diff --git a/sim/bfin/ChangeLog b/sim/bfin/ChangeLog index 4e656d75da3..8fd629a46ed 100644 --- a/sim/bfin/ChangeLog +++ b/sim/bfin/ChangeLog @@ -1,3 +1,8 @@ +2011-06-18 Robin Getz + + * bfin-sim.c (ashiftrt): If size is 40, do not call SET_ASTATREG. + (lshiftrt): Likewise. + 2011-06-18 Robin Getz * bfin-sim.c (decode_dsp32shift_0): Use get_unextended_acc diff --git a/sim/bfin/bfin-sim.c b/sim/bfin/bfin-sim.c index 2c71f6c5607..dbfce6c28ba 100644 --- a/sim/bfin/bfin-sim.c +++ b/sim/bfin/bfin-sim.c @@ -713,8 +713,8 @@ ashiftrt (SIM_CPU *cpu, bu40 val, int cnt, int size) val |= sgn; SET_ASTATREG (an, val >> (size - 1)); SET_ASTATREG (az, val == 0); - /* XXX: Need to check ASTAT[v] behavior here. */ - SET_ASTATREG (v, 0); + if (size != 40) + SET_ASTATREG (v, 0); return val; } @@ -742,7 +742,8 @@ lshiftrt (SIM_CPU *cpu, bu64 val, int cnt, int size) } SET_ASTATREG (an, val >> (size - 1)); SET_ASTATREG (az, val == 0); - SET_ASTATREG (v, 0); + if (size != 40) + SET_ASTATREG (v, 0); return val; }