From aad32a00b7d2b64ae158b2b167768a9ae3e20f6e Mon Sep 17 00:00:00 2001 From: Andrew Stubbs Date: Thu, 8 Jul 2021 15:47:53 +0100 Subject: amdgcn: Add -mxnack and -msram-ecc [PR 100208] gcc/ChangeLog: PR target/100208 * config/gcn/gcn-hsa.h (DRIVER_SELF_SPECS): New. (ASM_SPEC): Set -mattr for xnack and sram-ecc. * config/gcn/gcn-opts.h (enum sram_ecc_type): New. * config/gcn/gcn-valu.md: Add a warning comment. * config/gcn/gcn.c (gcn_option_override): Add "sorry" for -mxnack. (output_file_start): Add xnack and sram-ecc state to ".amdgcn_target". * config/gcn/gcn.md: Add a warning comment. * config/gcn/gcn.opt: Add -mxnack and -msram-ecc. * config/gcn/mkoffload.c (EF_AMDGPU_MACH_AMDGCN_GFX908): Remove SRAM-ECC flag. (EF_AMDGPU_XNACK): New. (EF_AMDGPU_SRAM_ECC): New. (elf_flags): New. (copy_early_debug_info): Use elf_flags. (main): Handle -mxnack and -msram-ecc options. * doc/invoke.texi: Document -mxnack and -msram-ecc. gcc/testsuite/ChangeLog: PR target/100208 * gcc.target/gcn/sram-ecc-1.c: New test. * gcc.target/gcn/sram-ecc-2.c: New test. * gcc.target/gcn/sram-ecc-3.c: New test. * gcc.target/gcn/sram-ecc-4.c: New test. * gcc.target/gcn/sram-ecc-5.c: New test. * gcc.target/gcn/sram-ecc-6.c: New test. * gcc.target/gcn/sram-ecc-7.c: New test. * gcc.target/gcn/sram-ecc-8.c: New test. --- gcc/doc/invoke.texi | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'gcc/doc/invoke.texi') diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi index b16176e..32697e6 100644 --- a/gcc/doc/invoke.texi +++ b/gcc/doc/invoke.texi @@ -18847,6 +18847,15 @@ Compile for GCN5 Vega 20 devices (gfx906). @end table +@item -msram-ecc=on +@itemx -msram-ecc=off +@itemx -msram-ecc=any +@opindex msram-ecc +Compile binaries suitable for devices with the SRAM-ECC feature enabled, +disabled, or either mode. This feature can be enabled per-process on some +devices. The compiled code must match the device mode. The default is +@samp{any}, for devices that support it. + @item -mstack-size=@var{bytes} @opindex mstack-size Specify how many @var{bytes} of stack space will be requested for each GPU @@ -18855,6 +18864,14 @@ available. The size of the stack allocation may also have an impact on run-time performance. The default is 32KB when using OpenACC or OpenMP, and 1MB otherwise. +@item -mxnack +@opindex mxnack +Compile binaries suitable for devices with the XNACK feature enabled. Some +devices always require XNACK and some allow the user to configure XNACK. The +compiled code must match the device mode. The default is @samp{-mno-xnack}. +At present this option is a placeholder for support that is not yet +implemented. + @end table @node ARC Options -- cgit v1.1