On Fri, Jun 07, 2013 at 02:30:10PM +0100, Michael Brown wrote:
> On 07/06/13 14:22, Daniel P. Berrange wrote:
> >This doesn't look right:
> >
> >-                                          "addw $4, %%sp\n\t" )
> >+                                          "popl %%ebp\n\t" /* discard */
> >+                                          "popl %%ebp\n\t" /* gcc bug */ )
> >
> >In the original patch it was
> >-                                          "addw $4, %%sp\n\t" )
> >+                                          "addw $4, %%sp\n\t"
> >+                                          "popl %%ebp\n\t" )
> >
> >You've accidentally transposed the 'addw' into a second 'popl'.
> 
> That's deliberate: since %ebp is about to get overwritten anyway, we
> can use it as a discard register for the "popl", which increments
> %sp by 4 using only two bytes of code rather than three.
> 
> You can see several other instances of this pattern within the codebase:
> 
>   git grep "pop.*discard"

Ok, I'll assume you're right since my assembler knowledge is tiny :-)
Just wanted to make sure it wasn't an accidental typo.

Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|
_______________________________________________
ipxe-devel mailing list
ipxe-devel@lists.ipxe.org
https://lists.ipxe.org/mailman/listinfo.cgi/ipxe-devel

Reply via email to