diff options
Diffstat (limited to 'sysdeps/i386')
-rw-r--r-- | sysdeps/i386/bzero.c | 70 | ||||
-rw-r--r-- | sysdeps/i386/elf/start.S | 4 | ||||
-rw-r--r-- | sysdeps/i386/ffs.c | 35 | ||||
-rw-r--r-- | sysdeps/i386/i386-mcount.S | 2 |
4 files changed, 56 insertions, 55 deletions
diff --git a/sysdeps/i386/bzero.c b/sysdeps/i386/bzero.c index 659e54d..5cc5989 100644 --- a/sysdeps/i386/bzero.c +++ b/sysdeps/i386/bzero.c @@ -1,24 +1,23 @@ -/* bzero -- set a block of memory to zero. - For Intel 80x86, x>=3. - Copyright (C) 1991, 1992, 1993 Free Software Foundation, Inc. +/* bzero -- set a block of memory to zero. For Intel 80x86, x>=3. + This file is part of the GNU C Library. + Copyright (C) 1991, 1992, 1993, 1997 Free Software Foundation, Inc. Contributed by Torbjorn Granlund (tege@sics.se). -The GNU C Library is free software; you can redistribute it and/or -modify it under the terms of the GNU Library General Public License as -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. -The GNU C Library is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -Library General Public License for more details. + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ -#include <ansidecl.h> #include <string.h> #include <memcopy.h> @@ -27,8 +26,9 @@ Cambridge, MA 02139, USA. */ #ifdef __GNUC__ void -DEFUN(bzero, (dstpp, len), - PTR dstpp AND size_t len) +bzero (dstpp, len) + void *dstpp; + size_t len; { /* N.B.: This code is almost verbatim from memset.c. */ @@ -36,12 +36,12 @@ DEFUN(bzero, (dstpp, len), /* This explicit register allocation improves code very much indeed. */ - register op_t x asm("ax"); + register op_t x asm ("ax"); x = 0; /* Clear the direction flag, so filling will move forward. */ - asm volatile("cld"); + asm volatile ("cld"); /* This threshold value is optimal. */ if (len >= 12) @@ -53,27 +53,27 @@ DEFUN(bzero, (dstpp, len), No need to test for LEN == 0 in this alignment loop. */ /* 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"); + asm volatile ("rep\n" + "stosb" /* %0, %2, %3 */ : + "=D" (dstp) : + "0" (dstp), "c" ((-dstp) % OPSIZ), "a" (x) : + "cx"); /* Fill longwords. */ - asm volatile("rep\n" - "stosl" /* %0, %2, %3 */ : - "=D" (dstp) : - "0" (dstp), "c" (len / OPSIZ), "a" (x) : - "cx"); + asm volatile ("rep\n" + "stosl" /* %0, %2, %3 */ : + "=D" (dstp) : + "0" (dstp), "c" (len / OPSIZ), "a" (x) : + "cx"); len %= OPSIZ; } /* Write the last few bytes. */ - asm volatile("rep\n" - "stosb" /* %0, %2, %3 */ : - "=D" (dstp) : - "0" (dstp), "c" (len), "a" (x) : - "cx"); + asm volatile ("rep\n" + "stosb" /* %0, %2, %3 */ : + "=D" (dstp) : + "0" (dstp), "c" (len), "a" (x) : + "cx"); } #else diff --git a/sysdeps/i386/elf/start.S b/sysdeps/i386/elf/start.S index 8b7faae..706e5c9 100644 --- a/sysdeps/i386/elf/start.S +++ b/sysdeps/i386/elf/start.S @@ -50,12 +50,12 @@ _start: pointer; hopefully it will be zero so we don't try to call random pointers. */ testl %edx,%edx - jz nofini + jz .Lnofini pushl %edx call atexit popl %eax /* Pop value to unused register to remove argument from stack. */ -nofini: +.Lnofini: /* Do essential libc initialization. In statically linked programs under the GNU Hurd, this is what sets up the diff --git a/sysdeps/i386/ffs.c b/sysdeps/i386/ffs.c index 1e21585..411439d 100644 --- a/sysdeps/i386/ffs.c +++ b/sysdeps/i386/ffs.c @@ -1,24 +1,24 @@ /* ffs -- find first set bit in a word, counted from least significant end. For Intel 80x86, x>=3. - Copyright (C) 1991, 1992, 1993, 1994 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Copyright (C) 1991, 1992, 1993, 1994, 1997 Free Software Foundation, Inc. Contributed by Torbjorn Granlund (tege@sics.se). -The GNU C Library is free software; you can redistribute it and/or -modify it under the terms of the GNU Library General Public License as -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. -The GNU C Library is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -Library General Public License for more details. + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ -#include <ansidecl.h> #include <string.h> #undef ffs @@ -26,16 +26,17 @@ Cambridge, MA 02139, USA. */ #ifdef __GNUC__ int -DEFUN(ffs, (x), int x) +ffs (x) + int x; { int cnt; int tmp; asm ("xorl %0,%0\n" /* Set CNT to zero. */ "bsfl %2,%1\n" /* Count low bits in X and store in %1. */ - "jz nonzero\n" /* Jump if OK, i.e. X was non-zero. */ + "jz 1f\n" /* Jump if OK, i.e. X was non-zero. */ "leal 1(%1),%0\n" /* Return bsfl-result plus one on %0. */ - "nonzero:" : "=&a" (cnt), "=r" (tmp) : "rm" (x)); + "1:" : "=&a" (cnt), "=r" (tmp) : "rm" (x)); return cnt; } diff --git a/sysdeps/i386/i386-mcount.S b/sysdeps/i386/i386-mcount.S index 60d52e9..d4c0d7b 100644 --- a/sysdeps/i386/i386-mcount.S +++ b/sysdeps/i386/i386-mcount.S @@ -45,7 +45,7 @@ C_LABEL(_mcount) call 1f 1: popl %ecx addl $_GLOBAL_OFFSET_TABLE_+[.-1b], %ecx - movl C_SYMBOL_NAME(__mcount_internal@GOTOFF)(%ecx), %eax + movl C_SYMBOL_NAME(__mcount_internal@GOT)(%ecx), %eax call *%eax #else call C_SYMBOL_NAME(__mcount_internal) |