+start-sanitize-tx3904
+Tue Jun 16 14:39:00 1998 Frank Ch. Eigler <fche@cygnus.com>
+
+ * dv-tx3904tmr.c: Deschedule timer event after dispatching.
+ Reduce unnecessarily high timer event frequency.
+ * dv-tx3904cpu.c: Ditto for interrupt event.
+
+end-sanitize-tx3904
+start-sanitize-sky
+Tue Jun 16 14:12:09 1998 Frank Ch. Eigler <fche@cygnus.com>
+
+ * interp.c (decode_coproc): Removed COP2 branches.
+ * r5900.igen: Moved COP2 branch instructions here.
+ * mips.igen: Restricted COPz == COP2 bit pattern to
+ exclude COP2 branches.
+
+end-sanitize-sky
Wed Jun 10 13:22:32 1998 Frank Ch. Eigler <fche@cygnus.com>
* interp.c (decode_coproc): For TX39, add stub COP0 register #7,
signed_8 last_ticks; /* time at last deliver_*_tick call */
signed_8 roundoff_ticks; /* sim ticks unprocessed during last tick call */
int ff; /* pulse generator flip-flop value: 1/0 */
+ struct hw_event* event; /* last scheduled event */
unsigned_4 tcr;
#define GET_TCR_TCE(c) (((c)->tcr & 0x80) >> 7)
controller->trr = 0;
controller->cpra = controller->cprb = 0x00FFFFFF;
controller->ff = 0;
+ controller->last_ticks = controller->roundoff_ticks = 0;
+ controller->event = NULL;
}
controller->tisr =
controller->trr = 0;
controller->cpra = controller->cprb = 0x00FFFFFF;
+ controller->last_ticks = controller->roundoff_ticks = 0;
+ if(controller->event != NULL)
+ hw_event_queue_deschedule(me, controller->event);
+ controller->event = NULL;
break;
}
SIM_DESC sd = hw_system (me);
signed_8 this_ticks = sim_events_time(sd);
- /* compute simulation ticks between last tick and this tick */
- signed_8 warp = this_ticks - controller->last_ticks + controller->roundoff_ticks;
+ signed_8 warp;
signed_8 divisor;
- signed_8 quotient, reminder;
+ signed_8 quotient, remainder;
+
+ /* compute simulation ticks between last tick and this tick */
+ if(controller->last_ticks != 0)
+ warp = this_ticks - controller->last_ticks + controller->roundoff_ticks;
+ else
+ {
+ controller->last_ticks = this_ticks; /* initialize */
+ warp = controller->roundoff_ticks;
+ }
+
+ if(controller->event != NULL)
+ hw_event_queue_deschedule(me, controller->event);
+ controller->event = NULL;
/* Check whether the timer ticking is enabled at this moment. This
largely a function of the TCE bit, but is also slightly
/* how many times to increase counter? */
quotient = warp / divisor;
- reminder = warp % divisor;
+ remainder = warp % divisor;
/* NOTE: If the event rescheduling code works properly, the quotient
should never be larger than 1. That is, we should receive events
here at least as frequently as the simulated counter is supposed
- to decrement. So the reminder (-> roundoff_ticks) will slowly
+ to decrement. So the remainder (-> roundoff_ticks) will slowly
accumulate, with the quotient == 0. Once in a while, quotient
will equal 1. */
- controller->roundoff_ticks = reminder;
+ controller->roundoff_ticks = remainder;
controller->last_ticks = this_ticks;
while(quotient > 0) /* Is it time to increment counter? */
{
/* Reschedule a timer event in near future, so we can increment the
counter again. Set the event about 75% of divisor time away, so
we will experience roughly 1.3 events per counter increment. */
- hw_event_queue_schedule(me, divisor*3/4, deliver_tx3904tmr_tick, NULL);
+ controller->event = hw_event_queue_schedule(me, divisor*3/4, deliver_tx3904tmr_tick, NULL);
}
-0100,ZZ!0!1!3,26.COP_FUN:NORMAL:32::COPz
-"cop<ZZ> <COP_FUN>"
-*mipsI,mipsII,mipsIII,mipsIV:
-// start-sanitize-r5900
-*r5900:
-// end-sanitize-r5900
-*r3900:
-// start-sanitize-tx19
-*tx19:
-// end-sanitize-tx19
-{
- DecodeCoproc (instruction_0);
-}
+
+
+
// C.EQ.S
// C.EQ.D
// ...
}
+0100,ZZ!0!1!3,5.COP_FUN0!8,5.COP_FUN1,16.COP_FUN2:NORMAL:32::COPz
+"cop<ZZ> <COP_FUN0><COP_FUN1><COP_FUN2>"
+*mipsI,mipsII,mipsIII,mipsIV:
+// start-sanitize-r5900
+*r5900:
+// end-sanitize-r5900
+*r3900:
+// start-sanitize-tx19
+*tx19:
+// end-sanitize-tx19
+{
+ DecodeCoproc (instruction_0);
+}
+
+
+
010000,10000,000000000000000,001000:COP0:32::TLBP
"tlbp"
*mipsI,mipsII,mipsIII,mipsIV: