[obj2yaml] - Fix a comment. NFC.
[llvm-complete.git] / test / MC / RISCV / option-mix.s
blob633b85dd326842827d6613d61507cbf68a4ccc3b
1 # RUN: llvm-mc %s -triple=riscv32 | FileCheck -check-prefix=ASM %s
2 # RUN: llvm-mc %s -triple=riscv64 | FileCheck -check-prefix=ASM %s
3 # RUN: llvm-mc -filetype=obj -triple riscv32 < %s \
4 # RUN: | llvm-objdump -d -M no-aliases - | FileCheck -check-prefix=DISASM %s
5 # RUN: llvm-mc -filetype=obj -triple riscv64 < %s \
6 # RUN: | llvm-objdump -d -M no-aliases - | FileCheck -check-prefix=DISASM %s
8 # Checks change of options does not cause error: could not find corresponding %pcrel_hi
9 # when assembling pseudoinstruction and its extended form.
11 .option push
12 .option norelax
13 la a0, a_symbol
14 .option pop
15 la a1, another_symbol
17 # ASM: .Lpcrel_hi0:
18 # ASM: auipc a0, %pcrel_hi(a_symbol)
19 # ASM: addi a0, a0, %pcrel_lo(.Lpcrel_hi0)
20 # ASM: .Lpcrel_hi1:
21 # ASM: auipc a1, %pcrel_hi(another_symbol)
22 # ASM: addi a1, a1, %pcrel_lo(.Lpcrel_hi1)
24 # DISASM: .Lpcrel_hi0:
25 # DISASM: auipc a0, 0
26 # DISASM: addi a0, a0, 0
27 # DISASM:.Lpcrel_hi1:
28 # DISASM: auipc a1, 0
29 # DISASM: addi a1, a1, 0
31 .option push
32 .option norelax
33 1:auipc a0, %pcrel_hi(a_symbol)
34 addi a0, a0, %pcrel_lo(1b)
35 .option pop
36 2:auipc a1, %pcrel_hi(another_symbol)
37 addi a1, a1, %pcrel_lo(2b)
39 # ASM: .Ltmp0:
40 # ASM: auipc a0, %pcrel_hi(a_symbol)
41 # ASM: addi a0, a0, %pcrel_lo(.Ltmp0)
42 # ASM: .Ltmp1:
43 # ASM: auipc a1, %pcrel_hi(another_symbol)
44 # ASM: addi a1, a1, %pcrel_lo(.Ltmp1)
46 # DISASM: .Ltmp0:
47 # DISASM: auipc a0, 0
48 # DISASM: addi a0, a0, 0
49 # DISASM: .Ltmp1:
50 # DISASM: auipc a1, 0
51 # DISASM: addi a1, a1, 0