37 lines · plain
1# RUN: llvm-mc -filetype=obj -triple=riscv32be %s -o %t.32be.o2# RUN: llvm-objdump -s %t.32be.o | FileCheck -check-prefix=RV32BE %s3# RUN: llvm-mc -filetype=obj -triple=riscv64be %s -o %t.64be.o4# RUN: llvm-objdump -s %t.64be.o | FileCheck -check-prefix=RV64BE %s5# RUN: llvm-mc -filetype=obj -triple=riscv32 %s -o %t.32le.o6# RUN: llvm-objdump -s %t.32le.o | FileCheck -check-prefix=RV32LE %s7# RUN: llvm-mc -filetype=obj -triple=riscv64 %s -o %t.64le.o8# RUN: llvm-objdump -s %t.64le.o | FileCheck -check-prefix=RV64LE %s9 10# Test that data directives are properly byte-swapped on big-endian RISC-V11 12.data13 14byte_data:15 .byte 0x1116 .byte 0x2217 .half 0x334418 .word 0x5566778819 .long 0x99aabbcc20 .quad 0x112233445566778821 22# RV32BE: Contents of section .data:23# RV32BE-NEXT: 0000 11223344 55667788 99aabbcc 1122334424# RV32BE-NEXT: 0010 5566778825 26# RV64BE: Contents of section .data:27# RV64BE-NEXT: 0000 11223344 55667788 99aabbcc 1122334428# RV64BE-NEXT: 0010 5566778829 30# RV32LE: Contents of section .data:31# RV32LE-NEXT: 0000 11224433 88776655 ccbbaa99 8877665532# RV32LE-NEXT: 0010 4433221133 34# RV64LE: Contents of section .data:35# RV64LE-NEXT: 0000 11224433 88776655 ccbbaa99 8877665536# RV64LE-NEXT: 0010 4433221137