]> git.ipfire.org Git - thirdparty/qemu.git/commit
MIPS/user: Fix reset CPU state initialization
authorMaciej W. Rozycki <macro@codesourcery.com>
Fri, 8 Jun 2012 01:04:40 +0000 (02:04 +0100)
committerMichael Roth <mdroth@linux.vnet.ibm.com>
Tue, 9 Oct 2012 06:58:30 +0000 (01:58 -0500)
commit27aae39fa04c7fe714aabf18f65994538c65fb12
tree00c3fb9b310b5dc66b69024db93264382ab1505d
parent635cc81bf91135c12035f56ac5b6ce28cb19c5ab
MIPS/user: Fix reset CPU state initialization

 This change updates the CPU reset sequence to use a common piece of code
that figures out CPU state flags, fixing the problem with MIPS_HFLAG_COP1X
not being set where applicable that causes floating-point MADD family
instructions (and other instructions from the MIPS IV FP subset) to trap.

 As compute_hflags is now shared between op_helper.c and translate.c, the
function is now moved to a common header.  There are no changes to this
function.

 The problem was seen with the 24Kf MIPS32r2 processor in user emulation.
The new approach prevents system and user emulation from diverging -- all
the hflags state is initialized in one place now.

Signed-off-by: Maciej W. Rozycki <macro@codesourcery.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
(cherry picked from commit 03e6e5017757645f00b2f3b4f3a257973985e455)

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