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]
Date:	Wed, 22 Aug 2007 16:24:11 +0200
From:	Segher Boessenkool <segher@...nel.crashing.org>
To:	Chris Snook <csnook@...hat.com>
Cc:	Hirokazu Takata <takata@...ux-m32r.org>,
	Linus Torvalds <torvalds@...ux-foundation.org>,
	"Robert P. J. Day" <rpjday@...dspring.com>,
	paulmck@...ux.vnet.ibm.com, linux-kernel@...r.kernel.org,
	"Luck, Tony" <tony.luck@...el.com>, akpm@...ux-foundation.org,
	linux-arch@...r.kernel.org, Chris Friesen <cfriesen@...tel.com>
Subject: Re: [PATCH 11/23] make atomic_read() and atomic_set() behavior consistent on m32r

>> I also tried to rewrite it with inline asm code, but the kernel text 
>> size
>> bacame roughly 2kB larger. So, I prefer C version.

Could you send me the source code diff between the two versions
you tested?  2kB difference is way too much, the asm version should
be smaller if anything.

> You're not the only arch maintainer who prefers doing it in C.  If you 
> trust your compiler (a big "if", apparently), inline asm only improves 
> code generation if you have a whole bunch of general purpose registers 
> for the optimizer to play with.

No.  The only real difference between the *(volatile *)& version
and the volatile asm() version is that the volatile asm() version
has defined semantics.  There will be some code generation differences
too, but they should be in the noise, unless GCC generates really
bad code for either case.  We know it sometimes does that for the
*(volatile *)& thing; if the asm() version does something bad, I'd
like to know about that too.


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