c/9475: Wrong ffs results
Falk Hueffner
falk.hueffner@student.uni-tuebingen.de
Tue Jan 28 13:55:00 GMT 2003
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
More information about the Gcc-bugs
mailing list