removed stdout reference (not portable)
[qemu] / target-ppc / op_mem.h
index e66a1db..b5d10ce 100644 (file)
@@ -97,8 +97,7 @@ PPC_OP(glue(lswx, MEMSUFFIX))
     if (T1 > 0) {
         if ((PARAM(1) < PARAM(2) && (PARAM(1) + T1) > PARAM(2)) ||
             (PARAM(1) < PARAM(3) && (PARAM(1) + T1) > PARAM(3))) {
-            do_queue_exception_err(EXCP_PROGRAM, EXCP_INVAL | EXCP_INVAL_LSWX);
-            do_process_exceptions();
+            do_raise_exception_err(EXCP_PROGRAM, EXCP_INVAL | EXCP_INVAL_LSWX);
         } else {
             glue(do_lsw, MEMSUFFIX)(PARAM(1));
         }
@@ -134,12 +133,23 @@ 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_raise_exception(EXCP_ALIGN);
+    } else {
+       T1 = glue(ldl, MEMSUFFIX)((void *)T0);
+       regs->reserve = T0;
+    }
+    RETURN();
+}
+
 /* Store with reservation */
 PPC_OP(glue(stwcx, MEMSUFFIX))
 {
     if (T0 & 0x03) {
-        do_queue_exception(EXCP_ALIGN);
-        do_process_exceptions();
+        do_raise_exception(EXCP_ALIGN);
     } else {
         if (regs->reserve != T0) {
             env->crf[0] = xer_ov;