aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/sparc/sparc32
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2003-01-27 21:03:22 +0000
committerUlrich Drepper <drepper@redhat.com>2003-01-27 21:03:22 +0000
commit62f29da7cbc527e8f8dda4f5101e6ac504c98505 (patch)
treed1f7d7ed70c131129214bc71441b1d8bbfc7268f /sysdeps/sparc/sparc32
parente4e9446ba3c762d9bddd2718f889af545bf4e95c (diff)
downloadglibc-62f29da7cbc527e8f8dda4f5101e6ac504c98505.tar
glibc-62f29da7cbc527e8f8dda4f5101e6ac504c98505.tar.gz
glibc-62f29da7cbc527e8f8dda4f5101e6ac504c98505.tar.bz2
glibc-62f29da7cbc527e8f8dda4f5101e6ac504c98505.zip
Update.
2003-01-26 Andreas Schwab <schwab@suse.de> * sysdeps/wordsize-32/divdi3.c: Export the functions only as compatibility symbols. Remove INTDEF for __divdi3. * sysdeps/wordsize-32/lldiv.c: Don't use __divdi3_internal. * sysdeps/powerpc/powerpc32/divdi3.c: Remove. * sysdeps/powerpc/powerpc32/Makefile (CPPFLAGS-divdi3.c): Don't define. * sysdeps/powerpc/powerpc32/Dist: Remove divdi3.c. 2003-01-24 Jakub Jelinek <jakub@redhat.com> * elf/tls-macros.h: Add SPARC 32-bit definitions. * sysdeps/sparc/sparc32/elf/configure.in: Add TLS check. * sysdeps/sparc/sparc32/dl-machine.h: Add dl_machine_h guards for the first half of the header. Include tls.h. (elf_machine_type_class): Return ELF_RTYPE_CLASS_PLT for TLS relocs too. (elf_machine_rela): Handle TLS relocs. * sysdeps/sparc/dl-tls.h: New file. * sysdeps/unix/sysv/linux/sparc/sparc32/socket.S: Add cancellation support. * sysdeps/sparc/sparc32/sparcv9/hp-timing.h: Use %g6 instead of %g7. * sysdeps/sparc/sparc32/memchr.S: Likewise. * sysdeps/sparc/sparc32/memcpy.S: Likewise. * sysdeps/sparc/sparc32/strcat.S: Likewise. * sysdeps/sparc/sparc32/strchr.S: Likewise. * sysdeps/sparc/sparc32/strcmp.S: Likewise. * sysdeps/sparc/sparc32/strcpy.S: Likewise. * sysdeps/sparc/sparc64/sparcv9b/memcpy.S: Likewise. * sysdeps/sparc/sparc64/hp-timing.h: Likewise. * sysdeps/sparc/sparc64/memcpy.S: Likewise. * sysdeps/sparc/sparc64/stpcpy.S: Likewise. * sysdeps/sparc/sparc64/stpncpy.S: Likewise. * sysdeps/sparc/sparc64/strcat.S: Likewise. * sysdeps/sparc/sparc64/strchr.S: Likewise. * sysdeps/sparc/sparc64/strcmp.S: Likewise. * sysdeps/sparc/sparc64/strcpy.S: Likewise. * sysdeps/sparc/sparc64/strncmp.S: Likewise. * sysdeps/sparc/sparc64/strncpy.S: Likewise. * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep.h: Likewise. * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep.h: Likewise. 2003-01-24 Andreas Schwab <schwab@suse.de> * elf/dl-close.c (_dl_close): Don't relocate DT_FINI_ARRAY elements, and process them backwards. * elf/Makefile ($(objpfx)tst-array4): New target. ($(objpfx)tst-array4.out): Likewise. (tests) [$(have-initfini-array) = yes]: Add tst-array4. * elf/tst-array4.c: New file. * elf/tst-array4.exp: Likewise. 2003-01-24 Steven Munroe <sjmunroe@us.ibm.com> * sysdeps/unix/sysv/linux/powerpc/powerpc64/fe_nomask.c: New file. 2003-01-27 Guido Guenther <agx@sigxcpu.org> * sysdeps/unix/sysv/linux/mips/sysdep.h (SYSCALL_ERROR_LABEL): Define. * sysdeps/unix/sysv/linux/mips/pread.c: Add support for cancellation handling and handle both __NR_pread64 and __NR_pread. * sysdeps/unix/sysv/linux/mips/pread64.c: Likewise. * sysdeps/unix/sysv/linux/mips/pwrite.c: Add support for cancellation handling and handle both __NR_pwrite64 and __NR_pwrite. * sysdeps/unix/sysv/linux/mips/pwrite64.c: Likewise. * sysdeps/unix/mips/sysdep.S: Don't set errno in the _LIBC_REENTRANT case, use register names consistently. 2003-01-27 Wolfram Gloger <wg@malloc.de> * malloc/hooks.c (mem2chunk_check): Check alignment of mem pointer, not of the computed chunk. Bug report from Carlos O'Donell <carlos@baldric.uwo.ca>.
Diffstat (limited to 'sysdeps/sparc/sparc32')
-rw-r--r--sysdeps/sparc/sparc32/dl-machine.h72
-rw-r--r--sysdeps/sparc/sparc32/elf/configure.in43
-rw-r--r--sysdeps/sparc/sparc32/memchr.S14
-rw-r--r--sysdeps/sparc/sparc32/memcpy.S138
-rw-r--r--sysdeps/sparc/sparc32/sparcv9/hp-timing.h14
-rw-r--r--sysdeps/sparc/sparc32/strcat.S14
-rw-r--r--sysdeps/sparc/sparc32/strchr.S10
-rw-r--r--sysdeps/sparc/sparc32/strcmp.S8
-rw-r--r--sysdeps/sparc/sparc32/strcpy.S14
9 files changed, 217 insertions, 110 deletions
diff --git a/sysdeps/sparc/sparc32/dl-machine.h b/sysdeps/sparc/sparc32/dl-machine.h
index 51060b652a..8c821b9cc2 100644
--- a/sysdeps/sparc/sparc32/dl-machine.h
+++ b/sysdeps/sparc/sparc32/dl-machine.h
@@ -1,5 +1,5 @@
/* Machine-dependent ELF dynamic relocation inline functions. SPARC version.
- Copyright (C) 1996-2001, 2002 Free Software Foundation, Inc.
+ Copyright (C) 1996-2002, 2003 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -17,11 +17,15 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
+#ifndef dl_machine_h
+#define dl_machine_h
+
#define ELF_MACHINE_NAME "sparc"
#include <string.h>
#include <sys/param.h>
#include <ldsodefs.h>
+#include <tls.h>
#ifndef VALIDX
# define VALIDX(tag) (DT_NUM + DT_THISPROCNUM + DT_VERSIONTAGNUM \
@@ -237,9 +241,17 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile)
PLT entries should not be allowed to define the value.
ELF_RTYPE_CLASS_NOCOPY iff TYPE should not be allowed to resolve to one
of the main executable's symbols, as for a COPY reloc. */
-#define elf_machine_type_class(type) \
- ((((type) == R_SPARC_JMP_SLOT) * ELF_RTYPE_CLASS_PLT) \
+#if defined USE_TLS && (!defined RTLD_BOOTSTRAP || USE___THREAD)
+# define elf_machine_type_class(type) \
+ ((((type) == R_SPARC_JMP_SLOT \
+ || ((type) >= R_SPARC_TLS_GD_HI22 && (type) <= R_SPARC_TLS_TPOFF64)) \
+ * ELF_RTYPE_CLASS_PLT) \
+ | (((type) == R_SPARC_COPY) * ELF_RTYPE_CLASS_COPY))
+#else
+# define elf_machine_type_class(type) \
+ ((((type) == R_SPARC_JMP_SLOT) * ELF_RTYPE_CLASS_PLT) \
| (((type) == R_SPARC_COPY) * ELF_RTYPE_CLASS_COPY))
+#endif
/* A reloc type used for ld.so cmdline arg lookups to reject PLT entries. */
#define ELF_MACHINE_JMP_SLOT R_SPARC_JMP_SLOT
@@ -413,6 +425,8 @@ elf_machine_plt_value (struct link_map *map, const Elf32_Rela *reloc,
return value + reloc->r_addend;
}
+#endif /* dl_machine_h */
+
#ifdef RESOLVE
/* Perform the relocation specified by RELOC and SYM (which is fully resolved).
@@ -448,16 +462,29 @@ elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc,
#if !defined RTLD_BOOTSTRAP && !defined RESOLVE_CONFLICT_FIND_MAP
const Elf32_Sym *const refsym = sym;
#endif
+#if defined USE_TLS && !defined RTLD_BOOTSTRAP
+ struct link_map *sym_map;
+#endif
Elf32_Addr value;
#ifndef RESOLVE_CONFLICT_FIND_MAP
if (sym->st_shndx != SHN_UNDEF &&
ELF32_ST_BIND (sym->st_info) == STB_LOCAL)
- value = map->l_addr;
+ {
+ value = map->l_addr;
+# if defined USE_TLS && !defined RTLD_BOOTSTRAP
+ sym_map = map;
+# endif
+ }
else
{
+# if defined USE_TLS && !defined RTLD_BOOTSTRAP
+ sym_map = RESOLVE_MAP (&sym, version, r_type);
+ value = sym == NULL ? 0 : sym_map->l_addr + sym->st_value;
+# else
value = RESOLVE (&sym, version, r_type);
if (sym)
value += sym->st_value;
+# endif
}
#else
value = 0;
@@ -496,6 +523,43 @@ elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc,
so we can optimize the first instruction of .plt out. */
sparc_fixup_plt (reloc, reloc_addr, value, 0);
break;
+#if defined USE_TLS && (!defined RTLD_BOOTSTRAP || USE___THREAD) \
+ && !defined RESOLVE_CONFLICT_FIND_MAP
+ case R_SPARC_TLS_DTPMOD32:
+ /* Get the information from the link map returned by the
+ resolv function. */
+ if (sym_map != NULL)
+ *reloc_addr = sym_map->l_tls_modid;
+ break;
+ case R_SPARC_TLS_DTPOFF32:
+ /* During relocation all TLS symbols are defined and used.
+ Therefore the offset is already correct. */
+ *reloc_addr = (sym == NULL ? 0 : sym->st_value) + reloc->r_addend;
+ break;
+ case R_SPARC_TLS_TPOFF32:
+ /* The offset is negative, forward from the thread pointer. */
+ /* We know the offset of object the symbol is contained in.
+ It is a negative value which will be added to the
+ thread pointer. */
+ CHECK_STATIC_TLS (map, sym_map);
+ *reloc_addr
+ = (sym == NULL ? 0 : sym->st_value - sym_map->l_tls_offset)
+ + reloc->r_addend;
+ break;
+# ifndef RTLD_BOOTSTRAP
+ case R_SPARC_TLS_LE_HIX22:
+ case R_SPARC_TLS_LE_LOX10:
+ CHECK_STATIC_TLS (map, sym_map);
+ value = (sym == NULL ? 0 : sym->st_value - sym_map->l_tls_offset)
+ + reloc->r_addend;
+ if (r_type == R_SPARC_TLS_LE_HIX22)
+ *reloc_addr = (*reloc_addr & 0xffc00000) | ((~value) >> 10);
+ else
+ *reloc_addr = (*reloc_addr & 0xffffe000) | (value & 0x3ff)
+ | 0x1c00;
+ break;
+# endif
+#endif
#ifndef RTLD_BOOTSTRAP
case R_SPARC_8:
*(char *) reloc_addr = value;
diff --git a/sysdeps/sparc/sparc32/elf/configure.in b/sysdeps/sparc/sparc32/elf/configure.in
new file mode 100644
index 0000000000..0c0b5121e5
--- /dev/null
+++ b/sysdeps/sparc/sparc32/elf/configure.in
@@ -0,0 +1,43 @@
+GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory.
+# Local configure fragment for sysdeps/sparc/sparc32/elf.
+
+if test "$usetls" != no; then
+# Check for support of thread-local storage handling in assembler and linker.
+AC_CACHE_CHECK(for sparc32 TLS support, libc_cv_sparc32_tls, [dnl
+cat > conftest.s <<\EOF
+ .section ".tdata", "awT", @progbits
+ .globl foo
+foo: .word 1
+ .section ".tbss", "awT", @nobits
+ .globl bar
+bar: .skip 4
+ .text
+baz: sethi %tgd_hi22(foo), %l1
+ add %l1, %tgd_lo10(foo), %l1
+ add %l7, %l1, %o0, %tgd_add(foo)
+ call __tls_get_addr, %tgd_call(foo)
+ sethi %tldm_hi22(bar), %l1
+ add %l1, %tldm_lo10(bar), %l1
+ add %l7, %l1, %o0, %tldm_add(bar)
+ call __tls_get_addr, %tldm_call(bar)
+ sethi %tldo_hix22(bar), %l1
+ xor %l1, %tldo_lox10(bar), %l1
+ add %o0, %l1, %l1, %tldo_add(bar)
+ sethi %tie_hi22(foo), %l1
+ add %l1, %tie_lo10(foo), %l1
+ ld [%l7 + %l1], %l1, %tie_ld(foo)
+ add %g7, %l1, %l1, %tie_add(foo)
+ sethi %tle_hix22(foo), %l1
+ xor %l1, %tle_lox10(foo), %l1
+EOF
+dnl
+if AC_TRY_COMMAND(${CC-cc} -c $CFLAGS conftest.s 1>&AS_MESSAGE_LOG_FD); then
+ libc_cv_sparc32_tls=yes
+else
+ libc_cv_sparc32_tls=no
+fi
+rm -f conftest*])
+if test $libc_cv_sparc32_tls = yes; then
+ AC_DEFINE(HAVE_TLS_SUPPORT)
+fi
+fi
diff --git a/sysdeps/sparc/sparc32/memchr.S b/sysdeps/sparc/sparc32/memchr.S
index d742a07bd7..490c431358 100644
--- a/sysdeps/sparc/sparc32/memchr.S
+++ b/sysdeps/sparc/sparc32/memchr.S
@@ -1,7 +1,7 @@
/* memchr (str, ch, n) -- Return pointer to first occurrence of CH in STR less
than N.
For SPARC v7.
- Copyright (C) 1996,1999, 2000 Free Software Foundation, Inc.
+ Copyright (C) 1996, 1999, 2000, 2003 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Jakub Jelinek <jj@ultra.linux.cz> and
David S. Miller <davem@caip.rutgers.edu>.
@@ -67,23 +67,23 @@
ENTRY(__memchr)
andcc %o1, 0xff, %o1
- sll %o1, 8, %g7
+ sll %o1, 8, %g6
andcc %o0, 3, %g0
- or %o1, %g7, %g7
- sll %g7, 16, %o3
+ or %o1, %g6, %g6
+ sll %g6, 16, %o3
bne 0b
- or %o3, %g7, %g2
+ or %o3, %g6, %g2
sethi %hi(0x80808080), %o4
or %o4, %lo(0x80808080), %o3
4: sethi %hi(0x01010101), %o5
5: and %o2, 3, %g1
7: andcc %o2, 0xfffffffc, %o2
be 0f
- or %o5, %lo(0x01010101), %g7
+ or %o5, %lo(0x01010101), %g6
ld [%o0], %g4
6: xor %g4, %g2, %g5
add %o0, 4, %o0
- sub %g5, %g7, %g5
+ sub %g5, %g6, %g5
andcc %g5, %o3, %g0
bne 8f
subcc %o2, 4, %o2
diff --git a/sysdeps/sparc/sparc32/memcpy.S b/sysdeps/sparc/sparc32/memcpy.S
index f4252d0bf4..43e19b88b5 100644
--- a/sysdeps/sparc/sparc32/memcpy.S
+++ b/sysdeps/sparc/sparc32/memcpy.S
@@ -1,6 +1,6 @@
/* Copy SIZE bytes from SRC to DEST.
For SPARC v7.
- Copyright (C) 1996, 1999 Free Software Foundation, Inc.
+ Copyright (C) 1996, 1999, 2003 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by David S. Miller <davem@caip.rutgers.edu>,
Eddie C. Dost <ecd@skynet.be> and
@@ -196,7 +196,7 @@ ENTRY(memmove)
st %o4, [%o0 - 4]
sub %o1, 4, %o1
sub %o0, 4, %o0
-2: andcc %g1, 0xffffff80, %g7
+2: andcc %g1, 0xffffff80, %g6
be 3f
andcc %o0, 4, %g0
@@ -205,23 +205,23 @@ ENTRY(memmove)
RMOVE_BIGCHUNK(o1, o0, 0x20, o2, o3, o4, o5, g2, g3, g4, g5)
RMOVE_BIGCHUNK(o1, o0, 0x40, o2, o3, o4, o5, g2, g3, g4, g5)
RMOVE_BIGCHUNK(o1, o0, 0x60, o2, o3, o4, o5, g2, g3, g4, g5)
- subcc %g7, 128, %g7
+ subcc %g6, 128, %g6
sub %o1, 128, %o1
bne 5b
sub %o0, 128, %o0
-3: andcc %g1, 0x70, %g7
+3: andcc %g1, 0x70, %g6
be 72f
andcc %g1, 8, %g0
- srl %g7, 1, %o4
+ srl %g6, 1, %o4
mov %o7, %g2
- add %g7, %o4, %o4
+ add %g6, %o4, %o4
101: call 100f
- sub %o1, %g7, %o1
+ sub %o1, %g6, %o1
mov %g2, %o7
jmpl %o5 + (72f - 101b), %g0
- sub %o0, %g7, %o0
+ sub %o0, %g6, %o0
71: RMOVE_LASTCHUNK(o1, o0, 0x60, g2, g3, g4, g5)
RMOVE_LASTCHUNK(o1, o0, 0x50, g2, g3, g4, g5)
@@ -264,23 +264,23 @@ ENTRY(memmove)
RMOVE_BIGALIGNCHUNK(o1, o0, 0x20, o2, o3, o4, o5, g2, g3, g4, g5)
RMOVE_BIGALIGNCHUNK(o1, o0, 0x40, o2, o3, o4, o5, g2, g3, g4, g5)
RMOVE_BIGALIGNCHUNK(o1, o0, 0x60, o2, o3, o4, o5, g2, g3, g4, g5)
- subcc %g7, 128, %g7
+ subcc %g6, 128, %g6
sub %o1, 128, %o1
bne 74b
sub %o0, 128, %o0
- andcc %g1, 0x70, %g7
+ andcc %g1, 0x70, %g6
be 72b
andcc %g1, 8, %g0
- srl %g7, 1, %o4
+ srl %g6, 1, %o4
mov %o7, %g2
- add %g7, %o4, %o4
+ add %g6, %o4, %o4
102: call 100f
- sub %o1, %g7, %o1
+ sub %o1, %g6, %o1
mov %g2, %o7
jmpl %o5 + (72b - 102b), %g0
- sub %o0, %g7, %o0
+ sub %o0, %g6, %o0
75: and %o2, 0xe, %o3
mov %o7, %g2
@@ -351,7 +351,7 @@ ENTRY(memmove)
sll %g2, 3, %g4
mov 32, %g2
be 4f
- sub %g2, %g4, %g7
+ sub %g2, %g4, %g6
blu 3f
cmp %g3, 8
@@ -386,22 +386,22 @@ ENTRY(memmove)
ld [%o1 + 12], %o3
5: sll %o5, %g4, %g2
- srl %g1, %g7, %g5
+ srl %g1, %g6, %g5
or %g2, %g5, %g2
st %g2, [%o0 + 12]
6: ld [%o1 + 8], %o4
sll %o3, %g4, %g2
- srl %o5, %g7, %g5
+ srl %o5, %g6, %g5
or %g2, %g5, %g2
st %g2, [%o0 + 8]
7: ld [%o1 + 4], %g1
sll %o4, %g4, %g2
- srl %o3, %g7, %g5
+ srl %o3, %g6, %g5
or %g2, %g5, %g2
st %g2, [%o0 + 4]
8: ld [%o1], %o5
sll %g1, %g4, %g2
- srl %o4, %g7, %g5
+ srl %o4, %g6, %g5
addcc %g3, -4, %g3
or %g2, %g5, %g2
add %o1, -16, %o1
@@ -410,7 +410,7 @@ ENTRY(memmove)
bne,a 5b
ld [%o1 + 12], %o3
sll %o5, %g4, %g2
- srl %g1, %g7, %g5
+ srl %g1, %g6, %g5
srl %g4, 3, %g3
or %g2, %g5, %g2
add %o1, %g3, %o1
@@ -471,7 +471,7 @@ ENTRY(memcpy) /* %o0=dst %o1=src %o2=len */
st %o4, [%o0]
add %o1, 4, %o1
add %o0, 4, %o0
-2: andcc %g1, 0xffffff80, %g7
+2: andcc %g1, 0xffffff80, %g6
be 3f
andcc %o0, 4, %g0
@@ -480,20 +480,20 @@ ENTRY(memcpy) /* %o0=dst %o1=src %o2=len */
MOVE_BIGCHUNK(o1, o0, 0x20, o2, o3, o4, o5, g2, g3, g4, g5)
MOVE_BIGCHUNK(o1, o0, 0x40, o2, o3, o4, o5, g2, g3, g4, g5)
MOVE_BIGCHUNK(o1, o0, 0x60, o2, o3, o4, o5, g2, g3, g4, g5)
- subcc %g7, 128, %g7
+ subcc %g6, 128, %g6
add %o1, 128, %o1
bne 5b
add %o0, 128, %o0
-3: andcc %g1, 0x70, %g7
+3: andcc %g1, 0x70, %g6
be 80f
andcc %g1, 8, %g0
- srl %g7, 1, %o4
+ srl %g6, 1, %o4
mov %o7, %g2
- add %g7, %o4, %o4
- add %o1, %g7, %o1
+ add %g6, %o4, %o4
+ add %o1, %g6, %o1
104: call 100f
- add %o0, %g7, %o0
+ add %o0, %g6, %o0
jmpl %o5 + (80f - 104b), %g0
mov %g2, %o7
@@ -541,21 +541,21 @@ ENTRY(memcpy) /* %o0=dst %o1=src %o2=len */
MOVE_BIGALIGNCHUNK(o1, o0, 0x20, o2, o3, o4, o5, g2, g3, g4, g5)
MOVE_BIGALIGNCHUNK(o1, o0, 0x40, o2, o3, o4, o5, g2, g3, g4, g5)
MOVE_BIGALIGNCHUNK(o1, o0, 0x60, o2, o3, o4, o5, g2, g3, g4, g5)
- subcc %g7, 128, %g7
+ subcc %g6, 128, %g6
add %o1, 128, %o1
bne 82b
add %o0, 128, %o0
- andcc %g1, 0x70, %g7
+ andcc %g1, 0x70, %g6
be 84f
andcc %g1, 8, %g0
mov %o7, %g2
111: call 110f
- add %o1, %g7, %o1
+ add %o1, %g6, %o1
mov %g2, %o7
jmpl %o5 + (84f - 111b), %g0
- add %o0, %g7, %o0
+ add %o0, %g6, %o0
83: MOVE_LASTALIGNCHUNK(o1, o0, 0x60, g2, g3, g4, g5)
MOVE_LASTALIGNCHUNK(o1, o0, 0x50, g2, g3, g4, g5)
@@ -626,7 +626,7 @@ ENTRY(memcpy) /* %o0=dst %o1=src %o2=len */
sll %g2, 3, %g4
mov 32, %g2
be 4f
- sub %g2, %g4, %g7
+ sub %g2, %g4, %g6
blu 3f
cmp %g3, 0x8
@@ -661,22 +661,22 @@ ENTRY(memcpy) /* %o0=dst %o1=src %o2=len */
ld [%o1], %o3
add %g3, -1, %g3
5: sll %o5, %g4, %g2
- srl %g1, %g7, %g5
+ srl %g1, %g6, %g5
or %g2, %g5, %g2
st %g2, [%o0]
7: ld [%o1 + 4], %o4
sll %g1, %g4, %g2
- srl %o3, %g7, %g5
+ srl %o3, %g6, %g5
or %g2, %g5, %g2
st %g2, [%o0 + 4]
8: ld [%o1 + 8], %o5
sll %o3, %g4, %g2
- srl %o4, %g7, %g5
+ srl %o4, %g6, %g5
or %g2, %g5, %g2
st %g2, [%o0 + 8]
9: ld [%o1 + 12], %g1
sll %o4, %g4, %g2
- srl %o5, %g7, %g5
+ srl %o5, %g6, %g5
addcc %g3, -4, %g3
or %g2, %g5, %g2
add %o1, 16, %o1
@@ -685,8 +685,8 @@ ENTRY(memcpy) /* %o0=dst %o1=src %o2=len */
bne,a 5b
ld [%o1], %o3
10: sll %o5, %g4, %g2
- srl %g1, %g7, %g5
- srl %g7, 3, %g3
+ srl %g1, %g6, %g5
+ srl %g6, 3, %g3
or %g2, %g5, %g2
sub %o1, %g3, %o1
andcc %o2, 2, %g0
@@ -758,10 +758,10 @@ ENTRY(memcpy) /* %o0=dst %o1=src %o2=len */
be 41f
and %o2, 0xffffffc0, %o3
ld [%o0 - 7], %o4
-4: SMOVE_CHUNK(o1, o0, 0x00, g2, g3, g4, g5, o4, o5, g7, g1, 8, 24, -3)
- SMOVE_CHUNK(o1, o0, 0x10, g2, g3, g4, g5, o4, o5, g7, g1, 8, 24, -3)
- SMOVE_CHUNK(o1, o0, 0x20, g2, g3, g4, g5, o4, o5, g7, g1, 8, 24, -3)
- SMOVE_CHUNK(o1, o0, 0x30, g2, g3, g4, g5, o4, o5, g7, g1, 8, 24, -3)
+4: SMOVE_CHUNK(o1, o0, 0x00, g2, g3, g4, g5, o4, o5, g6, g1, 8, 24, -3)
+ SMOVE_CHUNK(o1, o0, 0x10, g2, g3, g4, g5, o4, o5, g6, g1, 8, 24, -3)
+ SMOVE_CHUNK(o1, o0, 0x20, g2, g3, g4, g5, o4, o5, g6, g1, 8, 24, -3)
+ SMOVE_CHUNK(o1, o0, 0x30, g2, g3, g4, g5, o4, o5, g6, g1, 8, 24, -3)
subcc %o3, 64, %o3
add %o1, 64, %o1
bne 4b
@@ -770,7 +770,7 @@ ENTRY(memcpy) /* %o0=dst %o1=src %o2=len */
andcc %o2, 0x30, %o3
be,a 1f
srl %g1, 16, %g2
-4: SMOVE_CHUNK(o1, o0, 0x00, g2, g3, g4, g5, o4, o5, g7, g1, 8, 24, -3)
+4: SMOVE_CHUNK(o1, o0, 0x00, g2, g3, g4, g5, o4, o5, g6, g1, 8, 24, -3)
subcc %o3, 16, %o3
add %o1, 16, %o1
bne 4b
@@ -793,10 +793,10 @@ ENTRY(memcpy) /* %o0=dst %o1=src %o2=len */
be 42f
and %o2, 0xffffffc0, %o3
ld [%o0 - 6], %o4
-4: SMOVE_CHUNK(o1, o0, 0x00, g2, g3, g4, g5, o4, o5, g7, g1, 16, 16, -2)
- SMOVE_CHUNK(o1, o0, 0x10, g2, g3, g4, g5, o4, o5, g7, g1, 16, 16, -2)
- SMOVE_CHUNK(o1, o0, 0x20, g2, g3, g4, g5, o4, o5, g7, g1, 16, 16, -2)
- SMOVE_CHUNK(o1, o0, 0x30, g2, g3, g4, g5, o4, o5, g7, g1, 16, 16, -2)
+4: SMOVE_CHUNK(o1, o0, 0x00, g2, g3, g4, g5, o4, o5, g6, g1, 16, 16, -2)
+ SMOVE_CHUNK(o1, o0, 0x10, g2, g3, g4, g5, o4, o5, g6, g1, 16, 16, -2)
+ SMOVE_CHUNK(o1, o0, 0x20, g2, g3, g4, g5, o4, o5, g6, g1, 16, 16, -2)
+ SMOVE_CHUNK(o1, o0, 0x30, g2, g3, g4, g5, o4, o5, g6, g1, 16, 16, -2)
subcc %o3, 64, %o3
add %o1, 64, %o1
bne 4b
@@ -805,7 +805,7 @@ ENTRY(memcpy) /* %o0=dst %o1=src %o2=len */
andcc %o2, 0x30, %o3
be,a 1f
srl %g1, 16, %g2
-4: SMOVE_CHUNK(o1, o0, 0x00, g2, g3, g4, g5, o4, o5, g7, g1, 16, 16, -2)
+4: SMOVE_CHUNK(o1, o0, 0x00, g2, g3, g4, g5, o4, o5, g6, g1, 16, 16, -2)
subcc %o3, 16, %o3
add %o1, 16, %o1
bne 4b
@@ -830,10 +830,10 @@ ENTRY(memcpy) /* %o0=dst %o1=src %o2=len */
ld [%o0 - 1], %o4
add %o0, 4, %o0
-4: SMOVE_CHUNK(o1, o0, 0x00, g2, g3, g4, g5, o4, o5, g7, g1, 24, 8, -1)
- SMOVE_CHUNK(o1, o0, 0x10, g2, g3, g4, g5, o4, o5, g7, g1, 24, 8, -1)
- SMOVE_CHUNK(o1, o0, 0x20, g2, g3, g4, g5, o4, o5, g7, g1, 24, 8, -1)
- SMOVE_CHUNK(o1, o0, 0x30, g2, g3, g4, g5, o4, o5, g7, g1, 24, 8, -1)
+4: SMOVE_CHUNK(o1, o0, 0x00, g2, g3, g4, g5, o4, o5, g6, g1, 24, 8, -1)
+ SMOVE_CHUNK(o1, o0, 0x10, g2, g3, g4, g5, o4, o5, g6, g1, 24, 8, -1)
+ SMOVE_CHUNK(o1, o0, 0x20, g2, g3, g4, g5, o4, o5, g6, g1, 24, 8, -1)
+ SMOVE_CHUNK(o1, o0, 0x30, g2, g3, g4, g5, o4, o5, g6, g1, 24, 8, -1)
subcc %o3, 64, %o3
add %o1, 64, %o1
bne 4b
@@ -842,7 +842,7 @@ ENTRY(memcpy) /* %o0=dst %o1=src %o2=len */
andcc %o2, 0x30, %o3
be,a 1f
srl %g1, 24, %g2
-4: SMOVE_CHUNK(o1, o0, 0x00, g2, g3, g4, g5, o4, o5, g7, g1, 24, 8, -1)
+4: SMOVE_CHUNK(o1, o0, 0x00, g2, g3, g4, g5, o4, o5, g6, g1, 24, 8, -1)
subcc %o3, 16, %o3
add %o1, 16, %o1
bne 4b
@@ -852,10 +852,10 @@ ENTRY(memcpy) /* %o0=dst %o1=src %o2=len */
1: st %o4, [%o0 - 5]
b 88f
stb %g2, [%o0 - 1]
-41: SMOVE_ALIGNCHUNK(o1, o0, 0x00, g2, g3, g4, g5, o4, o5, g7, g1, 8, 24, -3)
- SMOVE_ALIGNCHUNK(o1, o0, 0x10, g2, g3, g4, g5, o4, o5, g7, g1, 8, 24, -3)
- SMOVE_ALIGNCHUNK(o1, o0, 0x20, g2, g3, g4, g5, o4, o5, g7, g1, 8, 24, -3)
- SMOVE_ALIGNCHUNK(o1, o0, 0x30, g2, g3, g4, g5, o4, o5, g7, g1, 8, 24, -3)
+41: SMOVE_ALIGNCHUNK(o1, o0, 0x00, g2, g3, g4, g5, o4, o5, g6, g1, 8, 24, -3)
+ SMOVE_ALIGNCHUNK(o1, o0, 0x10, g2, g3, g4, g5, o4, o5, g6, g1, 8, 24, -3)
+ SMOVE_ALIGNCHUNK(o1, o0, 0x20, g2, g3, g4, g5, o4, o5, g6, g1, 8, 24, -3)
+ SMOVE_ALIGNCHUNK(o1, o0, 0x30, g2, g3, g4, g5, o4, o5, g6, g1, 8, 24, -3)
subcc %o3, 64, %o3
add %o1, 64, %o1
bne 41b
@@ -864,7 +864,7 @@ ENTRY(memcpy) /* %o0=dst %o1=src %o2=len */
andcc %o2, 0x30, %o3
be,a 1f
srl %g1, 16, %g2
-4: SMOVE_ALIGNCHUNK(o1, o0, 0x00, g2, g3, g4, g5, o4, o5, g7, g1, 8, 24, -3)
+4: SMOVE_ALIGNCHUNK(o1, o0, 0x00, g2, g3, g4, g5, o4, o5, g6, g1, 8, 24, -3)
subcc %o3, 16, %o3
add %o1, 16, %o1
bne 4b
@@ -875,10 +875,10 @@ ENTRY(memcpy) /* %o0=dst %o1=src %o2=len */
srl %g1, 8, %g4
b 88f
stb %g4, [%o0 - 1]
-43: SMOVE_ALIGNCHUNK(o1, o0, 0x00, g2, g3, g4, g5, o4, o5, g7, g1, 24, 8, 3)
- SMOVE_ALIGNCHUNK(o1, o0, 0x10, g2, g3, g4, g5, o4, o5, g7, g1, 24, 8, 3)
- SMOVE_ALIGNCHUNK(o1, o0, 0x20, g2, g3, g4, g5, o4, o5, g7, g1, 24, 8, 3)
- SMOVE_ALIGNCHUNK(o1, o0, 0x30, g2, g3, g4, g5, o4, o5, g7, g1, 24, 8, 3)
+43: SMOVE_ALIGNCHUNK(o1, o0, 0x00, g2, g3, g4, g5, o4, o5, g6, g1, 24, 8, 3)
+ SMOVE_ALIGNCHUNK(o1, o0, 0x10, g2, g3, g4, g5, o4, o5, g6, g1, 24, 8, 3)
+ SMOVE_ALIGNCHUNK(o1, o0, 0x20, g2, g3, g4, g5, o4, o5, g6, g1, 24, 8, 3)
+ SMOVE_ALIGNCHUNK(o1, o0, 0x30, g2, g3, g4, g5, o4, o5, g6, g1, 24, 8, 3)
subcc %o3, 64, %o3
add %o1, 64, %o1
bne 43b
@@ -887,7 +887,7 @@ ENTRY(memcpy) /* %o0=dst %o1=src %o2=len */
andcc %o2, 0x30, %o3
be,a 1f
srl %g1, 24, %g2
-4: SMOVE_ALIGNCHUNK(o1, o0, 0x00, g2, g3, g4, g5, o4, o5, g7, g1, 24, 8, 3)
+4: SMOVE_ALIGNCHUNK(o1, o0, 0x00, g2, g3, g4, g5, o4, o5, g6, g1, 24, 8, 3)
subcc %o3, 16, %o3
add %o1, 16, %o1
bne 4b
@@ -897,10 +897,10 @@ ENTRY(memcpy) /* %o0=dst %o1=src %o2=len */
1: stb %g2, [%o0 + 3]
b 88f
add %o0, 4, %o0
-42: SMOVE_ALIGNCHUNK(o1, o0, 0x00, g2, g3, g4, g5, o4, o5, g7, g1, 16, 16, -2)
- SMOVE_ALIGNCHUNK(o1, o0, 0x10, g2, g3, g4, g5, o4, o5, g7, g1, 16, 16, -2)
- SMOVE_ALIGNCHUNK(o1, o0, 0x20, g2, g3, g4, g5, o4, o5, g7, g1, 16, 16, -2)
- SMOVE_ALIGNCHUNK(o1, o0, 0x30, g2, g3, g4, g5, o4, o5, g7, g1, 16, 16, -2)
+42: SMOVE_ALIGNCHUNK(o1, o0, 0x00, g2, g3, g4, g5, o4, o5, g6, g1, 16, 16, -2)
+ SMOVE_ALIGNCHUNK(o1, o0, 0x10, g2, g3, g4, g5, o4, o5, g6, g1, 16, 16, -2)
+ SMOVE_ALIGNCHUNK(o1, o0, 0x20, g2, g3, g4, g5, o4, o5, g6, g1, 16, 16, -2)
+ SMOVE_ALIGNCHUNK(o1, o0, 0x30, g2, g3, g4, g5, o4, o5, g6, g1, 16, 16, -2)
subcc %o3, 64, %o3
add %o1, 64, %o1
bne 42b
@@ -909,7 +909,7 @@ ENTRY(memcpy) /* %o0=dst %o1=src %o2=len */
andcc %o2, 0x30, %o3
be,a 1f
srl %g1, 16, %g2
-4: SMOVE_ALIGNCHUNK(o1, o0, 0x00, g2, g3, g4, g5, o4, o5, g7, g1, 16, 16, -2)
+4: SMOVE_ALIGNCHUNK(o1, o0, 0x00, g2, g3, g4, g5, o4, o5, g6, g1, 16, 16, -2)
subcc %o3, 16, %o3
add %o1, 16, %o1
bne 4b
@@ -964,5 +964,5 @@ ENTRY(memcpy) /* %o0=dst %o1=src %o2=len */
100: retl
sub %o7, %o4, %o5
110: retl
- sub %o7, %g7, %o5
+ sub %o7, %g6, %o5
END(memcpy)
diff --git a/sysdeps/sparc/sparc32/sparcv9/hp-timing.h b/sysdeps/sparc/sparc32/sparcv9/hp-timing.h
index 65b9d1fb2c..cc262882ab 100644
--- a/sysdeps/sparc/sparc32/sparcv9/hp-timing.h
+++ b/sysdeps/sparc/sparc32/sparcv9/hp-timing.h
@@ -1,5 +1,5 @@
/* High precision, low overhead timing functions. sparcv9 version.
- Copyright (C) 2001, 2002 Free Software Foundation, Inc.
+ Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by David S. Miller <davem@redhat.com>, 2001.
@@ -58,17 +58,17 @@ typedef unsigned long long int hp_timing_t;
do { \
hp_timing_t __diff = (Diff) - GL(dl_hp_timing_overhead); \
__asm__ __volatile__("srl %L0, 0, %%g1\n\t" \
- "sllx %H0, 32, %%g7\n\t" \
- "or %%g1, %%g7, %%g1\n\t" \
+ "sllx %H0, 32, %%g6\n\t" \
+ "or %%g1, %%g6, %%g1\n\t" \
"1: ldx [%1], %%g5\n\t" \
- "add %%g5, %%g1, %%g7\n\t" \
- "casx [%1], %%g5, %%g7\n\t" \
- "cmp %%g5, %%g7\n\t" \
+ "add %%g5, %%g1, %%g6\n\t" \
+ "casx [%1], %%g5, %%g6\n\t" \
+ "cmp %%g5, %%g6\n\t" \
"bne,pn %%xcc, 1b\n\t" \
" nop" \
: /* no outputs */ \
: "r" (__diff), "r" (&(Sum)) \
- : "memory", "g1", "g5", "g7"); \
+ : "memory", "g1", "g5", "g6"); \
} while(0)
#define HP_TIMING_ACCUM_NT(Sum, Diff) (Sum) += (Diff)
diff --git a/sysdeps/sparc/sparc32/strcat.S b/sysdeps/sparc/sparc32/strcat.S
index 888fb54090..434d8d03c7 100644
--- a/sysdeps/sparc/sparc32/strcat.S
+++ b/sysdeps/sparc/sparc32/strcat.S
@@ -1,6 +1,6 @@
/* strcat (dest, src) -- Append SRC on the end of DEST.
For SPARC v7.
- Copyright (C) 1996, 1999 Free Software Foundation, Inc.
+ Copyright (C) 1996, 1999, 2003 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Jakub Jelinek <jj@ultra.linux.cz>.
@@ -183,7 +183,7 @@ ENTRY(strcat)
srl %o5, 8, %g5
sth %g5, [%o0 + 2]
1: add %o0, 4, %o0
-4: sll %o5, 24, %g7
+4: sll %o5, 24, %g6
ld [%o1], %o5
add %o1, 4, %o1
srl %o5, 8, %g5
@@ -191,7 +191,7 @@ ENTRY(strcat)
#ifdef EIGHTBIT_NOT_RARE
andn %o4, %o5, %o4
#endif
- or %g5, %g7, %g5
+ or %g5, %g6, %g5
andcc %o4, %o3, %g0
be,a 1b
st %g5, [%o0]
@@ -249,7 +249,7 @@ ENTRY(strcat)
sth %g5, [%o0]
sub %o0, 2, %o0
1: add %o0, 4, %o0
-4: sll %o5, 16, %g7
+4: sll %o5, 16, %g6
ld [%o1], %o5
add %o1, 4, %o1
srl %o5, 16, %g5
@@ -257,7 +257,7 @@ ENTRY(strcat)
#ifdef EIGHTBIT_NOT_RARE
andn %o4, %o5, %o4
#endif
- or %g5, %g7, %g5
+ or %g5, %g6, %g5
andcc %o4, %o3, %g0
be,a 1b
st %g5, [%o0]
@@ -305,7 +305,7 @@ ENTRY(strcat)
stb %g5, [%o0]
sub %o0, 3, %o0
1: add %o0, 4, %o0
-4: sll %o5, 8, %g7
+4: sll %o5, 8, %g6
ld [%o1], %o5
add %o1, 4, %o1
srl %o5, 24, %g5
@@ -313,7 +313,7 @@ ENTRY(strcat)
#ifdef EIGHTBIT_NOT_RARE
andn %o4, %o5, %o4
#endif
- or %g5, %g7, %g5
+ or %g5, %g6, %g5
andcc %o4, %o3, %g0
be 1b
st %g5, [%o0]
diff --git a/sysdeps/sparc/sparc32/strchr.S b/sysdeps/sparc/sparc32/strchr.S
index adfaa47371..931ea890cd 100644
--- a/sysdeps/sparc/sparc32/strchr.S
+++ b/sysdeps/sparc/sparc32/strchr.S
@@ -1,6 +1,6 @@
/* strchr (str, ch) -- Return pointer to first occurrence of CH in STR.
For SPARC v7.
- Copyright (C) 1996, 1999 Free Software Foundation, Inc.
+ Copyright (C) 1996, 1999, 2003 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Jakub Jelinek <jj@ultra.linux.cz> and
David S. Miller <davem@caip.rutgers.edu>.
@@ -86,9 +86,9 @@ ENTRY(strchr)
6: xor %g4, %g2, %g5
sub %g4, %o2, %o4
#ifdef EIGHTBIT_NOT_RARE
- sub %g5, %o2, %g7
+ sub %g5, %o2, %g6
andn %o4, %g4, %o4
- andn %g7, %g5, %g5
+ andn %g6, %g5, %g5
#else
sub %g5, %o2, %g5
#endif
@@ -237,9 +237,9 @@ ENTRY(strrchr)
7: xor %g4, %g2, %g5
sub %g4, %o2, %o4
#ifdef EIGHTBIT_NOT_RARE
- sub %g5, %o2, %g7
+ sub %g5, %o2, %g6
andn %o4, %g4, %o4
- andn %g7, %g5, %g5
+ andn %g6, %g5, %g5
#else
sub %g5, %o2, %g5
#endif
diff --git a/sysdeps/sparc/sparc32/strcmp.S b/sysdeps/sparc/sparc32/strcmp.S
index 265f18fb96..90e6f67085 100644
--- a/sysdeps/sparc/sparc32/strcmp.S
+++ b/sysdeps/sparc/sparc32/strcmp.S
@@ -1,6 +1,6 @@
/* Compare two strings for differences.
For SPARC v7.
- Copyright (C) 1996, 97, 99 Free Software Foundation, Inc.
+ Copyright (C) 1996, 97, 99, 2003 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Jakub Jelinek <jj@ultra.linux.cz>.
@@ -144,13 +144,13 @@ ENTRY(strcmp)
andn %i1, 3, %i1
mov 32, %l1
ld [%i1], %l2
- mov -1, %g7
+ mov -1, %g6
add %i1, 4, %i1
sub %l1, %g3, %l1
- sll %g7, %g3, %g7
+ sll %g6, %g3, %g6
1: sll %l2, %g3, %g5
- and %i4, %g7, %l3
+ and %i4, %g6, %l3
sub %i4, %i2, %g1
#ifdef EIGHTBIT_NOT_RARE
andn %g1, %i4, %g1
diff --git a/sysdeps/sparc/sparc32/strcpy.S b/sysdeps/sparc/sparc32/strcpy.S
index 8ae6455e1d..c0572d9b50 100644
--- a/sysdeps/sparc/sparc32/strcpy.S
+++ b/sysdeps/sparc/sparc32/strcpy.S
@@ -1,6 +1,6 @@
/* Copy SRC to DEST returning DEST.
For SPARC v7.
- Copyright (C) 1996, 1999 Free Software Foundation, Inc.
+ Copyright (C) 1996, 1999, 2003 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Jakub Jelinek <jj@ultra.linux.cz>.
@@ -125,12 +125,12 @@ ENTRY(strcpy)
srl %o5, 8, %g5
sth %g5, [%o0 + 2]
1: add %o0, 4, %o0
-4: sll %o5, 24, %g7
+4: sll %o5, 24, %g6
ld [%o1], %o5
add %o1, 4, %o1
srl %o5, 8, %g5
sub %o5, %o2, %o4
- or %g5, %g7, %g5
+ or %g5, %g6, %g5
andcc %o4, %o3, %g0
be,a 1b
st %g5, [%o0]
@@ -184,12 +184,12 @@ ENTRY(strcpy)
sth %g5, [%o0]
sub %o0, 2, %o0
1: add %o0, 4, %o0
-4: sll %o5, 16, %g7
+4: sll %o5, 16, %g6
ld [%o1], %o5
add %o1, 4, %o1
srl %o5, 16, %g5
sub %o5, %o2, %o4
- or %g5, %g7, %g5
+ or %g5, %g6, %g5
andcc %o4, %o3, %g0
be,a 1b
st %g5, [%o0]
@@ -234,12 +234,12 @@ ENTRY(strcpy)
stb %g5, [%o0]
sub %o0, 3, %o0
1: add %o0, 4, %o0
-4: sll %o5, 8, %g7
+4: sll %o5, 8, %g6
ld [%o1], %o5
add %o1, 4, %o1
srl %o5, 24, %g5
sub %o5, %o2, %o4
- or %g5, %g7, %g5
+ or %g5, %g6, %g5
andcc %o4, %o3, %g0
be 1b
st %g5, [%o0]