[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <33C7EF5D-096B-4578-A0D8-E4B94D516F9A@zytor.com>
Date: Fri, 06 May 2016 13:25:07 -0700
From: "H. Peter Anvin" <hpa@...or.com>
To: Sasha Levin <sasha.levin@...cle.com>, John Denker <jsd@...n.com>,
tytso@....edu, noloader@...il.com, linux-kernel@...r.kernel.org,
Stephan Mueller <smueller@...onox.de>,
Herbert Xu <herbert@...dor.apana.org.au>, andi@...stfloor.org,
Sandy Harris <sandyinchina@...il.com>,
cryptography@...edaemon.net, linux-crypto@...r.kernel.org
CC: Linus Torvalds <torvalds@...ux-foundation.org>
Subject: Re: linux/bitops.h
On May 6, 2016 1:07:13 PM PDT, Sasha Levin <sasha.levin@...cle.com> wrote:
>On 05/04/2016 08:30 PM, H. Peter Anvin wrote:
>> On 05/04/16 15:06, John Denker wrote:
>>> On 05/04/2016 02:56 PM, H. Peter Anvin wrote:
>>>>> Beware that shifting by an amount >= the number of bits in the
>>>>> word remains Undefined Behavior.
>>>
>>>> This construct has been supported as a rotate since at least gcc2.
>>>
>>> How then should we understand the story told in commit d7e35dfa?
>>> Is the story wrong?
>>>
>>> At the very least, something inconsistent is going on. There
>>> are 8 functions. Why did d7e35dfa change one of them but
>>> not the other 7?
>>
>> Yes. d7e35dfa is baloney IMNSHO. All it does is produce worse code,
>and the description even says so.
>
>No, the description says that it produces worse code for *really
>really* ancient
>GCC versions.
>
>> As I said, gcc has treated the former code as idiomatic since gcc 2,
>so that support is beyond ancient.
>
>Because something works in a specific way on one compiler isn't a
>reason to
>ignore this noncompliance with the standard.
>
>
>Thanks,
>Sasha
4.6.2 is not "really, really ancient."
--
Sent from my Android device with K-9 Mail. Please excuse brevity and formatting.
Powered by blists - more mailing lists