Skip to content

Commit e24df92

Browse files
dwmw2H. Peter Anvin
authored andcommitted
x86, boot: Use .code16 instead of .code16gcc
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>
1 parent df90ca9 commit e24df92

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

arch/x86/boot/bioscall.S

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
* touching registers they shouldn't be.
1414
*/
1515

16-
.code16gcc
16+
.code16
1717
.text
1818
.globl intcall
1919
.type intcall, @function

arch/x86/boot/copy.S

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* Memory copy routines
1515
*/
1616

17-
.code16gcc
17+
.code16
1818
.text
1919

2020
GLOBAL(memcpy)
@@ -30,7 +30,7 @@ GLOBAL(memcpy)
3030
rep; movsb
3131
popw %di
3232
popw %si
33-
ret
33+
retl
3434
ENDPROC(memcpy)
3535

3636
GLOBAL(memset)
@@ -45,43 +45,43 @@ GLOBAL(memset)
4545
andw $3, %cx
4646
rep; stosb
4747
popw %di
48-
ret
48+
retl
4949
ENDPROC(memset)
5050

5151
GLOBAL(copy_from_fs)
5252
pushw %ds
5353
pushw %fs
5454
popw %ds
55-
call memcpy
55+
calll memcpy
5656
popw %ds
57-
ret
57+
retl
5858
ENDPROC(copy_from_fs)
5959

6060
GLOBAL(copy_to_fs)
6161
pushw %es
6262
pushw %fs
6363
popw %es
64-
call memcpy
64+
calll memcpy
6565
popw %es
66-
ret
66+
retl
6767
ENDPROC(copy_to_fs)
6868

6969
#if 0 /* Not currently used, but can be enabled as needed */
7070
GLOBAL(copy_from_gs)
7171
pushw %ds
7272
pushw %gs
7373
popw %ds
74-
call memcpy
74+
calll memcpy
7575
popw %ds
76-
ret
76+
retl
7777
ENDPROC(copy_from_gs)
7878

7979
GLOBAL(copy_to_gs)
8080
pushw %es
8181
pushw %gs
8282
popw %es
83-
call memcpy
83+
calll memcpy
8484
popw %es
85-
ret
85+
retl
8686
ENDPROC(copy_to_gs)
8787
#endif

0 commit comments

Comments
 (0)