This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug target/14907] bogus sign/zero extension when relaying parameters with regparm



------- Comment #4 from nmiell at comcast dot net  2006-03-01 05:54 -------
This also occurs on AMD64 without any special attributes (the ABI passes params
in registers already).

When compiling:
extern char c2(char);
char c1(char c) { return c2(c); }

with gcc -Wall -O2 -S tail-char.c
using gcc (GCC) 4.0.2 20051125 (Red Hat 4.0.2-8)

The result is:
c1:
        subq    $8, %rsp
        movsbl  %dil,%edi
        call    c2
        addq    $8, %rsp
        movsbl  %al,%eax
        ret


-- 

nmiell at comcast dot net changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |nmiell at comcast dot net


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]