]> rtime.felk.cvut.cz Git - lisovros/qemu_apohw.git/commit
target-mips: Fix accumulator selection for MIPS16 and microMIPS
authorRichard Sandiford <rdsandiford@googlemail.com>
Mon, 21 Jan 2013 20:43:31 +0000 (20:43 +0000)
committerMichael Roth <mdroth@linux.vnet.ibm.com>
Tue, 9 Apr 2013 14:59:17 +0000 (09:59 -0500)
commit6d0b135a981f052d50a5f151b4c0dde61e4db001
tree09f59efa638095cae13abbda78560044012e93d8
parentd89f9ba43b5999ee7873523ea2708aff92ebf858
target-mips: Fix accumulator selection for MIPS16 and microMIPS

Add accumulator arguments to gen_HILO and gen_muldiv, rather than
extracting the accumulator directly from ctx->opcode.  The extraction
was only right for the standard encoding: MIPS16 doesn't have access
to the DSP registers, while microMIPS encodes the accumulator register
in a different field (bits 14 and 15).

Passing the accumulator register is probably an over-generalisation
for division and 64-bit multiplication, which never access anything
other than HI and LO, and which always pass 0 as the new argument.
Separating them felt a bit fussy though.

Signed-off-by: Richard Sandiford <rdsandiford@googlemail.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
(cherry picked from commit 26135ead80fa1fd13e95c162dacfd06f2ba82981)

Conflicts:
target-mips/translate.c

Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
target-mips/helper.h
target-mips/op_helper.c
target-mips/translate.c