This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
Jan Hubicka <hubicka@ucw.cz> wrote on 12.06.2008 15:46:49: > > > > > > > Do you mean we should fix the builtin subject first, before we allow to > > use the call abi switching? > > Well, either that or sorry cases that does not work. > If SYSV->MS works and passing va_list around too, I think we can just > keep it as it is. > > Honza Well, I add the builtin feature for call abi switching. We need here an backend maintainer to review those parts. About the documentation for those new builtin functions and types, I need some advice, where to put them best. I tried to do this with a minimum of code change to backend and with less possible compile time disadvantage for i?86. I tested this patch for w64->x86_64 and it works well. I intoduced for x86_64 and w64 abi the new builtin types __builtin_ms_va_list and __builtin_sysv_va_list. Additionally I added the new builtin function prototypes (defaulting to standard BUILT_IN_(VA_START|VA_END|VA_COPY) as [__builtin_](ms_|sysv_)(va_start|va_end|va_copy). The testcase for varargs I adjusted to use those types. ChangeLog 2008-06-17 Kai Tietz <kai.tietz@onevision.com> * defaults.h (TARGET_GET_VALIST_TYPE): New. * builtins.c (stabilize_va_list): Replace va_list_type_node use by TARGET_GET_VALIST_TYPE. (gimplify_va_arg_expr): Likewise. (expand_builtin_va_copy): Likewise. * tree-sra.c (decl_can_be_decomposed_p): Likewise. * tree-ssa-ccp.c (optimize_stdarg_builtin): Likewise. * tree-stdarg.c (execute_optimize_stdarg): Likewise. * c-common.c (c_common_nodes_and_builtins): Use TARGET_ENUM_VA_LIST. * config/i386/i386-protos.h (ix86_get_valist_type): New. (ix86_enum_va_list): New. * config/i386/i386.c (sysv_va_list_type_node): New. (ms_va_list_type_node): New. (ix86_function_type_abi): Remove sorry. (ix86_build_builtin_va_list_abi): New. (ix86_build_builtin_va_list): Call ix86_build_builtin_va_list_abi for 64-bit targets. (ix86_va_start): Replace va_list_type_node by sysv_ va_list_type_node. (build_function_type_list_ellipsis): New helper. (ix86_init_builtins_va_builtins_abi): New. (ix86_init_builtins): Use ix86_init_builtins_va_builtins_abi for 64-bit targets. (ix86_handle_abi_attribute): New. (attribute_spec): Add sysv_abi and ms_abi. (ix86_get_valist_type): New. (ix86_enum_va_list): New. * config/i386/i386.h (TARGET_GET_VALIST_TYPE): New. (TARGET_ENUM_VA_LIST): New. * doc/tm.texi (TARGET_GET_VALIST_TYPE): New. (TARGET_ENUM_VA_LIST): New. 2008-06-17 Kai Tietz <kai.tietz@onevision.com> * gcc.dg/callabi/callabi.h: New. * gcc.dg/callabi/vaarg-1.c: New. * gcc.dg/callabi/func-1.c: New. Is this patch ok for apply on trunk? Cheers, Kai | (\_/) This is Bunny. Copy and paste Bunny | (='.'=) into your signature to help him gain | (")_(") world domination.
Attachment:
callabi_tstcase.txt
Description: Text document
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |