(fatal error) from which Vex (generated code) cannot recover.
Handle this in the ppc(64) backend.
git-svn-id: svn://svn.valgrind.org/vex/trunk@1542
case Ijk_Sys_syscall: trc = VEX_TRC_JMP_SYS_SYSCALL; break;
case Ijk_Yield: trc = VEX_TRC_JMP_YIELD; break;
case Ijk_EmWarn: trc = VEX_TRC_JMP_EMWARN; break;
+ case Ijk_EmFail: trc = VEX_TRC_JMP_EMFAIL; break;
case Ijk_MapFail: trc = VEX_TRC_JMP_MAPFAIL; break;
case Ijk_NoDecode: trc = VEX_TRC_JMP_NODECODE; break;
case Ijk_TInval: trc = VEX_TRC_JMP_TINVAL; break;
case Ijk_ClientReq: vex_printf("ClientReq"); break;
case Ijk_Yield: vex_printf("Yield"); break;
case Ijk_EmWarn: vex_printf("EmWarn"); break;
+ case Ijk_EmFail: vex_printf("EmFail"); break;
case Ijk_NoDecode: vex_printf("NoDecode"); break;
case Ijk_MapFail: vex_printf("MapFail"); break;
case Ijk_TInval: vex_printf("Invalidate"); break;
return "Setting %mxcsr.daz (SSE treat-denormals-as-zero mode)";
case EmWarn_X86_acFlag:
return "Setting %eflags.ac (setting noted but ignored)";
- case EmWarn_PPC32exns:
- return "Unmasking PPC32 FP exceptions";
+ case EmWarn_PPCexns:
+ return "Unmasking PPC32/64 FP exceptions";
+ case EmWarn_PPC64_redir_overflow:
+ return "PPC64 function redirection stack overflow";
+ case EmWarn_PPC64_redir_underflow:
+ return "PPC64 function redirection stack underflow";
default:
vpanic("LibVEX_EmWarn_string: unknown warning");
}
/* settings to %eflags.ac (alignment check) are noted but ignored */
EmWarn_X86_acFlag,
- /* unmasking PPC32 FP exceptions is not supported */
- EmWarn_PPC32exns,
+ /* unmasking PPC32/64 FP exceptions is not supported */
+ EmWarn_PPCexns,
+
+ /* overflow/underflow of the PPC64 _REDIR stack (ppc64 only) */
+ EmWarn_PPC64_redir_overflow,
+ EmWarn_PPC64_redir_underflow,
EmWarn_NUMBER
}
the size of a guest word. It is the responsibility of the relevant
toIR.c to ensure that these are filled in with suitable values
before issuing a jump of kind Ijk_TInval.
+
+ Re Ijk_EmWarn and Ijk_EmFail: the guest state must have a
+ pseudo-register guest_EMWARN, which is 32-bits regardless of
+ the host or guest word size. That register should be made
+ to hold an EmWarn_* value to indicate the reason for the exit.
+
+ In the case of Ijk_EmFail, the exit is fatal (Vex-generated code
+ cannot continue) and so the jump destination can be anything.
*/
typedef
enum {
Ijk_ClientReq, /* do guest client req before continuing */
Ijk_Yield, /* client is yielding to thread scheduler */
Ijk_EmWarn, /* report emulation warning before continuing */
+ Ijk_EmFail, /* emulation critical (FATAL) error; give up */
Ijk_NoDecode, /* next instruction cannot be decoded */
Ijk_MapFail, /* Vex-provided address translation failed */
Ijk_TInval, /* Invalidate translations before continuing. */
This file may get included in assembly code, so do not put
C-specific constructs in it.
+
+ These values should be 61 or above so as not to conflict
+ with Valgrind's VG_TRC_ values, which are 60 or below.
*/
#define VEX_TRC_JMP_TINVAL 61 /* invalidate translations before
#define VEX_TRC_JMP_NOREDIR 81 /* jump to undirected guest addr */
#define VEX_TRC_JMP_EMWARN 63 /* deliver emulation warning before
continuing */
+#define VEX_TRC_JMP_EMFAIL 83 /* emulation fatal error; abort system */
+
#define VEX_TRC_JMP_CLIENTREQ 65 /* do a client req before continuing */
#define VEX_TRC_JMP_YIELD 67 /* yield to thread sched
before continuing */