diff options
author | Michael Brown | 2013-09-25 13:55:46 +0200 |
---|---|---|
committer | Michael Brown | 2013-09-25 13:55:46 +0200 |
commit | cba22d36b77da53890bd65fdadd0e63925687af0 (patch) | |
tree | 340339fb8c8ccebd66638abb22a7b2d6db751bb5 /src/arch/i386/firmware/pcbios/bios_console.c | |
parent | [ipv6] Add inet6_aton() (diff) | |
download | ipxe-cba22d36b77da53890bd65fdadd0e63925687af0.tar.gz ipxe-cba22d36b77da53890bd65fdadd0e63925687af0.tar.xz ipxe-cba22d36b77da53890bd65fdadd0e63925687af0.zip |
[build] Work around bug in gcc >= 4.8
Commit 238050d ("[build] Work around bug in gcc >= 4.8") works around
one instance of a bug in recent versions of gcc, in which "ebp" cannot
be specified within an asm clobber list.
Some versions of gcc seem to exhibit the same bug on other points in
the codebase. Fix by changing all instances of "ebp" in a clobber
list to use the push/pop %ebp workaround instead.
Originally-implemented-by: Víctor Román Archidona <contacto@victor-roman.es>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/arch/i386/firmware/pcbios/bios_console.c')
-rw-r--r-- | src/arch/i386/firmware/pcbios/bios_console.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/arch/i386/firmware/pcbios/bios_console.c b/src/arch/i386/firmware/pcbios/bios_console.c index 213ebd92..79e43708 100644 --- a/src/arch/i386/firmware/pcbios/bios_console.c +++ b/src/arch/i386/firmware/pcbios/bios_console.c @@ -167,7 +167,8 @@ static void bios_putchar ( int character ) { return; /* Print character with attribute */ - __asm__ __volatile__ ( REAL_CODE ( "sti\n\t" + __asm__ __volatile__ ( REAL_CODE ( "pushl %%ebp\n\t" /* gcc bug */ + "sti\n\t" /* Skip non-printable characters */ "cmpb $0x20, %%al\n\t" "jb 1f\n\t" @@ -188,11 +189,11 @@ static void bios_putchar ( int character ) { "xorw %%bx, %%bx\n\t" "movb $0x0e, %%ah\n\t" "int $0x10\n\t" - "cli\n\t" ) + "cli\n\t" + "popl %%ebp\n\t" /* gcc bug */ ) : "=a" ( discard_a ), "=b" ( discard_b ), "=c" ( discard_c ) - : "a" ( character ), "b" ( bios_attr ) - : "ebp" ); + : "a" ( character ), "b" ( bios_attr ) ); } /** |