This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/42324] [4.3/4.4/4.5 Regression] Gcc doesn't follow x86-64 psABI on _Bool
- From: "hjl dot tools at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 7 Dec 2009 20:59:02 -0000
- Subject: [Bug target/42324] [4.3/4.4/4.5 Regression] Gcc doesn't follow x86-64 psABI on _Bool
- References: <bug-42324-682@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #6 from hjl dot tools at gmail dot com 2009-12-07 20:59 -------
(In reply to comment #5)
> The ABI says "is passed", not "is returned". The frontend did return-value
> promotion until I disabled that (see endless discussions and libffi fixes
> at that point).
>
> So where is a _Bool passed in a registed or on the stack in your testcases?
Please see b2.c in comment #2.
> I see the _Bool on stack is properly extended to 32bits. That the ABI
> requires 64bits here for _Bool seems odd - does it require that for
> char and int, too?
>
That is very odd. I think the psABI should be changed to
---
When a value of type _Bool is passed in a registeror on the stack,
the bits1-31 of the eightbyte shall be zero.
---
and leave the upper 32bits undefined.
--
hjl dot tools at gmail dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|4.3.5 |---
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42324