diff options
author | Paul Mackerras <paulus@samba.org> | 2008-12-16 14:38:58 +1100 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2008-12-16 14:38:58 +1100 |
commit | 1e1c568d6c66d1e2e345fd15e2a1ceafc5d7e33a (patch) | |
tree | 0cf88547108a750d6eb910564ef5bf0ffb5ceef3 /arch/sparc64/kernel/visemul.c | |
parent | 91cac623262c1c0cd298c5c648a8bd2b647c264d (diff) | |
parent | 23e0e8afafd9ac065d81506524adf3339584044b (diff) | |
download | linux-1e1c568d6c66d1e2e345fd15e2a1ceafc5d7e33a.tar.gz linux-1e1c568d6c66d1e2e345fd15e2a1ceafc5d7e33a.tar.bz2 linux-1e1c568d6c66d1e2e345fd15e2a1ceafc5d7e33a.zip |
Merge branch 'merge' into next
Diffstat (limited to 'arch/sparc64/kernel/visemul.c')
-rw-r--r-- | arch/sparc64/kernel/visemul.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/arch/sparc64/kernel/visemul.c b/arch/sparc64/kernel/visemul.c index 9e05cb5cb855..b956fd71c131 100644 --- a/arch/sparc64/kernel/visemul.c +++ b/arch/sparc64/kernel/visemul.c @@ -131,7 +131,7 @@ #define VIS_OPF_SHIFT 5 #define VIS_OPF_MASK (0x1ff << VIS_OPF_SHIFT) -#define RS1(INSN) (((INSN) >> 24) & 0x1f) +#define RS1(INSN) (((INSN) >> 14) & 0x1f) #define RS2(INSN) (((INSN) >> 0) & 0x1f) #define RD(INSN) (((INSN) >> 25) & 0x1f) @@ -445,7 +445,7 @@ static void pdist(struct pt_regs *regs, unsigned int insn) unsigned long i; rs1 = fpd_regval(f, RS1(insn)); - rs2 = fpd_regval(f, RS1(insn)); + rs2 = fpd_regval(f, RS2(insn)); rd = fpd_regaddr(f, RD(insn)); rd_val = *rd; @@ -807,6 +807,8 @@ int vis_emul(struct pt_regs *regs, unsigned int insn) if (get_user(insn, (u32 __user *) pc)) return -EFAULT; + save_and_clear_fpu(); + opf = (insn & VIS_OPF_MASK) >> VIS_OPF_SHIFT; switch (opf) { default: |