mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2025-01-29 21:24:04 +00:00
[AMDGPU] Add gfx1036 target
Differential Revision: https://reviews.llvm.org/D120846
This commit is contained in:
parent
93f42491a5
commit
840695814a
@ -96,6 +96,7 @@ enum class CudaArch {
|
||||
GFX1033,
|
||||
GFX1034,
|
||||
GFX1035,
|
||||
GFX1036,
|
||||
Generic, // A processor model named 'generic' if the target backend defines a
|
||||
// public one.
|
||||
LAST,
|
||||
|
@ -124,6 +124,7 @@ static const CudaArchToStringMap arch_names[] = {
|
||||
GFX(1033), // gfx1033
|
||||
GFX(1034), // gfx1034
|
||||
GFX(1035), // gfx1035
|
||||
GFX(1036), // gfx1036
|
||||
{CudaArch::Generic, "generic", ""},
|
||||
// clang-format on
|
||||
};
|
||||
|
@ -183,6 +183,7 @@ bool AMDGPUTargetInfo::initFeatureMap(
|
||||
// XXX - What does the member GPU mean if device name string passed here?
|
||||
if (isAMDGCN(getTriple())) {
|
||||
switch (llvm::AMDGPU::parseArchAMDGCN(CPU)) {
|
||||
case GK_GFX1036:
|
||||
case GK_GFX1035:
|
||||
case GK_GFX1034:
|
||||
case GK_GFX1033:
|
||||
|
@ -216,6 +216,7 @@ void NVPTXTargetInfo::getTargetDefines(const LangOptions &Opts,
|
||||
case CudaArch::GFX1033:
|
||||
case CudaArch::GFX1034:
|
||||
case CudaArch::GFX1035:
|
||||
case CudaArch::GFX1036:
|
||||
case CudaArch::Generic:
|
||||
case CudaArch::LAST:
|
||||
break;
|
||||
|
@ -3927,6 +3927,7 @@ void CGOpenMPRuntimeGPU::processRequiresDirective(
|
||||
case CudaArch::GFX1033:
|
||||
case CudaArch::GFX1034:
|
||||
case CudaArch::GFX1035:
|
||||
case CudaArch::GFX1036:
|
||||
case CudaArch::Generic:
|
||||
case CudaArch::UNUSED:
|
||||
case CudaArch::UNKNOWN:
|
||||
|
@ -36,6 +36,7 @@
|
||||
// RUN: %clang_cc1 -triple amdgcn -target-cpu gfx1033 -S -emit-llvm -o - %s | FileCheck --check-prefix=GFX1033 %s
|
||||
// RUN: %clang_cc1 -triple amdgcn -target-cpu gfx1034 -S -emit-llvm -o - %s | FileCheck --check-prefix=GFX1034 %s
|
||||
// RUN: %clang_cc1 -triple amdgcn -target-cpu gfx1035 -S -emit-llvm -o - %s | FileCheck --check-prefix=GFX1035 %s
|
||||
// RUN: %clang_cc1 -triple amdgcn -target-cpu gfx1036 -S -emit-llvm -o - %s | FileCheck --check-prefix=GFX1036 %s
|
||||
|
||||
// GFX600: "target-features"="+s-memtime-inst"
|
||||
// GFX601: "target-features"="+s-memtime-inst"
|
||||
@ -70,5 +71,6 @@
|
||||
// GFX1033: "target-features"="+16-bit-insts,+ci-insts,+dl-insts,+dot1-insts,+dot2-insts,+dot5-insts,+dot6-insts,+dot7-insts,+dpp,+flat-address-space,+gfx10-3-insts,+gfx10-insts,+gfx8-insts,+gfx9-insts,+s-memrealtime,+s-memtime-inst"
|
||||
// GFX1034: "target-features"="+16-bit-insts,+ci-insts,+dl-insts,+dot1-insts,+dot2-insts,+dot5-insts,+dot6-insts,+dot7-insts,+dpp,+flat-address-space,+gfx10-3-insts,+gfx10-insts,+gfx8-insts,+gfx9-insts,+s-memrealtime,+s-memtime-inst"
|
||||
// GFX1035: "target-features"="+16-bit-insts,+ci-insts,+dl-insts,+dot1-insts,+dot2-insts,+dot5-insts,+dot6-insts,+dot7-insts,+dpp,+flat-address-space,+gfx10-3-insts,+gfx10-insts,+gfx8-insts,+gfx9-insts,+s-memrealtime,+s-memtime-inst"
|
||||
// GFX1036: "target-features"="+16-bit-insts,+ci-insts,+dl-insts,+dot1-insts,+dot2-insts,+dot5-insts,+dot6-insts,+dot7-insts,+dpp,+flat-address-space,+gfx10-3-insts,+gfx10-insts,+gfx8-insts,+gfx9-insts,+s-memrealtime,+s-memtime-inst"
|
||||
|
||||
kernel void test() {}
|
||||
|
@ -118,6 +118,7 @@
|
||||
// RUN: %clang -E -dM -target amdgcn -mcpu=gfx1033 %s 2>&1 | FileCheck --check-prefixes=ARCH-GCN,FAST_FMAF %s -DWAVEFRONT_SIZE=32 -DCPU=gfx1033
|
||||
// RUN: %clang -E -dM -target amdgcn -mcpu=gfx1034 %s 2>&1 | FileCheck --check-prefixes=ARCH-GCN,FAST_FMAF %s -DWAVEFRONT_SIZE=32 -DCPU=gfx1034
|
||||
// RUN: %clang -E -dM -target amdgcn -mcpu=gfx1035 %s 2>&1 | FileCheck --check-prefixes=ARCH-GCN,FAST_FMAF %s -DWAVEFRONT_SIZE=32 -DCPU=gfx1035
|
||||
// RUN: %clang -E -dM -target amdgcn -mcpu=gfx1036 %s 2>&1 | FileCheck --check-prefixes=ARCH-GCN,FAST_FMAF %s -DWAVEFRONT_SIZE=32 -DCPU=gfx1036
|
||||
|
||||
// ARCH-GCN-DAG: #define FP_FAST_FMA 1
|
||||
|
||||
|
@ -103,6 +103,7 @@
|
||||
// RUN: %clang -### -target amdgcn -mcpu=gfx1033 %s 2>&1 | FileCheck --check-prefix=GFX1033 %s
|
||||
// RUN: %clang -### -target amdgcn -mcpu=gfx1034 %s 2>&1 | FileCheck --check-prefix=GFX1034 %s
|
||||
// RUN: %clang -### -target amdgcn -mcpu=gfx1035 %s 2>&1 | FileCheck --check-prefix=GFX1035 %s
|
||||
// RUN: %clang -### -target amdgcn -mcpu=gfx1036 %s 2>&1 | FileCheck --check-prefix=GFX1036 %s
|
||||
|
||||
// GCNDEFAULT-NOT: -target-cpu
|
||||
// GFX600: "-target-cpu" "gfx600"
|
||||
@ -138,3 +139,4 @@
|
||||
// GFX1033: "-target-cpu" "gfx1033"
|
||||
// GFX1034: "-target-cpu" "gfx1034"
|
||||
// GFX1035: "-target-cpu" "gfx1035"
|
||||
// GFX1036: "-target-cpu" "gfx1036"
|
||||
|
@ -29,7 +29,7 @@
|
||||
|
||||
// RUN: not %clang_cc1 -triple nvptx--- -target-cpu not-a-cpu -fsyntax-only %s 2>&1 | FileCheck %s --check-prefix NVPTX
|
||||
// NVPTX: error: unknown target CPU 'not-a-cpu'
|
||||
// NVPTX-NEXT: note: valid target CPU values are: sm_20, sm_21, sm_30, sm_32, sm_35, sm_37, sm_50, sm_52, sm_53, sm_60, sm_61, sm_62, sm_70, sm_72, sm_75, sm_80, sm_86, gfx600, gfx601, gfx602, gfx700, gfx701, gfx702, gfx703, gfx704, gfx705, gfx801, gfx802, gfx803, gfx805, gfx810, gfx900, gfx902, gfx904, gfx906, gfx908, gfx909, gfx90a, gfx90c, gfx940, gfx1010, gfx1011, gfx1012, gfx1013, gfx1030, gfx1031, gfx1032, gfx1033, gfx1034, gfx1035{{$}}
|
||||
// NVPTX-NEXT: note: valid target CPU values are: sm_20, sm_21, sm_30, sm_32, sm_35, sm_37, sm_50, sm_52, sm_53, sm_60, sm_61, sm_62, sm_70, sm_72, sm_75, sm_80, sm_86, gfx600, gfx601, gfx602, gfx700, gfx701, gfx702, gfx703, gfx704, gfx705, gfx801, gfx802, gfx803, gfx805, gfx810, gfx900, gfx902, gfx904, gfx906, gfx908, gfx909, gfx90a, gfx90c, gfx940, gfx1010, gfx1011, gfx1012, gfx1013, gfx1030, gfx1031, gfx1032, gfx1033, gfx1034, gfx1035, gfx1036{{$}}
|
||||
|
||||
// RUN: not %clang_cc1 -triple r600--- -target-cpu not-a-cpu -fsyntax-only %s 2>&1 | FileCheck %s --check-prefix R600
|
||||
// R600: error: unknown target CPU 'not-a-cpu'
|
||||
@ -37,7 +37,7 @@
|
||||
|
||||
// RUN: not %clang_cc1 -triple amdgcn--- -target-cpu not-a-cpu -fsyntax-only %s 2>&1 | FileCheck %s --check-prefix AMDGCN
|
||||
// AMDGCN: error: unknown target CPU 'not-a-cpu'
|
||||
// AMDGCN-NEXT: note: valid target CPU values are: gfx600, tahiti, gfx601, pitcairn, verde, gfx602, hainan, oland, gfx700, kaveri, gfx701, hawaii, gfx702, gfx703, kabini, mullins, gfx704, bonaire, gfx705, gfx801, carrizo, gfx802, iceland, tonga, gfx803, fiji, polaris10, polaris11, gfx805, tongapro, gfx810, stoney, gfx900, gfx902, gfx904, gfx906, gfx908, gfx909, gfx90a, gfx90c, gfx940, gfx1010, gfx1011, gfx1012, gfx1013, gfx1030, gfx1031, gfx1032, gfx1033, gfx1034, gfx1035{{$}}
|
||||
// AMDGCN-NEXT: note: valid target CPU values are: gfx600, tahiti, gfx601, pitcairn, verde, gfx602, hainan, oland, gfx700, kaveri, gfx701, hawaii, gfx702, gfx703, kabini, mullins, gfx704, bonaire, gfx705, gfx801, carrizo, gfx802, iceland, tonga, gfx803, fiji, polaris10, polaris11, gfx805, tongapro, gfx810, stoney, gfx900, gfx902, gfx904, gfx906, gfx908, gfx909, gfx90a, gfx90c, gfx940, gfx1010, gfx1011, gfx1012, gfx1013, gfx1030, gfx1031, gfx1032, gfx1033, gfx1034, gfx1035, gfx1036{{$}}
|
||||
|
||||
// RUN: not %clang_cc1 -triple wasm64--- -target-cpu not-a-cpu -fsyntax-only %s 2>&1 | FileCheck %s --check-prefix WEBASM
|
||||
// WEBASM: error: unknown target CPU 'not-a-cpu'
|
||||
|
@ -435,6 +435,13 @@ Every processor supports every OS ABI (see :ref:`amdgpu-os`) with the following
|
||||
Add product
|
||||
names.
|
||||
|
||||
``gfx1036`` ``amdgcn`` APU - cumode - Absolute - *pal-amdpal* *TBA*
|
||||
- wavefrontsize64 flat
|
||||
scratch .. TODO::
|
||||
|
||||
Add product
|
||||
names.
|
||||
|
||||
=========== =============== ============ ===== ================= =============== =============== ======================
|
||||
|
||||
.. _amdgpu-target-features:
|
||||
@ -1236,7 +1243,7 @@ The AMDGPU backend uses the following ELF header:
|
||||
``EF_AMDGPU_MACH_AMDGCN_GFX1013`` 0x042 ``gfx1013``
|
||||
*reserved* 0x043 Reserved.
|
||||
*reserved* 0x044 Reserved.
|
||||
*reserved* 0x045 Reserved.
|
||||
``EF_AMDGPU_MACH_AMDGCN_GFX1036`` 0x045 ``gfx1036``
|
||||
==================================== ========== =============================
|
||||
|
||||
Sections
|
||||
|
@ -759,11 +759,11 @@ enum : unsigned {
|
||||
EF_AMDGPU_MACH_AMDGCN_GFX1013 = 0x042,
|
||||
EF_AMDGPU_MACH_AMDGCN_RESERVED_0X43 = 0x043,
|
||||
EF_AMDGPU_MACH_AMDGCN_RESERVED_0X44 = 0x044,
|
||||
EF_AMDGPU_MACH_AMDGCN_RESERVED_0X45 = 0x045,
|
||||
EF_AMDGPU_MACH_AMDGCN_GFX1036 = 0x045,
|
||||
|
||||
// First/last AMDGCN-based processors.
|
||||
EF_AMDGPU_MACH_AMDGCN_FIRST = EF_AMDGPU_MACH_AMDGCN_GFX600,
|
||||
EF_AMDGPU_MACH_AMDGCN_LAST = EF_AMDGPU_MACH_AMDGCN_RESERVED_0X45,
|
||||
EF_AMDGPU_MACH_AMDGCN_LAST = EF_AMDGPU_MACH_AMDGCN_GFX1036,
|
||||
|
||||
// Indicates if the "xnack" target feature is enabled for all code contained
|
||||
// in the object.
|
||||
|
@ -98,9 +98,10 @@ enum GPUKind : uint32_t {
|
||||
GK_GFX1033 = 78,
|
||||
GK_GFX1034 = 79,
|
||||
GK_GFX1035 = 80,
|
||||
GK_GFX1036 = 81,
|
||||
|
||||
GK_AMDGCN_FIRST = GK_GFX600,
|
||||
GK_AMDGCN_LAST = GK_GFX1035,
|
||||
GK_AMDGCN_LAST = GK_GFX1036,
|
||||
};
|
||||
|
||||
/// Instruction set architecture version.
|
||||
|
@ -483,6 +483,8 @@ StringRef ELFObjectFileBase::getAMDGPUCPUName() const {
|
||||
return "gfx1034";
|
||||
case ELF::EF_AMDGPU_MACH_AMDGCN_GFX1035:
|
||||
return "gfx1035";
|
||||
case ELF::EF_AMDGPU_MACH_AMDGCN_GFX1036:
|
||||
return "gfx1036";
|
||||
default:
|
||||
llvm_unreachable("Unknown EF_AMDGPU_MACH value");
|
||||
}
|
||||
|
@ -574,6 +574,7 @@ void ScalarBitSetTraits<ELFYAML::ELF_EF>::bitset(IO &IO,
|
||||
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);
|
||||
BCaseMask(EF_AMDGPU_MACH_AMDGCN_GFX1036, EF_AMDGPU_MACH);
|
||||
switch (Object->Header.ABIVersion) {
|
||||
default:
|
||||
// ELFOSABI_AMDGPU_PAL, ELFOSABI_AMDGPU_MESA3D support *_V3 flags.
|
||||
|
@ -115,6 +115,7 @@ constexpr GPUInfo AMDGCNGPUs[] = {
|
||||
{{"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},
|
||||
{{"gfx1036"}, {"gfx1036"}, GK_GFX1036, FEATURE_FAST_FMA_F32|FEATURE_FAST_DENORMAL_F32|FEATURE_WAVE32},
|
||||
};
|
||||
|
||||
const GPUInfo *getArchEntry(AMDGPU::GPUKind AK, ArrayRef<GPUInfo> Table) {
|
||||
@ -229,6 +230,7 @@ AMDGPU::IsaVersion AMDGPU::getIsaVersion(StringRef GPU) {
|
||||
case GK_GFX1033: return {10, 3, 3};
|
||||
case GK_GFX1034: return {10, 3, 4};
|
||||
case GK_GFX1035: return {10, 3, 5};
|
||||
case GK_GFX1036: return {10, 3, 6};
|
||||
default: return {0, 0, 0};
|
||||
}
|
||||
}
|
||||
|
@ -239,3 +239,7 @@ def : ProcessorModel<"gfx1034", GFX10SpeedModel,
|
||||
def : ProcessorModel<"gfx1035", GFX10SpeedModel,
|
||||
FeatureISAVersion10_3_0.Features
|
||||
>;
|
||||
|
||||
def : ProcessorModel<"gfx1036", GFX10SpeedModel,
|
||||
FeatureISAVersion10_3_0.Features
|
||||
>;
|
||||
|
@ -117,6 +117,7 @@ StringRef AMDGPUTargetStreamer::getArchNameFromElfMach(unsigned ElfMach) {
|
||||
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_AMDGCN_GFX1036: AK = GK_GFX1036; break;
|
||||
case ELF::EF_AMDGPU_MACH_NONE: AK = GK_NONE; break;
|
||||
}
|
||||
|
||||
@ -181,6 +182,7 @@ unsigned AMDGPUTargetStreamer::getElfMach(StringRef GPU) {
|
||||
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_GFX1036: return ELF::EF_AMDGPU_MACH_AMDGCN_GFX1036;
|
||||
case GK_NONE: return ELF::EF_AMDGPU_MACH_NONE;
|
||||
}
|
||||
|
||||
|
@ -92,6 +92,7 @@
|
||||
; 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 --amdhsa-code-object-version=3 -mcpu=gfx1036 < %s | FileCheck --check-prefixes=V3-GFX1036 %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
|
||||
@ -187,6 +188,7 @@
|
||||
; 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
|
||||
; RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx1036 < %s | FileCheck --check-prefixes=GFX1036 %s
|
||||
|
||||
; V3-GFX600: .amdgcn_target "amdgcn-amd-amdhsa--gfx600"
|
||||
; V3-GFX601: .amdgcn_target "amdgcn-amd-amdhsa--gfx601"
|
||||
@ -238,6 +240,7 @@
|
||||
; V3-GFX1033: .amdgcn_target "amdgcn-amd-amdhsa--gfx1033"
|
||||
; V3-GFX1034: .amdgcn_target "amdgcn-amd-amdhsa--gfx1034"
|
||||
; V3-GFX1035: .amdgcn_target "amdgcn-amd-amdhsa--gfx1035"
|
||||
; V3-GFX1036: .amdgcn_target "amdgcn-amd-amdhsa--gfx1036"
|
||||
|
||||
; GFX600: .amdgcn_target "amdgcn-amd-amdhsa--gfx600"
|
||||
; GFX601: .amdgcn_target "amdgcn-amd-amdhsa--gfx601"
|
||||
@ -311,6 +314,7 @@
|
||||
; GFX1033: .amdgcn_target "amdgcn-amd-amdhsa--gfx1033"
|
||||
; GFX1034: .amdgcn_target "amdgcn-amd-amdhsa--gfx1034"
|
||||
; GFX1035: .amdgcn_target "amdgcn-amd-amdhsa--gfx1035"
|
||||
; GFX1036: .amdgcn_target "amdgcn-amd-amdhsa--gfx1036"
|
||||
|
||||
define amdgpu_kernel void @directive_amdgcn_target() {
|
||||
ret void
|
||||
|
@ -65,6 +65,7 @@
|
||||
; RUN: llc -filetype=obj -march=amdgcn -mcpu=gfx1033 < %s | llvm-readobj --file-header - | FileCheck --check-prefixes=ALL,ARCH-GCN,GFX1033 %s
|
||||
; RUN: llc -filetype=obj -march=amdgcn -mcpu=gfx1034 < %s | llvm-readobj --file-header - | FileCheck --check-prefixes=ALL,ARCH-GCN,GFX1034 %s
|
||||
; RUN: llc -filetype=obj -march=amdgcn -mcpu=gfx1035 < %s | llvm-readobj --file-header - | FileCheck --check-prefixes=ALL,ARCH-GCN,GFX1035 %s
|
||||
; RUN: llc -filetype=obj -march=amdgcn -mcpu=gfx1036 < %s | llvm-readobj --file-header - | FileCheck --check-prefixes=ALL,ARCH-GCN,GFX1036 %s
|
||||
|
||||
; FIXME: With the default attributes the eflags are not accurate for
|
||||
; xnack and sramecc. Subsequent Target-ID patches will address this.
|
||||
@ -127,6 +128,7 @@
|
||||
; GFX1033: EF_AMDGPU_MACH_AMDGCN_GFX1033 (0x39)
|
||||
; GFX1034: EF_AMDGPU_MACH_AMDGCN_GFX1034 (0x3E)
|
||||
; GFX1035: EF_AMDGPU_MACH_AMDGCN_GFX1035 (0x3D)
|
||||
; GFX1036: EF_AMDGPU_MACH_AMDGCN_GFX1036 (0x45)
|
||||
; ALL: ]
|
||||
|
||||
define amdgpu_kernel void @elf_header() {
|
||||
|
@ -6,6 +6,7 @@
|
||||
// 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
|
||||
// RUN: llvm-mc -arch=amdgcn -mcpu=gfx1036 -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]
|
||||
|
@ -4,6 +4,7 @@
|
||||
// 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
|
||||
// RUN: not llvm-mc -arch=amdgcn -mcpu=gfx1036 %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
|
||||
|
@ -4,6 +4,7 @@
|
||||
// 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
|
||||
// RUN: llvm-mc -arch=amdgcn -mcpu=gfx1036 -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]
|
||||
|
@ -6,6 +6,7 @@
|
||||
# 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
|
||||
# RUN: llvm-mc -arch=amdgcn -mcpu=gfx1036 -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
|
||||
|
@ -4,6 +4,7 @@
|
||||
# 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
|
||||
# RUN: llvm-mc -arch=amdgcn -mcpu=gfx1036 -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
|
||||
|
@ -194,6 +194,10 @@
|
||||
# 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
|
||||
|
||||
# RUN: sed -e 's/<BITS>/64/' -e 's/<MACH>/AMDGCN_GFX1036/' %s | yaml2obj -o %t.o.AMDGCN_GFX1036
|
||||
# RUN: llvm-readobj -S --file-headers %t.o.AMDGCN_GFX1036 | FileCheck --check-prefixes=ELF-AMDGCN-ALL,ELF-AMDGCN-GFX1036 %s
|
||||
# RUN: obj2yaml %t.o.AMDGCN_GFX1036 | FileCheck --check-prefixes=YAML-AMDGCN-ALL,YAML-AMDGCN-GFX1036 %s
|
||||
|
||||
# ELF-R600-ALL: Format: elf32-amdgpu
|
||||
# ELF-R600-ALL: Arch: r600
|
||||
# ELF-R600-ALL: AddressSize: 32bit
|
||||
@ -357,7 +361,10 @@
|
||||
|
||||
# ELF-AMDGCN-GFX1035: EF_AMDGPU_MACH_AMDGCN_GFX1035 (0x3D)
|
||||
# YAML-AMDGCN-GFX1035: Flags: [ EF_AMDGPU_MACH_AMDGCN_GFX1035 ]
|
||||
#
|
||||
|
||||
# ELF-AMDGCN-GFX1036: EF_AMDGPU_MACH_AMDGCN_GFX1036 (0x45)
|
||||
# YAML-AMDGCN-GFX1036: Flags: [ EF_AMDGPU_MACH_AMDGCN_GFX1036 ]
|
||||
|
||||
# ELF-AMDGCN-ALL: ]
|
||||
|
||||
|
||||
|
@ -5,6 +5,11 @@ 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=gfx1036 -filetype=obj -O0 -o %t.o %s
|
||||
; RUN: llvm-objdump -D --arch-name=amdgcn --mcpu=gfx1036 %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=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
|
||||
|
@ -295,6 +295,15 @@
|
||||
# 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_GFX1036
|
||||
# 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_GFX1036 -DFLAG_VALUE=0x45
|
||||
|
||||
# RUN: yaml2obj %s -o %t -DABI_VERSION=1 -DFLAG_NAME=EF_AMDGPU_MACH_AMDGCN_GFX1036
|
||||
# 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_GFX1036 -DFLAG_VALUE=0x45
|
||||
|
||||
# RUN: yaml2obj %s -o %t -DABI_VERSION=2 -DFLAG_NAME=EF_AMDGPU_MACH_AMDGCN_GFX1036
|
||||
# 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_GFX1036 -DFLAG_VALUE=0x45
|
||||
|
||||
# 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
|
||||
|
||||
|
@ -1538,6 +1538,7 @@ const EnumEntry<unsigned> ElfHeaderAMDGPUFlagsABIVersion3[] = {
|
||||
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_MACH_AMDGCN_GFX1036),
|
||||
LLVM_READOBJ_ENUM_ENT(ELF, EF_AMDGPU_FEATURE_XNACK_V3),
|
||||
LLVM_READOBJ_ENUM_ENT(ELF, EF_AMDGPU_FEATURE_SRAMECC_V3)
|
||||
};
|
||||
@ -1593,6 +1594,7 @@ const EnumEntry<unsigned> ElfHeaderAMDGPUFlagsABIVersion4[] = {
|
||||
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_MACH_AMDGCN_GFX1036),
|
||||
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),
|
||||
|
@ -96,7 +96,7 @@ foreach(sm ${nvptx_sm_list})
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
set(amdgpu_mcpus gfx700 gfx701 gfx801 gfx803 gfx900 gfx902 gfx906 gfx908 gfx90a gfx90c gfx940 gfx1010 gfx1030 gfx1031)
|
||||
set(amdgpu_mcpus gfx700 gfx701 gfx801 gfx803 gfx900 gfx902 gfx906 gfx908 gfx90a gfx90c gfx940 gfx1010 gfx1030 gfx1031 gfx1032 gfx1033 gfx1034 gfx1035 gfx1036)
|
||||
if (DEFINED LIBOMPTARGET_AMDGCN_GFXLIST)
|
||||
set(amdgpu_mcpus ${LIBOMPTARGET_AMDGCN_GFXLIST})
|
||||
endif()
|
||||
|
@ -60,6 +60,8 @@ const char *get_elf_mach_gfx_name(uint32_t EFlags) {
|
||||
return "gfx1034";
|
||||
case EF_AMDGPU_MACH_AMDGCN_GFX1035:
|
||||
return "gfx1035";
|
||||
case EF_AMDGPU_MACH_AMDGCN_GFX1036:
|
||||
return "gfx1036";
|
||||
default:
|
||||
return "--unknown gfx";
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user