Commit a87265cf authored by Maciej W. Rozycki's avatar Maciej W. Rozycki Committed by Ralf Baechle

MIPS: math-emu: dsemul: Fix ill formatting of microMIPS part

Correct formatting breakage introduced with commit 102cedc3 ("MIPS:
microMIPS: Floating point support."), so that further changes to this
code can be consistent.
Signed-off-by: default avatarMaciej W. Rozycki <macro@imgtec.com>
Cc: Aurelien Jarno <aurelien@aurel32.net>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/12173/Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
parent e4553573
...@@ -75,10 +75,14 @@ int mips_dsemul(struct pt_regs *regs, mips_instruction ir, unsigned long cpc) ...@@ -75,10 +75,14 @@ int mips_dsemul(struct pt_regs *regs, mips_instruction ir, unsigned long cpc)
return SIGBUS; return SIGBUS;
if (get_isa16_mode(regs->cp0_epc)) { if (get_isa16_mode(regs->cp0_epc)) {
err = __put_user(ir >> 16, (u16 __user *)(&fr->emul)); err = __put_user(ir >> 16,
err |= __put_user(ir & 0xffff, (u16 __user *)((long)(&fr->emul) + 2)); (u16 __user *)(&fr->emul));
err |= __put_user(BREAK_MATH >> 16, (u16 __user *)(&fr->badinst)); err |= __put_user(ir & 0xffff,
err |= __put_user(BREAK_MATH & 0xffff, (u16 __user *)((long)(&fr->badinst) + 2)); (u16 __user *)((long)(&fr->emul) + 2));
err |= __put_user(BREAK_MATH >> 16,
(u16 __user *)(&fr->badinst));
err |= __put_user(BREAK_MATH & 0xffff,
(u16 __user *)((long)(&fr->badinst) + 2));
} else { } else {
err = __put_user(ir, &fr->emul); err = __put_user(ir, &fr->emul);
err |= __put_user((mips_instruction)BREAK_MATH, &fr->badinst); err |= __put_user((mips_instruction)BREAK_MATH, &fr->badinst);
...@@ -125,8 +129,10 @@ int do_dsemulret(struct pt_regs *xcp) ...@@ -125,8 +129,10 @@ int do_dsemulret(struct pt_regs *xcp)
* - Is the following memory word the BD_COOKIE? * - Is the following memory word the BD_COOKIE?
*/ */
if (get_isa16_mode(xcp->cp0_epc)) { if (get_isa16_mode(xcp->cp0_epc)) {
err = __get_user(instr[0], (u16 __user *)(&fr->badinst)); err = __get_user(instr[0],
err |= __get_user(instr[1], (u16 __user *)((long)(&fr->badinst) + 2)); (u16 __user *)(&fr->badinst));
err |= __get_user(instr[1],
(u16 __user *)((long)(&fr->badinst) + 2));
insn = (instr[0] << 16) | instr[1]; insn = (instr[0] << 16) | instr[1];
} else { } else {
err = __get_user(insn, &fr->badinst); err = __get_user(insn, &fr->badinst);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment