1## Test llvm-readobj & llvm-readelf can decode RISC-V attributes correctly. 2 3# RUN: llvm-mc -triple riscv32 -filetype obj -o %t.rv32.o %s 4# RUN: llvm-mc -triple riscv64 -filetype obj -o %t.rv64.o %s 5# RUN: llvm-readobj --arch-specific %t.rv32.o \ 6# RUN: | FileCheck %s --check-prefix=CHECK-OBJ 7# RUN: llvm-readelf -A %t.rv32.o \ 8# RUN: | FileCheck %s --check-prefix=CHECK-OBJ 9# RUN: llvm-readobj --arch-specific %t.rv64.o \ 10# RUN: | FileCheck %s --check-prefix=CHECK-OBJ 11# RUN: llvm-readelf -A %t.rv64.o \ 12# RUN: | FileCheck %s --check-prefix=CHECK-OBJ 13 14.attribute Tag_stack_align, 16 15# CHECK-OBJ: Tag: 4 16# CHECK-OBJ-NEXT: Value: 16 17# CHECK-OBJ-NEXT: TagName: stack_align 18# CHECK-OBJ-NEXT: Description: Stack alignment is 16-bytes 19 20.attribute Tag_arch, "rv32i2p0_m2p0_a2p0_c2p0" 21# CHECK-OBJ: Tag: 5 22# CHECK-OBJ-NEXT: TagName: arch 23# CHECK-OBJ-NEXT: Value: rv32i2p0_m2p0_a2p0_c2p0 24 25.attribute Tag_unaligned_access, 0 26# CHECK-OBJ: Tag: 6 27# CHECK-OBJ-NEXT: Value: 0 28# CHECK-OBJ-NEXT: TagName: unaligned_access 29# CHECK-OBJ-NEXT: Description: No unaligned access 30 31.attribute Tag_priv_spec, 2 32# CHECK-OBJ: Tag: 8 33# CHECK-OBJ-NEXT: TagName: priv_spec 34# CHECK-OBJ-NEXT: Value: 2 35 36.attribute Tag_priv_spec_minor, 0 37# CHECK-OBJ: Tag: 10 38# CHECK-OBJ-NEXT: TagName: priv_spec_minor 39# CHECK-OBJ-NEXT: Value: 0 40 41.attribute Tag_priv_spec_revision, 0 42# CHECK-OBJ: Tag: 12 43# CHECK-OBJ-NEXT: TagName: priv_spec_revision 44# CHECK-OBJ-NEXT: Value: 0 45