summaryrefslogtreecommitdiff
path: root/arch/powerpc/math-emu/math.c
diff options
context:
space:
mode:
authorPaul Mackerras <paulus@samba.org>2007-10-17 22:30:43 +1000
committerPaul Mackerras <paulus@samba.org>2007-10-17 22:30:43 +1000
commit5cae826e9e54a31f06b4c11b73f4af29e2ea4932 (patch)
tree65caaaf6a40c4beb76181c5c00578e4a11c35c27 /arch/powerpc/math-emu/math.c
parentf6b80769109d5b2d9291dd788f4c250cc8b7a55b (diff)
parent01db9953a70e8ad33fbcf91d629f8a8ee59b3484 (diff)
downloadlinux-5cae826e9e54a31f06b4c11b73f4af29e2ea4932.tar.gz
linux-5cae826e9e54a31f06b4c11b73f4af29e2ea4932.tar.xz
Merge branch 'fixes-2.6.24' of master.kernel.org:/pub/scm/linux/kernel/git/galak/powerpc into merge
Diffstat (limited to 'arch/powerpc/math-emu/math.c')
-rw-r--r--arch/powerpc/math-emu/math.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/arch/powerpc/math-emu/math.c b/arch/powerpc/math-emu/math.c
index 69058b2873de..381306bb1590 100644
--- a/arch/powerpc/math-emu/math.c
+++ b/arch/powerpc/math-emu/math.c
@@ -407,11 +407,16 @@ do_mathemu(struct pt_regs *regs)
case XE:
idx = (insn >> 16) & 0x1f;
- if (!idx)
- goto illegal;
-
op0 = (void *)&current->thread.fpr[(insn >> 21) & 0x1f];
- op1 = (void *)(regs->gpr[idx] + regs->gpr[(insn >> 11) & 0x1f]);
+ if (!idx) {
+ if (((insn >> 1) & 0x3ff) == STFIWX)
+ op1 = (void *)(regs->gpr[(insn >> 11) & 0x1f]);
+ else
+ goto illegal;
+ } else {
+ op1 = (void *)(regs->gpr[idx] + regs->gpr[(insn >> 11) & 0x1f]);
+ }
+
break;
case XEU: