Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions core/arch/aarchxx/mangle.c
Original file line number Diff line number Diff line change
Expand Up @@ -986,8 +986,7 @@ insert_reachable_cti(dcontext_t *dcontext, instrlist_t *ilist, instr_t *where,
{
ASSERT(scratch != REG_NULL); /* required */
/* load target into scratch register */
insert_mov_immed_ptrsz(dcontext, (ptr_int_t)
PC_AS_JMP_TGT(dr_get_isa_mode(dcontext), target),

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What I'm puzzling over is the reason that 850c10c put this here: it is called out in the commit message so there must have been something that did not have the lsb set. Not everything does: e.g., fragment tags deliberately do not have lsb set. There must have been something like that that would make its way here. Does a test suite run on arm hit any discrepancy here?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think for clean calls, we can rely on the ARM/Thumb bit being set properly in the address of the function. But I am not sure if that is true for the code DynamoRIO emits itself? Then we would need to set it explicitly when moving the address to a register.

insert_mov_immed_ptrsz(dcontext, (ptr_int_t)target,
opnd_create_reg(scratch), ilist, where, NULL, NULL);
/* even if a call and not a jmp, we can skip this if it doesn't return */
if (!jmp && returns) {
Expand Down