xemu/target-mips
Richard Sandiford c728154bbb target-mips: Sign-extend the result of LWR
Sign-extend the result of LWR, as is already done for LWL.  This is necessary
in the case where LWR loads the full word (i.e. the address is actually
aligned).  In the other cases, it is implementation defined whether the
upper 32 bits of the result are unchanged or a copy of bit 31.  The latter
seems easier to implement.

Previously the code used:

    (oldval & (0xfffffffe << (31 - bitshift))) | (newval >> bitshift)

which zeroed the upper bits of the register, losing any previous sign
extension in the unaligned cases.

Signed-off-by: Richard Sandiford <rdsandiford@googlemail.com>
Reviewed-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2013-01-31 23:40:52 +01:00
..
cpu-qom.h qom: move include files to include/qom/ 2012-12-19 08:31:32 +01:00
cpu.c cpu: Move cpu_index field to CPUState 2013-01-15 04:09:13 +01:00
cpu.h target-mips: Allow DSP access to be disabled once enabled. 2013-01-08 11:49:01 +01:00
dsp_helper.c target-mips: implement DSP (d)append sub-class with TCG 2013-01-31 23:30:19 +01:00
helper.c target-mips: Add ASE DSP resources access check 2012-10-31 20:24:06 +01:00
helper.h target-mips: implement DSP (d)append sub-class with TCG 2013-01-31 23:30:19 +01:00
lmi_helper.c target-mips: Implement Loongson Multimedia Instructions 2012-09-19 21:40:48 +02:00
machine.c target-mips: Don't overuse CPUState 2012-03-14 22:20:25 +01:00
Makefile.objs target-mips: Add ASE DSP internal functions 2012-10-31 20:24:05 +01:00
mips-defs.h MIPS: Initial support of fulong mini pc (CPU definition) 2010-06-29 23:07:52 +02:00
op_helper.c exec: Return CPUState from qemu_get_cpu() 2013-01-15 04:09:14 +01:00
TODO target-mips: Change TODO file 2012-10-31 21:37:24 +01:00
translate_init.c target-mips: Add ASE DSP processors 2012-10-31 21:37:20 +01:00
translate.c target-mips: Sign-extend the result of LWR 2013-01-31 23:40:52 +01:00