Index: head/sys/powerpc/include/pcb.h =================================================================== --- head/sys/powerpc/include/pcb.h +++ head/sys/powerpc/include/pcb.h @@ -37,6 +37,8 @@ #ifndef _MACHINE_PCB_H_ #define _MACHINE_PCB_H_ +#include + #include #ifndef _STANDALONE @@ -62,8 +64,16 @@ #define PCB_CFSCR 0x40 /* Process had FSCR updated */ struct fpu { union { +#if _BYTE_ORDER == _BIG_ENDIAN double fpr; uint32_t vsr[4]; +#else + uint32_t vsr[4]; + struct { + double padding; + double fpr; + }; +#endif } fpr[32]; double fpscr; /* FPSCR stored as double for easier access */ } pcb_fpu; /* Floating point processor */ Index: head/sys/powerpc/powerpc/fpu.c =================================================================== --- head/sys/powerpc/powerpc/fpu.c +++ head/sys/powerpc/powerpc/fpu.c @@ -79,7 +79,7 @@ #undef SFP } else { #define SFP(n) __asm ("stfd " #n ", 0(%0)" \ - :: "b"(&pcb->pcb_fpu.fpr[n])); + :: "b"(&pcb->pcb_fpu.fpr[n].fpr)); SFP(0); SFP(1); SFP(2); SFP(3); SFP(4); SFP(5); SFP(6); SFP(7); SFP(8); SFP(9); SFP(10); SFP(11); @@ -164,7 +164,7 @@ #undef LFP } else { #define LFP(n) __asm ("lfd " #n ", 0(%0)" \ - :: "b"(&pcb->pcb_fpu.fpr[n])); + :: "b"(&pcb->pcb_fpu.fpr[n].fpr)); LFP(0); LFP(1); LFP(2); LFP(3); LFP(4); LFP(5); LFP(6); LFP(7); LFP(8); LFP(9); LFP(10); LFP(11);