Page MenuHomeFreeBSD

D27431.id.diff
No OneTemporary

D27431.id.diff

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 <sys/endian.h>
+
#include <machine/setjmp.h>
#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);

File Metadata

Mime Type
text/plain
Expires
Sat, Apr 25, 7:11 AM (3 h, 3 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
32115846
Default Alt Text
D27431.id.diff (1 KB)

Event Timeline