[patch i386]: Enable ms_abi/sysv_abi and add testcases
Kai Tietz
ktietz70@googlemail.com
Sat Jun 21 14:39:00 GMT 2008
Hi
2008/6/20 Kai Tietz <Kai.Tietz@onevision.com>:
> Joseph,
>
>> Why is this patch adding built-in functions in the user's namespace such
>
>> as ms_va_start? Only the __builtin versions should be needed; any
>> user-namespace versions should go in a target-specific header users need
>
>> to include explicitly.
>
> These I can remove. I just didn't planed to add a target-specific header
> file. But I will do this, when the patch works and I add the new user
> header file. Fine?
I removed the builtins without the __builtin_ prefix. Additionally I
add an new cross-stdarg.h file for x86_64. Maybe we could add it to
the i?86-*-* section in config.gcc, too.
2008-06-21 Kai Tietz <kai.tietz@onevision.com>
* config.gcc (extra_headers): Add cross-stdarg.h for target
x86_64-*-*.
* config/i386/cross-stdarg.h: New.
* builtins.c (std_cfun_abi_va_list): New.
(std_type_abi_va_list): New.
(stabilize_va_list): Replace va_list_type_node use by
mtarget.type_abi_va_list.
(gimplify_va_arg_expr): Likewise.
(expand_builtin_va_copy): Replace va_list_type_node use by
mtarget.cfun_abi_va_list.
* tree-sra.c (decl_can_be_decomposed_p): Replace
va_list_type_node use by mtarget.type_abi_va_list.
* 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_cfun_abi_va_list): New.
(ix86_type_abi_va_list): New.
(ix86_enum_va_list): New.
(TARGET_CFUN_ABI_VA_LIST): New.
(TARGET_TYPE_ABI_VA_LIST): New.
* config/i386/i386.h (TARGET_ENUM_VA_LIST): New.
* doc/tm.texi (TARGET_CFUN_ABI_VA_LIST): New.
(TARGET_TYPE_ABI_VA_LIST): New.
(TARGET_ENUM_VA_LIST): New.
* expr.h (std_cfun_abi_va_list): New.
(std_type_abi_va_list): New.
* target-def.h (TARGET_CFUN_ABI_VA_LIST): New.
(TARGET_TYPE_ABI_VA_LIST): New.
(TARGET_INITIALIZER): Add TARGET_CFUN_ABI_VA_LIST and
TARGET_TYPE_ABI_VA_LIST.
* target.h (struct gcc_target): Add cfun_abi_va_list hook
and type_abi_va_list hook.
2008-06-21 Kai Tietz <kai.tietz@onevision.com>
* gcc.dg/callabi/callabi.h: New.
* gcc.dg/callabi/vaarg-1.c: New.
* gcc.dg/callabi/vaarg-2.c: New.
* gcc.dg/callabi/vaarg-3.c: New.
* gcc.dg/callabi/func-1.c: New.
Is this patch of for apply on trunk?
Cheers,
Kai
--
| (\_/) This is Bunny. Copy and paste
| (='.'=) Bunny into your signature to help
| (")_(") him gain world domination
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: callabi.txt
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20080621/b1f6ac56/attachment.txt>
More information about the Gcc-patches
mailing list