This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] sim: bfin: handle AZ updates with 16bit adds/subs


From: Robin Getz <robin.getz@analog.com>

We weren't updating AZ when doing a 16bit add or sub insn.  Implement it.

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_dsp32alu_0): Set AZ based on val for 16bit adds
	and subs.
---
 sim/bfin/bfin-sim.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/sim/bfin/bfin-sim.c b/sim/bfin/bfin-sim.c
index df9a192..42d0d20 100644
--- a/sim/bfin/bfin-sim.c
+++ b/sim/bfin/bfin-sim.c
@@ -4127,7 +4127,7 @@ decode_dsp32alu_0 (SIM_CPU *cpu, bu16 iw0, bu16 iw1)
 	SET_DREG_L (dst0, val);
 
       SET_ASTATREG (an, val & 0x8000);
-
+      SET_ASTATREG (az, val == 0);
     }
   else if ((aop == 0 || aop == 2) && aopcde == 9 && s == 1)
     {
-- 
1.7.4.1


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]