]> git.ipfire.org Git - thirdparty/ipxe.git/commit
[build] Work around bug in gcc >= 4.8
authorMichael Brown <mcb30@ipxe.org>
Fri, 7 Jun 2013 12:46:27 +0000 (13:46 +0100)
committerMichael Brown <mcb30@ipxe.org>
Fri, 7 Jun 2013 12:59:58 +0000 (13:59 +0100)
commit238050dfd46e3c4a87329da1d48b4d8dde5af8a1
treedc066370b45c13357e74f98920fbdd7e57f36a32
parente3dd10edc4916da53fc257f172ba85bbe2f85fa0
[build] Work around bug in gcc >= 4.8

gcc 4.8 and 4.9 fail to compile pxe_call.c with the error "bp cannot
be used in asm here".  Other points in the codebase which use "ebp" in
the asm clobber list do not seem to be affected.

Unfortunately gcc provides no way to specify %ebp as an output
register, so we cannot use this as a workaround.  The only viable
solution is to explicitly push/pop %ebp within the asm itself.  This
is ugly for two reasons: firstly, it may be unnecessary; secondly, it
may cause gcc to generate invalid %esp-relative addresses if the asm
happens to use memory operands.  This specific block of asm uses no
memory operands and so will not generate invalid code.

Reported-by: Daniel P. Berrange <berrange@redhat.com>
Reported-by: Christian Hesse <list@eworm.de>
Originally-fixed-by: Christian Hesse <list@eworm.de>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
src/arch/i386/interface/pxe/pxe_call.c