summaryrefslogtreecommitdiff
path: root/gcc/config/nvptx/nvptx.h
diff options
context:
space:
mode:
authorvries <vries@138bc75d-0d04-0410-961f-82ee72b054a4>2017-07-19 13:05:35 +0000
committervries <vries@138bc75d-0d04-0410-961f-82ee72b054a4>2017-07-19 13:05:35 +0000
commitffaae5bde5dd45dd4251b24bb10f7a0fc2a5a037 (patch)
tree62be9cc7eb642cfb779faad19c47eb9021e2f1fc /gcc/config/nvptx/nvptx.h
parentfcac805ed9f2e4d899a3dd2959017884867995ca (diff)
downloadgcc-ffaae5bde5dd45dd4251b24bb10f7a0fc2a5a037.tar.gz
Add v2di support for nvptx
2017-07-19 Tom de Vries <tom@codesourcery.com> * config/nvptx/nvptx-modes.def: Add V2DImode. * config/nvptx/nvptx-protos.h (nvptx_data_alignment): Declare. * config/nvptx/nvptx.c (nvptx_ptx_type_from_mode): Handle V2DImode. (nvptx_output_mov_insn): Handle lack of mov.b128. (nvptx_print_operand): Handle 'H' and 'L' codes. (nvptx_vector_mode_supported): Allow V2DImode. (nvptx_preferred_simd_mode): New function. (nvptx_data_alignment): New function. (TARGET_VECTORIZE_PREFERRED_SIMD_MODE): Redefine to nvptx_preferred_simd_mode. * config/nvptx/nvptx.h (STACK_BOUNDARY, BIGGEST_ALIGNMENT): Change from 64 to 128 bits. (DATA_ALIGNMENT): Define. Set to nvptx_data_alignment. * config/nvptx/nvptx.md (VECIM): Add V2DI. * gcc.target/nvptx/decl-init.c: Update alignment. * gcc.target/nvptx/slp-2-run.c: New test. * gcc.target/nvptx/slp-2.c: New test. * gcc.target/nvptx/v2di.c: New test. * testsuite/libgomp.oacc-c/vec.c: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@250341 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config/nvptx/nvptx.h')
-rw-r--r--gcc/config/nvptx/nvptx.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/gcc/config/nvptx/nvptx.h b/gcc/config/nvptx/nvptx.h
index 0a000a73df5..4224acf26e2 100644
--- a/gcc/config/nvptx/nvptx.h
+++ b/gcc/config/nvptx/nvptx.h
@@ -52,13 +52,15 @@
/* Alignments in bits. */
#define PARM_BOUNDARY 32
-#define STACK_BOUNDARY 64
+#define STACK_BOUNDARY 128
#define FUNCTION_BOUNDARY 32
-#define BIGGEST_ALIGNMENT 64
+#define BIGGEST_ALIGNMENT 128
#define STRICT_ALIGNMENT 1
#define MAX_STACK_ALIGNMENT (1024 * 8)
+#define DATA_ALIGNMENT nvptx_data_alignment
+
/* Copied from elf.h and other places. We'd otherwise use
BIGGEST_ALIGNMENT and fail a number of testcases. */
#define MAX_OFILE_ALIGNMENT (32768 * 8)