diff --git a/docs/AMDGPUUsage.rst b/docs/AMDGPUUsage.rst index 7d8aab577a4..8d6d86a35e9 100644 --- a/docs/AMDGPUUsage.rst +++ b/docs/AMDGPUUsage.rst @@ -421,6 +421,12 @@ Every processor supports every OS ABI (see :ref:`amdgpu-os`) with the following Add product names. + ``gfx1035`` ``amdgcn`` APU - cumode - Absolute - *pal-amdpal* *TBA* + - wavefrontsize64 flat + scratch .. TODO:: + Add product + names. + =========== =============== ============ ===== ================= =============== =============== ====================== .. _amdgpu-target-features: @@ -1151,7 +1157,7 @@ The AMDGPU backend uses the following ELF header: ``EF_AMDGPU_MACH_AMDGCN_GFX602`` 0x03a ``gfx602`` ``EF_AMDGPU_MACH_AMDGCN_GFX705`` 0x03b ``gfx705`` ``EF_AMDGPU_MACH_AMDGCN_GFX805`` 0x03c ``gfx805`` - *reserved* 0x03d Reserved. + ``EF_AMDGPU_MACH_AMDGCN_GFX1035`` 0x03d ``gfx1035`` ``EF_AMDGPU_MACH_AMDGCN_GFX1034`` 0x03e ``gfx1034`` ``EF_AMDGPU_MACH_AMDGCN_GFX90A`` 0x03f ``gfx90a`` *reserved* 0x040 Reserved. diff --git a/include/llvm/BinaryFormat/ELF.h b/include/llvm/BinaryFormat/ELF.h index 99ad345bbcc..bd784b97396 100644 --- a/include/llvm/BinaryFormat/ELF.h +++ b/include/llvm/BinaryFormat/ELF.h @@ -737,7 +737,7 @@ enum : unsigned { EF_AMDGPU_MACH_AMDGCN_GFX602 = 0x03a, EF_AMDGPU_MACH_AMDGCN_GFX705 = 0x03b, EF_AMDGPU_MACH_AMDGCN_GFX805 = 0x03c, - EF_AMDGPU_MACH_AMDGCN_RESERVED_0X3D = 0x03d, + EF_AMDGPU_MACH_AMDGCN_GFX1035 = 0x03d, EF_AMDGPU_MACH_AMDGCN_GFX1034 = 0x03e, EF_AMDGPU_MACH_AMDGCN_GFX90A = 0x03f, EF_AMDGPU_MACH_AMDGCN_RESERVED_0X40 = 0x040, diff --git a/include/llvm/Support/TargetParser.h b/include/llvm/Support/TargetParser.h index e36ee01636b..366dd3cf55c 100644 --- a/include/llvm/Support/TargetParser.h +++ b/include/llvm/Support/TargetParser.h @@ -95,9 +95,10 @@ enum GPUKind : uint32_t { GK_GFX1032 = 77, GK_GFX1033 = 78, GK_GFX1034 = 79, + GK_GFX1035 = 80, GK_AMDGCN_FIRST = GK_GFX600, - GK_AMDGCN_LAST = GK_GFX1034, + GK_AMDGCN_LAST = GK_GFX1035, }; /// Instruction set architecture version. diff --git a/lib/Object/ELFObjectFile.cpp b/lib/Object/ELFObjectFile.cpp index 932f3aad27c..6613d79ab3d 100644 --- a/lib/Object/ELFObjectFile.cpp +++ b/lib/Object/ELFObjectFile.cpp @@ -481,6 +481,8 @@ StringRef ELFObjectFileBase::getAMDGPUCPUName() const { return "gfx1033"; case ELF::EF_AMDGPU_MACH_AMDGCN_GFX1034: return "gfx1034"; + case ELF::EF_AMDGPU_MACH_AMDGCN_GFX1035: + return "gfx1035"; default: llvm_unreachable("Unknown EF_AMDGPU_MACH value"); } diff --git a/lib/ObjectYAML/ELFYAML.cpp b/lib/ObjectYAML/ELFYAML.cpp index af6247e9339..50821544a68 100644 --- a/lib/ObjectYAML/ELFYAML.cpp +++ b/lib/ObjectYAML/ELFYAML.cpp @@ -555,6 +555,7 @@ void ScalarBitSetTraits::bitset(IO &IO, BCaseMask(EF_AMDGPU_MACH_AMDGCN_GFX1032, EF_AMDGPU_MACH); BCaseMask(EF_AMDGPU_MACH_AMDGCN_GFX1033, EF_AMDGPU_MACH); BCaseMask(EF_AMDGPU_MACH_AMDGCN_GFX1034, EF_AMDGPU_MACH); + BCaseMask(EF_AMDGPU_MACH_AMDGCN_GFX1035, EF_AMDGPU_MACH); switch (Object->Header.ABIVersion) { default: // ELFOSABI_AMDGPU_PAL, ELFOSABI_AMDGPU_MESA3D support *_V3 flags. diff --git a/lib/Support/TargetParser.cpp b/lib/Support/TargetParser.cpp index d61b64b1f50..1dadce4b904 100644 --- a/lib/Support/TargetParser.cpp +++ b/lib/Support/TargetParser.cpp @@ -115,6 +115,7 @@ constexpr GPUInfo AMDGCNGPUs[] = { {{"gfx1032"}, {"gfx1032"}, GK_GFX1032, FEATURE_FAST_FMA_F32|FEATURE_FAST_DENORMAL_F32|FEATURE_WAVE32}, {{"gfx1033"}, {"gfx1033"}, GK_GFX1033, FEATURE_FAST_FMA_F32|FEATURE_FAST_DENORMAL_F32|FEATURE_WAVE32}, {{"gfx1034"}, {"gfx1034"}, GK_GFX1034, FEATURE_FAST_FMA_F32|FEATURE_FAST_DENORMAL_F32|FEATURE_WAVE32}, + {{"gfx1035"}, {"gfx1035"}, GK_GFX1035, FEATURE_FAST_FMA_F32|FEATURE_FAST_DENORMAL_F32|FEATURE_WAVE32}, }; const GPUInfo *getArchEntry(AMDGPU::GPUKind AK, ArrayRef Table) { @@ -227,6 +228,7 @@ AMDGPU::IsaVersion AMDGPU::getIsaVersion(StringRef GPU) { case GK_GFX1032: return {10, 3, 2}; case GK_GFX1033: return {10, 3, 3}; case GK_GFX1034: return {10, 3, 4}; + case GK_GFX1035: return {10, 3, 5}; default: return {0, 0, 0}; } } diff --git a/lib/Target/AMDGPU/GCNProcessors.td b/lib/Target/AMDGPU/GCNProcessors.td index e4eb91613cb..3a68ed1934e 100644 --- a/lib/Target/AMDGPU/GCNProcessors.td +++ b/lib/Target/AMDGPU/GCNProcessors.td @@ -231,3 +231,7 @@ def : ProcessorModel<"gfx1033", GFX10SpeedModel, def : ProcessorModel<"gfx1034", GFX10SpeedModel, FeatureISAVersion10_3_0.Features >; + +def : ProcessorModel<"gfx1035", GFX10SpeedModel, + FeatureISAVersion10_3_0.Features +>; diff --git a/lib/Target/AMDGPU/MCTargetDesc/AMDGPUTargetStreamer.cpp b/lib/Target/AMDGPU/MCTargetDesc/AMDGPUTargetStreamer.cpp index 0008c157441..9a9a2c973f4 100644 --- a/lib/Target/AMDGPU/MCTargetDesc/AMDGPUTargetStreamer.cpp +++ b/lib/Target/AMDGPU/MCTargetDesc/AMDGPUTargetStreamer.cpp @@ -111,6 +111,7 @@ StringRef AMDGPUTargetStreamer::getArchNameFromElfMach(unsigned ElfMach) { case ELF::EF_AMDGPU_MACH_AMDGCN_GFX1032: AK = GK_GFX1032; break; case ELF::EF_AMDGPU_MACH_AMDGCN_GFX1033: AK = GK_GFX1033; break; case ELF::EF_AMDGPU_MACH_AMDGCN_GFX1034: AK = GK_GFX1034; break; + case ELF::EF_AMDGPU_MACH_AMDGCN_GFX1035: AK = GK_GFX1035; break; case ELF::EF_AMDGPU_MACH_NONE: AK = GK_NONE; break; } @@ -173,6 +174,7 @@ unsigned AMDGPUTargetStreamer::getElfMach(StringRef GPU) { case GK_GFX1032: return ELF::EF_AMDGPU_MACH_AMDGCN_GFX1032; case GK_GFX1033: return ELF::EF_AMDGPU_MACH_AMDGCN_GFX1033; case GK_GFX1034: return ELF::EF_AMDGPU_MACH_AMDGCN_GFX1034; + case GK_GFX1035: return ELF::EF_AMDGPU_MACH_AMDGCN_GFX1035; case GK_NONE: return ELF::EF_AMDGPU_MACH_NONE; } diff --git a/test/CodeGen/AMDGPU/directive-amdgcn-target.ll b/test/CodeGen/AMDGPU/directive-amdgcn-target.ll index f181f8548f4..a922c3fe8cb 100644 --- a/test/CodeGen/AMDGPU/directive-amdgcn-target.ll +++ b/test/CodeGen/AMDGPU/directive-amdgcn-target.ll @@ -88,6 +88,7 @@ ; RUN: llc -mtriple=amdgcn-amd-amdhsa --amdhsa-code-object-version=3 -mcpu=gfx1032 < %s | FileCheck --check-prefixes=V3-GFX1032 %s ; RUN: llc -mtriple=amdgcn-amd-amdhsa --amdhsa-code-object-version=3 -mcpu=gfx1033 < %s | FileCheck --check-prefixes=V3-GFX1033 %s ; RUN: llc -mtriple=amdgcn-amd-amdhsa --amdhsa-code-object-version=3 -mcpu=gfx1034 < %s | FileCheck --check-prefixes=V3-GFX1034 %s +; RUN: llc -mtriple=amdgcn-amd-amdhsa --amdhsa-code-object-version=3 -mcpu=gfx1035 < %s | FileCheck --check-prefixes=V3-GFX1035 %s ; RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx600 < %s | FileCheck --check-prefixes=GFX600 %s ; RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=tahiti < %s | FileCheck --check-prefixes=GFX600 %s @@ -179,6 +180,7 @@ ; RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx1032 < %s | FileCheck --check-prefixes=GFX1032 %s ; RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx1033 < %s | FileCheck --check-prefixes=GFX1033 %s ; RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx1034 < %s | FileCheck --check-prefixes=GFX1034 %s +; RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx1035 < %s | FileCheck --check-prefixes=GFX1035 %s ; V3-GFX600: .amdgcn_target "amdgcn-amd-amdhsa--gfx600" ; V3-GFX601: .amdgcn_target "amdgcn-amd-amdhsa--gfx601" @@ -227,6 +229,7 @@ ; V3-GFX1032: .amdgcn_target "amdgcn-amd-amdhsa--gfx1032" ; V3-GFX1033: .amdgcn_target "amdgcn-amd-amdhsa--gfx1033" ; V3-GFX1034: .amdgcn_target "amdgcn-amd-amdhsa--gfx1034" +; V3-GFX1035: .amdgcn_target "amdgcn-amd-amdhsa--gfx1035" ; GFX600: .amdgcn_target "amdgcn-amd-amdhsa--gfx600" ; GFX601: .amdgcn_target "amdgcn-amd-amdhsa--gfx601" @@ -296,6 +299,7 @@ ; GFX1032: .amdgcn_target "amdgcn-amd-amdhsa--gfx1032" ; GFX1033: .amdgcn_target "amdgcn-amd-amdhsa--gfx1033" ; GFX1034: .amdgcn_target "amdgcn-amd-amdhsa--gfx1034" +; GFX1035: .amdgcn_target "amdgcn-amd-amdhsa--gfx1035" define amdgpu_kernel void @directive_amdgcn_target() { ret void diff --git a/test/CodeGen/AMDGPU/elf-header-flags-mach.ll b/test/CodeGen/AMDGPU/elf-header-flags-mach.ll index 2af743d3a14..e8d89ed0879 100644 --- a/test/CodeGen/AMDGPU/elf-header-flags-mach.ll +++ b/test/CodeGen/AMDGPU/elf-header-flags-mach.ll @@ -63,6 +63,7 @@ ; RUN: llc -filetype=obj -march=amdgcn -mcpu=gfx1032 < %s | llvm-readobj -file-headers - | FileCheck --check-prefixes=ALL,ARCH-GCN,GFX1032 %s ; RUN: llc -filetype=obj -march=amdgcn -mcpu=gfx1033 < %s | llvm-readobj -file-headers - | FileCheck --check-prefixes=ALL,ARCH-GCN,GFX1033 %s ; RUN: llc -filetype=obj -march=amdgcn -mcpu=gfx1034 < %s | llvm-readobj -file-headers - | FileCheck --check-prefixes=ALL,ARCH-GCN,GFX1034 %s +; RUN: llc -filetype=obj -march=amdgcn -mcpu=gfx1035 < %s | llvm-readobj -file-headers - | FileCheck --check-prefixes=ALL,ARCH-GCN,GFX1035 %s ; FIXME: With the default attributes the eflags are not accurate for ; xnack and sramecc. Subsequent Target-ID patches will address this. @@ -123,6 +124,7 @@ ; GFX1032: EF_AMDGPU_MACH_AMDGCN_GFX1032 (0x38) ; GFX1033: EF_AMDGPU_MACH_AMDGCN_GFX1033 (0x39) ; GFX1034: EF_AMDGPU_MACH_AMDGCN_GFX1034 (0x3E) +; GFX1035: EF_AMDGPU_MACH_AMDGCN_GFX1035 (0x3D) ; ALL: ] define amdgpu_kernel void @elf_header() { diff --git a/test/MC/AMDGPU/gfx1011_dlops.s b/test/MC/AMDGPU/gfx1011_dlops.s index c2b798782d0..5c07d1b39f5 100644 --- a/test/MC/AMDGPU/gfx1011_dlops.s +++ b/test/MC/AMDGPU/gfx1011_dlops.s @@ -5,6 +5,7 @@ // RUN: llvm-mc -arch=amdgcn -mcpu=gfx1032 -show-encoding %s | FileCheck --check-prefix=GFX10 %s // RUN: llvm-mc -arch=amdgcn -mcpu=gfx1033 -show-encoding %s | FileCheck --check-prefix=GFX10 %s // RUN: llvm-mc -arch=amdgcn -mcpu=gfx1034 -show-encoding %s | FileCheck --check-prefix=GFX10 %s +// RUN: llvm-mc -arch=amdgcn -mcpu=gfx1035 -show-encoding %s | FileCheck --check-prefix=GFX10 %s v_dot2_f32_f16 v0, v1, v2, v3 // GFX10: encoding: [0x00,0x40,0x13,0xcc,0x01,0x05,0x0e,0x1c] diff --git a/test/MC/AMDGPU/gfx1030_err.s b/test/MC/AMDGPU/gfx1030_err.s index 5f2b395412e..ef04e685771 100644 --- a/test/MC/AMDGPU/gfx1030_err.s +++ b/test/MC/AMDGPU/gfx1030_err.s @@ -3,6 +3,7 @@ // RUN: not llvm-mc -arch=amdgcn -mcpu=gfx1032 %s 2>&1 | FileCheck --check-prefix=GFX10 --implicit-check-not=error: %s // RUN: not llvm-mc -arch=amdgcn -mcpu=gfx1033 %s 2>&1 | FileCheck --check-prefix=GFX10 --implicit-check-not=error: %s // RUN: not llvm-mc -arch=amdgcn -mcpu=gfx1034 %s 2>&1 | FileCheck --check-prefix=GFX10 --implicit-check-not=error: %s +// RUN: not llvm-mc -arch=amdgcn -mcpu=gfx1035 %s 2>&1 | FileCheck --check-prefix=GFX10 --implicit-check-not=error: %s v_dot8c_i32_i4 v5, v1, v2 // GFX10: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU diff --git a/test/MC/AMDGPU/gfx1030_new.s b/test/MC/AMDGPU/gfx1030_new.s index 47eb5a6e75d..9fbf04053be 100644 --- a/test/MC/AMDGPU/gfx1030_new.s +++ b/test/MC/AMDGPU/gfx1030_new.s @@ -3,6 +3,7 @@ // RUN: llvm-mc -arch=amdgcn -mcpu=gfx1032 -show-encoding %s | FileCheck --check-prefix=GFX10 %s // RUN: llvm-mc -arch=amdgcn -mcpu=gfx1033 -show-encoding %s | FileCheck --check-prefix=GFX10 %s // RUN: llvm-mc -arch=amdgcn -mcpu=gfx1034 -show-encoding %s | FileCheck --check-prefix=GFX10 %s +// RUN: llvm-mc -arch=amdgcn -mcpu=gfx1035 -show-encoding %s | FileCheck --check-prefix=GFX10 %s global_load_dword_addtid v1, s[2:3] offset:16 // GFX10: encoding: [0x10,0x80,0x58,0xdc,0x00,0x00,0x02,0x01] diff --git a/test/MC/Disassembler/AMDGPU/gfx1011_dasm_dlops.txt b/test/MC/Disassembler/AMDGPU/gfx1011_dasm_dlops.txt index 27f9caa0923..00d3e86ca7b 100644 --- a/test/MC/Disassembler/AMDGPU/gfx1011_dasm_dlops.txt +++ b/test/MC/Disassembler/AMDGPU/gfx1011_dasm_dlops.txt @@ -5,6 +5,7 @@ # RUN: llvm-mc -arch=amdgcn -mcpu=gfx1032 -disassemble -show-encoding < %s | FileCheck -check-prefix=GFX10 %s # RUN: llvm-mc -arch=amdgcn -mcpu=gfx1033 -disassemble -show-encoding < %s | FileCheck -check-prefix=GFX10 %s # RUN: llvm-mc -arch=amdgcn -mcpu=gfx1034 -disassemble -show-encoding < %s | FileCheck -check-prefix=GFX10 %s +# RUN: llvm-mc -arch=amdgcn -mcpu=gfx1035 -disassemble -show-encoding < %s | FileCheck -check-prefix=GFX10 %s # GFX10: v_dot2_f32_f16 v0, v1, v2, v3 ; encoding: [0x00,0x40,0x13,0xcc,0x01,0x05,0x0e,0x1c] 0x00,0x40,0x13,0xcc,0x01,0x05,0x0e,0x1c diff --git a/test/MC/Disassembler/AMDGPU/gfx1030_dasm_new.txt b/test/MC/Disassembler/AMDGPU/gfx1030_dasm_new.txt index 65ed5edcd26..03785e69642 100644 --- a/test/MC/Disassembler/AMDGPU/gfx1030_dasm_new.txt +++ b/test/MC/Disassembler/AMDGPU/gfx1030_dasm_new.txt @@ -3,6 +3,7 @@ # RUN: llvm-mc -arch=amdgcn -mcpu=gfx1032 -disassemble -show-encoding < %s | FileCheck -check-prefix=GFX10 %s # RUN: llvm-mc -arch=amdgcn -mcpu=gfx1033 -disassemble -show-encoding < %s | FileCheck -check-prefix=GFX10 %s # RUN: llvm-mc -arch=amdgcn -mcpu=gfx1034 -disassemble -show-encoding < %s | FileCheck -check-prefix=GFX10 %s +# RUN: llvm-mc -arch=amdgcn -mcpu=gfx1035 -disassemble -show-encoding < %s | FileCheck -check-prefix=GFX10 %s # GFX10: global_load_dword_addtid v1, s[2:3] offset:16 0x10,0x80,0x58,0xdc,0x00,0x00,0x02,0x01 diff --git a/test/Object/AMDGPU/elf-header-flags-mach.yaml b/test/Object/AMDGPU/elf-header-flags-mach.yaml index f5aca52e39b..62c2b83e823 100644 --- a/test/Object/AMDGPU/elf-header-flags-mach.yaml +++ b/test/Object/AMDGPU/elf-header-flags-mach.yaml @@ -186,6 +186,10 @@ # RUN: llvm-readobj -S --file-headers %t.o.AMDGCN_GFX1034 | FileCheck --check-prefixes=ELF-AMDGCN-ALL,ELF-AMDGCN-GFX1034 %s # RUN: obj2yaml %t.o.AMDGCN_GFX1034 | FileCheck --check-prefixes=YAML-AMDGCN-ALL,YAML-AMDGCN-GFX1034 %s +# RUN: sed -e 's//64/' -e 's//AMDGCN_GFX1035/' %s | yaml2obj -o %t.o.AMDGCN_GFX1035 +# RUN: llvm-readobj -S --file-headers %t.o.AMDGCN_GFX1035 | FileCheck --check-prefixes=ELF-AMDGCN-ALL,ELF-AMDGCN-GFX1035 %s +# RUN: obj2yaml %t.o.AMDGCN_GFX1035 | FileCheck --check-prefixes=YAML-AMDGCN-ALL,YAML-AMDGCN-GFX1035 %s + # ELF-R600-ALL: Format: elf32-amdgpu # ELF-R600-ALL: Arch: r600 # ELF-R600-ALL: AddressSize: 32bit @@ -344,6 +348,9 @@ # ELF-AMDGCN-GFX1034: EF_AMDGPU_MACH_AMDGCN_GFX1034 (0x3E) # YAML-AMDGCN-GFX1034: Flags: [ EF_AMDGPU_MACH_AMDGCN_GFX1034 ] +# ELF-AMDGCN-GFX1035: EF_AMDGPU_MACH_AMDGCN_GFX1035 (0x3D) +# YAML-AMDGCN-GFX1035: Flags: [ EF_AMDGPU_MACH_AMDGCN_GFX1035 ] +# # ELF-AMDGCN-ALL: ] diff --git a/test/tools/llvm-objdump/ELF/AMDGPU/subtarget.ll b/test/tools/llvm-objdump/ELF/AMDGPU/subtarget.ll index a759a3e289d..425d631616d 100644 --- a/test/tools/llvm-objdump/ELF/AMDGPU/subtarget.ll +++ b/test/tools/llvm-objdump/ELF/AMDGPU/subtarget.ll @@ -5,6 +5,10 @@ define amdgpu_kernel void @test_kernel() { ; Test subtarget detection. Disassembly is only supported for GFX8 and beyond. ; ; ----------------------------------GFX10-------------------------------------- +; RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx1035 -filetype=obj -O0 -o %t.o %s +; RUN: llvm-objdump -D --arch-name=amdgcn --mcpu=gfx1035 %t.o > %t-specify.txt +; RUN: llvm-objdump -D %t.o > %t-detect.txt +; RUN: diff %t-specify.txt %t-detect.txt ; ; RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx1034 -filetype=obj -O0 -o %t.o %s ; RUN: llvm-objdump -D --arch-name=amdgcn --mcpu=gfx1034 %t.o > %t-specify.txt diff --git a/test/tools/llvm-readobj/ELF/amdgpu-elf-headers.test b/test/tools/llvm-readobj/ELF/amdgpu-elf-headers.test index 8f026aa3bfc..c8f44cadde9 100644 --- a/test/tools/llvm-readobj/ELF/amdgpu-elf-headers.test +++ b/test/tools/llvm-readobj/ELF/amdgpu-elf-headers.test @@ -277,6 +277,14 @@ # RUN: yaml2obj %s -o %t -DABI_VERSION=2 -DFLAG_NAME=EF_AMDGPU_MACH_AMDGCN_GFX1034 # RUN: llvm-readobj -h %t | FileCheck %s --check-prefixes=ALL,KNOWN-ABI-VERSION,SINGLE-FLAG --match-full-lines -DABI_VERSION=2 -DFILE=%t -DFLAG_NAME=EF_AMDGPU_MACH_AMDGCN_GFX1034 -DFLAG_VALUE=0x3E +# RUN: yaml2obj %s -o %t -DABI_VERSION=0 -DFLAG_NAME=EF_AMDGPU_MACH_AMDGCN_GFX1035 +# RUN: llvm-readobj -h %t | FileCheck %s --check-prefixes=ALL,KNOWN-ABI-VERSION,SINGLE-FLAG --match-full-lines -DABI_VERSION=0 -DFILE=%t -DFLAG_NAME=EF_AMDGPU_MACH_AMDGCN_GFX1035 -DFLAG_VALUE=0x3D +# +# RUN: yaml2obj %s -o %t -DABI_VERSION=1 -DFLAG_NAME=EF_AMDGPU_MACH_AMDGCN_GFX1035 +# RUN: llvm-readobj -h %t | FileCheck %s --check-prefixes=ALL,KNOWN-ABI-VERSION,SINGLE-FLAG --match-full-lines -DABI_VERSION=1 -DFILE=%t -DFLAG_NAME=EF_AMDGPU_MACH_AMDGCN_GFX1035 -DFLAG_VALUE=0x3D +# +# RUN: yaml2obj %s -o %t -DABI_VERSION=2 -DFLAG_NAME=EF_AMDGPU_MACH_AMDGCN_GFX1035 +# RUN: llvm-readobj -h %t | FileCheck %s --check-prefixes=ALL,KNOWN-ABI-VERSION,SINGLE-FLAG --match-full-lines -DABI_VERSION=2 -DFILE=%t -DFLAG_NAME=EF_AMDGPU_MACH_AMDGCN_GFX1035 -DFLAG_VALUE=0x3D # RUN: yaml2obj %s -o %t -DABI_VERSION=0 -DFLAG_NAME="EF_AMDGPU_MACH_AMDGCN_GFX90A, EF_AMDGPU_FEATURE_XNACK_V3" # RUN: llvm-readobj -h %t | FileCheck %s --check-prefixes=ALL,KNOWN-ABI-VERSION,DOUBLE-FLAG --match-full-lines -DABI_VERSION=0 -DFILE=%t -DFLAG_0="EF_AMDGPU_FEATURE_XNACK_V3 (0x100)" -DFLAG_1="EF_AMDGPU_MACH_AMDGCN_GFX90A (0x3F)" -DFLAG_VALUE=0x13F diff --git a/tools/llvm-readobj/ELFDumper.cpp b/tools/llvm-readobj/ELFDumper.cpp index bf2b642c695..11914fc808f 100644 --- a/tools/llvm-readobj/ELFDumper.cpp +++ b/tools/llvm-readobj/ELFDumper.cpp @@ -1493,6 +1493,7 @@ static const EnumEntry ElfHeaderAMDGPUFlagsABIVersion3[] = { LLVM_READOBJ_ENUM_ENT(ELF, EF_AMDGPU_MACH_AMDGCN_GFX1032), LLVM_READOBJ_ENUM_ENT(ELF, EF_AMDGPU_MACH_AMDGCN_GFX1033), LLVM_READOBJ_ENUM_ENT(ELF, EF_AMDGPU_MACH_AMDGCN_GFX1034), + LLVM_READOBJ_ENUM_ENT(ELF, EF_AMDGPU_MACH_AMDGCN_GFX1035), LLVM_READOBJ_ENUM_ENT(ELF, EF_AMDGPU_FEATURE_XNACK_V3), LLVM_READOBJ_ENUM_ENT(ELF, EF_AMDGPU_FEATURE_SRAMECC_V3) }; @@ -1546,6 +1547,7 @@ static const EnumEntry ElfHeaderAMDGPUFlagsABIVersion4[] = { LLVM_READOBJ_ENUM_ENT(ELF, EF_AMDGPU_MACH_AMDGCN_GFX1032), LLVM_READOBJ_ENUM_ENT(ELF, EF_AMDGPU_MACH_AMDGCN_GFX1033), LLVM_READOBJ_ENUM_ENT(ELF, EF_AMDGPU_MACH_AMDGCN_GFX1034), + LLVM_READOBJ_ENUM_ENT(ELF, EF_AMDGPU_MACH_AMDGCN_GFX1035), LLVM_READOBJ_ENUM_ENT(ELF, EF_AMDGPU_FEATURE_XNACK_ANY_V4), LLVM_READOBJ_ENUM_ENT(ELF, EF_AMDGPU_FEATURE_XNACK_OFF_V4), LLVM_READOBJ_ENUM_ENT(ELF, EF_AMDGPU_FEATURE_XNACK_ON_V4),