This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch i386] Fix detection of va_list type for w64.
- From: "Kai Tietz" <ktietz70 at googlemail dot com>
- To: "Uros Bizjak" <ubizjak at gmail dot com>
- Cc: "GCC Patches" <gcc-patches at gcc dot gnu dot org>, "Jan Hubicka" <jh at suse dot cz>, NightStrike <nightstrike at gmail dot com>, "Kai Tietz" <Kai dot Tietz at onevision dot com>
- Date: Mon, 7 Jul 2008 19:19:21 +0200
- Subject: Re: [patch i386] Fix detection of va_list type for w64.
- References: <48724DDE.9080208@gmail.com>
Hi Uros,
2008/7/7 Uros Bizjak <ubizjak@gmail.com>:
> Hello!
>
>> 2008-07-07 Kai Tietz <kai.tietz@onevision.com>
>>
>> * config/i386.c (is_va_list_pointer_char): New.
>> (ix86_va_start): Replace compare with ms_va_list_type_node
>> by call of is_va_list_pointer_char.
>> (ix86_gimplify_va_arg): Likewise.
>>
>> Bootstraped on x86_64-pc-linux64 and x86_64-pc-mingw32 without
>> regressions.
>> Ok for apply?
>>
>
> Please add something like following to both call sites:
>
> if (!TARGET_64BIT
> || ix86_canonical_va_list_type (TREE_TYPE (valist)) ==
> (DEFAULT_ABI == MS_ABI) ? ms_va_list_type_node : va_list_type_node)
> {
This would be wrong, because - as I wrote - both return values are
possible for w64. This is depent on the use of the
__builtin_ms_va_list or __builtin_va_list, and on the use in context
of x86_64 or in w64 itself. Your suggested replacement just checks for
one case, which is just the half of the job here.
The method checks for both types, which is the fix.
Cheers,
Kai
--
| (\_/) This is Bunny. Copy and paste
| (='.'=) Bunny into your signature to help
| (")_(") him gain world domination