Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 136899
b: refs/heads/master
c: 2f79555
h: refs/heads/master
i:
  136897: 90b280d
  136895: 3041617
v: v3
  • Loading branch information
Cyrill Gorcunov authored and Ingo Molnar committed Feb 19, 2009
1 parent e5c6b69 commit 1fd9220
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 27 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 1b25f3b4e18d1acffeb41258a18f13db71da9a7a
refs/heads/master: 2f7955509710fd378a1ac96e19d29d5a0e3301fd
40 changes: 14 additions & 26 deletions trunk/arch/x86/boot/copy.S
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,16 @@
*
* ----------------------------------------------------------------------- */

#include <linux/linkage.h>

/*
* Memory copy routines
*/

.code16gcc
.text

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

.globl memset
.type memset, @function
memset:
GLOBAL(memset)
pushw %di
movw %ax, %di
movzbl %dl, %eax
Expand All @@ -48,52 +46,42 @@ memset:
rep; stosb
popw %di
ret
.size memset, .-memset
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
popw %ds
ret
.size copy_from_fs, .-copy_from_fs
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
popw %es
ret
.size copy_to_fs, .-copy_to_fs
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
popw %ds
ret
.size copy_from_gs, .-copy_from_gs
.globl copy_to_gs
ENDPROC(copy_from_gs)

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

ENDPROC(copy_to_gs)
#endif

0 comments on commit 1fd9220

Please sign in to comment.