binutils-gdb/ld/testsuite/ld-loongarch-elf/relax-align.s
mengqinggang c3d507aba3 LoongArch: Add support for the third expression of .align for R_LARCH_ALIGN
If the symbol index is not zero, the addend is used to represent
the first and the third expressions of the .align.

The lowest 8 bits are used to represent the first expression.
Other bits are used to represent the third expression.

The addend of R_LARCH_ALIGN for ".align 5, ,4" is 0x405.
The addend of R_LARCH_ALIGN for ".balign 32, ,4" is 0x405.
2023-12-22 14:20:18 +08:00

13 lines
262 B
ArmAsm

# relax-align.o has 3 andi(nop) insns.
# relax-align has 2 andi insns, ld relax delete andi insns.
# the last pcaddi 16 bytes align.
.text
L1:
la.local $a0, L1
.align 3
la.local $a0, L1
.align 3, ,4
la.local $a0, L1
.align 3, ,2
la.local $a0, L1