From 1836b860d2685108f733302b00beef55916cd4a8 Mon Sep 17 00:00:00 2001 From: Edmund Grimley Evans Date: Mon, 18 Jul 2016 11:28:07 +0100 Subject: [PATCH] i#1569 AArch64: Adapt tests that use DynamoRIO extension libraries. Review-URL: https://codereview.appspot.com/299570043 --- suite/tests/client-interface/drutil-test.dll.c | 4 ++-- suite/tests/client-interface/events.dll.c | 11 ++++++----- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/suite/tests/client-interface/drutil-test.dll.c b/suite/tests/client-interface/drutil-test.dll.c index ea0060e57c9..ed173a0b898 100644 --- a/suite/tests/client-interface/drutil-test.dll.c +++ b/suite/tests/client-interface/drutil-test.dll.c @@ -97,12 +97,12 @@ event_exit(void) static bool instr_is_stringop_loop(instr_t *inst) { -#ifdef X86 +#if defined(X86) int opc = instr_get_opcode(inst); return (opc == OP_rep_ins || opc == OP_rep_outs || opc == OP_rep_movs || opc == OP_rep_stos || opc == OP_rep_lods || opc == OP_rep_cmps || opc == OP_repne_cmps || opc == OP_rep_scas || opc == OP_repne_scas); -#elif defined(ARM) +#elif defined(AARCHXX) return false; #endif } diff --git a/suite/tests/client-interface/events.dll.c b/suite/tests/client-interface/events.dll.c index d119af9e0d0..2af3c2a320d 100644 --- a/suite/tests/client-interface/events.dll.c +++ b/suite/tests/client-interface/events.dll.c @@ -432,12 +432,13 @@ bool exception_event_redirect(void *dcontext, dr_exception_t *excpt) dr_fprintf(STDERR, "Couldn't find function redirect in "EVENTS".exe\n"); return true; } -#ifdef X64 +# ifdef X86_64 /* align properly in case redirect function relies on conventions (i#419) */ mcontext.xsp = ALIGN_BACKWARD(mcontext.xsp, 16) - sizeof(void*); -#endif +# endif dr_redirect_execution(&mcontext); - dr_fprintf(STDERR, "should not be reached, dr_redirect_execution() should not return\n"); + dr_fprintf(STDERR, + "should not be reached, dr_redirect_execution() should not return\n"); return true; } @@ -485,10 +486,10 @@ dr_signal_action_t signal_event_redirect(void *dcontext, dr_siginfo_t *info) dr_fprintf(STDERR, "Couldn't find function redirect in client."EVENTS"\n"); return DR_SIGNAL_DELIVER; } -#ifdef X64 +# ifdef X86_64 /* align properly in case redirect function relies on conventions (i#384) */ info->mcontext->xsp = ALIGN_BACKWARD(info->mcontext->xsp, 16) - sizeof(void*); -#endif +# endif info->mcontext->pc = addr; return DR_SIGNAL_REDIRECT; }