This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
buildins for vaargs for call abi switch
- From: Kai Tietz <Kai dot Tietz at onevision dot com>
- To: gcc at gcc dot gnu dot org
- Cc: "Uros Bizjak" <ubizjak at gmail dot com>
- Date: Tue, 10 Jun 2008 14:02:58 +0200
- Subject: buildins for vaargs for call abi switch
Hi,
While writing some testcases for the call abi switching for x86_64<->w64 I
came to the point, that it would be may good to add the builtin types and
functions for the different calling abi, too.
For the target default abi it would be
Index: gcc/gcc/testsuite/gcc.dg/callabi/callabi.h
===================================================================
--- /dev/null
+++ gcc/gcc/testsuite/gcc.dg/callabi/callabi.h
@@ -0,0 +1,27 @@
+/* First the default target definition. */
+#ifndef __GNUC_VA_LIST
+#define __GNUC_VA_LIST
+ typedef __builtin_va_list __gnuc_va_list;
+#endif
+
+#ifndef _VA_LIST_DEFINED
+#define _VA_LIST_DEFINED
+ typedef __gnuc_va_list va_list;
+#endif
+
+#define __va_copy(d,s) __builtin_va_copy(d,s)
+#define __va_start(v,l) __builtin_va_start(v,l)
+#define __va_arg(v,l) __builtin_va_arg(v,l)
+#define __va_end(v) __builtin_va_end(v)
For x86_64->w64 I would like to add the type __builtin_w64_va_list, and
the functions __builtin_w64_va_copy, ....
For w64->x86_64 I would like to add the type __builtin_x86_64_va_list,
and the functions __builtin_x86_64_va_copy, ....
Is this approach ok to prepare a patch for it?
Cheers,
Kai
| (\_/) This is Bunny. Copy and paste Bunny
| (='.'=) into your signature to help him gain
| (")_(") world domination.