Skip to content

Commit

Permalink
i#1569 AArch64: Adapt tests that use DynamoRIO extension libraries.
Browse files Browse the repository at this point in the history
  • Loading branch information
egrimley-arm committed Jul 18, 2016
1 parent cbde5a0 commit 1836b86
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
4 changes: 2 additions & 2 deletions suite/tests/client-interface/drutil-test.dll.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
11 changes: 6 additions & 5 deletions suite/tests/client-interface/events.dll.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down Expand Up @@ -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;
}
Expand Down

0 comments on commit 1836b86

Please sign in to comment.