Commit e24df921 authored by David Woodhouse's avatar David Woodhouse Committed by H. Peter Anvin

x86, boot: Use .code16 instead of .code16gcc

This reverts commit 28b48688 ("x86, boot: use .code16gcc instead
of .code16").

Versions of binutils older than 2.16 are already not working, so this
workaround is no longer necessary either.  At the same time, some of
the transformations that .code16gcc does can be *extremely*
counterintuitive to a human programmer.

[ hpa: folded ret -> retl and call -> calll fixes from followup patch ]
Signed-off-by: default avatarDavid Woodhouse <David.Woodhouse@intel.com>
Link: http://lkml.kernel.org/r/1388788242.2391.75.camel@shinybook.infradead.orgSigned-off-by: default avatarH. Peter Anvin <hpa@linux.intel.com>
parent df90ca96
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
* touching registers they shouldn't be. * touching registers they shouldn't be.
*/ */
.code16gcc .code16
.text .text
.globl intcall .globl intcall
.type intcall, @function .type intcall, @function
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
* Memory copy routines * Memory copy routines
*/ */
.code16gcc .code16
.text .text
GLOBAL(memcpy) GLOBAL(memcpy)
...@@ -30,7 +30,7 @@ GLOBAL(memcpy) ...@@ -30,7 +30,7 @@ GLOBAL(memcpy)
rep; movsb rep; movsb
popw %di popw %di
popw %si popw %si
ret retl
ENDPROC(memcpy) ENDPROC(memcpy)
GLOBAL(memset) GLOBAL(memset)
...@@ -45,25 +45,25 @@ GLOBAL(memset) ...@@ -45,25 +45,25 @@ GLOBAL(memset)
andw $3, %cx andw $3, %cx
rep; stosb rep; stosb
popw %di popw %di
ret retl
ENDPROC(memset) ENDPROC(memset)
GLOBAL(copy_from_fs) GLOBAL(copy_from_fs)
pushw %ds pushw %ds
pushw %fs pushw %fs
popw %ds popw %ds
call memcpy calll memcpy
popw %ds popw %ds
ret retl
ENDPROC(copy_from_fs) ENDPROC(copy_from_fs)
GLOBAL(copy_to_fs) GLOBAL(copy_to_fs)
pushw %es pushw %es
pushw %fs pushw %fs
popw %es popw %es
call memcpy calll memcpy
popw %es popw %es
ret retl
ENDPROC(copy_to_fs) ENDPROC(copy_to_fs)
#if 0 /* Not currently used, but can be enabled as needed */ #if 0 /* Not currently used, but can be enabled as needed */
...@@ -71,17 +71,17 @@ GLOBAL(copy_from_gs) ...@@ -71,17 +71,17 @@ GLOBAL(copy_from_gs)
pushw %ds pushw %ds
pushw %gs pushw %gs
popw %ds popw %ds
call memcpy calll memcpy
popw %ds popw %ds
ret retl
ENDPROC(copy_from_gs) ENDPROC(copy_from_gs)
GLOBAL(copy_to_gs) GLOBAL(copy_to_gs)
pushw %es pushw %es
pushw %gs pushw %gs
popw %es popw %es
call memcpy calll memcpy
popw %es popw %es
ret retl
ENDPROC(copy_to_gs) ENDPROC(copy_to_gs)
#endif #endif
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment