This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[PATCH] sim: bfin: skip acc/ASTAT updates for moves
- From: Mike Frysinger <vapier at gentoo dot org>
- To: gdb-patches at sourceware dot org
- Cc: Robin Getz <robin dot getz at analog dot com>
- Date: Mon, 14 Mar 2011 19:38:04 -0400
- Subject: [PATCH] sim: bfin: skip acc/ASTAT updates for moves
From: Robin Getz <robin.getz@analog.com>
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>
2011-03-14 Robin Getz <robin.getz@analog.com>
* bfin-sim.c (decode_macfunc): Move acc STOREs behind op != 3 check.
---
sim/bfin/bfin-sim.c | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/sim/bfin/bfin-sim.c b/sim/bfin/bfin-sim.c
index a23a571..df9a192 100644
--- a/sim/bfin/bfin-sim.c
+++ b/sim/bfin/bfin-sim.c
@@ -1661,13 +1661,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);
--
1.7.4.1