Skip to content
This repository has been archived by the owner on Apr 29, 2021. It is now read-only.

Force re-align PC/R15 operations #82

Open
matanlurey opened this issue Jul 27, 2020 · 0 comments
Open

Force re-align PC/R15 operations #82

matanlurey opened this issue Jul 27, 2020 · 0 comments
Labels
bug Something isn't working

Comments

@matanlurey
Copy link
Owner

E.g. BRANCH opCodes, or MOV/ALU/LDR with Rd=R15.

  • For ARM: Low-bits of the target usually 0, force-align by clearing lower 2-bits.
  • For THUMB: Low bit of the target may/should/must be set, the bit is (or is not) interpreted as thumb-bit
    (depending on the opCode), and R15 is then forcibly aligned by clearing the lower bit.

... in short, R15 will always be forcibly aligned, so mis-aligned branches won't have effect on subsequent opcodes that use R15 (or R15+disp) as an operand.

@matanlurey matanlurey added the bug Something isn't working label Jul 27, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant