mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 00:03:54 -06:00
Fix MIPS64 address computation specialcase, by Aurelien Jarno.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2793 c046a42c-6fe2-441c-8c8c-71466251a162
This commit is contained in:
parent
204a1b8d5e
commit
a6763a5881
2 changed files with 18 additions and 2 deletions
|
@ -289,6 +289,22 @@ void op_store_LO (void)
|
|||
#undef MEMSUFFIX
|
||||
#endif
|
||||
|
||||
/* Addresses computation */
|
||||
void op_addr_add (void)
|
||||
{
|
||||
/* For compatibility with 32-bit code, data reference in user mode
|
||||
with Status_UX = 0 should be casted to 32-bit and sign extended.
|
||||
See the MIPS64 PRA manual, section 4.10. */
|
||||
#ifdef TARGET_MIPS64
|
||||
if ((env->CP0_Status & (1 << CP0St_UM)) &&
|
||||
!(env->CP0_Status & (1 << CP0St_UX)))
|
||||
T0 = (int64_t)(int32_t)(T0 + T1);
|
||||
else
|
||||
#endif
|
||||
T0 += T1;
|
||||
RETURN();
|
||||
}
|
||||
|
||||
/* Arithmetic */
|
||||
void op_add (void)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue