[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH] xen: arm: make sure gcc doesn't use floating-point registers on arm64



By using -mgeneral-regs-only which is the Aarch64 equivalent to
-msoft-float.

Otherwise gcc will corrupt the d* registers, which we don't save/restore when
trapping to/from the hypervisor.

Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
---
Needless to say I consider this important for 4.4 backport...
---
 xen/arch/arm/Rules.mk |    1 +
 1 file changed, 1 insertion(+)

diff --git a/xen/arch/arm/Rules.mk b/xen/arch/arm/Rules.mk
index 76b35d9..b5bf5cb 100644
--- a/xen/arch/arm/Rules.mk
+++ b/xen/arch/arm/Rules.mk
@@ -28,6 +28,7 @@ endif
 
 ifeq ($(TARGET_SUBARCH),arm64)
 CFLAGS += -mcpu=generic
+CFLAGS += -mgeneral-regs-only # No fp registers etc
 arm32 := n
 arm64 := y
 endif
-- 
1.7.10.4


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.