From fc4418e4a52d142d9e3b5ea449a3f425ddb90ad9 Mon Sep 17 00:00:00 2001 From: Andrew Turner Date: Mon, 16 Mar 2015 13:40:45 +0000 Subject: [PATCH] Update the types used for fpcr and fpsr. The special registers need to be accessed using a 64-bit general purpose register, even if the special register is 32-bits. Clang 3.6 adds a check to make sure the type and general purpose register sizes line up. To fix this we need to use the correct sized type to get the correct register size. --- sys/arm64/arm64/vfp.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sys/arm64/arm64/vfp.c b/sys/arm64/arm64/vfp.c index f12ca1a3a5df..d1c16038689e 100644 --- a/sys/arm64/arm64/vfp.c +++ b/sys/arm64/arm64/vfp.c @@ -83,7 +83,8 @@ void vfp_save_state(struct thread *td) { __int128_t *vfp_state; - uint32_t cpacr, fpcr, fpsr; + uint64_t fpcr, fpsr; + uint32_t cpacr; /* * Only store the registers if the VFP is enabled, @@ -125,7 +126,7 @@ void vfp_restore_state(void) { __int128_t *vfp_state; - uint32_t fpcr, fpsr; + uint64_t fpcr, fpsr; struct pcb *curpcb; u_int cpu; -- 2.39.5