Wed Jan 15 18:43:00 GMT 2003
> > Could you please also tell me if 3.3 and 3.4 remove the extra mov's in
> > of %eax. Ideally, there should be no more than 4 instructions in the
> > loop.
> movl -4(%ebp), %eax <== still does the load
> cmpl $16, %eax
> je .L7
> incl %eax
> movl %eax, -4(%ebp) <== and store
> jmp .L2
> For some reason it is not (even with -fnew-ra), but on PPC there
> is no extra load/store.
Instruction counts do not tell the whole story; gcc is simply putting more
pressure on the decoding unit but less pressure on the execution unit (which
otherwise would execute two loads in the `taken' case). Things might be
different if gcc is given other options like -mtune=i386.
|_ _ _ __
More information about the Gcc-help