* simops.c: Fix "not1" and "set1".
authorJeff Law <law@redhat.com>
Fri, 30 Aug 1996 21:55:26 +0000 (21:55 +0000)
committerJeff Law <law@redhat.com>
Fri, 30 Aug 1996 21:55:26 +0000 (21:55 +0000)
sim/v850/ChangeLog
sim/v850/simops.c

index 436a83c116c9d728706576464b6989eb3c5f9555..cfbb027fae7ab52211ac2bac246b22c07ba98dab 100644 (file)
@@ -1,5 +1,7 @@
 Fri Aug 30 10:33:49 1996  Jeffrey A Law  (law@cygnus.com)
 
+       * simops.c: Fix "not1" and "set1".
+
        * simops.c: Don't forget to initialize temp for
        "ld.h" and "ld.w"
 
index 77d6949e4aaab8d2917231034d0f4e59e40de5fc..5ab83dca65d7c9ed1af8b432fd3a7b60b874ac4f 100644 (file)
@@ -1320,7 +1320,7 @@ OP_7C0 ()
   State.sregs[5] &= ~PSW_Z;
   if ((temp & (1 << op1)) == 0)
     State.sregs[5] |= PSW_Z;
-  temp |= ~(1 << op1);
+  temp |= (1 << op1);
   put_byte (State.mem + op0 + op2, temp);
 }
 
@@ -1340,7 +1340,7 @@ OP_47C0 ()
   State.sregs[5] &= ~PSW_Z;
   if ((temp & (1 << op1)) == 0)
     State.sregs[5] |= PSW_Z;
-  temp ^= ~(1 << op1);
+  temp ^= (1 << op1);
   put_byte (State.mem + op0 + op2, temp);
 }