Mail Archives: djgpp/1997/11/28/21:03:24
"Alan M. Doerhoefer" <aland AT seanet DOT com> writes:
> Eli Zaretskii wrote:
> >
> > On Tue, 25 Nov 1997, Alan M. Doerhoefer wrote:
> >
> > > using binutils 2.8.1 instead of 2.7 caused a remarkable
> > > slowing of my program.
> >
> > Did you consider the possibility of different alignment of the functions
> > in the version linked with 2.8.1? What processor did you run your
> > program on?
Different versions of binutils produce different instructions
for .align directive. E.g. for the following function:
int test (void) {
__asm__ __volatile__ (".align 4\n\tmovl $0, %eax\n\t.align 4");
return 0;
}
bnu2.7:
leal 0x0(%esi),%esi
leal 0x0(%esi,1),%esi
bnu2.8.1:
leal 0x0(%esi),%esi
leal 0x0(%edi,1),%edi
This difference may have effects on instructions pipelining or something.
I think, speed may depend on instructions near .align.
Probably for other alignment quantities (or assembler directives)
assemblers from different versions will produce different results too.
- Raw text -