aboutsummaryrefslogtreecommitdiff
path: root/target-mips/op_mem.c
diff options
context:
space:
mode:
Diffstat (limited to 'target-mips/op_mem.c')
-rw-r--r--target-mips/op_mem.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/target-mips/op_mem.c b/target-mips/op_mem.c
index d402d616b1..42f5e2ba3f 100644
--- a/target-mips/op_mem.c
+++ b/target-mips/op_mem.c
@@ -89,7 +89,7 @@ void glue(op_lwl, MEMSUFFIX) (void)
target_ulong tmp;
tmp = glue(ldub, MEMSUFFIX)(T0);
- T1 = (int32_t)((T1 & 0x00FFFFFF) | (tmp << 24));
+ T1 = (T1 & 0x00FFFFFF) | (tmp << 24);
if (GET_LMASK(T0) <= 2) {
tmp = glue(ldub, MEMSUFFIX)(GET_OFFSET(T0, 1));
@@ -105,6 +105,7 @@ void glue(op_lwl, MEMSUFFIX) (void)
tmp = glue(ldub, MEMSUFFIX)(GET_OFFSET(T0, 3));
T1 = (T1 & 0xFFFFFF00) | tmp;
}
+ T1 = (int32_t)T1;
RETURN();
}
@@ -129,6 +130,7 @@ void glue(op_lwr, MEMSUFFIX) (void)
tmp = glue(ldub, MEMSUFFIX)(GET_OFFSET(T0, -3));
T1 = (T1 & 0x00FFFFFF) | (tmp << 24);
}
+ T1 = (int32_t)T1;
RETURN();
}