diff options
Diffstat (limited to 'sim')
-rw-r--r-- | sim/d30v/ChangeLog | 5 | ||||
-rw-r--r-- | sim/d30v/d30v-insns | 9 |
2 files changed, 12 insertions, 2 deletions
diff --git a/sim/d30v/ChangeLog b/sim/d30v/ChangeLog index 19e2a19..fbaf934 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 5b34e80..f37138f 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>" |