[llvm] [AArch64] Disable FP loads/stores when fp-armv8 not enabled (PR #77817)

Daniel Thornburgh via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 16 14:14:13 PST 2024


mysterymath wrote:

We've observed a breakage in Fuchsia due to this commit: https://luci-milo.appspot.com/ui/p/fuchsia/builders/ci/clang_toolchain.ci.core.arm64-debug/b8758715042351668065/overview

That module broke due to (amonst others) the inline asm `mrs x9, fpcr`. We compile that module with the flag `-mgeneral-regs-only`. That flag disables the target feature `fp-armv8` in LLVM, but that isn't correct WRT it's GCC semantics, since it's explicitly documented not to affect the assembler (https://gcc.gnu.org/onlinedocs/gcc-7.5.0/gcc/AArch64-Options.html#AArch64-Options).

I'd agree that these instructions should be disabled on systems that actually are configured to lack a FPU, but it would be prudent to roll this back and alter the semantics of `-mgeneral-regs-only` to no longer be affected before relanding.

https://github.com/llvm/llvm-project/pull/77817


More information about the llvm-commits mailing list