aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/i386/memset.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>1998-08-25 11:45:26 +0000
committerUlrich Drepper <drepper@redhat.com>1998-08-25 11:45:26 +0000
commit6dbb7062ff2af970c6b8befecf71d7284d5813fb (patch)
tree491c0061190c228120bb48e2b3975572b4ba33e2 /sysdeps/i386/memset.c
parented1ac6a2d6c744bdbd4751efc86326ceafeac26c (diff)
downloadglibc-6dbb7062ff2af970c6b8befecf71d7284d5813fb.zip
glibc-6dbb7062ff2af970c6b8befecf71d7284d5813fb.tar.gz
glibc-6dbb7062ff2af970c6b8befecf71d7284d5813fb.tar.bz2
Update.
1998-08-25 11:43 Ulrich Drepper <drepper@cygnus.com> * elf/elf.h: Add syminfo stuff and other DT_* from Solaris' ELF. 1998-08-25 Bernd Schmidt <crux@Pool.Informatik.RWTH-Aachen.DE> * argp/argp.h: Use __inline__ not inline. * sysdeps/i386/bits/select.h (FD_ZERO): Rewrite asm not to indicate an input register as being clobbered. * sysdeps/i386/memset.c (memset): Likewise. * sysdeps/i386/bzero.c (__bzero): Likewise. * sysdeps/i386/memcopy.h ({BYTE,WORD}_COPY_[FB]WD): Likewise. 1998-08-25 Andreas Jaeger <aj@arthur.rhein-neckar.de> * stdlib/jrand48_r.c (__jrand48_r): Set also upper half of result. Fixes PR libc/757 (Reported by Michael Creutz <creutz@bnl.gov).
Diffstat (limited to 'sysdeps/i386/memset.c')
-rw-r--r--sysdeps/i386/memset.c21
1 files changed, 11 insertions, 10 deletions
diff --git a/sysdeps/i386/memset.c b/sysdeps/i386/memset.c
index 0cb6578..e7a8bc6 100644
--- a/sysdeps/i386/memset.c
+++ b/sysdeps/i386/memset.c
@@ -1,6 +1,6 @@
/* Set a block of memory to some byte value.
For Intel 80x86, x>=3.
- Copyright (C) 1991, 1992, 1993, 1997 Free Software Foundation, Inc.
+ Copyright (C) 1991, 1992, 1993, 1997, 1998 Free Software Foundation, Inc.
Contributed by Torbjorn Granlund (tege@sics.se).
The GNU C Library is free software; you can redistribute it and/or
@@ -28,6 +28,7 @@
void *
memset (void *dstpp, int c, size_t len)
{
+ int d0;
unsigned long int dstp = (unsigned long int) dstpp;
/* This explicit register allocation
@@ -55,25 +56,25 @@ memset (void *dstpp, int c, size_t len)
/* Fill bytes until DSTP is aligned on a longword boundary. */
asm volatile("rep\n"
"stosb" /* %0, %2, %3 */ :
- "=D" (dstp) :
- "0" (dstp), "c" ((-dstp) % OPSIZ), "a" (x) :
- "cx");
+ "=D" (dstp), "=c" (d0) :
+ "0" (dstp), "1" ((-dstp) % OPSIZ), "a" (x) :
+ "memory");
/* Fill longwords. */
asm volatile("rep\n"
"stosl" /* %0, %2, %3 */ :
- "=D" (dstp) :
- "0" (dstp), "c" (len / OPSIZ), "a" (x) :
- "cx");
+ "=D" (dstp), "=c" (d0) :
+ "0" (dstp), "1" (len / OPSIZ), "a" (x) :
+ "memory");
len %= OPSIZ;
}
/* Write the last few bytes. */
asm volatile("rep\n"
"stosb" /* %0, %2, %3 */ :
- "=D" (dstp) :
- "0" (dstp), "c" (len), "a" (x) :
- "cx");
+ "=D" (dstp), "=c" (d0) :
+ "0" (dstp), "1" (len), "a" (x) :
+ "memory");
return dstpp;
}