aboutsummaryrefslogtreecommitdiff
path: root/arch/x86/boot/copy.S
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86/boot/copy.S')
-rw-r--r--arch/x86/boot/copy.S62
1 files changed, 25 insertions, 37 deletions
diff --git a/arch/x86/boot/copy.S b/arch/x86/boot/copy.S
index ef50c84e8b4..1eb7d298b47 100644
--- a/arch/x86/boot/copy.S
+++ b/arch/x86/boot/copy.S
@@ -8,16 +8,16 @@
*
* ----------------------------------------------------------------------- */
+#include <linux/linkage.h>
+
/*
* Memory copy routines
*/
- .code16gcc
+ .code16
.text
- .globl memcpy
- .type memcpy, @function
-memcpy:
+GLOBAL(memcpy)
pushw %si
pushw %di
movw %ax, %di
@@ -30,12 +30,10 @@ memcpy:
rep; movsb
popw %di
popw %si
- ret
- .size memcpy, .-memcpy
+ retl
+ENDPROC(memcpy)
- .globl memset
- .type memset, @function
-memset:
+GLOBAL(memset)
pushw %di
movw %ax, %di
movzbl %dl, %eax
@@ -47,53 +45,43 @@ memset:
andw $3, %cx
rep; stosb
popw %di
- ret
- .size memset, .-memset
+ retl
+ENDPROC(memset)
- .globl copy_from_fs
- .type copy_from_fs, @function
-copy_from_fs:
+GLOBAL(copy_from_fs)
pushw %ds
pushw %fs
popw %ds
- call memcpy
+ calll memcpy
popw %ds
- ret
- .size copy_from_fs, .-copy_from_fs
+ retl
+ENDPROC(copy_from_fs)
- .globl copy_to_fs
- .type copy_to_fs, @function
-copy_to_fs:
+GLOBAL(copy_to_fs)
pushw %es
pushw %fs
popw %es
- call memcpy
+ calll memcpy
popw %es
- ret
- .size copy_to_fs, .-copy_to_fs
+ retl
+ENDPROC(copy_to_fs)
#if 0 /* Not currently used, but can be enabled as needed */
-
- .globl copy_from_gs
- .type copy_from_gs, @function
-copy_from_gs:
+GLOBAL(copy_from_gs)
pushw %ds
pushw %gs
popw %ds
- call memcpy
+ calll memcpy
popw %ds
- ret
- .size copy_from_gs, .-copy_from_gs
- .globl copy_to_gs
+ retl
+ENDPROC(copy_from_gs)
- .type copy_to_gs, @function
-copy_to_gs:
+GLOBAL(copy_to_gs)
pushw %es
pushw %gs
popw %es
- call memcpy
+ calll memcpy
popw %es
- ret
- .size copy_to_gs, .-copy_to_gs
-
+ retl
+ENDPROC(copy_to_gs)
#endif