1# RUN: llvm-mc -triple=riscv32 %s | FileCheck --check-prefix=PRINT %s 2# RUN: llvm-mc -triple=riscv64 %s | FileCheck --check-prefix=PRINT %s 3# RUN: llvm-mc -filetype=obj -triple=riscv32 %s | llvm-readobj -r - | FileCheck %s 4# RUN: llvm-mc -filetype=obj -triple=riscv64 %s | llvm-readobj -r - | FileCheck %s 5 6# PRINT: .reloc 8, R_RISCV_NONE, .data 7# PRINT: .reloc 4, R_RISCV_NONE, foo+4 8# PRINT: .reloc 0, R_RISCV_NONE, 8 9# PRINT: .reloc 0, R_RISCV_32, .data+2 10# PRINT: .reloc 0, R_RISCV_SET32, foo+3 11# PRINT: .reloc 0, R_RISCV_32_PCREL, 5 12 13# CHECK: 0x8 R_RISCV_NONE .data 0x0 14# CHECK-NEXT: 0x4 R_RISCV_NONE foo 0x4 15# CHECK-NEXT: 0x0 R_RISCV_NONE - 0x8 16# CHECK-NEXT: 0x0 R_RISCV_32 .data 0x2 17# CHECK-NEXT: 0x0 R_RISCV_SET32 foo 0x3 18# CHECK-NEXT: 0x0 R_RISCV_32_PCREL - 0x5 19.text 20 ret 21 nop 22 nop 23 .reloc 8, R_RISCV_NONE, .data 24 .reloc 4, R_RISCV_NONE, foo+4 25 .reloc 0, R_RISCV_NONE, 8 26 27 .reloc 0, R_RISCV_32, .data+2 28 .reloc 0, R_RISCV_SET32, foo+3 29 .reloc 0, R_RISCV_32_PCREL, 5 30 31.data 32.globl foo 33foo: 34 .word 0 35 .word 0 36 .word 0 37