This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
[applied mips sim patch] get closer to coproc usabilitychecking
- From: cgd at broadcom dot com
- To: gdb-patches at sources dot redhat dot com
- Date: 05 Mar 2002 21:43:49 -0800
- Subject: [applied mips sim patch] get closer to coproc usabilitychecking
One step closer to coprocessor usability testing, and proper
unusable-coprocessor reporting.
cgd
===================================================================
2002-03-05 Chris Demetriou <cgd@broadcom.com>
* mips.igen (check_fpu): Enable check for coprocessor 1 usability.
* sim-main.h (COP_Usable): Define, but for now coprocessor 1
is always enabled.
(SignalExceptionCoProcessorUnusable): Take as argument the
unusable coprocessor number.
Index: mips.igen
===================================================================
RCS file: /cvs/src/src/sim/mips/mips.igen,v
retrieving revision 1.33
diff -u -r1.33 mips.igen
--- mips.igen 2002/03/05 22:24:24 1.33
+++ mips.igen 2002/03/06 05:40:27
@@ -3087,10 +3087,8 @@
*vr5000:
*r3900:
{
-#if 0 /* XXX FIXME: For now, never treat the FPU as disabled. */
if (! COP_Usable (1))
SignalExceptionCoProcessorUnusable (1);
-#endif
}
Index: sim-main.h
===================================================================
RCS file: /cvs/src/src/sim/mips/sim-main.h,v
retrieving revision 1.8
diff -u -r1.8 sim-main.h
--- sim-main.h 2002/03/05 19:22:13 1.8
+++ sim-main.h 2002/03/06 05:40:27
@@ -653,7 +653,7 @@
#define SignalExceptionSimulatorFault(buf) signal_exception (SD, CPU, cia, SimulatorFault, buf)
#define SignalExceptionFPE() signal_exception (SD, CPU, cia, FPE)
#define SignalExceptionIntegerOverflow() signal_exception (SD, CPU, cia, IntegerOverflow)
-#define SignalExceptionCoProcessorUnusable() signal_exception (SD, CPU, cia, CoProcessorUnusable)
+#define SignalExceptionCoProcessorUnusable(cop) signal_exception (SD, CPU, cia, CoProcessorUnusable)
#define SignalExceptionNMIReset() signal_exception (SD, CPU, cia, NMIReset)
#define SignalExceptionTLBRefillStore() signal_exception (SD, CPU, cia, TLBStore, TLB_REFILL)
#define SignalExceptionTLBRefillLoad() signal_exception (SD, CPU, cia, TLBLoad, TLB_REFILL)
@@ -662,6 +662,9 @@
#define SignalExceptionTLBModification() signal_exception (SD, CPU, cia, TLBModification)
/* Co-processor accesses */
+
+/* XXX FIXME: For now, assume that FPU (cp1) is always usable. */
+#define COP_Usable(coproc_num) (coproc_num == 1)
void cop_lw PARAMS ((SIM_DESC sd, sim_cpu *cpu, address_word cia, int coproc_num, int coproc_reg, unsigned int memword));
void cop_ld PARAMS ((SIM_DESC sd, sim_cpu *cpu, address_word cia, int coproc_num, int coproc_reg, uword64 memword));