qemu-e2k/target-mips
Nathan Froyd f1cb0951c5 MIPS: Correct FCR0 initialization
This change addresses a problem where QEMU incorrectly traps on
floating-point MADD group instructions with SIGILL, at least while
emulating MIPS32r2 processors.  These instructions use the COP1X major
opcode and include ones like:

	madd.d	$f2,$f4,$f2,$f6

 Here's Nathan's original analysis of the problem:

"QEMU essentially does:

  d = find_cpu (cpu_string)	// get CPU definition
  fpu_init (env, d)		// initialize fpu state (init FCR0, basically)
  cpu_reset (env)

...and the cpu_reset call clears all interesting state that fpu_init
setup, then proceeds to reinitialize all the CP0 registers...but not
FCR0."

 I have verified this change with system emulation running the GDB test
suite for the mips-sde-elf target (o32, big endian, 24Kf CPU emulated),
there were 55 progressions and no regressions.

Signed-off-by: Maciej W. Rozycki <macro@codesourcery.com>
Reviewed-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2012-08-09 18:36:19 +00:00
..
cpu-qom.h target-mips: QOM'ify CPU 2012-04-30 11:32:13 +02:00
cpu.c target-mips: Start QOM'ifying CPU init 2012-04-30 11:32:13 +02:00
cpu.h Kill off cpu_state_reset() 2012-06-04 23:00:45 +02:00
helper.c target-mips: Use cpu_reset() in do_interrupt() 2012-06-04 23:00:43 +02:00
helper.h target-mips: Add compiler attribute to some functions which don't return 2012-03-24 13:02:43 +00:00
machine.c
Makefile.objs build: move other target-*/ objects to nested Makefile.objs 2012-06-07 09:21:11 +02:00
mips-defs.h
op_helper.c target-mips: Remove unused inline function 2012-05-03 07:04:48 +02:00
TODO Replace Qemu by QEMU in internal documentation 2012-04-07 13:58:25 +00:00
translate_init.c
translate.c MIPS: Correct FCR0 initialization 2012-08-09 18:36:19 +00:00