diff --git a/core/arch/arch_exports.h b/core/arch/arch_exports.h index 15130158b5a..d6d3461dca6 100644 --- a/core/arch/arch_exports.h +++ b/core/arch/arch_exports.h @@ -2196,6 +2196,10 @@ int append_trace_speculate_last_ibl(dcontext_t *dcontext, instrlist_t *trace, app_pc speculate_next_tag, bool record_translation); + +/* XXX i#5062 In the long term we should have this only called in mangle_trace() + * and it should be removed from here. + */ #ifdef AARCH64 int fixup_indirect_trace_exit(dcontext_t *dcontext, instrlist_t *trace); diff --git a/core/arch/interp.c b/core/arch/interp.c index 4fed601c003..6fecba34574 100644 --- a/core/arch/interp.c +++ b/core/arch/interp.c @@ -5420,6 +5420,7 @@ recreate_fragment_ilist(dcontext_t *dcontext, byte *pc, instrlist_destroy(dcontext, bb); } + /* XXX i#5062 In the future this call should be placed inside mangle_trace() */ IF_AARCH64(fixup_indirect_trace_exit(dcontext, ilist)); /* PR 214962: re-apply client changes, this time storing translation diff --git a/core/monitor.c b/core/monitor.c index e2c1a28f6f5..6aefd3c140e 100644 --- a/core/monitor.c +++ b/core/monitor.c @@ -1205,6 +1205,8 @@ end_and_emit_trace(dcontext_t *dcontext, fragment_t *cur_f) target = opnd_get_pc(instr_get_target(last)); md->emitted_size -= local_exit_stub_size(dcontext, target, md->trace_flags); } + + /* XXX i#5062 In the future this call should be placed inside mangle_trace() */ IF_AARCH64(md->emitted_size += fixup_indirect_trace_exit(dcontext, trace)); if (DYNAMO_OPTION(speculate_last_exit)