This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[PATCH] sim: bfin: handle saturation with fract multiplications
- From: Mike Frysinger <vapier at gentoo dot org>
- To: gdb-patches at sourceware dot org
- Cc: Robin Getz <robin dot getz at analog dot com>
- Date: Mon, 14 Mar 2011 03:52:50 -0400
- Subject: [PATCH] sim: bfin: handle saturation with fract multiplications
From: Robin Getz <robin.getz@analog.com>
The saturation behavior with fract modes differs from non-fract modes.
Signed-off-by: Robin Getz <robin.getz@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-03-14 Robin Getz <robin.getz@analog.com>
* bfin-sim.c (extract_mult): Handle M_IU.
---
sim/bfin/bfin-sim.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
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);
--
1.7.4.1