aboutsummaryrefslogtreecommitdiff
path: root/sim/bfin/bfin-sim.c
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2011-03-15 20:10:12 +0000
committerMike Frysinger <vapier@gentoo.org>2011-03-15 20:10:12 +0000
commite3809a37d45651f2a08be03dda0b48275a6e04d8 (patch)
tree073bf21bd375759adfce4bf8a7ada4a1d6680ad0 /sim/bfin/bfin-sim.c
parent86d3d8de687fda121bd8d12a9d0e9f00e7284bf1 (diff)
downloadfsf-binutils-gdb-e3809a37d45651f2a08be03dda0b48275a6e04d8.zip
fsf-binutils-gdb-e3809a37d45651f2a08be03dda0b48275a6e04d8.tar.gz
fsf-binutils-gdb-e3809a37d45651f2a08be03dda0b48275a6e04d8.tar.bz2
sim: bfin: skip acc/ASTAT updates for moves
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>
Diffstat (limited to 'sim/bfin/bfin-sim.c')
-rw-r--r--sim/bfin/bfin-sim.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/sim/bfin/bfin-sim.c b/sim/bfin/bfin-sim.c
index ba0e0c2..14cf41a 100644
--- a/sim/bfin/bfin-sim.c
+++ b/sim/bfin/bfin-sim.c
@@ -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);