lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <6e8c2b4453be89dba35e0595c9cfcf0a@kernel.crashing.org>
Date:	Sun, 29 Jun 2008 00:28:14 +0200
From:	Segher Boessenkool <segher@...nel.crashing.org>
To:	monstr@...nam.cz
Cc:	hpa@...or.com, John.Linn@...inx.com, arnd@...db.de,
	drepper@...hat.com, matthew@....cx, john.williams@...alogix.com,
	linux-kernel@...r.kernel.org, alan@...rguk.ukuu.org.uk,
	linuxppc-dev@...abs.org, Michal Simek <monstr@...str.eu>,
	vapier.adi@...il.com, microblaze-uclinux@...e.uq.edu.au,
	linux-arch@...r.kernel.org, will.newton@...il.com
Subject: Re: [PATCH 19/60] microblaze_v4: checksum support

> +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-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ