diff options
author | Andrew Stubbs <ams@codesourcery.com> | 2020-10-22 21:23:48 +0100 |
---|---|---|
committer | Andrew Stubbs <ams@codesourcery.com> | 2021-02-03 14:25:33 +0000 |
commit | 3535402e20118655b2ad4085a6e1d4f1b9c46e92 (patch) | |
tree | 14f777474f73b72dd2ce0e654ab8fc9206a6de1a /libgomp | |
parent | 9633e5797637ac395e3ef8048d421a77c84e73a8 (diff) | |
download | gcc-3535402e20118655b2ad4085a6e1d4f1b9c46e92.zip gcc-3535402e20118655b2ad4085a6e1d4f1b9c46e92.tar.gz gcc-3535402e20118655b2ad4085a6e1d4f1b9c46e92.tar.bz2 |
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.
Diffstat (limited to 'libgomp')
-rw-r--r-- | libgomp/plugin/plugin-gcn.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/libgomp/plugin/plugin-gcn.c b/libgomp/plugin/plugin-gcn.c index 47f0b6e..8e6af69 100644 --- a/libgomp/plugin/plugin-gcn.c +++ b/libgomp/plugin/plugin-gcn.c @@ -403,6 +403,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; @@ -1596,6 +1597,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 @@ -1611,6 +1613,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; } @@ -1644,6 +1648,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; } |