summaryrefslogtreecommitdiff
path: root/sim/d30v
diff options
context:
space:
mode:
authorJason Molenda <jsm@bugshack.cygnus.com>1999-06-01 15:44:41 +0000
committerJason Molenda <jsm@bugshack.cygnus.com>1999-06-01 15:44:41 +0000
commit32cdd960534de92805b882f7cfa863064f7f6b31 (patch)
treecfa1f6ad34289dd35cdca07c7a23fd030c67385d /sim/d30v
parentbd93f96afc89b3f880ed08004bea39c2c49bbc41 (diff)
downloadgdb-32cdd960534de92805b882f7cfa863064f7f6b31.tar.gz
import gdb-1999-06-01 snapshot
Diffstat (limited to 'sim/d30v')
-rw-r--r--sim/d30v/ChangeLog5
-rw-r--r--sim/d30v/d30v-insns9
2 files changed, 12 insertions, 2 deletions
diff --git a/sim/d30v/ChangeLog b/sim/d30v/ChangeLog
index 19e2a19be3e..fbaf93494fd 100644
--- a/sim/d30v/ChangeLog
+++ b/sim/d30v/ChangeLog
@@ -1,3 +1,8 @@
+1999-05-27 Michael Meissner <meissner@cygnus.com>
+
+ * d30v-insns (do_repeat): Print a warning if a REPEAT or REPEATI
+ instruction loop is too small.
+
1999-05-08 Felix Lee <flee@cygnus.com>
* configure: Regenerated to track ../common/aclocal.m4 changes.
diff --git a/sim/d30v/d30v-insns b/sim/d30v/d30v-insns
index 5b34e807bd5..f37138f734d 100644
--- a/sim/d30v/d30v-insns
+++ b/sim/d30v/d30v-insns
@@ -1614,13 +1614,18 @@ _BRA,01000,00,6.**,6.**,6.**:BRA:short:mu:REIT
// REPEAT
void::function::do_repeat:unsigned32 count, address_word pcaddr
+ address_word rpt_s = cia + 8;
+ address_word rpt_e = cia + pcaddr;
+
if (count == 0)
sim_engine_abort (SD, CPU, cia, "REPEAT with ra=0 and REPEATI with imm = 0 is forbidden.");
if (count > 1)
PSW_SET_QUEUE (PSW_RP, 1);
+ if (rpt_e < rpt_s + 0x18)
+ sim_io_eprintf (sd, "warning: 0x%lx: REPEAT or REPEATI loop is too small\n", cia);
WRITE32_QUEUE (&RPT_C, count - 1);
- WRITE32_QUEUE (&RPT_S, cia + 8);
- WRITE32_QUEUE (&RPT_E, cia + pcaddr);
+ WRITE32_QUEUE (&RPT_S, rpt_s);
+ WRITE32_QUEUE (&RPT_E, rpt_e);
_BRA,11000,00,6.RA,6.**,6.RC:BRA:short:mu:REPEAT
"repeat r<RA>, r<RC>"