Expand description
Various macros to help write inline assembly for ARM targets.
These macros help you get your assembly written, but they have nearly no ability to help ensure that your assembly is correct. In rare cases where something can be statically known to be “obviously” wrong (eg: an invalid register name is picked for a specific instruction) the macro will panic.
Macros§
- a32_
fake_ blx - ARMv4T lacks the actual
blx
instruction, so this performs a “fake”blx
-styled operation. - a32_
read_ spsr_ to - Reads SPSR to the register given.
- a32_
set_ cpu_ control - Generates the asm string to set the CPU control bits.
- a32_
write_ spsr_ from - Writes SPSR from the register given.
- put_
fn_ in_ section - Emits a
.section
directive to place the code in a section name you pick. - t32_
with_ a32_ scope - Places
.code 32
at the start and.code 16
at the end of the input sequence. - when
- Emits code that will perform the test and skip past some lines if the test does not pass.