xemu/target-sparc
Mark Cave-Ayland 4553e10360 target-sparc: fix ldstub sign-extension bug
ldstub [addr], reg incorrectly reads a signed byte from memory which causes
problems in the 32-bit Solaris mutex code. Here the byte value being read is
0xff which is incorrectly sign-extended to 0xffffffff before being written back
to the target register causing lock detection to behave incorrectly.

This fixes the intermittent hangs and MUTEX_HELD warnings issued to the
console when running 32-bit Solaris images under qemu-system-sparc.

With thanks to Joseph Dery for providing a condensed test image to consistently
reproduce the problem on demand, and Martin Husemann for allowing me access to
real hardware for comparison.

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Reviewed-By: Artyom Tarasenko <atar4qemu@gmail.com>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
2016-04-11 16:25:07 +01:00
..
cc_helper.c sparc: Clean up includes 2016-01-29 15:07:22 +00:00
cpu-qom.h target-sparc: Convert to VMStateDescription 2016-01-16 12:01:23 +00:00
cpu.c include/qemu/osdep.h: Don't include qapi/error.h 2016-03-22 22:20:15 +01:00
cpu.h all: Clean up includes 2016-02-23 12:43:05 +00:00
fop_helper.c sparc: Clean up includes 2016-01-29 15:07:22 +00:00
gdbstub.c sparc: Clean up includes 2016-01-29 15:07:22 +00:00
helper.c sparc: Clean up includes 2016-01-29 15:07:22 +00:00
helper.h target-sparc: implement NPT timer bit 2016-01-07 12:21:06 +00:00
int32_helper.c log: do not unnecessarily include qom/cpu.h 2016-02-03 09:19:10 +00:00
int64_helper.c log: do not unnecessarily include qom/cpu.h 2016-02-03 09:19:10 +00:00
ldst_helper.c sparc: Clean up includes 2016-01-29 15:07:22 +00:00
machine.c sparc: Clean up includes 2016-01-29 15:07:22 +00:00
Makefile.objs monitor: remove target-specific code from monitor.c 2015-09-16 17:33:32 +02:00
mmu_helper.c sparc: Clean up includes 2016-01-29 15:07:22 +00:00
monitor.c sparc: Clean up includes 2016-01-29 15:07:22 +00:00
TODO
translate.c target-sparc: fix ldstub sign-extension bug 2016-04-11 16:25:07 +01:00
vis_helper.c sparc: Clean up includes 2016-01-29 15:07:22 +00:00
win_helper.c sparc: Clean up includes 2016-01-29 15:07:22 +00:00