summaryrefslogtreecommitdiff
path: root/target-ppc/op_mem.h
diff options
context:
space:
mode:
authorbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>2004-01-18 22:49:57 +0000
committerbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>2004-01-18 22:49:57 +0000
commit985a19d6d1d7ab3705bf42698cc95abfbbfa24f8 (patch)
treedfeaf5bbfface7c1211937494a3a28045fe3a63e /target-ppc/op_mem.h
parent3f5dcc340c1e4fa8a49066e30cf980bafdb3ecf4 (diff)
downloadqemu-985a19d6d1d7ab3705bf42698cc95abfbbfa24f8.tar.gz
PowerPC merge (Jocelyn Mayer)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@566 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'target-ppc/op_mem.h')
-rw-r--r--target-ppc/op_mem.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/target-ppc/op_mem.h b/target-ppc/op_mem.h
index e66a1dbe01..01df45d9cf 100644
--- a/target-ppc/op_mem.h
+++ b/target-ppc/op_mem.h
@@ -134,6 +134,19 @@ PPC_OP(glue(glue(l, name), MEMSUFFIX)) \
PPC_LDF_OP(fd, ldfq);
PPC_LDF_OP(fs, ldfl);
+/* Load and set reservation */
+PPC_OP(glue(lwarx, MEMSUFFIX))
+{
+ if (T0 & 0x03) {
+ do_queue_exception(EXCP_ALIGN);
+ do_process_exceptions();
+ } else {
+ glue(ldl, MEMSUFFIX)((void *)T0);
+ regs->reserve = T0 & ~0x03;
+ }
+ RETURN();
+}
+
/* Store with reservation */
PPC_OP(glue(stwcx, MEMSUFFIX))
{