Re: [PATCH] arm64: lse: fix LSE atomics with LLVM's integrated assembler

2019-10-09 Thread Robin Murphy
On 2019-10-08 10:03 pm, Ard Biesheuvel wrote: On Tue, 8 Oct 2019 at 18:19, Robin Murphy wrote: On 08/10/2019 16:22, Sami Tolvanen wrote: On Mon, Oct 7, 2019 at 2:46 PM 'Nick Desaulniers' via Clang Built Linux wrote: I'm worried that one of these might lower to LSE atomics without ALTERNATIV

Re: [PATCH] arm64: lse: fix LSE atomics with LLVM's integrated assembler

2019-10-08 Thread Ard Biesheuvel
On Tue, 8 Oct 2019 at 18:19, Robin Murphy wrote: > > On 08/10/2019 16:22, Sami Tolvanen wrote: > > On Mon, Oct 7, 2019 at 2:46 PM 'Nick Desaulniers' via Clang Built > > Linux wrote: > >> I'm worried that one of these might lower to LSE atomics without > >> ALTERNATIVE guards by blanketing all C c

Re: [PATCH] arm64: lse: fix LSE atomics with LLVM's integrated assembler

2019-10-08 Thread Robin Murphy
On 08/10/2019 16:22, Sami Tolvanen wrote: On Mon, Oct 7, 2019 at 2:46 PM 'Nick Desaulniers' via Clang Built Linux wrote: I'm worried that one of these might lower to LSE atomics without ALTERNATIVE guards by blanketing all C code with `-march=armv8-a+lse`. True, that's a valid concern. I thin

Re: [PATCH] arm64: lse: fix LSE atomics with LLVM's integrated assembler

2019-10-08 Thread Sami Tolvanen
On Mon, Oct 7, 2019 at 2:46 PM 'Nick Desaulniers' via Clang Built Linux wrote: > I'm worried that one of these might lower to LSE atomics without > ALTERNATIVE guards by blanketing all C code with `-march=armv8-a+lse`. True, that's a valid concern. I think adding the directive to each assembly bl

Re: [PATCH] arm64: lse: fix LSE atomics with LLVM's integrated assembler

2019-10-08 Thread Andrew Murray
On Mon, Oct 07, 2019 at 01:28:19PM -0700, Nick Desaulniers wrote: > On Mon, Oct 7, 2019 at 1:14 PM 'Sami Tolvanen' via Clang Built Linux > wrote: > > > > Unlike gcc, clang considers each inline assembly block to be independent > > and therefore, when using the integrated assembler for inline assem

Re: [PATCH] arm64: lse: fix LSE atomics with LLVM's integrated assembler

2019-10-07 Thread Nick Desaulniers
On Mon, Oct 7, 2019 at 2:24 PM Sami Tolvanen wrote: > > On Mon, Oct 7, 2019 at 1:28 PM 'Nick Desaulniers' via Clang Built > Linux wrote: > > I tried adding `.arch armv8-a+lse` directives to all of the inline asm: > > https://github.com/ClangBuiltLinux/linux/issues/573#issuecomment-535098996 > > Y

Re: [PATCH] arm64: lse: fix LSE atomics with LLVM's integrated assembler

2019-10-07 Thread Sami Tolvanen
On Mon, Oct 7, 2019 at 1:28 PM 'Nick Desaulniers' via Clang Built Linux wrote: > I tried adding `.arch armv8-a+lse` directives to all of the inline asm: > https://github.com/ClangBuiltLinux/linux/issues/573#issuecomment-535098996 Yes, I had a similar patch earlier. I feel like using a command lin

Re: [PATCH] arm64: lse: fix LSE atomics with LLVM's integrated assembler

2019-10-07 Thread Nick Desaulniers
On Mon, Oct 7, 2019 at 1:14 PM 'Sami Tolvanen' via Clang Built Linux wrote: > > Unlike gcc, clang considers each inline assembly block to be independent > and therefore, when using the integrated assembler for inline assembly, > any preambles that enable features must be repeated in each block. >