]> git.proxmox.com Git - mirror_qemu.git/commit - target-mips/cpu.h
MIPS/user: Fix reset CPU state initialization
authorMaciej W. Rozycki <macro@codesourcery.com>
Fri, 8 Jun 2012 01:04:40 +0000 (02:04 +0100)
committerAurelien Jarno <aurelien@aurel32.net>
Fri, 7 Sep 2012 23:37:23 +0000 (01:37 +0200)
commit03e6e5017757645f00b2f3b4f3a257973985e455
tree058d1b5d6b75836bc6b26d572b41a7b5d03ae278
parent449bc90e1f2e2fbafb64eb0c76d16c9352b0d2df
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>
target-mips/cpu.h
target-mips/op_helper.c
target-mips/translate.c