[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAMuHMdXZ4fGjjXguftvrB69rt7dR6ngFA46YB8oGpk2_issJzA@mail.gmail.com>
Date: Mon, 28 Aug 2023 09:33:25 +0200
From: Geert Uytterhoeven <geert@...ux-m68k.org>
To: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: Nick Desaulniers <ndesaulniers@...gle.com>,
Bill Wendling <morbo@...gle.com>, Helge Deller <deller@....de>,
Nathan Chancellor <nathan@...nel.org>,
linux-kernel@...r.kernel.org, linux-parisc@...r.kernel.org,
Andrew Morton <akpm@...ux-foundation.org>,
Chanho Min <chanho.min@....com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Kees Cook <keescook@...omium.org>,
clang-built-linux <llvm@...ts.linux.dev>,
"maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT)" <x86@...nel.org>
Subject: Re: [PATCH] lib/clz_ctz.c: Fix __clzdi2() and __ctzdi2() for 32-bit kernels
Hi Linus,
On Sat, Aug 26, 2023 at 3:08 AM Linus Torvalds
<torvalds@...ux-foundation.org> wrote:
> On Fri, 25 Aug 2023 at 17:52, Nick Desaulniers <ndesaulniers@...gle.com> wrote:
> And quite often we simply use other names - but then we also do *not*
> build with -freestanding, because -freestanding has at least
> traditionally meant that the compiler won't optimize the simple and
> obvious cases (typically things like "memcpy with a constant size").
Several architectures (incl. x86, but excl. amd64) do build the kernel with
-freestanding.
IIRC, the issue was that without that, gcc was "optimizing" calls
to standard functions (implemented as inline optimized assembler
functions) by replacing them with calls to other standard functions
(also implemented as inline optimized assembler functions). As the
latter became external calls, this defeated the optimized assembler
implementation, and could even cause build failures if no external
implementation was available.
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@...ux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
Powered by blists - more mailing lists