This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]