mirror of
https://sourceware.org/git/glibc.git
synced 2025-01-08 18:30:18 +00:00
* sysdeps/i386/i686/memset.S: Fix treatment of unaligned pointer.
Reported by John Zulauf <john.zulauf@amd.com>.
This commit is contained in:
parent
7d93246124
commit
93b94c0412
@ -1,3 +1,8 @@
|
|||||||
|
2006-02-21 Roland McGrath <roland@redhat.com>
|
||||||
|
|
||||||
|
* sysdeps/i386/i686/memset.S: Fix treatment of unaligned pointer.
|
||||||
|
Reported by John Zulauf <john.zulauf@amd.com>.
|
||||||
|
|
||||||
2004-11-23 Richard Sandiford <rsandifo@redhat.com>
|
2004-11-23 Richard Sandiford <rsandifo@redhat.com>
|
||||||
|
|
||||||
* configure.in (libc_cv_gcc_dwarf2_unwind_info): Delete.
|
* configure.in (libc_cv_gcc_dwarf2_unwind_info): Delete.
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
/* memset/bzero -- set memory area to CH/0
|
/* memset/bzero -- set memory area to CH/0
|
||||||
Highly optimized version for ix86, x>=6.
|
Highly optimized version for ix86, x>=6.
|
||||||
Copyright (C) 1999, 2000, 2003, 2005 Free Software Foundation, Inc.
|
Copyright (C) 1999,2000,2003,2005,2006 Free Software Foundation, Inc.
|
||||||
This file is part of the GNU C Library.
|
This file is part of the GNU C Library.
|
||||||
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1999.
|
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1999.
|
||||||
|
|
||||||
@ -64,17 +64,17 @@ ENTRY (BP_SYM (memset))
|
|||||||
movl %edx, %edi
|
movl %edx, %edi
|
||||||
cfi_rel_offset (edi, 0)
|
cfi_rel_offset (edi, 0)
|
||||||
andl $3, %edx
|
andl $3, %edx
|
||||||
jz 2f
|
jz 2f /* aligned */
|
||||||
jnp 3f
|
jp 3f /* misaligned at 3, store just one byte below */
|
||||||
stosb
|
stosb /* misaligned at 1 or 2, store two bytes */
|
||||||
decl %ecx
|
decl %ecx
|
||||||
jz 1f
|
jz 1f
|
||||||
3: stosb
|
3: stosb
|
||||||
decl %ecx
|
decl %ecx
|
||||||
jz 1f
|
jz 1f
|
||||||
xorl $3, %edx
|
xorl $1, %edx
|
||||||
jz 2f
|
jnz 2f /* was misaligned at 2 or 3, now aligned */
|
||||||
stosb
|
stosb /* was misaligned at 1, store third byte */
|
||||||
decl %ecx
|
decl %ecx
|
||||||
2: movl %ecx, %edx
|
2: movl %ecx, %edx
|
||||||
shrl $2, %ecx
|
shrl $2, %ecx
|
||||||
|
Loading…
Reference in New Issue
Block a user