Arthur Heymans has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/81658?usp=email )
Change subject: arch/arm64: Use -mno-implicit-float with clang ......................................................................
arch/arm64: Use -mno-implicit-float with clang
This fixes building inline assembly that uses SIMD registers. This is for instance the case in the vboot library.
Change-Id: I24fa9d9f81430ea3ecd40de4304a10c6e235fece Signed-off-by: Arthur Heymans arthur@aheymans.xyz --- M toolchain.mk 1 file changed, 10 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/58/81658/1
diff --git a/toolchain.mk b/toolchain.mk index f985e88..0292d60 100644 --- a/toolchain.mk +++ b/toolchain.mk @@ -60,7 +60,7 @@ ARCHDIR-ppc64 := ppc64
CFLAGS_arm += -CFLAGS_arm64 += -mgeneral-regs-only +CFLAGS_arm64 += CFLAGS_riscv += CFLAGS_x86_32 += CFLAGS_x86_64 += -mcmodel=large -mno-red-zone @@ -93,6 +93,15 @@ CFLAGS_ppc64 += -Wstack-usage=1536 endif
+# https://bugs.llvm.org/show_bug.cgi?id=30792 +# LLVM/clang runs into problems when encountering SIMD registers in assembly +# with -mgeneral-regs-only. -mno-implicit-float achieves the same though. +ifeq ($(CONFIG_COMPILER_GCC),y) +CFLAGS_arm64 += -mgeneral-regs-only +else +CFLAGS_arm64 += -mno-implicit-float +endif + toolchain_to_dir = \ $(foreach arch,$(ARCH_SUPPORTED),\ $(eval CPPFLAGS_$(arch) += \