Skip to content

Commit

Permalink
x86, boot: Use .code16 instead of .code16gcc
Browse files Browse the repository at this point in the history
This reverts commit 28b4868 ("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: David Woodhouse <David.Woodhouse@intel.com>
Link: http://lkml.kernel.org/r/1388788242.2391.75.camel@shinybook.infradead.org
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
  • Loading branch information
David Woodhouse authored and H. Peter Anvin committed Jan 4, 2014
1 parent df90ca9 commit e24df92
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion arch/x86/boot/bioscall.S
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* touching registers they shouldn't be.
*/

.code16gcc
.code16
.text
.globl intcall
.type intcall, @function
Expand Down
22 changes: 11 additions & 11 deletions arch/x86/boot/copy.S
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* Memory copy routines
*/

.code16gcc
.code16
.text

GLOBAL(memcpy)
Expand All @@ -30,7 +30,7 @@ GLOBAL(memcpy)
rep; movsb
popw %di
popw %si
ret
retl
ENDPROC(memcpy)

GLOBAL(memset)
Expand All @@ -45,43 +45,43 @@ GLOBAL(memset)
andw $3, %cx
rep; stosb
popw %di
ret
retl
ENDPROC(memset)

GLOBAL(copy_from_fs)
pushw %ds
pushw %fs
popw %ds
call memcpy
calll memcpy
popw %ds
ret
retl
ENDPROC(copy_from_fs)

GLOBAL(copy_to_fs)
pushw %es
pushw %fs
popw %es
call memcpy
calll memcpy
popw %es
ret
retl
ENDPROC(copy_to_fs)

#if 0 /* Not currently used, but can be enabled as needed */
GLOBAL(copy_from_gs)
pushw %ds
pushw %gs
popw %ds
call memcpy
calll memcpy
popw %ds
ret
retl
ENDPROC(copy_from_gs)

GLOBAL(copy_to_gs)
pushw %es
pushw %gs
popw %es
call memcpy
calll memcpy
popw %es
ret
retl
ENDPROC(copy_to_gs)
#endif

0 comments on commit e24df92

Please sign in to comment.