1# RUN: llvm-mc -filetype=obj -triple riscv32 -mattr=+relax < %s \ 2# RUN: | llvm-readobj -r | FileCheck -check-prefix=RELAX-RELOC %s 3# RUN: llvm-mc -filetype=obj -triple riscv32 -mattr=-relax < %s \ 4# RUN: | llvm-readobj -r | FileCheck -check-prefix=NORELAX-RELOC %s 5# RUN: llvm-mc -triple riscv32 -mattr=+relax < %s -show-encoding \ 6# RUN: | FileCheck -check-prefix=RELAX-FIXUP %s 7# RUN: llvm-mc -filetype=obj -triple riscv64 -mattr=+relax < %s \ 8# RUN: | llvm-readobj -r | FileCheck -check-prefix=RELAX-RELOC %s 9# RUN: llvm-mc -filetype=obj -triple riscv64 -mattr=-relax < %s \ 10# RUN: | llvm-readobj -r | FileCheck -check-prefix=NORELAX-RELOC %s 11# RUN: llvm-mc -triple riscv64 -mattr=+relax < %s -show-encoding \ 12# RUN: | FileCheck -check-prefix=RELAX-FIXUP %s 13 14.long foo 15 16.L1: 17call foo 18# NORELAX-RELOC: R_RISCV_CALL foo 0x0 19# NORELAX-RELOC-NOT: R_RISCV_RELAX 20# RELAX-RELOC: R_RISCV_CALL foo 0x0 21# RELAX-RELOC: R_RISCV_RELAX foo 0x0 22# RELAX-FIXUP: fixup A - offset: 0, value: foo, kind: fixup_riscv_call 23# RELAX-FIXUP: fixup B - offset: 0, value: foo, kind: fixup_riscv_relax 24beq s1, s1, .L1 25# RELAX-RELOC: R_RISCV_BRANCH .L1 0x0 26# RELAX-FIXUP: fixup A - offset: 0, value: .L1, kind: fixup_riscv_branch 27