[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Wed, 4 Apr 2018 23:11:36 +0200
From: Arnd Bergmann <arnd@...db.de>
To: Matthias Kaehlcke <mka@...omium.org>
Cc: Peter Zijlstra <peterz@...radead.org>,
Ingo Molnar <mingo@...nel.org>,
Linus Torvalds <torvalds@...ux-foundation.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Thomas Gleixner <tglx@...utronix.de>,
Andrew Morton <akpm@...ux-foundation.org>,
James Y Knight <jyknight@...gle.com>,
Chandler Carruth <chandlerc@...gle.com>,
Stephen Hines <srhines@...gle.com>,
Nick Desaulniers <ndesaulniers@...gle.com>,
Kees Cook <keescook@...gle.com>,
Guenter Roeck <groeck@...omium.org>,
Greg Hackmann <ghackmann@...gle.com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Subject: Re: [GIT PULL] x86/build changes for v4.17
On Wed, Apr 4, 2018 at 10:58 PM, Matthias Kaehlcke <mka@...omium.org> wrote:
> El Wed, Apr 04, 2018 at 10:33:19PM +0200 Arnd Bergmann ha dit:
>>
>> In most cases, this is used to implement a fast-path for a helper
>> function, so not doing it the same way as gcc just results in
>> slower execution, but I assume we also have code that behaves
>> differently on clang compared to gcc because of this.
>
> I think I didn't come (knowingly) across that one yet. Could you point
> me to an instance that could be used as an example in a bug report?
This code
#include <linux/math64.h>
int f(u64 u)
{
return div_u64(u, 100000);
}
results in a call to __do_div64() on 32-bit arm using clang, but
gets optimized into a set of multiply+shift on gcc.
The same thing should happen on x86, but haven't tried it
because of the 'asm goto' build failure in linux-next with clang.
Arnd
Powered by blists - more mailing lists