summaryrefslogtreecommitdiffstats
path: root/target-mips/op_mem.c
diff options
context:
space:
mode:
authorbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>2005-12-05 19:59:36 +0000
committerbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>2005-12-05 19:59:36 +0000
commit4ad40f366f20f6991b640d7af63c9fc3a59246fa (patch)
treec895253e1b6f236ff8d874b7ac7fddf98e486795 /target-mips/op_mem.c
parent6810e154907c4ed3883f3f9fc03507fe45a679ea (diff)
downloadhqemu-4ad40f366f20f6991b640d7af63c9fc3a59246fa.zip
hqemu-4ad40f366f20f6991b640d7af63c9fc3a59246fa.tar.gz
MIPS fixes (Daniel Jacobowitz)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1690 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'target-mips/op_mem.c')
-rw-r--r--target-mips/op_mem.c17
1 files changed, 12 insertions, 5 deletions
diff --git a/target-mips/op_mem.c b/target-mips/op_mem.c
index bbb322d..7fcfc24 100644
--- a/target-mips/op_mem.c
+++ b/target-mips/op_mem.c
@@ -67,28 +67,35 @@ void glue(op_sw, MEMSUFFIX) (void)
RETURN();
}
-/* "half" load and stores */
+/* "half" load and stores. We must do the memory access inline,
+ or fault handling won't work. */
void glue(op_lwl, MEMSUFFIX) (void)
{
- CALL_FROM_TB0(glue(do_lwl, MEMSUFFIX));
+ uint32_t tmp = glue(ldl, MEMSUFFIX)(T0 & ~3);
+ CALL_FROM_TB1(glue(do_lwl, MEMSUFFIX), tmp);
RETURN();
}
void glue(op_lwr, MEMSUFFIX) (void)
{
- CALL_FROM_TB0(glue(do_lwr, MEMSUFFIX));
+ uint32_t tmp = glue(ldl, MEMSUFFIX)(T0 & ~3);
+ CALL_FROM_TB1(glue(do_lwr, MEMSUFFIX), tmp);
RETURN();
}
void glue(op_swl, MEMSUFFIX) (void)
{
- CALL_FROM_TB0(glue(do_swl, MEMSUFFIX));
+ uint32_t tmp = glue(ldl, MEMSUFFIX)(T0 & ~3);
+ tmp = CALL_FROM_TB1(glue(do_swl, MEMSUFFIX), tmp);
+ glue(stl, MEMSUFFIX)(T0 & ~3, tmp);
RETURN();
}
void glue(op_swr, MEMSUFFIX) (void)
{
- CALL_FROM_TB0(glue(do_swr, MEMSUFFIX));
+ uint32_t tmp = glue(ldl, MEMSUFFIX)(T0 & ~3);
+ tmp = CALL_FROM_TB1(glue(do_swr, MEMSUFFIX), tmp);
+ glue(stl, MEMSUFFIX)(T0 & ~3, tmp);
RETURN();
}
OpenPOWER on IntegriCloud