forked from OSchip/llvm-project
28 lines
768 B
Plaintext
28 lines
768 B
Plaintext
# RUN: llvm-mc -assemble -triple riscv32 -mattr=+c -filetype=obj %s -o - 2>&1 | \
|
|
# RUN: llvm-objdump -d --mattr=+c -M no-aliases - | FileCheck %s
|
|
# RUN: llvm-mc -assemble -triple riscv64 -mattr=+c -filetype=obj %s -o - 2>&1 | \
|
|
# RUN: llvm-objdump -d --mattr=+c -M no-aliases - | FileCheck %s
|
|
|
|
label1:
|
|
.option norvc
|
|
j label1
|
|
j label2
|
|
bnez a0, label1
|
|
bnez a0, label2
|
|
.option rvc
|
|
j label1
|
|
j label2
|
|
bnez a0, label1
|
|
bnez a0, label2
|
|
# CHECK-LABEL: <label1>:
|
|
# CHECK-NEXT: jal zero, 0 <label1>
|
|
# CHECK-NEXT: jal zero, 20 <label2>
|
|
# CHECK-NEXT: bne a0, zero, -8 <label1>
|
|
# CHECK-NEXT: bne a0, zero, 12 <label2>
|
|
# CHECK-NEXT: c.j -16 <label1>
|
|
# CHECK-NEXT: c.j 6 <label2>
|
|
# CHECK-NEXT: c.bnez a0, -20 <label1>
|
|
# CHECK-NEXT: c.bnez a0, 2 <label2>
|
|
|
|
label2:
|