This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/14907] bogus sign/zero extension when relaying parameters with regparm
- From: "nmiell at comcast dot net" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 1 Mar 2006 05:54:00 -0000
- Subject: [Bug target/14907] bogus sign/zero extension when relaying parameters with regparm
- References: <bug-14907-1037@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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