sim: bfin: do not extend accumulator in LSHIFT insns
authorMike Frysinger <vapier@gentoo.org>
Sat, 18 Jun 2011 21:58:08 +0000 (21:58 +0000)
committerMike Frysinger <vapier@gentoo.org>
Sat, 18 Jun 2011 21:58:08 +0000 (21:58 +0000)
The logical shift insn does not sign extend before shifting, so
we shouldn't either.

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 5033c22d66d0078fdbe528fa158bf5fb13e7f2bc..4e656d75da33079fd18a123ed1400a3eed99e1a6 100644 (file)
@@ -1,3 +1,8 @@
+2011-06-18  Robin Getz  <robin.getz@analog.com>
+
+       * bfin-sim.c (decode_dsp32shift_0): Use get_unextended_acc
+       rather than get_extended_acc in LSHIFT insns.
+
 2011-06-18  Robin Getz  <robin.getz@analog.com>
 
        * bfin-sim.c (decode_macfunc): Handle MM when mmod is M_TFU.
index 20602b752e6c4ea064ba1236b878d2f367004196..2c71f6c5607c0d66bec82b054644953fe94a743e 100644 (file)
@@ -5230,7 +5230,7 @@ decode_dsp32shift_0 (SIM_CPU *cpu, bu16 iw0, bu16 iw1)
 
       HLs = !!HLs;
       TRACE_INSN (cpu, "A%i = LSHIFT A%i BY R%i.L;", HLs, HLs, src0);
-      val = get_extended_acc (cpu, HLs);
+      val = get_unextended_acc (cpu, HLs);
 
       if (shft <= 0)
        val = lshiftrt (cpu, val, -shft, 40);