From: Chris Demetriou Date: Wed, 6 Mar 2002 05:41:40 +0000 (+0000) Subject: 2002-03-05 Chris Demetriou X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=3ad6f714f2528bf03a4eb49fb27e89eabfc05654;p=binutils-gdb.git 2002-03-05 Chris Demetriou * 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. --- diff --git a/sim/mips/ChangeLog b/sim/mips/ChangeLog index f4f58923f2c..3bcc294859d 100644 --- a/sim/mips/ChangeLog +++ b/sim/mips/ChangeLog @@ -1,3 +1,11 @@ +2002-03-05 Chris Demetriou + + * 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. + 2002-03-05 Chris Demetriou * mips.igen: Fix formatting of all SignalException calls. diff --git a/sim/mips/mips.igen b/sim/mips/mips.igen index 9b20a6bcf44..d1a3f1ad3fa 100644 --- a/sim/mips/mips.igen +++ b/sim/mips/mips.igen @@ -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 } diff --git a/sim/mips/sim-main.h b/sim/mips/sim-main.h index 8e8511fae9f..1870c965cd0 100644 --- a/sim/mips/sim-main.h +++ b/sim/mips/sim-main.h @@ -653,7 +653,7 @@ void signal_exception (SIM_DESC sd, sim_cpu *cpu, address_word cia, int exceptio #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) @@ -663,6 +663,9 @@ void signal_exception (SIM_DESC sd, sim_cpu *cpu, address_word cia, int exceptio /* 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)); unsigned int cop_sw PARAMS ((SIM_DESC sd, sim_cpu *cpu, address_word cia, int coproc_num, int coproc_reg));