ld: Update function prototypes for compilers defaulting to -std=gnu23
[binutils-gdb.git] / ld / testsuite / ld-loongarch-elf / abi1_sops.s
blob34f2d5920649332961670e4c20f51565e711daa0
1 .macro sign_check reloc_sym reloc_name reloc_bits
2 .ifdef \reloc_sym
3 .ifdef overflow
4 .reloc 0, R_LARCH_SOP_PUSH_ABSOLUTE, 1 << (\reloc_bits - 1)
5 .reloc 0, \reloc_name
6 .else
7 .reloc 0, R_LARCH_SOP_PUSH_ABSOLUTE, -(1 << (\reloc_bits - 1)) - 1
8 .reloc 0, \reloc_name
9 .endif
10 .word 0
11 .endif
12 .endm
14 .macro sign_check_s2 reloc_sym reloc_name reloc_bits
15 .ifdef \reloc_sym
16 .ifdef overflow
17 .reloc 0, R_LARCH_SOP_PUSH_ABSOLUTE, (1 << (\reloc_bits - 1)) << 2
18 .reloc 0, \reloc_name
19 .else
20 .reloc 0, R_LARCH_SOP_PUSH_ABSOLUTE, (-(1 << (\reloc_bits - 1)) - 1) << 2
21 .reloc 0, \reloc_name
22 .endif
23 .word 0
24 .endif
25 .endm
27 .macro unsign_check reloc_sym reloc_name reloc_bits
28 .ifdef \reloc_sym
29 .reloc 0, R_LARCH_SOP_PUSH_ABSOLUTE, 1 << \reloc_bits
30 .reloc 0, \reloc_name
31 .word 0
32 .endif
33 .endm
35 sign_check s_10_5 R_LARCH_SOP_POP_32_S_10_5 5
36 sign_check s_10_12 R_LARCH_SOP_POP_32_S_10_12 12
37 sign_check s_10_16 R_LARCH_SOP_POP_32_S_10_16 16
38 sign_check_s2 s_10_16_s2 R_LARCH_SOP_POP_32_S_10_16_S2 16
39 sign_check_s2 s_0_5_10_16_s2 R_LARCH_SOP_POP_32_S_0_5_10_16_S2 21
40 sign_check_s2 s_0_10_10_16_s2 R_LARCH_SOP_POP_32_S_0_10_10_16_S2 26
41 sign_check s_5_20 R_LARCH_SOP_POP_32_S_5_20 20
42 unsign_check u_10_12 R_LARCH_SOP_POP_32_U_10_12 12
43 unsign_check u R_LARCH_SOP_POP_32_U 32