Merge r1663-r1666:
- AIX5 build changes
- genoffsets.c: print the offsets of a few more ppc registers
- Get rid of a bunch of ad-hoc hacks which hardwire in certain
assumptions about guest and host ABIs. Instead pass that info
in a VexMiscInfo structure. This cleans up various grotty bits.
- Add to ppc32 guest state, redirection-stack stuff already present
in ppc64 guest state. This is to enable function redirection/
wrapping in the presence of TOC pointers in 32-bit mode.
- Add to both ppc32 and ppc64 guest states, a new pseudo-register
LR_AT_SC. This holds the link register value at the most recent
'sc', so that AIX can back up to restart a syscall if needed.
- Add to both ppc32 and ppc64 guest states, a SPRG3 register.
- Use VexMiscInfo to handle 'sc' on AIX differently from Linux:
on AIX, 'sc' continues at the location stated in the link
register, not at the next insn.
git-svn-id: svn://svn.valgrind.org/vex/trunk@1669 8f6e269a-dfd6-0310-a8e1-e2731360e62c
diff --git a/priv/main/vex_main.c b/priv/main/vex_main.c
index 0475f68..a590774 100644
--- a/priv/main/vex_main.c
+++ b/priv/main/vex_main.c
@@ -193,7 +193,8 @@
HInstr* (*genReload) ( HReg, Int, Bool );
void (*ppInstr) ( HInstr*, Bool );
void (*ppReg) ( HReg );
- HInstrArray* (*iselBB) ( IRBB*, VexArch, VexArchInfo* );
+ HInstrArray* (*iselBB) ( IRBB*, VexArch, VexArchInfo*,
+ VexMiscInfo* );
Int (*emit) ( UChar*, Int, HInstr*, Bool, void* );
IRExpr* (*specHelper) ( HChar*, IRExpr** );
Bool (*preciseMemExnsFn) ( Int, Int );
@@ -432,6 +433,7 @@
host_is_bigendian,
vta->arch_guest,
&vta->archinfo_guest,
+ &vta->miscinfo_both,
guest_word_type,
vta->do_self_check,
vta->preamble_function,
@@ -558,7 +560,8 @@
" Instruction selection "
"------------------------\n");
- vcode = iselBB ( irbb, vta->arch_host, &vta->archinfo_host );
+ vcode = iselBB ( irbb, vta->arch_host, &vta->archinfo_host,
+ &vta->miscinfo_both );
vexAllocSanityCheck();
@@ -695,7 +698,6 @@
}
-
/* Write default settings info *vai. */
void LibVEX_default_VexArchInfo ( /*OUT*/VexArchInfo* vai )
{
@@ -703,6 +705,17 @@
vai->ppc_cache_line_szB = 0;
}
+/* Write default settings info *vmi. */
+void LibVEX_default_VexMiscInfo ( /*OUT*/VexMiscInfo* vmi )
+{
+ vmi->guest_stack_redzone_size = 0;
+ vmi->guest_ppc_zap_RZ_at_blr = False;
+ vmi->guest_ppc_zap_RZ_at_bl = NULL;
+ vmi->guest_ppc_sc_continues_at_LR = False;
+ vmi->host_ppc_calls_use_fndescrs = False;
+ vmi->host_ppc32_regalign_int64_args = False;
+}
+
/* Return a string showing the hwcaps in a nice way. The string will
be NULL for invalid combinations of flags, so these functions also