diff options
Diffstat (limited to 'sim/bfin')
-rw-r--r-- | sim/bfin/ChangeLog | 6 | ||||
-rw-r--r-- | sim/bfin/bfin-sim.c | 4 |
2 files changed, 10 insertions, 0 deletions
diff --git a/sim/bfin/ChangeLog b/sim/bfin/ChangeLog index 52b75ee..4c3692f 100644 --- a/sim/bfin/ChangeLog +++ b/sim/bfin/ChangeLog @@ -1,5 +1,11 @@ 2011-06-18 Robin Getz <robin.getz@analog.com> + * bfin-sim.c (extract_mult): Call saturate_s32 when MM is set + and mmod is M_IU. Call saturate_s16 when MM is set and mmod + is M_TFU. + +2011-06-18 Robin Getz <robin.getz@analog.com> + * bfin-sim.c (decode_multfunc): Call new is_macmod_signed, and allow MM to sign extend all the time. (decode_macfunc): Likewise. Drop sign extension of unsigned diff --git a/sim/bfin/bfin-sim.c b/sim/bfin/bfin-sim.c index 017ddca..71fda3e 100644 --- a/sim/bfin/bfin-sim.c +++ b/sim/bfin/bfin-sim.c @@ -1516,6 +1516,8 @@ extract_mult (SIM_CPU *cpu, bu64 res, int mmod, int MM, case M_IS: return saturate_s32 (res, overflow); case M_IU: + if (MM) + return saturate_s32 (res, overflow); return saturate_u32 (res, overflow); case M_FU: if (MM) @@ -1559,6 +1561,8 @@ extract_mult (SIM_CPU *cpu, bu64 res, int mmod, int MM, case M_T: return saturate_s16 (trunc16 (res), overflow); case M_TFU: + if (MM) + return saturate_s16 (trunc16 (res), overflow); return saturate_u16 (trunc16 (res), overflow); case M_S2RND: |