public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/42324]  New: Gcc doesn't follow x86-64 psABI on _Bool
@ 2009-12-07 18:19 hjl dot tools at gmail dot com
  2009-12-07 18:32 ` [Bug target/42324] " hpa at zytor dot com
                   ` (15 more replies)
  0 siblings, 16 replies; 17+ messages in thread
From: hjl dot tools at gmail dot com @ 2009-12-07 18:19 UTC (permalink / raw)
  To: gcc-bugs

x86-64 psABI 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 generates:

[hjl@gnu-6 tmp]$ cat b.c
_Bool myfunction(char val)
{
  return val;
}
[hjl@gnu-6 tmp]$ gcc -O2 -S b.c
[hjl@gnu-6 tmp]$ cat b.s
        .file   "b.c"
        .text
        .p2align 4,,15
.globl myfunction
        .type   myfunction, @function
myfunction:
.LFB0:
        .cfi_startproc
        testb   %dil, %dil
        setne   %al
        ret
        .cfi_endproc
.LFE0:
        .size   myfunction, .-myfunction

Icc generates:
        movsbq    %dil, %rax                                    #3.10
        movl      $1, %edx                                      #3.10
        testl     %eax, %eax                                    #3.10
        cmovne    %edx, %eax                                    #3.10
        ret                                                     #3.10


-- 
           Summary: Gcc doesn't follow x86-64 psABI on _Bool
           Product: gcc
           Version: 4.5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: hjl dot tools at gmail dot com
GCC target triplet: x86_64-*-linux-gnu


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42324


^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2010-01-13 14:49 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-12-07 18:19 [Bug target/42324] New: Gcc doesn't follow x86-64 psABI on _Bool hjl dot tools at gmail dot com
2009-12-07 18:32 ` [Bug target/42324] " hpa at zytor dot com
2009-12-07 18:39 ` hjl dot tools at gmail dot com
2009-12-07 18:58 ` [Bug target/42324] [4.3/4.4/4.5 Regression] " hjl dot tools at gmail dot com
2009-12-07 19:41 ` hjl dot tools at gmail dot com
2009-12-07 20:49 ` rguenth at gcc dot gnu dot org
2009-12-07 20:59 ` hjl dot tools at gmail dot com
2009-12-08 18:17 ` hjl dot tools at gmail dot com
2009-12-08 18:27 ` hjl dot tools at gmail dot com
2009-12-09 17:43 ` [Bug target/42324] " hjl dot tools at gmail dot com
2009-12-10 14:42 ` hjl dot tools at gmail dot com
2009-12-10 15:20 ` hpa at zytor dot com
2010-01-13 12:09 ` matz at gcc dot gnu dot org
2010-01-13 13:55 ` joseph at codesourcery dot com
2010-01-13 14:33 ` matz at gcc dot gnu dot org
2010-01-13 14:46 ` hjl dot tools at gmail dot com
2010-01-13 14:49 ` matz at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).