This is the mail archive of the
gcc-prs@gcc.gnu.org
mailing list for the GCC project.
Re: c/9475: Wrong ffs results
- From: Falk Hueffner <falk dot hueffner at student dot uni-tuebingen dot de>
- To: nobody at gcc dot gnu dot org
- Cc: gcc-prs at gcc dot gnu dot org,
- Date: 28 Jan 2003 13:16:00 -0000
- Subject: Re: c/9475: Wrong ffs results
- Reply-to: Falk Hueffner <falk dot hueffner at student dot uni-tuebingen dot de>
The following reply was made to PR c/9475; it has been noted by GNATS.
From: Falk Hueffner <falk.hueffner@student.uni-tuebingen.de>
To: gcc-gnats@gcc.gnu.org, gcc-bugs@gcc.gnu.org
Cc:
Subject: Re: c/9475: Wrong ffs results
Date: 28 Jan 2003 14:13:37 +0100
Hi,
gcc thinks ffs gets its parameters on the stack:
int f(unsigned dummy, unsigned x) {
return __builtin_ffs(x);
}
f:
.frame $30,32,$26,0
.mask 0x4000000,-16
ldah $29,0($27) !gpdisp!6
lda $29,0($29) !gpdisp!6
$f..ng:
lda $30,-32($30)
ldq $27,ffs($29) !literal!7
stq $26,16($30)
.prologue 1
--> stl $17,0($30)
jsr $26,($27),ffs !lituse_jsr!7
ldah $29,0($26) !gpdisp!8
addl $31,$0,$0
bis $31,$31,$31
lda $29,0($29) !gpdisp!8
ldq $26,16($30)
lda $30,32($30)
ret $31,($26),1
But ffs follows normal C calling conventions (first argument in $16).
Any ideas which recent change might have caused this?
--
Falk