More user timer fixes (Robert Reif)
[qemu] / target-m68k / op.c
index 466fdc2..8600f43 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *  m68k micro operations
- * 
+ *
  *  Copyright (c) 2006-2007 CodeSourcery
  *  Written by Paul Brook
  *
@@ -349,7 +349,7 @@ OP(divu)
     uint32_t quot;
     uint32_t rem;
     uint32_t flags;
-    
+
     num = env->div1;
     den = env->div2;
     /* ??? This needs to make sure the throwing location is accurate.  */
@@ -380,7 +380,7 @@ OP(divs)
     int32_t quot;
     int32_t rem;
     int32_t flags;
-    
+
     num = env->div1;
     den = env->div2;
     if (den == 0)
@@ -487,37 +487,38 @@ OP(jmp)
     GOTO_LABEL_PARAM(1);
 }
 
-/* These ops involve a function call, which probably requires a stack frame
-   and breaks things on some hosts.  */
-OP(jmp_z32)
+OP(set_T0_z32)
 {
     uint32_t arg = get_op(PARAM1);
-    if (arg == 0)
-        GOTO_LABEL_PARAM(2);
+    T0 = (arg == 0);
     FORCE_RET();
 }
 
-OP(jmp_nz32)
+OP(set_T0_nz32)
 {
     uint32_t arg = get_op(PARAM1);
-    if (arg != 0)
-        GOTO_LABEL_PARAM(2);
+    T0 = (arg != 0);
     FORCE_RET();
 }
 
-OP(jmp_s32)
+OP(set_T0_s32)
 {
     int32_t arg = get_op(PARAM1);
-    if (arg < 0)
-        GOTO_LABEL_PARAM(2);
+    T0 = (arg > 0);
     FORCE_RET();
 }
 
-OP(jmp_ns32)
+OP(set_T0_ns32)
 {
     int32_t arg = get_op(PARAM1);
-    if (arg >= 0)
-        GOTO_LABEL_PARAM(2);
+    T0 = (arg >= 0);
+    FORCE_RET();
+}
+
+OP(jmp_T0)
+{
+    if (T0)
+        GOTO_LABEL_PARAM(1);
     FORCE_RET();
 }