-
Notifications
You must be signed in to change notification settings - Fork 566
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement dr_insert_cbr_instrumentation on ARM & AArch64 #2297
Comments
xref #1569 |
Hello @derekbruening @fhahn @egrimley I have a requirement to get api/samples/cbrtrace.c working for AArch64. My approach to implementing dr_insert_cbr_instrumentation_help() is to figure out the X86 version and port to AArch64. Do you think this is the best way of tackling the issue? There may (probably will?) be differences in the way the clean call is used by dr_insert_cbr_instrumentation_help() on AArch64 AIUI the layouts differ. |
The x86 version is so complex b/c it's trying to take advantage of the clean call state save to avoid spilling anything extra, yet not affect the stored state, while not changing the clean call insertion code and instead examining it afterward: rather messy. One could imagine ways to make it simpler and less fragile, but at a performance cost with extra loads and stores; or even simpler, with a layered callee who computes the branch direction from the dr_mcontex_t, but again at a performance cost. One thing you won't have to deal with on AArch64 is the flags being clobbered (by POPF on x86 to clear the direction flag for the ABI). |
Ah ok! Thanks Derek. |
Implement cbr instrumentation for AARCH64, supporting cbz/cbnz/tbz/tbnz/bcond opcodes. Issue: DynamoRIO#2297
Document newly added instruction creation macros for EOR, CSINC and UBFM. Refactor XINST_CREATE_slr_s to use the new macro to create ubfm instruction. Fixes DynamoRIO#2297
dr_insert_cbr_instrumentation
anddr_insert_cbr_instrumentation_ex
are not yet implemented on ARM & AArch64.The text was updated successfully, but these errors were encountered: