MS/CW-style inline assembly for GCC
Neil Booth
neil@daikokuya.co.uk
Tue May 11 05:35:00 GMT 2004
Robert Dewar wrote:-
> Robert Dewar wrote:
>
> >For reference, the code on the x86 should look something like
> >(in Intel syntax):
> >
> > lp: mov eax, [ebx]
> > adc eax, [ecx]
> > inc ebx
> > inc ecx
> > loop lp
>
> that's the code that was wrong, should be
>
> > lp: mov eax, [ebx]
> > adc eax, [ecx]
> > lea ebx, [ebx+4]
> > lea ecx, [ecx+4]
> > loop lp
Except that loop decrements ecx and loops if non-zero, so I
think you've still got some work to do 8-)
Neil.
More information about the Gcc
mailing list