]> xenbits.xensource.com Git - people/julieng/freebsd.git/commitdiff
Update the types used for fpcr and fpsr.
authorAndrew Turner <andrew@fubar.geek.nz>
Mon, 16 Mar 2015 13:40:45 +0000 (13:40 +0000)
committerAndrew Turner <andrew@fubar.geek.nz>
Tue, 17 Mar 2015 16:27:45 +0000 (16:27 +0000)
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

index f12ca1a3a5df7fafafa2c4d1fe78d4a865f15e0d..d1c16038689e08373a1181a815e778b1ff0ffb09 100644 (file)
@@ -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;