aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorAnton Blanchard <anton@samba.org>2006-06-10 06:18:39 -0400
committerPaul Mackerras <paulus@samba.org>2006-06-15 05:31:25 -0400
commit3a2c48cfc97f9046abbd810f1efb1aa824bcfaf1 (patch)
treeafcd54f2ad36353abcf2282fdf15a05e77fcba4a /arch
parent30d8caf7c625203b295a78f143820cdc3124830b (diff)
[POWERPC] 64bit FPSCR support
Forthcoming machines will extend the FPSCR to 64 bits. We already had a 64-bit save area for the FPSCR, but we need to use a new form of the mtfsf instruction. Fortunately this new form is decoded as an ordinary mtfsf by existing 64-bit processors. Signed-off-by: Anton Blanchard <anton@samba.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch')
-rw-r--r--arch/powerpc/kernel/fpu.S6
-rw-r--r--arch/powerpc/kernel/vector.S4
2 files changed, 5 insertions, 5 deletions
diff --git a/arch/powerpc/kernel/fpu.S b/arch/powerpc/kernel/fpu.S
index 340730fb8c91..01f71200c603 100644
--- a/arch/powerpc/kernel/fpu.S
+++ b/arch/powerpc/kernel/fpu.S
@@ -72,7 +72,7 @@ _GLOBAL(load_up_fpu)
72 std r12,_MSR(r1) 72 std r12,_MSR(r1)
73#endif 73#endif
74 lfd fr0,THREAD_FPSCR(r5) 74 lfd fr0,THREAD_FPSCR(r5)
75 mtfsf 0xff,fr0 75 MTFSF_L(fr0)
76 REST_32FPRS(0, r5) 76 REST_32FPRS(0, r5)
77#ifndef CONFIG_SMP 77#ifndef CONFIG_SMP
78 subi r4,r5,THREAD 78 subi r4,r5,THREAD
@@ -127,7 +127,7 @@ _GLOBAL(giveup_fpu)
127 127
128_GLOBAL(cvt_fd) 128_GLOBAL(cvt_fd)
129 lfd 0,THREAD_FPSCR(r5) /* load up fpscr value */ 129 lfd 0,THREAD_FPSCR(r5) /* load up fpscr value */
130 mtfsf 0xff,0 130 MTFSF_L(0)
131 lfs 0,0(r3) 131 lfs 0,0(r3)
132 stfd 0,0(r4) 132 stfd 0,0(r4)
133 mffs 0 133 mffs 0
@@ -136,7 +136,7 @@ _GLOBAL(cvt_fd)
136 136
137_GLOBAL(cvt_df) 137_GLOBAL(cvt_df)
138 lfd 0,THREAD_FPSCR(r5) /* load up fpscr value */ 138 lfd 0,THREAD_FPSCR(r5) /* load up fpscr value */
139 mtfsf 0xff,0 139 MTFSF_L(0)
140 lfd 0,0(r3) 140 lfd 0,0(r3)
141 stfs 0,0(r4) 141 stfs 0,0(r4)
142 mffs 0 142 mffs 0
diff --git a/arch/powerpc/kernel/vector.S b/arch/powerpc/kernel/vector.S
index 66b3d03c5fa5..9416b4ab92ec 100644
--- a/arch/powerpc/kernel/vector.S
+++ b/arch/powerpc/kernel/vector.S
@@ -53,12 +53,12 @@ fpenable:
53 stfd fr31,8(r1) 53 stfd fr31,8(r1)
54 LDCONST(fr1, fpzero) 54 LDCONST(fr1, fpzero)
55 mffs fr31 55 mffs fr31
56 mtfsf 0xff,fr1 56 MTFSF_L(fr1)
57 blr 57 blr
58 58
59fpdisable: 59fpdisable:
60 mtlr r12 60 mtlr r12
61 mtfsf 0xff,fr31 61 MTFSF_L(fr31)
62 lfd fr31,8(r1) 62 lfd fr31,8(r1)
63 lfd fr1,16(r1) 63 lfd fr1,16(r1)
64 lfd fr0,24(r1) 64 lfd fr0,24(r1)