sim: bfin: handle odd shift values with shift insns
authorMike Frysinger <vapier@gentoo.org>
Sat, 18 Jun 2011 20:59:24 +0000 (20:59 +0000)
committerMike Frysinger <vapier@gentoo.org>
Sat, 18 Jun 2011 20:59:24 +0000 (20:59 +0000)
commit99dcc4dc6501c726df79173fa254faebc68a486d
tree7b6f02f91d68dbd0e7627569a616a75bd72a5ae4
parent4bd2c0c31ccea3032031648e7497bb7d1c04cc39
sim: bfin: handle odd shift values with shift insns

The shift magnitude is a 5-bit signed value.  When it is between 0 and
15, then we do the requested shift, but when it is outside of that, we
have to do the opposite.

That means we flip between lshift and ashiftrt to match the hardware.

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