This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Bug in x86-64 psABI or in gcc?
- From: "H. Peter Anvin" <hpa at zytor dot com>
- To: "H.J. Lu" <hjl dot tools at gmail dot com>
- Cc: discuss at x86-64 dot org, GCC Development <gcc at gcc dot gnu dot org>, "Girkar, Milind" <milind dot girkar at intel dot com>, "Kreitzer, David L" <david dot l dot kreitzer at intel dot com>
- Date: Mon, 07 Dec 2009 10:37:48 -0800
- Subject: Re: Bug in x86-64 psABI or in gcc?
- References: <6dc9ffc80912071033o20516ae1ta19a5a2521ec7f9a@mail.gmail.com>
On 12/07/2009 10:33 AM, H.J. Lu wrote:
> Hi,
>
>
> x86-64 psABI says _Bool has 1 byte and aligned at 1 byte. It also says:
>
> ---
> When a value of type _Bool is passed in a register or on the stack,
> the upper 63 bits of the eightbyte shall be zero.
> ---
>
> However, gcc treats _Bool as char:
>
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42324
>
> Given that gcc never zeros the upper 63 bits in register nor
> on stack, should we update x86-64 psABI to reflect what gcc
> really does?
>
Keep in mind it's not just gcc but at least also icc, the Solaris
compiler, and the Qlogic compiler... possibly others.
-hpa
--
H. Peter Anvin, Intel Open Source Technology Center
I work for Intel. I don't speak on their behalf.