Crate bracer

Source
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.