sim: bfin: skip acc/ASTAT updates for moves
authorMike Frysinger <vapier@gentoo.org>
Tue, 15 Mar 2011 20:10:12 +0000 (20:10 +0000)
committerMike Frysinger <vapier@gentoo.org>
Tue, 15 Mar 2011 20:10:12 +0000 (20:10 +0000)
No point in moving unchanged acc values to the acc regs, and avoid
updating the acc ASTAT bits when only reading.  This fixes incorrect
changing of the ASTAT bits when they're only being read.

Signed-off-by: Robin Getz <robin.getz@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
sim/bfin/ChangeLog
sim/bfin/bfin-sim.c

index 45bf0a81bf1afca4153f59e633913b6da0a066d7..deaf6158616ecf724a656702854d3de0bd8d59b7 100644 (file)
@@ -1,3 +1,7 @@
+2011-03-15  Robin Getz  <robin.getz@analog.com>
+
+       * bfin-sim.c (decode_macfunc): Move acc STOREs behind op != 3 check.
+
 2011-03-15  Robin Getz  <robin.getz@analog.com>
 
        * bfin-sim.c (decode_macfunc): New neg parameter.  Set when the
index ba0e0c2c56f7db28c58f72e943b9f4f3e5ac1843..14cf41ad70d12c2090770af06d707398c9731659 100644 (file)
@@ -1662,13 +1662,13 @@ decode_macfunc (SIM_CPU *cpu, int which, int op, int h0, int h1, int src0,
 
       if (acc & 0x8000000000ull)
        *neg = 1;
-    }
 
-  STORE (AXREG (which), (acc >> 32) & 0xff);
-  STORE (AWREG (which), acc & 0xffffffff);
-  STORE (ASTATREG (av[which]), sat);
-  if (sat)
-    STORE (ASTATREG (avs[which]), sat);
+      STORE (AXREG (which), (acc >> 32) & 0xff);
+      STORE (AWREG (which), acc & 0xffffffff);
+      STORE (ASTATREG (av[which]), sat);
+      if (sat)
+       STORE (ASTATREG (avs[which]), sat);
+    }
 
   ret = extract_mult (cpu, acc, mmod, MM, fullword, overflow);
 
This page took 0.031427 seconds and 4 git commands to generate.