Closed
Description
Bugzilla Link | 43448 |
Version | trunk |
OS | Linux |
Blocks | #4440 |
CC | @DougGregor,@echristo,@erichkeane,@fhahn,@kbeyls,@zygoloid,@stephenhines |
Extended Description
When looking into an ISA-extension-assembler-directive related issue in assembling the Linux kernel w/ Clang (ClangBuiltLinux/linux#671, ClangBuiltLinux/linux#573), I ran into some issue with the ARMv8.1 lse extensions.
It seems that we can either:
- use an assembler
.arch armv8-a+lse
directive - use a command line arg
-march=armv8-a+lse
- use a function level attribute
Unfortunately, 3 gets a little complicated in terms of our "compatibility w/ GCC" which is a constraint for compiling the Linux kernel w/ Clang.
__attribute__((target("arch=armv8-a+lse")))
void foo (void){}
produces a warning in Clang, but is accepted by GCC.
__attribute__((target("lse")))
void foo (void){}
produces an error in GCC, but is accepted by Clang.
I find the current behavior in Clang for 3 inconsistent with 1+2.