This is an archive of the discontinued LLVM Phabricator instance.

[objdump][ARM] Fix evaluating the target address of a Thumb BLX(i)
ClosedPublic

Authored by ikudrin on Jun 17 2021, 4:15 AM.

Details

Summary

The instruction can be 16-bit aligned while targeting 32-bit aligned code. To calculate the target address correctly, the address of the instruction has to be adjusted.

Diff Detail

Event Timeline

ikudrin created this revision.Jun 17 2021, 4:15 AM
ikudrin requested review of this revision.Jun 17 2021, 4:15 AM

Change looks good to me. There is some usage of BLX in the LLD test suite. If you've not done so already it will be worth doing a check-all including the LLD test suite to make sure that there are no tests that need updating.

Thanks for looking at it.

There is some usage of BLX in the LLD test suite. If you've not done so already it will be worth doing a check-all including the LLD test suite to make sure that there are no tests that need updating.

As far as I can see, such tests either have the BLX instructions 32-bit aligned or check only their immediates.

peter.smith accepted this revision.Jun 17 2021, 6:00 AM

OK LGTM.

This revision is now accepted and ready to land.Jun 17 2021, 6:00 AM
This revision was landed with ongoing or failed builds.Jun 17 2021, 8:42 PM
This revision was automatically updated to reflect the committed changes.