[prev in list] [next in list] [prev in thread] [next in thread]
List: linux-arch
Subject: =?us-ascii?Q?Re=3A=20=5BPATCH=2019=2F60=5D=20microblaze=5Fv4=3A=20checksum=20support?=
From: <Monstr () seznam ! cz>
Date: 2008-06-30 7:18:10
Message-ID: 4117.6640-711-1819091302-1214810290 () seznam ! cz
[Download RAW message or body]
Hi Segher,
you find bug because there is microblaze asm code in generic folder.
Big thanks. I'll fix it and I'll look at parameters too.
Michal
> +static inline unsigned int
> +csum_tcpudp_nofold(unsigned long saddr, unsigned long daddr, unsigned
> short len,
> + unsigned short proto, unsigned int sum)
> +{
> + __asm__("add %0, %4, %1\n\t"
> + "addc %0, %4, %2\n\t"
> + "addc %0, %4, %3\n\t"
> + "addc %0, %4, r0\n\t"
> + : "=d" (sum)
> + : "d" (saddr), "d" (daddr), "d" (len + proto),
> + "0"(sum));
"sum" should use an earlyclobber, i.e. "=&d"(sum) , since some
inputs are used after %0 is first written to.
Also, you can use "+" instead of "=" to say the argument is both
input and output, and get rid of %4, if you like.
Segher
--
To unsubscribe from this list: send the line "unsubscribe linux-arch" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic