From c9329594d491d5e2c3c2f59bb8c6e833910022b4 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Tue, 15 Mar 2011 20:04:04 +0000 Subject: sim: bfin: handle saturation with fract multiplications The saturation behavior with fract modes differs from non-fract modes. Signed-off-by: Robin Getz Signed-off-by: Mike Frysinger --- sim/bfin/ChangeLog | 4 ++++ sim/bfin/bfin-sim.c | 2 ++ 2 files changed, 6 insertions(+) (limited to 'sim') diff --git a/sim/bfin/ChangeLog b/sim/bfin/ChangeLog index 8065fad..bdc7690 100644 --- a/sim/bfin/ChangeLog +++ b/sim/bfin/ChangeLog @@ -1,3 +1,7 @@ +2010-03-15 Robin Getz + + * bfin-sim.c (extract_mult): Handle M_IU. + 2011-03-05 Mike Frysinger * Makefile.in, TODO, aclocal.m4, bfin-sim.c, bfin-sim.h, diff --git a/sim/bfin/bfin-sim.c b/sim/bfin/bfin-sim.c index 6d9361e..f70526b 100644 --- a/sim/bfin/bfin-sim.c +++ b/sim/bfin/bfin-sim.c @@ -1479,6 +1479,8 @@ extract_mult (SIM_CPU *cpu, bu64 res, int mmod, int MM, case 0: case M_IS: return saturate_s32 (res, overflow); + case M_IU: + return saturate_u32 (res, overflow); case M_FU: if (MM) return saturate_s32 (res, overflow); -- cgit v1.1