directive is ignored when the ‘
’ option is not used or when
instructions use the absolute addressing mode.
The assembler will automatically place text section literal pools before
instructions, so the
directive is only needed to specify some other location for a literal pool. You may need to add an explicit jump instruction to skip over an inline literal pool.
For example, an interrupt vector does not begin with an
instruction so the assembler will be unable to automatically find a good place to put a literal pool. Moreover, the code for the interrupt vector must be at a specific starting address, so the literal pool cannot come before the start of the code. The literal pool for the vector must be explicitly positioned in the middle of the vector (before any uses of the literals, due to the negative offsets used by PC-relative
directive can be used to do this. In the following code, the literal for ‘
’ will automatically be aligned correctly and is placed after the unconditional jump.
.global M code_start: j continue .literal_position .align 4 continue: movi a4, M