|
From: Julian S. <js...@ac...> - 2012-09-24 11:05:04
|
> Some of the remaining tests in the test suite need this. Do you think we
> should fix/model this differently,
Yes. There is already a framework in place to generate SIGSEGV, SIGBUS,
SIGTRAP, without having to look at the guest insn. So we just need to
extend it to handle SIGFPE.
* in guest_mips_toIR.c, change this to Ijk_SigFPE
case 0x34: { /* TEQ */
/*teq */ DIP("teq r%d, r%d %d", rs, rt, trap_code);
stmt (IRStmt_Exit(binop (Iop_CmpEQ32, getIReg (rs), getIReg (rt)),
Ijk_SigTRAP, IRConst_U32 (guest_PC_curr_instr + 4), OFFB_PC));
break;
}
* add Ijk_SigFPE to the IR definition, fix up the MIPS back end
to handle it,
* add VEX_TRC_JMP_SIGFPE, plus a case for it in scheduler.c
* add VG_(synth_sigfpe)
Makes sense? I am happy to review patches if you want.
J
|