summaryrefslogtreecommitdiff
path: root/dos/memset.S
diff options
context:
space:
mode:
authorhpa <hpa>2004-12-17 10:03:47 +0000
committerhpa <hpa>2004-12-17 10:03:47 +0000
commit3f4d6d81eea34770ddb50cfbf589d4d7febf1802 (patch)
tree823f696aa4f872b63f1ac82f653eab00e5c09a2d /dos/memset.S
parent89d4a08e6df3062b3aaf302c3f41e54150aaced0 (diff)
downloadsyslinux-3f4d6d81eea34770ddb50cfbf589d4d7febf1802.tar.gz
Fix memcpy/memset to match the use of regparm and .code16gcc
Diffstat (limited to 'dos/memset.S')
-rw-r--r--dos/memset.S14
1 files changed, 7 insertions, 7 deletions
diff --git a/dos/memset.S b/dos/memset.S
index a7f610a3..dd534e7b 100644
--- a/dos/memset.S
+++ b/dos/memset.S
@@ -6,17 +6,17 @@
#
.text
- .code16
+ .code16gcc
.globl memset
.type memset, @function
memset:
cld
- pushl %edi
- movw 8(%esp),%di
- movb 12(%esp),%al
- movw 16(%esp),%cx
+ pushw %di
+ movw %ax,%di
+ movb %dl,%al
+ # The third argument is already in %cx
rep ; stosb
- popl %edi
- ret
+ popw %di
+ retl
.size memset,.-memset