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]

Re: c/9475: Wrong ffs results


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


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