Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2f795550 authored by Cyrill Gorcunov's avatar Cyrill Gorcunov Committed by Ingo Molnar
Browse files

x86: copy.S - use GLOBAL,ENDPROC macros



Impact: cleanup

Signed-off-by: default avatarCyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
parent 1b25f3b4
Loading
Loading
Loading
Loading
+14 −26
Original line number Original line Diff line number Diff line
@@ -8,6 +8,8 @@
 *
 *
 * ----------------------------------------------------------------------- */
 * ----------------------------------------------------------------------- */


#include <linux/linkage.h>

/*
/*
 * Memory copy routines
 * Memory copy routines
 */
 */
@@ -15,9 +17,7 @@
	.code16gcc
	.code16gcc
	.text
	.text


	.globl	memcpy
GLOBAL(memcpy)
	.type	memcpy, @function
memcpy:
	pushw	%si
	pushw	%si
	pushw	%di
	pushw	%di
	movw	%ax, %di
	movw	%ax, %di
@@ -31,11 +31,9 @@ memcpy:
	popw	%di
	popw	%di
	popw	%si
	popw	%si
	ret
	ret
	.size	memcpy, .-memcpy
ENDPROC(memcpy)


	.globl	memset
GLOBAL(memset)
	.type	memset, @function
memset:
	pushw	%di
	pushw	%di
	movw	%ax, %di
	movw	%ax, %di
	movzbl	%dl, %eax
	movzbl	%dl, %eax
@@ -48,52 +46,42 @@ memset:
	rep; stosb
	rep; stosb
	popw	%di
	popw	%di
	ret
	ret
	.size	memset, .-memset
ENDPROC(memset)


	.globl	copy_from_fs
GLOBAL(copy_from_fs)
	.type	copy_from_fs, @function
copy_from_fs:
	pushw	%ds
	pushw	%ds
	pushw	%fs
	pushw	%fs
	popw	%ds
	popw	%ds
	call	memcpy
	call	memcpy
	popw	%ds
	popw	%ds
	ret
	ret
	.size	copy_from_fs, .-copy_from_fs
ENDPROC(copy_from_fs)


	.globl	copy_to_fs
GLOBAL(copy_to_fs)
	.type	copy_to_fs, @function
copy_to_fs:
	pushw	%es
	pushw	%es
	pushw	%fs
	pushw	%fs
	popw	%es
	popw	%es
	call	memcpy
	call	memcpy
	popw	%es
	popw	%es
	ret
	ret
	.size	copy_to_fs, .-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 */

GLOBAL(copy_from_gs)
	.globl	copy_from_gs
	.type	copy_from_gs, @function
copy_from_gs:
	pushw	%ds
	pushw	%ds
	pushw	%gs
	pushw	%gs
	popw	%ds
	popw	%ds
	call	memcpy
	call	memcpy
	popw	%ds
	popw	%ds
	ret
	ret
	.size	copy_from_gs, .-copy_from_gs
ENDPROC(copy_from_gs)
	.globl	copy_to_gs


	.type	copy_to_gs, @function
GLOBAL(copy_to_gs)
copy_to_gs:
	pushw	%es
	pushw	%es
	pushw	%gs
	pushw	%gs
	popw	%es
	popw	%es
	call	memcpy
	call	memcpy
	popw	%es
	popw	%es
	ret
	ret
	.size	copy_to_gs, .-copy_to_gs
ENDPROC(copy_to_gs)

#endif
#endif