... primarily in preparation for later changes.
gcc/
* config.gcc (with_arch) [nvptx]: Set to 'sm_30'.
* config/nvptx/nvptx.cc (nvptx_option_override): Assert that
'-misa' appeared.
* config/nvptx/nvptx.h (OPTION_DEFAULT_SPECS): Define.
* config/nvptx/nvptx.opt (misa=): Remove 'Init'.
(cherry picked from commit
108b99b6c45ed8fbad6776539a639244b63191f5)
+2022-09-26 Thomas Schwinge <thomas@codesourcery.com>
+
+ Backported from master:
+ 2022-09-26 Thomas Schwinge <thomas@codesourcery.com>
+
+ * config.gcc (with_arch) [nvptx]: Set to 'sm_30'.
+ * config/nvptx/nvptx.cc (nvptx_option_override): Assert that
+ '-misa' appeared.
+ * config/nvptx/nvptx.h (OPTION_DEFAULT_SPECS): Define.
+ * config/nvptx/nvptx.opt (misa=): Remove 'Init'.
+
2022-09-26 Thomas Schwinge <thomas@codesourcery.com>
Backported from master:
mips*-*-vxworks)
with_arch=mips2
;;
+ nvptx-*)
+ with_arch=sm_30
+ ;;
esac
# Avoid overriding --with-arch-32 and --with-arch-64 values.
esac
;;
+ nvptx-*)
+ supported_defaults=arch
+ case $with_arch in
+ sm_30 )
+ # OK; default.
+ ;;
+ * )
+ echo "Unknown arch used in --with-arch=$with_arch" 1>&2
+ exit 1
+ ;;
+ esac
+ ;;
+
powerpc*-*-* | rs6000-*-*)
supported_defaults="abi cpu cpu_32 cpu_64 float tune tune_32 tune_64 advance_toolchain"
{
init_machine_status = nvptx_init_machine_status;
+ /* Via nvptx 'OPTION_DEFAULT_SPECS', '-misa' always appears on the command
+ line. */
+ gcc_checking_assert (OPTION_SET_P (ptx_isa_option));
+
handle_ptx_version_option ();
/* Set toplevel_reorder, unless explicitly disabled. We need
/* Run-time Target. */
+/* Use '--with-arch' for default '-misa'. */
+#define OPTION_DEFAULT_SPECS \
+ { "arch", "%{!misa=*:-misa=%(VALUE)}" }, \
+
/* Assembler supports '-v' option; handle similar to
'../../gcc.cc:asm_options', 'HAVE_GNU_AS'. */
#define ASM_SPEC "%{v}"
Generate code for OpenMP offloading: enables -msoft-stack and -muniform-simt.
misa=
-Target RejectNegative ToLower Joined Enum(ptx_isa) Var(ptx_isa_option) Init(PTX_ISA_SM30)
+Target RejectNegative ToLower Joined Enum(ptx_isa) Var(ptx_isa_option)
Specify the PTX ISA target architecture to use.
march=