[llvm] [SPARC][Utilities] Add names for SPARC ELF flags in LLVM binary utilities (PR #102843)

Sergei Barannikov via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 14 01:04:32 PDT 2024


================
@@ -0,0 +1,57 @@
+# RUN: yaml2obj %s -o %t -DCLASS_NAME="ELFCLASS32" -DMACHINE_NAME="EM_SPARC" -DFLAG_NAME=""
+# RUN: llvm-readobj -h %t | FileCheck %s --check-prefixes=V8 -DFLAG_VALUE=0x0
+# RUN: llvm-readelf -h %t | FileCheck %s --check-prefix=READELF -DFLAG_VALUE=0x0 -DREADELF_FLAG_NAME=""
+
+# RUN: yaml2obj %s -o %t -DCLASS_NAME="ELFCLASS32" -DMACHINE_NAME="EM_SPARC32PLUS" -DFLAG_NAME="EF_SPARC_32PLUS"
+# RUN: llvm-readobj -h %t | FileCheck %s --check-prefixes=V8PLUS-PLAIN -DFLAG_NAME=EF_SPARC_32PLUS -DFLAG_VALUE=0x100
+# RUN: llvm-readelf -h %t | FileCheck %s --check-prefix=READELF -DFLAG_VALUE=0x100 -DREADELF_FLAG_NAME=", V8+ ABI"
+
+# RUN: yaml2obj %s -o %t -DCLASS_NAME="ELFCLASS32" -DMACHINE_NAME="EM_SPARC32PLUS" -DFLAG_NAME="EF_SPARC_32PLUS, EF_SPARC_SUN_US1"
+# RUN: llvm-readobj -h %t | FileCheck %s --check-prefixes=V8PLUS-US1 -DFLAG0_NAME=EF_SPARC_32PLUS -DFLAG1_NAME=EF_SPARC_SUN_US1 -DFLAG_VALUE=0x300
+# RUN: llvm-readelf -h %t | FileCheck %s --check-prefix=READELF -DFLAG_VALUE=0x300 -DREADELF_FLAG_NAME=", V8+ ABI, Sun UltraSPARC I extensions"
+
+# RUN: yaml2obj %s -o %t -DCLASS_NAME="ELFCLASS64" -DMACHINE_NAME="EM_SPARCV9" -DFLAG_NAME=""
+# RUN: llvm-readobj -h %t | FileCheck %s --check-prefixes=V9-PLAIN -DFLAG_VALUE=0x0
+# RUN: llvm-readelf -h %t | FileCheck %s --check-prefix=READELF -DFLAG_VALUE=0x0 -DREADELF_FLAG_NAME=""
+
+# RUN: yaml2obj %s -o %t -DCLASS_NAME="ELFCLASS64" -DMACHINE_NAME="EM_SPARCV9" -DFLAG_NAME="EF_SPARC_SUN_US1"
+# RUN: llvm-readobj -h %t | FileCheck %s --check-prefixes=V9-US1 -DFLAG_NAME=EF_SPARC_SUN_US1 -DFLAG_VALUE=0x200
+# RUN: llvm-readelf -h %t | FileCheck %s --check-prefix=READELF -DFLAG_VALUE=0x200 -DREADELF_FLAG_NAME=", Sun UltraSPARC I extensions"
+
+# RUN: yaml2obj %s -o %t -DCLASS_NAME="ELFCLASS64" -DMACHINE_NAME="EM_SPARCV9" -DFLAG_NAME="EF_SPARC_SUN_US1, EF_SPARCV9_RMO"
+# RUN: llvm-readobj -h %t | FileCheck %s --check-prefixes=V9-US1-RMO -DFLAG0_NAME=EF_SPARCV9_RMO -DFLAG1_NAME=EF_SPARC_SUN_US1 -DFLAG_VALUE=0x202
+# RUN: llvm-readelf -h %t | FileCheck %s --check-prefix=READELF -DFLAG_VALUE=0x202 -DREADELF_FLAG_NAME=", Sun UltraSPARC I extensions, Relaxed Memory Ordering"
----------------
s-barannikov wrote:

Yes, thanks.


https://github.com/llvm/llvm-project/pull/102843


More information about the llvm-commits mailing list