From e10f63222f3e4d99b21495cd54accaf13a5e016c Mon Sep 17 00:00:00 2001 From: Cerion Armour-Brown Date: Mon, 2 Jan 2006 14:09:16 +0000 Subject: [PATCH] Handle ppc64's function ptr's in bb_to_IR::do_self_check. git-svn-id: svn://svn.valgrind.org/vex/trunk@1526 --- VEX/priv/guest-generic/bb_to_IR.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/VEX/priv/guest-generic/bb_to_IR.c b/VEX/priv/guest-generic/bb_to_IR.c index cc3df974fc..c354762b40 100644 --- a/VEX/priv/guest-generic/bb_to_IR.c +++ b/VEX/priv/guest-generic/bb_to_IR.c @@ -57,11 +57,11 @@ __attribute((regparm(2))) static UInt genericg_compute_adler32 ( HWord addr, HWord len ); -/* Disassemble a complete basic block, starting at guest_IP_start, +/* Disassemble a complete basic block, starting at guest_IP_bbstart, returning a new IRBB. The disassembler may chase across basic block boundaries if it wishes and if chase_into_ok allows it. The precise guest address ranges from which code has been taken - are written into vge. guest_IP_start is taken to be the IP in + are written into vge. guest_IP_bbstart is taken to be the IP in the guest's address space corresponding to the instruction at &guest_code[0]. @@ -344,7 +344,11 @@ IRBB* bb_to_IR ( /*OUT*/VexGuestExtents* vge, Ity_I32, 2/*regparms*/, "genericg_compute_adler32", +#if defined(__powerpc__) && defined(__powerpc64__) + (void*)((ULong*)(&genericg_compute_adler32))[0], +#else &genericg_compute_adler32, +#endif mkIRExprVec_2( mkIRExpr_HWord( (HWord)guest_code ), mkIRExpr_HWord( (HWord)len2check ) -- 2.47.3