51 lines · plain
1# RUN: llvm-mc -filetype=obj -triple=riscv64 -mattr=+c,+relax %s --defsym LATE=1 -o %t12# RUN: llvm-objdump -dr --no-show-raw-insn -M no-aliases %t1 | FileCheck %s3 4# RUN: llvm-mc -filetype=obj -triple=riscv64 -mattr=+c,+relax %s -o %t05# RUN: llvm-objdump -dr --no-show-raw-insn -M no-aliases %t0 | FileCheck %s --check-prefix=CHECK06 7# CHECK: 4: 00 00 01 00 .word 0x000100008# CHECK-EMPTY:9# CHECK: 8: 78 56 34 12 .word 0x1234567810# CHECK-NEXT: c: 00 00 00 00 .word 0x0000000011# CHECK: 10: auipc ra, 0x012# CHECK-NEXT: R_RISCV_CALL_PLT foo13# CHECK-NEXT: R_RISCV_RELAX *ABS*14# CHECK: 18: c.nop15# CHECK-NEXT: R_RISCV_ALIGN *ABS*+0x616 17## Alignment directives in a lower-numbered subsection may be conservatively treated as linker-relaxable.18# CHECK0: 4: 00 00 01 00 .word 0x0001000019# CHECK0-NEXT: 000000006: R_RISCV_ALIGN *ABS*+0x620# CHECK0-NEXT: 8: 13 00 00 00 .word 0x0000001321# CHECK0: 14: auipc ra, 0x022# CHECK0: 1c: c.nop23# CHECK0-NEXT: R_RISCV_ALIGN *ABS*+0x624 25.text 226.option push27.option norelax28## R_RISCV_ALIGN is required even if norelax, because it is after a linker-relaxable instruction.29.balign 830l2:31 .word 0x1234567832.option pop33 34.text 135 .org .+136 .org .+337.ifdef LATE38 .org .+039.endif40 call foo41 42.text 043_start:44 .space 645.option push46.option norelax47.balign 848l0:49 .word 0x1234567850.option pop51