Skip to content

Commit

Permalink
i#1569 AArch64: Fix instrace_simple and memtrace_simple.
Browse files Browse the repository at this point in the history
Extend special handling of exclusive stores to AArch64.

Review-URL: https://codereview.appspot.com/303120043
  • Loading branch information
egrimley-arm committed Jul 20, 2016
1 parent d039d22 commit e1c7996
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions api/samples/instrace_simple.c
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ event_app_instruction(void *drcontext, void *tag, instrlist_t *bb,
* It is ok to skip a few clean calls on predicated instructions,
* since the buffer will be dumped later by other clean calls.
*/
IF_X86_ELSE(true, !instr_is_predicated(instr))
IF_ARM_ELSE(!instr_is_predicated(instr), true)
/* XXX i#1698: there are constraints for code between ldrex/strex pairs,
* so we minimize the instrumentation in between by skipping the clean call.
* We're relying a bit on the typical code sequence with either ldrex..strex
Expand All @@ -237,7 +237,7 @@ event_app_instruction(void *drcontext, void *tag, instrlist_t *bb,
* Using a fault to handle a full buffer should be more robust, and the
* forthcoming buffer filling API (i#513) will provide that.
*/
IF_ARM(&& !instr_is_exclusive_store(instr)))
IF_AARCHXX(&& !instr_is_exclusive_store(instr)))
dr_insert_clean_call(drcontext, bb, instr, (void *)clean_call, false, 0);

return DR_EMIT_DEFAULT;
Expand Down
4 changes: 2 additions & 2 deletions api/samples/memtrace_simple.c
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ event_app_instruction(void *drcontext, void *tag, instrlist_t *bb,
* It is ok to skip a few clean calls on predicated instructions,
* since the buffer will be dumped later by other clean calls.
*/
IF_X86_ELSE(true, !instr_is_predicated(instr))
IF_ARM_ELSE(!instr_is_predicated(instr), true)
/* XXX i#1698: there are constraints for code between ldrex/strex pairs,
* so we minimize the instrumentation in between by skipping the clean call.
* As we're only inserting instrumentation on a memory reference, and the
Expand All @@ -331,7 +331,7 @@ event_app_instruction(void *drcontext, void *tag, instrlist_t *bb,
* Using a fault to handle a full buffer should be more robust, and the
* forthcoming buffer filling API (i#513) will provide that.
*/
IF_ARM(&& !instr_is_exclusive_store(instr)))
IF_AARCHXX(&& !instr_is_exclusive_store(instr)))
dr_insert_clean_call(drcontext, bb, instr, (void *)clean_call, false, 0);

return DR_EMIT_DEFAULT;
Expand Down

0 comments on commit e1c7996

Please sign in to comment.