mirror of
git://sourceware.org/git/newlib-cygwin.git
synced 2025-01-18 04:19:21 +08:00
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>
This commit is contained in:
parent
787908c173
commit
e70fc2f8ef
@ -1,3 +1,7 @@
|
||||
2011-06-18 Robin Getz <robin.getz@analog.com>
|
||||
|
||||
* bfin.h (is_macmod_signed): New func
|
||||
|
||||
2011-06-18 Mike Frysinger <vapier@gentoo.org>
|
||||
|
||||
* bfin.h (is_macmod_pmove): Add missing space before func args.
|
||||
|
@ -53,6 +53,12 @@ static inline int is_macmod_hmove (int x)
|
||||
|| (x == M_TFU) || (x == M_S2RND) || (x == M_ISS2) || (x == M_IH);
|
||||
}
|
||||
|
||||
static inline int is_macmod_signed (int x)
|
||||
{
|
||||
return (x == 0) || (x == M_IS) || (x == M_T) || (x == M_S2RND)
|
||||
|| (x == M_ISS2) || (x == M_IH) || (x == M_W32);
|
||||
}
|
||||
|
||||
/* dsp32mac
|
||||
+----+----+---+---|---+----+----+---|---+---+---+---|---+---+---+---+
|
||||
| 1 | 1 | 0 | 0 |.M.| 0 | 0 |.mmod..........|.MM|.P.|.w1|.op1...|
|
||||
|
Loading…
x
Reference in New Issue
Block a user