sim: bfin: fix sign extension in dsp insns with MM flag
authorMike Frysinger <vapier@gentoo.org>
Sat, 18 Jun 2011 19:42:55 +0000 (19:42 +0000)
committerMike Frysinger <vapier@gentoo.org>
Sat, 18 Jun 2011 19:42:55 +0000 (19:42 +0000)
commitef26d60eba5736240c27c545e275667bb4b0fbd1
tree1964dea48acfb2df2639d14cb5cb8fd8b8b62f5b
parent075a845a9281b4bdef459b6494a7db3bf666b911
sim: bfin: fix sign extension in dsp insns with MM flag

After testing the hardware with all the different dsp flags, the MM flag
triggers sign extension in all modes.  So drop the limited use of it, and
the local custom helper that was also extending unsigned values.  We also
can see that the flag checks in the mult/mac insns have the same behavior
with sign extending, so add a helper func to keep the logic the same in
both places.

Signed-off-by: Robin Getz <robin.getz@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
include/opcode/ChangeLog
include/opcode/bfin.h
sim/bfin/ChangeLog
sim/bfin/bfin-sim.c