From 402586aa260ba9b74e3a2382276cf31a7abc2b6b Mon Sep 17 00:00:00 2001 From: Chris Demetriou Date: Wed, 1 May 2002 17:26:14 +0000 Subject: 2002-05-01 Chris Demetriou * cp1.c (store_fpr): Remove #ifdef'd out call to UndefinedResult which wouldn't compile anyway. * sim-main.h (unpredictable_action): New function prototype. (Unpredictable): Define to call igen function unpredictable(). (NotWordValue): New macro to call igen function not_word_value(). (UndefinedResult): Remove. * interp.c (undefined_result): Remove. (unpredictable_action): New function. * mips.igen (not_word_value, unpredictable): New functions. (ADD, ADDI, do_addiu, do_addu, BGEZAL, BGEZALL, BLTZAL, BLTZALL) (CLO, CLZ, MADD, MADDU, MSUB, MSUBU, MUL, do_mult, do_multu) (do_sra, do_srav, do_srl, do_srlv, SUB, do_subu): Invoke NotWordValue() to check for unpredictable inputs, then Unpredictable() to handle them. --- sim/mips/sim-main.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'sim/mips/sim-main.h') diff --git a/sim/mips/sim-main.h b/sim/mips/sim-main.h index 7c34888..4373c00 100644 --- a/sim/mips/sim-main.h +++ b/sim/mips/sim-main.h @@ -771,8 +771,9 @@ INLINE_SIM_MAIN (void) prefetch PARAMS ((SIM_DESC sd, sim_cpu *cpu, address_word #define Prefetch(CCA,pAddr,vAddr,DATA,hint) \ prefetch (SD, CPU, cia, CCA, pAddr, vAddr, DATA, hint) -#define UndefinedResult() -#define Unpredictable() +void unpredictable_action (sim_cpu *cpu, address_word cia); +#define NotWordValue(val) not_word_value (SD_, (val)) +#define Unpredictable() unpredictable (SD_) INLINE_SIM_MAIN (unsigned32) ifetch32 PARAMS ((SIM_DESC sd, sim_cpu *cpu, address_word cia, address_word vaddr)); #define IMEM32(CIA) ifetch32 (SD, CPU, (CIA), (CIA)) -- cgit v1.1