summaryrefslogtreecommitdiff
path: root/libgomp
diff options
context:
space:
mode:
authorAndrew Stubbs <ams@codesourcery.com>2020-10-22 21:23:48 +0100
committerKwok Cheung Yeung <kcy@codesourcery.com>2021-03-25 12:30:43 -0700
commitbb55967ccde0b48f285150caf6443a327159b4a2 (patch)
tree38482fc63a8f183d87fe9230933eaa54e35a9a58 /libgomp
parent312ed310cf68c6f28ecba0b439cfa7252d0d213b (diff)
downloadgcc-bb55967ccde0b48f285150caf6443a327159b4a2.tar.gz
amdgcn: Add gfx908 support
gcc/ * config/gcn/gcn-opts.h (enum processor_type): Add PROCESSOR_GFX908. * config/gcn/gcn.c (gcn_omp_device_kind_arch_isa): Add gfx908. (output_file_start): Add gfx908. * config/gcn/gcn.opt (gpu_type): Add gfx908. * config/gcn/t-gcn-hsa (MULTILIB_OPTIONS): Add march=gfx908. (MULTILIB_DIRNAMES): Add gfx908. * config/gcn/mkoffload.c (EF_AMDGPU_MACH_AMDGCN_GFX908): New define. (main): Recognize gfx908. * config/gcn/t-omp-device: Add gfx908. libgomp/ * plugin/plugin-gcn.c (EF_AMDGPU_MACH): Add EF_AMDGPU_MACH_AMDGCN_GFX908. (gcn_gfx908_s): New constant string. (isa_hsa_name): Add gfx908. (isa_code): Add gfx908. (cherry picked from commit 3535402e20118655b2ad4085a6e1d4f1b9c46e92)
Diffstat (limited to 'libgomp')
-rw-r--r--libgomp/ChangeLog.omp11
-rw-r--r--libgomp/plugin/plugin-gcn.c7
2 files changed, 18 insertions, 0 deletions
diff --git a/libgomp/ChangeLog.omp b/libgomp/ChangeLog.omp
index e8e1ce96fc3..b0af9c205a3 100644
--- a/libgomp/ChangeLog.omp
+++ b/libgomp/ChangeLog.omp
@@ -1,3 +1,14 @@
+2021-03-25 Kwok Cheung Yeung <kcy@codesourcery.com>
+
+ Backport from mainline
+ 2020-10-22 Andrew Stubbs <ams@codesourcery.com>
+
+ * plugin/plugin-gcn.c (EF_AMDGPU_MACH): Add
+ EF_AMDGPU_MACH_AMDGCN_GFX908.
+ (gcn_gfx908_s): New constant string.
+ (isa_hsa_name): Add gfx908.
+ (isa_code): Add gfx908.
+
2021-03-25 Thomas Schwinge <thomas@codesourcery.com>
* plugin/plugin-hsa.c (init_enviroment_variables): Don't prepend
diff --git a/libgomp/plugin/plugin-gcn.c b/libgomp/plugin/plugin-gcn.c
index 5d96b33351b..cef616f4f5f 100644
--- a/libgomp/plugin/plugin-gcn.c
+++ b/libgomp/plugin/plugin-gcn.c
@@ -406,6 +406,7 @@ typedef enum {
EF_AMDGPU_MACH_AMDGCN_GFX803 = 0x02a,
EF_AMDGPU_MACH_AMDGCN_GFX900 = 0x02c,
EF_AMDGPU_MACH_AMDGCN_GFX906 = 0x02f,
+ EF_AMDGPU_MACH_AMDGCN_GFX908 = 0x030
} EF_AMDGPU_MACH;
const static int EF_AMDGPU_MACH_MASK = 0x000000ff;
@@ -1630,6 +1631,7 @@ elf_gcn_isa_field (Elf64_Ehdr *image)
const static char *gcn_gfx803_s = "gfx803";
const static char *gcn_gfx900_s = "gfx900";
const static char *gcn_gfx906_s = "gfx906";
+const static char *gcn_gfx908_s = "gfx908";
const static int gcn_isa_name_len = 6;
/* Returns the name that the HSA runtime uses for the ISA or NULL if we do not
@@ -1645,6 +1647,8 @@ isa_hsa_name (int isa) {
return gcn_gfx900_s;
case EF_AMDGPU_MACH_AMDGCN_GFX906:
return gcn_gfx906_s;
+ case EF_AMDGPU_MACH_AMDGCN_GFX908:
+ return gcn_gfx908_s;
}
return NULL;
}
@@ -1678,6 +1682,9 @@ isa_code(const char *isa) {
if (!strncmp (isa, gcn_gfx906_s, gcn_isa_name_len))
return EF_AMDGPU_MACH_AMDGCN_GFX906;
+ if (!strncmp (isa, gcn_gfx908_s, gcn_isa_name_len))
+ return EF_AMDGPU_MACH_AMDGCN_GFX908;
+
return -1;
}