Re:ARM Assembly: ∞ Ways to Return (2017)
by ksherlock on Friday February 10, 2023 @01:44PM
(#34743869)
Early versions of ARM (ARM 1/2, optional in 3/4) had a combined program counter / status register; since there was only a 26-bit address space and instructions are always 32-bit word aligned, the top 6 and bottom 2 bits were used for the status register.
So, if you're still developing for an ARM1, not all of these are equivalent. MOV/POP/etc will set the PC and the status register; B/BL will leave the status register bits alone.
* edit: MOV/MOVS determined if the status bits are written to R15.
So, if you're still developing for an ARM1, not all of these are equivalent. MOV/POP/etc will set the PC and the status register; B/BL will leave the status register bits alone.
* edit: MOV/MOVS determined if the status bits are written to R15.