1 # RUN: llvm-mc -triple xtensa < %s -show-encoding \
2 # RUN: | FileCheck -check-prefix=INSTR -check-prefix=FIXUP %s
3 # RUN: llvm-mc -filetype=obj -triple xtensa < %s \
4 # RUN: | llvm-readobj -r - | FileCheck -check-prefix=RELOC %s
7 # RELOC - Check the relocation in the object.
8 # FIXUP - Check the fixup on the instruction.
9 # INSTR - Check the instruction is handled properly by the ASMPrinter
12 # RELOC: R_XTENSA_32 func
15 # RELOC: R_XTENSA_SLOT0_OP
16 # INST: ball a1, a3, func
17 # FIXUP: fixup A - offset: 0, value: func, kind: fixup_xtensa_branch_8
20 # RELOC: R_XTENSA_SLOT0_OP
21 # INST: bany a8, a13, func
22 # FIXUP: fixup A - offset: 0, value: func, kind: fixup_xtensa_branch_8
25 # RELOC: R_XTENSA_SLOT0_OP
26 # INST: bbc a8, a7, func
27 # FIXUP: fixup A - offset: 0, value: func, kind: fixup_xtensa_branch_8
30 # RELOC: R_XTENSA_SLOT0_OP
31 # INST: bbci a3, 16, func
32 # FIXUP: fixup A - offset: 0, value: func, kind: fixup_xtensa_branch_8
35 # RELOC: R_XTENSA_SLOT0_OP
36 # INST: bbs a12, a5, func
37 # FIXUP: fixup A - offset: 0, value: func, kind: fixup_xtensa_branch_8
40 # RELOC: R_XTENSA_SLOT0_OP
41 # INST: bbsi a3, 16, func
42 # FIXUP: fixup A - offset: 0, value: func, kind: fixup_xtensa_branch_8
45 # RELOC: R_XTENSA_SLOT0_OP
46 # INST: bnall a7, a3, func
47 # FIXUP: fixup A - offset: 0, value: func, kind: fixup_xtensa_branch_8
50 # RELOC: R_XTENSA_SLOT0_OP
51 # INST: bnone a2, a4, func
52 # FIXUP: fixup A - offset: 0, value: func, kind: fixup_xtensa_branch_8
55 # RELOC: R_XTENSA_SLOT0_OP
56 # INST: beq a1, a2, func
57 # FIXUP: fixup A - offset: 0, value: func, kind: fixup_xtensa_branch_8
60 # RELOC: R_XTENSA_SLOT0_OP
61 # INST: beq a11, a5, func
62 # FIXUP: fixup A - offset: 0, value: func, kind: fixup_xtensa_branch_8
65 # RELOC: R_XTENSA_SLOT0_OP
66 # INST: beqi a1, 256, func
67 # FIXUP: fixup A - offset: 0, value: func, kind: fixup_xtensa_branch_8
70 # RELOC: R_XTENSA_SLOT0_OP
71 # INST: beqi a11, -1, func
72 # FIXUP: fixup A - offset: 0, value: func, kind: fixup_xtensa_branch_8
75 # RELOC: R_XTENSA_SLOT0_OP
77 # FIXUP: fixup A - offset: 0, value: func, kind: fixup_xtensa_branch_12
80 # RELOC: R_XTENSA_SLOT0_OP
81 # INST: bge a14, a2, func
82 # FIXUP: fixup A - offset: 0, value: func, kind: fixup_xtensa_branch_8
85 # RELOC: R_XTENSA_SLOT0_OP
86 # INST: bgei a11, -1, func
87 # FIXUP: fixup A - offset: 0, value: func, kind: fixup_xtensa_branch_8
90 # RELOC: R_XTENSA_SLOT0_OP
91 # INST: bgei a11, 128, func
92 # FIXUP: fixup A - offset: 0, value: func, kind: fixup_xtensa_branch_8
95 # RELOC: R_XTENSA_SLOT0_OP
96 # INST: bgeu a14, a2, func
97 # FIXUP: fixup A - offset: 0, value: func, kind: fixup_xtensa_branch_8
100 # RELOC: R_XTENSA_SLOT0_OP
101 # INST: bgeui a9, 32768, func
102 # FIXUP: fixup A - offset: 0, value: func, kind: fixup_xtensa_branch_8
104 bgeui a7
, 65536, func
105 # RELOC: R_XTENSA_SLOT0_OP
106 # INST: bgeui a7, 65536, func
107 # FIXUP: fixup A - offset: 0, value: func, kind: fixup_xtensa_branch_8
110 # RELOC: R_XTENSA_SLOT0_OP
111 # INST: bgeui a7, 64, func
112 # FIXUP: fixup A - offset: 0, value: func, kind: fixup_xtensa_branch_8
115 # RELOC: R_XTENSA_SLOT0_OP
116 # INST: bgez a8, func
117 # FIXUP: fixup A - offset: 0, value: func, kind: fixup_xtensa_branch_12
120 # RELOC: R_XTENSA_SLOT0_OP
121 # INST: blt a14, a2, func
122 # FIXUP: fixup A - offset: 0, value: func, kind: fixup_xtensa_branch_8
125 # RELOC: R_XTENSA_SLOT0_OP
126 # INST: blti a12, -1, func
127 # FIXUP: fixup A - offset: 0, value: func, kind: fixup_xtensa_branch_8
130 # RELOC: R_XTENSA_SLOT0_OP
131 # INST: blti a0, 32, func
132 # FIXUP: fixup A - offset: 0, value: func, kind: fixup_xtensa_branch_8
135 # RELOC: R_XTENSA_SLOT0_OP
136 # INST: bgeu a13, a1, func
137 # FIXUP: fixup A - offset: 0, value: func, kind: fixup_xtensa_branch_8
140 # RELOC: R_XTENSA_SLOT0_OP
141 # INST: bltui a7, 16, func
142 # FIXUP: fixup A - offset: 0, value: func, kind: fixup_xtensa_branch_8
145 # RELOC: R_XTENSA_SLOT0_OP
146 # INST: bltz a6, func
147 # FIXUP: fixup A - offset: 0, value: func, kind: fixup_xtensa_branch_12
150 # RELOC: R_XTENSA_SLOT0_OP
151 # INST: bne a3, a4, func
152 # FIXUP: fixup A - offset: 0, value: func, kind: fixup_xtensa_branch_8
155 # RELOC: R_XTENSA_SLOT0_OP
156 # INST: bnei a5, 12, func
157 # FIXUP: fixup A - offset: 0, value: func, kind: fixup_xtensa_branch_8
160 # RELOC: R_XTENSA_SLOT0_OP
161 # INST: bnez a5, func
162 # FIXUP: fixup A - offset: 0, value: func, kind: fixup_xtensa_branch_12
165 # RELOC: R_XTENSA_SLOT0_OP
167 # FIXUP: fixup A - offset: 0, value: func, kind: fixup_xtensa_call_18
170 # RELOC: R_XTENSA_SLOT0_OP
172 # FIXUP: fixup A - offset: 0, value: func, kind: fixup_xtensa_jump_18
175 # RELOC: R_XTENSA_SLOT0_OP
176 # INSTR: l32r a6, func
177 # FIXUP: fixup A - offset: 0, value: func, kind: fixup_xtensa_l32r_16