+2016-05-17 Nathan Sidwell <nathan@acm.org>
+
+ * config/nvptx/nvptx.c (nvptx_function_arg_boundary): New.
+ (TARGET_FUNCTION_ARG_BOUNDARY): Override.
+
2016-05-17 Mikhail Maltsev <maltsevm@gmail.com>
PR tree-optimization/54579
cum->count++;
}
+/* Implement TARGET_FUNCTION_ARG_BOUNDARY.
+
+ For nvptx This is only used for varadic args. The type has already
+ been promoted and/or converted to invisible reference. */
+
+static unsigned
+nvptx_function_arg_boundary (machine_mode mode, const_tree ARG_UNUSED (type))
+{
+ return GET_MODE_ALIGNMENT (mode);
+}
+
/* Handle the TARGET_STRICT_ARGUMENT_NAMING target hook.
For nvptx, we know how to handle functions declared as stdarg: by
#define TARGET_FUNCTION_INCOMING_ARG nvptx_function_incoming_arg
#undef TARGET_FUNCTION_ARG_ADVANCE
#define TARGET_FUNCTION_ARG_ADVANCE nvptx_function_arg_advance
+#undef TARGET_FUNCTION_ARG_BOUNDARY
+#define TARGET_FUNCTION_ARG_BOUNDARY nvptx_function_arg_boundary
#undef TARGET_PASS_BY_REFERENCE
#define TARGET_PASS_BY_REFERENCE nvptx_pass_by_reference
#undef TARGET_FUNCTION_VALUE_REGNO_P
+2016-05-17 Nathan Sidwell <nathan@acm.org>
+
+ * gcc.target/nvptx/abi-vararg-3.c: New.
+
2016-05-17 Mikhail Maltsev <maltsevm@gmail.com>
PR tree-optimization/54579
--- /dev/null
+/* { dg-do compile } */
+/* { dg-additional-options "-Wno-pedantic -Wno-long-long" } */
+
+/* 64-bit var args should be aligned to 64 bits. */
+
+void Foo (const char *, ...);
+
+void Baz ()
+{
+ Foo ("", 0, 1ll);
+}
+
+/* { dg-final { scan-assembler "st.u64\t\\\[%stack\\+8\\\]," } } */