From c09e41ef92e48356e62c795384864ee792ac7fe6 Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Thu, 28 Aug 2014 12:31:19 +0200 Subject: Revert "sparc: use HIDDEN_JUMPTARGET for errno" This reverts commit f51fb26dbcceee9e48d10facc830bd4a549f6cc2. This fixes linking error for sparc build. While building a sparc system you get following linking error: libc/sysdeps/linux/sparc/pipe.S:54: undefined reference to `__GI___errno_location' Removing the HIDDEN_JUMPTARGET fixes the issue, while using gcc 4.8.3/binutils 2.24. The definition of __errno_location was changed recently here: http://git.uclibc.org/uClibc/commit/?id=8f550715c2b211036fc273add3cb5219397ed312 Signed-off-by: Waldemar Brodkorb Signed-off-by: Bernhard Reutner-Fischer --- libc/sysdeps/linux/sparc/fork.S | 2 +- libc/sysdeps/linux/sparc/pipe.S | 2 +- libc/sysdeps/linux/sparc/vfork.S | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/libc/sysdeps/linux/sparc/fork.S b/libc/sysdeps/linux/sparc/fork.S index 8e4bc2265..171591123 100644 --- a/libc/sysdeps/linux/sparc/fork.S +++ b/libc/sysdeps/linux/sparc/fork.S @@ -35,7 +35,7 @@ fork: bcc,a 9000f nop save %sp,-96,%sp - call HIDDEN_JUMPTARGET(__errno_location) + call __errno_location nop st %i0,[%o0] jmpl %i7+8,%g0 diff --git a/libc/sysdeps/linux/sparc/pipe.S b/libc/sysdeps/linux/sparc/pipe.S index b085fafec..fa77f4d23 100644 --- a/libc/sysdeps/linux/sparc/pipe.S +++ b/libc/sysdeps/linux/sparc/pipe.S @@ -49,7 +49,7 @@ pipe: restore %g0,%g0,%o0 .Lerror: - call HIDDEN_JUMPTARGET(__errno_location) + call __errno_location or %g0,EINVAL,%i0 st %i0,[%o0] ret diff --git a/libc/sysdeps/linux/sparc/vfork.S b/libc/sysdeps/linux/sparc/vfork.S index 4b701f7ff..e5a3c303d 100644 --- a/libc/sysdeps/linux/sparc/vfork.S +++ b/libc/sysdeps/linux/sparc/vfork.S @@ -37,7 +37,7 @@ __vfork: bcc,a 9000f nop save %sp,-96,%sp - call HIDDEN_JUMPTARGET(__errno_location) + call __errno_location nop st %i0,[%o0] jmpl %i7+8,%g0 -- cgit v1.2.3 From 789fca90bff0b0bcd658444cea6afd4cdb43dc5d Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Thu, 28 Aug 2014 12:31:20 +0200 Subject: Revert "sparc: disable cancellable system, as it fails in strange ways right now" This reverts commit 1db4f8f8389f6a935ecd83aff7fcce5d1cf2c0f3. It is unclear in which way this is breaking sparc systems. With this change added you get following linking error: libpthread/nptl/libpthread_so.a(pt-system.oS): In function `__libc_system': libc/stdlib/system.c:64: undefined reference to `__wait4_nocancel' Signed-off-by: Waldemar Brodkorb Signed-off-by: Bernhard Reutner-Fischer --- libc/stdlib/system.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/libc/stdlib/system.c b/libc/stdlib/system.c index 151a229c6..8c5d25d51 100644 --- a/libc/stdlib/system.c +++ b/libc/stdlib/system.c @@ -18,13 +18,14 @@ #include #endif -extern __typeof(system) __libc_system; - -/* TODO: the cancellable version breaks on sparc currently, - * need to figure out why still - */ -#if !defined __UCLIBC_HAS_THREADS_NATIVE__ || defined __sparc__ +#if !defined __UCLIBC_HAS_THREADS_NATIVE__ +/* uClinux-2.0 has vfork, but Linux 2.0 doesn't */ +#include +#ifndef __NR_vfork +# define vfork fork +#endif +extern __typeof(system) __libc_system; int __libc_system(const char *command) { int wait_val, pid; -- cgit v1.2.3 From 10d05ca07c4632e8dfca4877a8fc6a458b8f5810 Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Thu, 28 Aug 2014 12:31:21 +0200 Subject: sparc: remove unused subdirs variable For sparc TARGET_SUBARCH is never used. And there is a typo in the path. Signed-off-by: Waldemar Brodkorb Signed-off-by: Bernhard Reutner-Fischer --- libpthread/nptl/sysdeps/sparc/Makefile.arch | 3 --- 1 file changed, 3 deletions(-) diff --git a/libpthread/nptl/sysdeps/sparc/Makefile.arch b/libpthread/nptl/sysdeps/sparc/Makefile.arch index 52ac6dbe0..f9662c60c 100644 --- a/libpthread/nptl/sysdeps/sparc/Makefile.arch +++ b/libpthread/nptl/sysdeps/sparc/Makefile.arch @@ -4,8 +4,5 @@ # # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. # -subdirs += libpthread/nptl/sysdeps/$(TARGET_ARCH)/$(TARGET_SUBARCH)/sparv9 CFLAGS-pthread_spin_lock.c += -D_GNU_SOURCE - - -- cgit v1.2.3 From 68d700d66bfe498eeccd03ba44dd2081e34441d0 Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Thu, 28 Aug 2014 12:31:22 +0200 Subject: sparc: add missing pthread_spin_lock/pthread_spin_trylock tst-spin1.c compile breaks with: test/nptl/tst-spin1.c:34: undefined reference to `pthread_spin_lock' pthread_spin_lock and pthread_spin_trylock is missing while building sparc. add the meta c files here. Signed-off-by: Waldemar Brodkorb Signed-off-by: Bernhard Reutner-Fischer --- libpthread/nptl/sysdeps/sparc/pthread_spin_lock.c | 5 +++++ libpthread/nptl/sysdeps/sparc/pthread_spin_trylock.c | 5 +++++ 2 files changed, 10 insertions(+) create mode 100644 libpthread/nptl/sysdeps/sparc/pthread_spin_lock.c create mode 100644 libpthread/nptl/sysdeps/sparc/pthread_spin_trylock.c diff --git a/libpthread/nptl/sysdeps/sparc/pthread_spin_lock.c b/libpthread/nptl/sysdeps/sparc/pthread_spin_lock.c new file mode 100644 index 000000000..dcc5ae28e --- /dev/null +++ b/libpthread/nptl/sysdeps/sparc/pthread_spin_lock.c @@ -0,0 +1,5 @@ +#if defined(__arch64__) +#include "sparc64/pthread_spin_lock.c" +#else +#include "sparc32/pthread_spin_lock.c" +#endif diff --git a/libpthread/nptl/sysdeps/sparc/pthread_spin_trylock.c b/libpthread/nptl/sysdeps/sparc/pthread_spin_trylock.c new file mode 100644 index 000000000..af63eec73 --- /dev/null +++ b/libpthread/nptl/sysdeps/sparc/pthread_spin_trylock.c @@ -0,0 +1,5 @@ +#if defined(__arch64__) +#include "sparc64/pthread_spin_trylock.c" +#else +#include "sparc32/pthread_spin_trylock.c" +#endif -- cgit v1.2.3 From 23abbfa633f7e017a7939aa3966e0d7d24df480d Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Thu, 28 Aug 2014 12:31:23 +0200 Subject: test: NPTL: sync WRITE_BUFFER_SIZE with glibc test Test on Linux 3.16.1 in Qemu ARM fails with: TEST_EXEC nptl/ tst-cancel4 ret == 1 ; expected_ret == 0 make[1]: *** [tst-cancel4.exe] Error 1 The output of failed test is: minimum write buffer size too large ../Test.mak:89: recipe for target 'tst-cancel4.exe' failed Signed-off-by: Waldemar Brodkorb Signed-off-by: Bernhard Reutner-Fischer --- test/nptl/tst-cancel4.c | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/test/nptl/tst-cancel4.c b/test/nptl/tst-cancel4.c index e7119589f..53abf83ee 100644 --- a/test/nptl/tst-cancel4.c +++ b/test/nptl/tst-cancel4.c @@ -83,7 +83,30 @@ static pthread_barrier_t b2; # define IPC_ADDVAL 0 #endif -#define WRITE_BUFFER_SIZE 4096 +/* The WRITE_BUFFER_SIZE value needs to be chosen such that if we set + the socket send buffer size to '1', a write of this size on that + socket will block. + + The Linux kernel imposes a minimum send socket buffer size which + has changed over the years. As of Linux 3.10 the value is: + + 2 * (2048 + SKB_DATA_ALIGN(sizeof(struct sk_buff))) + + which is attempting to make sure that with standard MTUs, + TCP can always queue up at least 2 full sized packets. + + Furthermore, there is logic in the socket send paths that + will allow one more packet (of any size) to be queued up as + long as some socket buffer space remains. Blocking only + occurs when we try to queue up a new packet and the send + buffer space has already been fully consumed. + + Therefore we must set this value to the largest possible value of + the formula above (and since it depends upon the size of "struct + sk_buff", it is dependent upon machine word size etc.) plus some + slack space. */ + +#define WRITE_BUFFER_SIZE 16384 /* Cleanup handling test. */ static int cl_called; @@ -758,7 +781,6 @@ tf_sigpause (void *arg) pthread_cleanup_push (cl, NULL); - /* Just for fun block the cancellation signal. */ sigpause (SIGCANCEL); pthread_cleanup_pop (0); -- cgit v1.2.3 From ad687dda63a43d5ea5ed834475cec5e0a618ebf5 Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Thu, 28 Aug 2014 12:31:24 +0200 Subject: test: do not depend on compile When you cross-compile the testsuite and then try to run on a system without gcc/binutils it would be nice if no compiling or linking is tried. Refresh test/README (suggested by Khem) Signed-off-by: Waldemar Brodkorb Signed-off-by: Bernhard Reutner-Fischer --- test/Makefile | 2 +- test/README | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/test/Makefile b/test/Makefile index b759bf9ea..787c530d4 100644 --- a/test/Makefile +++ b/test/Makefile @@ -45,7 +45,7 @@ endif test check all: run -run: compile subdirs_run +run: subdirs_run compile: $(top_builddir)$(LOCAL_INSTALL_PATH) subdirs_compile diff --git a/test/README b/test/README index 8fb12d9a7..28225b063 100644 --- a/test/README +++ b/test/README @@ -5,12 +5,11 @@ Following make targets are avaialable make compile -This will compile and link the tests +This will compile and link the tests. make run -This will check for binaries, if they are not there it -will call 'compile' target, then it will execute all the tests. +This will execute all the tests. make check make all -- cgit v1.2.3 From 5a89f1c6964cc938c439d992f187bc87cdd4eb07 Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Thu, 28 Aug 2014 12:31:27 +0200 Subject: m68k: fix typo otherwise you get compile warnings, when building for m68k. Signed-off-by: Waldemar Brodkorb Signed-off-by: Bernhard Reutner-Fischer --- libc/sysdeps/linux/m68k/bits/huge_vall.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libc/sysdeps/linux/m68k/bits/huge_vall.h b/libc/sysdeps/linux/m68k/bits/huge_vall.h index c44b64dfc..674b46d25 100644 --- a/libc/sysdeps/linux/m68k/bits/huge_vall.h +++ b/libc/sysdeps/linux/m68k/bits/huge_vall.h @@ -26,7 +26,7 @@ # define HUGE_VALL (__builtin_huge_vall ()) #elif __GNUC_PREREQ(2,96) # define HUGE_VALL (__extension__ 0x1.0p32767L) -#elif defined__GNUC__ +#elif defined __GNUC__ # define HUGE_VALL \ (__extension__ \ -- cgit v1.2.3 From 697dbb016e4bc63d20a7c871a9580e7dce32d1b0 Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Thu, 28 Aug 2014 12:31:29 +0200 Subject: test: get out of the endless while loop, when bind failed When bind() fails in this test, then /tmp get filled up with temp files and upcoming tests will fail, because they need to create temp files, too. Better exit from the loop. Test still needs to be investigated to fix the failing bind(). Signed-off-by: Waldemar Brodkorb Signed-off-by: Bernhard Reutner-Fischer --- test/nptl/tst-cancel4.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/nptl/tst-cancel4.c b/test/nptl/tst-cancel4.c index 53abf83ee..4ba40450e 100644 --- a/test/nptl/tst-cancel4.c +++ b/test/nptl/tst-cancel4.c @@ -1015,6 +1015,8 @@ tf_accept (void *arg) if (++tries > 10) { printf ("%s: too many unsuccessful bind calls\n", __FUNCTION__); + /* prevent endless loop, when bind fails forever */ + exit (1); } strcpy (sun.sun_path, "/tmp/tst-cancel4-socket-1-XXXXXX"); -- cgit v1.2.3 From 512fd3804b963a6738ce59d25dd44a7d9143b8b7 Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Thu, 28 Aug 2014 12:31:30 +0200 Subject: test: sync with glibc, use do_test This breaks out of a deadlock, which occurs when testing for powerpc. (qemu) Otherwise the test suite does not finish. Signed-off-by: Waldemar Brodkorb Signed-off-by: Bernhard Reutner-Fischer --- test/nptl/tst-sem3.c | 33 ++++++++++++++++++--------------- test/nptl/tst-sem4.c | 7 +++++-- 2 files changed, 23 insertions(+), 17 deletions(-) diff --git a/test/nptl/tst-sem3.c b/test/nptl/tst-sem3.c index d14f6f633..7b75e29e2 100644 --- a/test/nptl/tst-sem3.c +++ b/test/nptl/tst-sem3.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2002, 2003 Free Software Foundation, Inc. +/* Copyright (C) 2002-2014 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 2002. @@ -28,7 +28,7 @@ int -main (void) +do_test (void) { size_t ps = sysconf (_SC_PAGESIZE); char tmpfname[] = "/tmp/tst-sem3.XXXXXX"; @@ -43,7 +43,7 @@ main (void) if (fd == -1) { printf ("cannot open temporary file: %m\n"); - exit (1); + return 1; } /* Make sure it is always removed. */ @@ -56,14 +56,14 @@ main (void) if (write (fd, data, ps) != (ssize_t) ps) { puts ("short write"); - exit (1); + return 1; } mem = mmap (NULL, ps, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0); if (mem == MAP_FAILED) { printf ("mmap failed: %m\n"); - exit (1); + return 1; } s = (sem_t *) (((uintptr_t) mem + __alignof (sem_t)) @@ -73,25 +73,25 @@ main (void) if (sem_init (s, 1, 1) == -1) { puts ("init failed"); - exit (1); + return 1; } if (TEMP_FAILURE_RETRY (sem_wait (s)) == -1) { puts ("1st wait failed"); - exit (1); + return 1; } errno = 0; if (TEMP_FAILURE_RETRY (sem_trywait (s)) != -1) { puts ("trywait succeeded"); - exit (1); + return 1; } else if (errno != EAGAIN) { puts ("trywait didn't return EAGAIN"); - exit (1); + return 1; } *p = 0; @@ -101,7 +101,7 @@ main (void) if (pid == -1) { puts ("fork failed"); - exit (1); + return 1; } else if (pid == 0) { @@ -109,13 +109,13 @@ main (void) if ((*p)++ != 0) { puts ("child: *p != 0"); - exit (1); + return 1; } if (sem_post (s) == -1) { puts ("child: 1st post failed"); - exit (1); + return 1; } puts ("child done"); @@ -125,17 +125,20 @@ main (void) if (TEMP_FAILURE_RETRY (sem_wait (s)) == -1) { printf ("parent: 2nd wait failed: %m\n"); - exit (1); + return 1; } if (*p != 1) { puts ("*p != 1"); - exit (1); + return 1; } puts ("parent done"); } - exit (0); + return 0; } + +#define TEST_FUNCTION do_test () +#include "../test-skeleton.c" diff --git a/test/nptl/tst-sem4.c b/test/nptl/tst-sem4.c index 125759bab..72ed97d37 100644 --- a/test/nptl/tst-sem4.c +++ b/test/nptl/tst-sem4.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2002 Free Software Foundation, Inc. +/* Copyright (C) 2002-2014 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 2002. @@ -32,7 +32,7 @@ remove_sem (int status, void *arg) int -main (void) +do_test (void) { sem_t *s; sem_t *s2; @@ -144,3 +144,6 @@ main (void) return 0; } + +#define TEST_FUNCTION do_test () +#include "../test-skeleton.c" -- cgit v1.2.3 From 88041f133f06d81a9bf6c72fc6e41a604eddf4b8 Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Thu, 28 Aug 2014 12:31:26 +0200 Subject: test: disable test for systems without FPU This test fails for systems without fpu. For example m68k build for non-mmu/non-fpu systems fail. Signed-off-by: Waldemar Brodkorb Signed-off-by: Bernhard Reutner-Fischer --- test/math/Makefile.in | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test/math/Makefile.in b/test/math/Makefile.in index d241baa9e..147d579f4 100644 --- a/test/math/Makefile.in +++ b/test/math/Makefile.in @@ -13,6 +13,9 @@ endif ifeq ($(DO_C99_MATH),) TESTS_DISABLED += test-float test-ifloat test-double test-idouble rint signgam ilogb endif +ifeq ($(UCLIBC_HAS_FPU),) +TESTS_DISABLED += test-fpucw +endif DODIFF_rint := 1 DODIFF_signgam := 1 -- cgit v1.2.3 From 61ae023e5bb93f05b2b30b31f299efc64bcd420e Mon Sep 17 00:00:00 2001 From: Bernhard Reutner-Fischer Date: Fri, 29 Aug 2014 20:53:04 +0200 Subject: buildsys: use SED for create-lds Signed-off-by: Bernhard Reutner-Fischer --- Makerules | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makerules b/Makerules index 5030205c4..520b47d5a 100644 --- a/Makerules +++ b/Makerules @@ -303,7 +303,7 @@ define create-lds $(Q)$(CC) -nostdlib -nostartfiles -shared -Wl,-z,combreloc \ -Wl,-z,relro -Wl,--hash-style=gnu -Wl,-z,defs \ -Wl,--verbose 2>&1 | LC_ALL=C \ - sed -e '/^=========/,/^=========/!d;/^=========/d' \ + $(SED) -e '/^=========/,/^=========/!d;/^=========/d' \ -e 's/\. = .* + SIZEOF_HEADERS;/& $(SYMBOL_PREFIX)_begin = . - SIZEOF_HEADERS;/' > $@.lds endef -- cgit v1.2.3 From 5c0c667fb21c74b4a9ac0554418a553bf1e11c1c Mon Sep 17 00:00:00 2001 From: Bernhard Reutner-Fischer Date: Fri, 29 Aug 2014 21:06:18 +0200 Subject: buildsys: refine compile.S filter out all -std= Signed-off-by: Bernhard Reutner-Fischer --- Makerules | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makerules b/Makerules index 520b47d5a..05d9548cb 100644 --- a/Makerules +++ b/Makerules @@ -240,7 +240,7 @@ cmd_compile.c = $(CC) -c $< -o $@ $(CFLAGS) \ cmd_compile.i = $(cmd_compile.c:-c=-E -dD) $(UCLIBC_EXTRA_CPPFLAGS) cmd_compile.s = $(cmd_compile.c:-c=-S) cmd_compile.u = $(CC) $^ $(DEPS-$(notdir $@)) -o $@ $(CFLAGS) $(CFLAGS-$(notdir $(^D))) $(CFLAGS-$(notdir $@)) $(CFLAGS_gen.dep) -cmd_compile.S = $(filter-out -std=gnu99, $(cmd_compile.c)) -D__ASSEMBLER__ $(ASFLAGS) $(ARCH_ASFLAGS) $(ASFLAGS-$(suffix $@)) $(ASFLAGS-$(notdir $<)) $(ASFLAGS-$(notdir $@)) +cmd_compile.S = $(filter-out -std=%, $(cmd_compile.c)) -D__ASSEMBLER__ $(ASFLAGS) $(ARCH_ASFLAGS) $(ASFLAGS-$(suffix $@)) $(ASFLAGS-$(notdir $<)) $(ASFLAGS-$(notdir $@)) cmd_compile.m = $(cmd_compile.c) -DL_$(patsubst %$(suffix $(notdir $@)),%,$(notdir $@)) cmd_compile.mi= $(cmd_compile.m:-c=-E -dD) $(UCLIBC_EXTRA_CPPFLAGS) -- cgit v1.2.3 From 7a3acb243bc09f253a77faee7ee097a781f3eebe Mon Sep 17 00:00:00 2001 From: Bernhard Reutner-Fischer Date: Thu, 4 Sep 2014 12:46:56 +0200 Subject: buildsys: tweak check_ld flag probing ld was (erroneously) complaining that it failed to merge private bfd data. Silence this mismatch as seen on m68k with obfd binary. Signed-off-by: Bernhard Reutner-Fischer --- Rules.mak | 7 +++++-- extra/scripts/none.lds | 13 +++++++++++++ 2 files changed, 18 insertions(+), 2 deletions(-) create mode 100644 extra/scripts/none.lds diff --git a/Rules.mak b/Rules.mak index 19cc38a1e..cb657008c 100644 --- a/Rules.mak +++ b/Rules.mak @@ -201,7 +201,7 @@ check_as=$(shell \ if $(CC) -Wa,$(1) -Wa,-Z -c -o /dev/null -xassembler /dev/null > /dev/null 2>&1; \ then echo "-Wa,$(1)"; fi) check_ld=$(shell \ - if $(CC) $(LDFLAG-fuse-ld) -Wl,$(1) $(CFLAG_-nostdlib) -o /dev/null -Wl,-b,binary /dev/null > /dev/null 2>&1; \ + if $(CC) $(LDFLAG-fuse-ld) $(CFLAG_-Wl--no-warn-mismatch) -Wl,$(1) $(CFLAG_-nostdlib) -o /dev/null -Wl,-b,binary /dev/null > /dev/null 2>&1; \ then echo "$(1)"; fi) # Use variable indirection here so that we can have variable @@ -254,8 +254,11 @@ ARFLAGS:=cr # Note: The check for -nostdlib has to be before all calls to check_ld $(eval $(call check-gcc-var,-nostdlib)) -LDFLAG-fuse-ld := $(filter -fuse-ld=%,$(EXTRA_UCLIBC_FLAGS)) # deliberately not named CFLAG-fuse-ld since unchecked and from user +LDFLAG-fuse-ld := $(filter -fuse-ld=%,$(EXTRA_UCLIBC_FLAGS)) +# failed to merge target specific data of file /dev/null +# Could use -Wl,--script,$(top_srcdir)extra/scripts/none.lds as well. +$(eval $(call check-ld-var,--no-warn-mismatch)) # Flags in OPTIMIZATION are used only for non-debug builds diff --git a/extra/scripts/none.lds b/extra/scripts/none.lds new file mode 100644 index 000000000..d6bd05afc --- /dev/null +++ b/extra/scripts/none.lds @@ -0,0 +1,13 @@ +/* GNU ld script + * Used by the build system to probe flags. + * Discards all output to avoid error + * "failed to merge target specific data of file %B". */ +TARGET(binary) +INPUT(/dev/null) +/* We could as well omit the whole SECTIONS block. + * This redundancy is just for clarity. */ +SECTIONS +{ + /DISCARD/ : { *(*) } +} + -- cgit v1.2.3 From ff48662bbadd3d49fabe6fdfeb8e8181d4c80b06 Mon Sep 17 00:00:00 2001 From: Bernhard Reutner-Fischer Date: Thu, 4 Sep 2014 13:12:52 +0200 Subject: test: disable librt shmtest on non-MMU systems This test fails for non-MMU systems, because it uses fork() Thanks to Waldemar Brodkorb! Signed-off-by: Bernhard Reutner-Fischer --- test/librt/Makefile.in | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test/librt/Makefile.in b/test/librt/Makefile.in index 15ecbae5b..f25522cbe 100644 --- a/test/librt/Makefile.in +++ b/test/librt/Makefile.in @@ -2,3 +2,7 @@ # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. LDFLAGS_shmtest := -lrt + +ifeq ($(ARCH_USE_MMU),) +TESTS_DISABLED := shmtest +endif -- cgit v1.2.3 From bc23c6440d34d85c8e6bb04656beb233bba47cb8 Mon Sep 17 00:00:00 2001 From: Bernhard Reutner-Fischer Date: Thu, 4 Sep 2014 13:16:35 +0200 Subject: test: wcsftime depends on XLOCALE Thanks to Waldemar Brodkorb for noticing. Signed-off-by: Bernhard Reutner-Fischer --- test/time/Makefile.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/time/Makefile.in b/test/time/Makefile.in index 05f73a45d..02c8d910c 100644 --- a/test/time/Makefile.in +++ b/test/time/Makefile.in @@ -5,7 +5,7 @@ TESTS_DISABLED := bug-asctime bug-asctime_r time tst-mktime2 tst-posixtz \ tst-strftime tst-strptime tst-timezone ifneq ($(UCLIBC_HAS_XLOCALE),y) -TESTS_DISABLED += tst-ftime_l +TESTS_DISABLED += tst-ftime_l tst_wcsftime endif CFLAGS_tst-strptime2 := -std=c99 -- cgit v1.2.3 From b212e3804fb155cb418852dd70abad9a3d2354cc Mon Sep 17 00:00:00 2001 From: Bernhard Reutner-Fischer Date: Thu, 4 Sep 2014 13:21:23 +0200 Subject: ldso: Fix compile-error on noMMU Thanks to Waldemar Brodkorb for noticing! Signed-off-by: Bernhard Reutner-Fischer --- ldso/ldso/dl-elf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ldso/ldso/dl-elf.c b/ldso/ldso/dl-elf.c index 1b06bc172..54501d143 100644 --- a/ldso/ldso/dl-elf.c +++ b/ldso/ldso/dl-elf.c @@ -728,7 +728,7 @@ struct elf_resolve *_dl_load_elf_shared_library(unsigned rflags, void *new_addr; new_addr = map_writeable (infile, ppnt, piclib, flags, libaddr); if (!new_addr) { - _dl_dprintf(_dl_debug_file, "Can't modify %s's text section.", + _dl_dprintf(2, "Can't modify %s's text section.", libname); _dl_exit(1); } -- cgit v1.2.3 From 6d550ddd129b18cf800eab604f74536754526cd8 Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Mon, 1 Sep 2014 20:44:20 +0200 Subject: sparc: remove sparc64/sparcv9 code The sparc64/sparcv9 code is incomplete. Furthermore there is no real embedded hardware for sparc64 available, so better remove it until someone comes up with a complete port. Signed-off-by: Waldemar Brodkorb Signed-off-by: Bernhard Reutner-Fischer --- extra/Configs/Config.sparc | 6 - libc/string/sparc/sparc64/memchr.S | 258 ------ libc/string/sparc/sparc64/memcpy.S | 922 --------------------- libc/string/sparc/sparc64/memset.S | 316 ------- libc/string/sparc/sparc64/sparcv9b/memcpy.S | 611 -------------- libc/string/sparc/sparc64/stpcpy.S | 270 ------ libc/string/sparc/sparc64/strcat.S | 338 -------- libc/string/sparc/sparc64/strchr.S | 485 ----------- libc/string/sparc/sparc64/strcmp.S | 278 ------- libc/string/sparc/sparc64/strcpy.S | 244 ------ libc/string/sparc/sparc64/strlen.S | 172 ---- libc/sysdeps/linux/sparc/bits/setjmp.h | 31 - libc/sysdeps/linux/sparc/bits/sigcontext.h | 35 - libc/sysdeps/linux/sparc/crt1.S | 11 - libc/sysdeps/linux/sparc/jmpbuf-unwind.h | 25 +- libc/sysdeps/linux/sparc/qp_ops.c | 8 - libc/sysdeps/linux/sparc/sparcv9/clone.S | 101 --- libc/sysdeps/linux/sparc/sparcv9/rem.S | 20 - libc/sysdeps/linux/sparc/sparcv9/sdiv.S | 18 - libc/sysdeps/linux/sparc/sparcv9/udiv.S | 15 - libc/sysdeps/linux/sparc/sparcv9/umul.S | 15 - libc/sysdeps/linux/sparc/sparcv9/urem.S | 17 - libc/sysdeps/linux/sparc/sys/procfs.h | 88 -- .../linuxthreads.old/sysdeps/sparc/pt-machine.h | 86 +- .../sysdeps/sparc/sparc32/pt-machine.h | 82 -- .../sysdeps/sparc/sparc64/pt-machine.h | 104 --- libpthread/linuxthreads/sysdeps/sparc/pspinlock.c | 95 ++- libpthread/linuxthreads/sysdeps/sparc/pt-machine.h | 86 +- .../linuxthreads/sysdeps/sparc/sparc32/pspinlock.c | 87 -- .../sysdeps/sparc/sparc32/pt-machine.h | 82 -- .../sysdeps/sparc/sparc32/sparcv9/pspinlock.c | 93 --- .../linuxthreads/sysdeps/sparc/sparc64/pspinlock.c | 92 -- .../sysdeps/sparc/sparc64/pt-machine.h | 104 --- .../unix/sysv/linux/sparc/sparc32/sysdep-cancel.h | 100 --- .../sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S | 64 -- .../unix/sysv/linux/sparc/sparc64/pt-sigsuspend.c | 1 - .../unix/sysv/linux/sparc/sparc64/sysdep-cancel.h | 99 --- .../sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S | 63 -- .../sysdeps/unix/sysv/linux/sparc/sysdep-cancel.h | 102 ++- .../sysdeps/unix/sysv/linux/sparc/vfork.S | 64 ++ libpthread/nptl/sysdeps/jmpbuf-unwind.h | 27 + libpthread/nptl/sysdeps/pthread_spin_lock.c | 39 + libpthread/nptl/sysdeps/pthread_spin_trylock.c | 28 + libpthread/nptl/sysdeps/pthreaddef.h | 39 + libpthread/nptl/sysdeps/sparc/jmpbuf-unwind.h | 32 +- libpthread/nptl/sysdeps/sparc/pthread_spin_lock.c | 44 +- .../nptl/sysdeps/sparc/pthread_spin_trylock.c | 33 +- libpthread/nptl/sysdeps/sparc/pthreaddef.h | 44 +- .../nptl/sysdeps/sparc/sparc32/jmpbuf-unwind.h | 27 - .../nptl/sysdeps/sparc/sparc32/pthread_spin_lock.c | 39 - .../sysdeps/sparc/sparc32/pthread_spin_trylock.c | 28 - libpthread/nptl/sysdeps/sparc/sparc32/pthreaddef.h | 39 - .../sparc/sparc32/sparcv9/pthread_spin_lock.c | 38 - .../sparc/sparc32/sparcv9/pthread_spin_trylock.c | 1 - .../sparc/sparc32/sparcv9/pthread_spin_unlock.c | 1 - .../nptl/sysdeps/sparc/sparc64/jmpbuf-unwind.h | 27 - .../nptl/sysdeps/sparc/sparc64/pthread_spin_lock.c | 38 - .../sysdeps/sparc/sparc64/pthread_spin_trylock.c | 33 - .../sysdeps/sparc/sparc64/pthread_spin_unlock.c | 29 - libpthread/nptl/sysdeps/sparc/sparc64/pthreaddef.h | 39 - .../nptl/sysdeps/unix/sysv/linux/sparc/clone.S | 7 +- .../nptl/sysdeps/unix/sysv/linux/sparc/pt-vfork.S | 49 +- .../unix/sysv/linux/sparc/pthread_barrier_wait.c | 94 ++- .../nptl/sysdeps/unix/sysv/linux/sparc/sem_post.c | 52 ++ .../sysdeps/unix/sysv/linux/sparc/sem_timedwait.c | 147 ++++ .../sysdeps/unix/sysv/linux/sparc/sem_trywait.c | 51 ++ .../nptl/sysdeps/unix/sysv/linux/sparc/sem_wait.c | 124 +++ .../sysdeps/unix/sysv/linux/sparc/sparc32/clone.S | 2 - .../unix/sysv/linux/sparc/sparc32/pt-vfork.S | 44 - .../linux/sparc/sparc32/pthread_barrier_wait.c | 93 --- .../unix/sysv/linux/sparc/sparc32/sem_post.c | 52 -- .../unix/sysv/linux/sparc/sparc32/sem_timedwait.c | 147 ---- .../unix/sysv/linux/sparc/sparc32/sem_trywait.c | 51 -- .../unix/sysv/linux/sparc/sparc32/sem_wait.c | 124 --- .../unix/sysv/linux/sparc/sparc32/sysdep-cancel.h | 111 --- .../sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S | 48 -- .../sysdeps/unix/sysv/linux/sparc/sparc64/clone.S | 2 - .../unix/sysv/linux/sparc/sparc64/pt-vfork.S | 44 - .../unix/sysv/linux/sparc/sparc64/sysdep-cancel.h | 109 --- .../unix/sysv/linux/sparc/sparc64/timer_create.c | 1 - .../unix/sysv/linux/sparc/sparc64/timer_delete.c | 1 - .../unix/sysv/linux/sparc/sparc64/timer_getoverr.c | 1 - .../unix/sysv/linux/sparc/sparc64/timer_gettime.c | 1 - .../unix/sysv/linux/sparc/sparc64/timer_settime.c | 1 - .../sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S | 48 -- .../sysdeps/unix/sysv/linux/sparc/sysdep-cancel.h | 114 ++- .../nptl/sysdeps/unix/sysv/linux/sparc/vfork.S | 53 +- 87 files changed, 1350 insertions(+), 6534 deletions(-) delete mode 100644 libc/string/sparc/sparc64/memchr.S delete mode 100644 libc/string/sparc/sparc64/memcpy.S delete mode 100644 libc/string/sparc/sparc64/memset.S delete mode 100644 libc/string/sparc/sparc64/sparcv9b/memcpy.S delete mode 100644 libc/string/sparc/sparc64/stpcpy.S delete mode 100644 libc/string/sparc/sparc64/strcat.S delete mode 100644 libc/string/sparc/sparc64/strchr.S delete mode 100644 libc/string/sparc/sparc64/strcmp.S delete mode 100644 libc/string/sparc/sparc64/strcpy.S delete mode 100644 libc/string/sparc/sparc64/strlen.S delete mode 100644 libc/sysdeps/linux/sparc/sparcv9/clone.S delete mode 100644 libc/sysdeps/linux/sparc/sparcv9/rem.S delete mode 100644 libc/sysdeps/linux/sparc/sparcv9/sdiv.S delete mode 100644 libc/sysdeps/linux/sparc/sparcv9/udiv.S delete mode 100644 libc/sysdeps/linux/sparc/sparcv9/umul.S delete mode 100644 libc/sysdeps/linux/sparc/sparcv9/urem.S delete mode 100644 libpthread/linuxthreads.old/sysdeps/sparc/sparc32/pt-machine.h delete mode 100644 libpthread/linuxthreads.old/sysdeps/sparc/sparc64/pt-machine.h delete mode 100644 libpthread/linuxthreads/sysdeps/sparc/sparc32/pspinlock.c delete mode 100644 libpthread/linuxthreads/sysdeps/sparc/sparc32/pt-machine.h delete mode 100644 libpthread/linuxthreads/sysdeps/sparc/sparc32/sparcv9/pspinlock.c delete mode 100644 libpthread/linuxthreads/sysdeps/sparc/sparc64/pspinlock.c delete mode 100644 libpthread/linuxthreads/sysdeps/sparc/sparc64/pt-machine.h delete mode 100644 libpthread/linuxthreads/sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h delete mode 100644 libpthread/linuxthreads/sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S delete mode 100644 libpthread/linuxthreads/sysdeps/unix/sysv/linux/sparc/sparc64/pt-sigsuspend.c delete mode 100644 libpthread/linuxthreads/sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h delete mode 100644 libpthread/linuxthreads/sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S create mode 100644 libpthread/linuxthreads/sysdeps/unix/sysv/linux/sparc/vfork.S create mode 100644 libpthread/nptl/sysdeps/jmpbuf-unwind.h create mode 100644 libpthread/nptl/sysdeps/pthread_spin_lock.c create mode 100644 libpthread/nptl/sysdeps/pthread_spin_trylock.c create mode 100644 libpthread/nptl/sysdeps/pthreaddef.h delete mode 100644 libpthread/nptl/sysdeps/sparc/sparc32/jmpbuf-unwind.h delete mode 100644 libpthread/nptl/sysdeps/sparc/sparc32/pthread_spin_lock.c delete mode 100644 libpthread/nptl/sysdeps/sparc/sparc32/pthread_spin_trylock.c delete mode 100644 libpthread/nptl/sysdeps/sparc/sparc32/pthreaddef.h delete mode 100644 libpthread/nptl/sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.c delete mode 100644 libpthread/nptl/sysdeps/sparc/sparc32/sparcv9/pthread_spin_trylock.c delete mode 100644 libpthread/nptl/sysdeps/sparc/sparc32/sparcv9/pthread_spin_unlock.c delete mode 100644 libpthread/nptl/sysdeps/sparc/sparc64/jmpbuf-unwind.h delete mode 100644 libpthread/nptl/sysdeps/sparc/sparc64/pthread_spin_lock.c delete mode 100644 libpthread/nptl/sysdeps/sparc/sparc64/pthread_spin_trylock.c delete mode 100644 libpthread/nptl/sysdeps/sparc/sparc64/pthread_spin_unlock.c delete mode 100644 libpthread/nptl/sysdeps/sparc/sparc64/pthreaddef.h create mode 100644 libpthread/nptl/sysdeps/unix/sysv/linux/sparc/sem_post.c create mode 100644 libpthread/nptl/sysdeps/unix/sysv/linux/sparc/sem_timedwait.c create mode 100644 libpthread/nptl/sysdeps/unix/sysv/linux/sparc/sem_trywait.c create mode 100644 libpthread/nptl/sysdeps/unix/sysv/linux/sparc/sem_wait.c delete mode 100644 libpthread/nptl/sysdeps/unix/sysv/linux/sparc/sparc32/clone.S delete mode 100644 libpthread/nptl/sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S delete mode 100644 libpthread/nptl/sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c delete mode 100644 libpthread/nptl/sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c delete mode 100644 libpthread/nptl/sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c delete mode 100644 libpthread/nptl/sysdeps/unix/sysv/linux/sparc/sparc32/sem_trywait.c delete mode 100644 libpthread/nptl/sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c delete mode 100644 libpthread/nptl/sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h delete mode 100644 libpthread/nptl/sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S delete mode 100644 libpthread/nptl/sysdeps/unix/sysv/linux/sparc/sparc64/clone.S delete mode 100644 libpthread/nptl/sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S delete mode 100644 libpthread/nptl/sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h delete mode 100644 libpthread/nptl/sysdeps/unix/sysv/linux/sparc/sparc64/timer_create.c delete mode 100644 libpthread/nptl/sysdeps/unix/sysv/linux/sparc/sparc64/timer_delete.c delete mode 100644 libpthread/nptl/sysdeps/unix/sysv/linux/sparc/sparc64/timer_getoverr.c delete mode 100644 libpthread/nptl/sysdeps/unix/sysv/linux/sparc/sparc64/timer_gettime.c delete mode 100644 libpthread/nptl/sysdeps/unix/sysv/linux/sparc/sparc64/timer_settime.c delete mode 100644 libpthread/nptl/sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S diff --git a/extra/Configs/Config.sparc b/extra/Configs/Config.sparc index c6180c831..47c8ac289 100644 --- a/extra/Configs/Config.sparc +++ b/extra/Configs/Config.sparc @@ -26,10 +26,4 @@ config CONFIG_SPARC_V7 config CONFIG_SPARC_V8 bool "SPARC v8" -config CONFIG_SPARC_V9 - bool "SPARC v9" - -config CONFIG_SPARC_V9B - bool "SPARC v9b" - endchoice diff --git a/libc/string/sparc/sparc64/memchr.S b/libc/string/sparc/sparc64/memchr.S deleted file mode 100644 index 6467f7fff..000000000 --- a/libc/string/sparc/sparc64/memchr.S +++ /dev/null @@ -1,258 +0,0 @@ -/* memchr (str, ch, n) -- Return pointer to first occurrence of CH in STR less - than N. - For SPARC v9. - Copyright (C) 1998, 1999, 2000, 2003 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Jan Vondrak and - Jakub Jelinek . - This version is developed using the same algorithm as the fast C - version which carries the following introduction: - Based on strlen implementation by Torbjorn Granlund (tege@sics.se), - with help from Dan Sahlin (dan@sics.se) and - commentary by Jim Blandy (jimb@ai.mit.edu); - adaptation to memchr suggested by Dick Karpinski (dick@cca.ucsf.edu), - and implemented by Roland McGrath (roland@ai.mit.edu). - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 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 - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - . */ - -#include -#ifndef XCC -#define XCC xcc -#define USE_BPR - .register %g2, #scratch - .register %g3, #scratch -#endif - - /* Normally, this uses - ((xword - 0x0101010101010101) & 0x8080808080808080) test - to find out if any byte in xword could be zero. This is fast, but - also gives false alarm for any byte in range 0x81-0xff. It does - not matter for correctness, as if this test tells us there could - be some zero byte, we check it byte by byte, but if bytes with - high bits set are common in the strings, then this will give poor - performance. You can #define EIGHTBIT_NOT_RARE and the algorithm - will use one tick slower, but more precise test - ((xword - 0x0101010101010101) & (~xword) & 0x8080808080808080), - which does not give any false alarms (but if some bits are set, - one cannot assume from it which bytes are zero and which are not). - It is yet to be measured, what is the correct default for glibc - in these days for an average user. - */ - - .text - .align 32 -ENTRY(memchr) - and %o1, 0xff, %o1 /* IEU0 Group */ -#ifdef USE_BPR - brz,pn %o2, 12f /* CTI+IEU1 */ -#else - tst %o2 /* IEU1 */ - be,pn %XCC, 12f /* CTI */ -#endif - sll %o1, 8, %g3 /* IEU0 Group */ - add %o0, %o2, %o2 /* IEU1 */ - - sethi %hi(0x01010101), %g1 /* IEU0 Group */ - or %g3, %o1, %g3 /* IEU1 */ - ldub [%o0], %o3 /* Load */ - sllx %g3, 16, %g5 /* IEU0 Group */ - - or %g1, %lo(0x01010101), %g1 /* IEU1 */ - sllx %g1, 32, %g2 /* IEU0 Group */ - or %g3, %g5, %g3 /* IEU1 */ - sllx %g3, 32, %g5 /* IEU0 Group */ - - cmp %o3, %o1 /* IEU1 */ - be,pn %xcc, 13f /* CTI */ - or %g1, %g2, %g1 /* IEU0 Group */ - andcc %o0, 7, %g0 /* IEU1 */ - - bne,a,pn %icc, 21f /* CTI */ - add %o0, 1, %o0 /* IEU0 Group */ - ldx [%o0], %o3 /* Load Group */ - sllx %g1, 7, %g2 /* IEU0 */ - - or %g3, %g5, %g3 /* IEU1 */ -1: add %o0, 8, %o0 /* IEU0 Group */ - xor %o3, %g3, %o4 /* IEU1 */ - /* %g1 = 0101010101010101 * - * %g2 = 8080088080808080 * - * %g3 = c c c c c c c c * - * %o3 = value * - * %o4 = value XOR c */ -2: cmp %o0, %o2 /* IEU1 Group */ - - bg,pn %XCC, 11f /* CTI */ - ldxa [%o0] ASI_PNF, %o3 /* Load */ - sub %o4, %g1, %o5 /* IEU0 Group */ - add %o0, 8, %o0 /* IEU1 */ -#ifdef EIGHTBIT_NOT_RARE - andn %o5, %o4, %o5 /* IEU0 Group */ -#endif - - andcc %o5, %g2, %g0 /* IEU1 Group */ - be,a,pt %xcc, 2b /* CTI */ - xor %o3, %g3, %o4 /* IEU0 */ - srlx %o4, 56, %g5 /* IEU0 */ - - andcc %g5, 0xff, %g0 /* IEU1 Group */ - be,pn %icc, 3f /* CTI */ - srlx %o4, 48, %g5 /* IEU0 */ - andcc %g5, 0xff, %g0 /* IEU1 Group */ - - be,pn %icc, 4f /* CTI */ - srlx %o4, 40, %g5 /* IEU0 */ - andcc %g5, 0xff, %g0 /* IEU1 Group */ - be,pn %icc, 5f /* CTI */ - - srlx %o4, 32, %g5 /* IEU0 */ - andcc %g5, 0xff, %g0 /* IEU1 Group */ - be,pn %icc, 6f /* CTI */ - srlx %o4, 24, %g5 /* IEU0 */ - - andcc %g5, 0xff, %g0 /* IEU1 Group */ - be,pn %icc, 7f /* CTI */ - srlx %o4, 16, %g5 /* IEU0 */ - andcc %g5, 0xff, %g0 /* IEU1 Group */ - - be,pn %icc, 8f /* CTI */ - srlx %o4, 8, %g5 /* IEU0 */ - andcc %g5, 0xff, %g0 /* IEU1 Group */ - be,pn %icc, 9f /* CTI */ - - andcc %o4, 0xff, %g0 /* IEU1 Group */ - bne,pt %icc, 2b /* CTI */ - xor %o3, %g3, %o4 /* IEU0 */ - retl /* CTI+IEU1 Group */ - - add %o0, -9, %o0 /* IEU0 */ - - .align 16 -3: retl /* CTI+IEU1 Group */ - add %o0, -16, %o0 /* IEU0 */ -4: retl /* CTI+IEU1 Group */ - add %o0, -15, %o0 /* IEU0 */ - -5: retl /* CTI+IEU1 Group */ - add %o0, -14, %o0 /* IEU0 */ -6: retl /* CTI+IEU1 Group */ - add %o0, -13, %o0 /* IEU0 */ - -7: retl /* CTI+IEU1 Group */ - add %o0, -12, %o0 /* IEU0 */ -8: retl /* CTI+IEU1 Group */ - add %o0, -11, %o0 /* IEU0 */ - -9: retl /* CTI+IEU1 Group */ - add %o0, -10, %o0 /* IEU0 */ -11: sub %o4, %g1, %o5 /* IEU0 Group */ - sub %o0, 8, %o0 /* IEU1 */ - - andcc %o5, %g2, %g0 /* IEU1 Group */ - be,pt %xcc, 12f /* CTI */ - sub %o2, %o0, %o2 /* IEU0 */ - tst %o2 /* IEU1 Group */ - - be,pn %XCC, 12f /* CTI */ - srlx %o4, 56, %g5 /* IEU0 */ - andcc %g5, 0xff, %g0 /* IEU1 Group */ - be,pn %icc, 13f /* CTI */ - - cmp %o2, 1 /* IEU0 */ - be,pn %XCC, 12f /* CTI Group */ - srlx %o4, 48, %g5 /* IEU0 */ - andcc %g5, 0xff, %g0 /* IEU1 Group */ - - be,pn %icc, 14f /* CTI */ - cmp %o2, 2 /* IEU1 Group */ - be,pn %XCC, 12f /* CTI */ - srlx %o4, 40, %g5 /* IEU0 */ - - andcc %g5, 0xff, %g0 /* IEU1 Group */ - be,pn %icc, 15f /* CTI */ - cmp %o2, 3 /* IEU1 Group */ - be,pn %XCC, 12f /* CTI */ - - srlx %o4, 32, %g5 /* IEU0 */ - andcc %g5, 0xff, %g0 /* IEU1 Group */ - be,pn %icc, 16f /* CTI */ - cmp %o2, 4 /* IEU1 Group */ - - be,pn %XCC, 12f /* CTI */ - srlx %o4, 24, %g5 /* IEU0 */ - andcc %g5, 0xff, %g0 /* IEU1 Group */ - be,pn %icc, 17f /* CTI */ - - cmp %o2, 5 /* IEU1 Group */ - be,pn %XCC, 12f /* CTI */ - srlx %o4, 16, %g5 /* IEU0 */ - andcc %g5, 0xff, %g0 /* IEU1 Group */ - - be,pn %icc, 18f /* CTI */ - cmp %o2, 6 /* IEU1 Group */ - be,pn %XCC, 12f /* CTI */ - srlx %o4, 8, %g5 /* IEU0 */ - - andcc %g5, 0xff, %g0 /* IEU1 Group */ - be,pn %icc, 19f /* CTI */ - nop /* IEU0 */ -12: retl /* CTI+IEU1 Group */ - - clr %o0 /* IEU0 */ - nop /* Stub */ -13: retl /* CTI+IEU1 Group */ - nop /* IEU0 */ - -14: retl /* CTI+IEU1 Group */ - add %o0, 1, %o0 /* IEU0 */ -15: retl /* CTI+IEU1 Group */ - add %o0, 2, %o0 /* IEU0 */ - -16: retl /* CTI+IEU1 Group */ - add %o0, 3, %o0 /* IEU0 */ -17: retl /* CTI+IEU1 Group */ - add %o0, 4, %o0 /* IEU0 */ - -18: retl /* CTI+IEU1 Group */ - add %o0, 5, %o0 /* IEU0 */ -19: retl /* CTI+IEU1 Group */ - add %o0, 6, %o0 /* IEU0 */ - -21: cmp %o0, %o2 /* IEU1 */ - be,pn %XCC, 12b /* CTI */ - sllx %g1, 7, %g2 /* IEU0 Group */ - ldub [%o0], %o3 /* Load */ - - or %g3, %g5, %g3 /* IEU1 */ -22: andcc %o0, 7, %g0 /* IEU1 Group */ - be,a,pn %icc, 1b /* CTI */ - ldx [%o0], %o3 /* Load */ - - cmp %o3, %o1 /* IEU1 Group */ - be,pn %xcc, 23f /* CTI */ - add %o0, 1, %o0 /* IEU0 */ - cmp %o0, %o2 /* IEU1 Group */ - - bne,a,pt %XCC, 22b /* CTI */ - ldub [%o0], %o3 /* Load */ - retl /* CTI+IEU1 Group */ - clr %o0 /* IEU0 */ - -23: retl /* CTI+IEU1 Group */ - add %o0, -1, %o0 /* IEU0 */ -END(memchr) - -libc_hidden_def(memchr) -weak_alias(memchr,__ubp_memchr) diff --git a/libc/string/sparc/sparc64/memcpy.S b/libc/string/sparc/sparc64/memcpy.S deleted file mode 100644 index df3e2d342..000000000 --- a/libc/string/sparc/sparc64/memcpy.S +++ /dev/null @@ -1,922 +0,0 @@ -/* Copy SIZE bytes from SRC to DEST. - For UltraSPARC. - Copyright (C) 1996, 97, 98, 99, 2003 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by David S. Miller (davem@caip.rutgers.edu) and - Jakub Jelinek (jakub@redhat.com). - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 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 - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - . */ - -#include -#include -#ifndef XCC -#define USE_BPR - .register %g2, #scratch - .register %g3, #scratch - .register %g6, #scratch -#define XCC xcc -#endif -#define FPRS_FEF 4 - -#define FREG_FROB(f1, f2, f3, f4, f5, f6, f7, f8, f9) \ - faligndata %f1, %f2, %f48; \ - faligndata %f2, %f3, %f50; \ - faligndata %f3, %f4, %f52; \ - faligndata %f4, %f5, %f54; \ - faligndata %f5, %f6, %f56; \ - faligndata %f6, %f7, %f58; \ - faligndata %f7, %f8, %f60; \ - faligndata %f8, %f9, %f62; - -#define MAIN_LOOP_CHUNK(src, dest, fdest, fsrc, len, jmptgt) \ - ldda [%src] %asi, %fdest; \ - add %src, 0x40, %src; \ - add %dest, 0x40, %dest; \ - subcc %len, 0x40, %len; \ - be,pn %xcc, jmptgt; \ - stda %fsrc, [%dest - 0x40] %asi; - -#define LOOP_CHUNK1(src, dest, len, branch_dest) \ - MAIN_LOOP_CHUNK(src, dest, f0, f48, len, branch_dest) -#define LOOP_CHUNK2(src, dest, len, branch_dest) \ - MAIN_LOOP_CHUNK(src, dest, f16, f48, len, branch_dest) -#define LOOP_CHUNK3(src, dest, len, branch_dest) \ - MAIN_LOOP_CHUNK(src, dest, f32, f48, len, branch_dest) - -#define STORE_SYNC(dest, fsrc) \ - stda %fsrc, [%dest] %asi; \ - add %dest, 0x40, %dest; - -#define STORE_JUMP(dest, fsrc, target) \ - stda %fsrc, [%dest] %asi; \ - add %dest, 0x40, %dest; \ - ba,pt %xcc, target; - -#define VISLOOP_PAD nop; nop; nop; nop; \ - nop; nop; nop; nop; \ - nop; nop; nop; nop; \ - nop; nop; nop; - -#define FINISH_VISCHUNK(dest, f0, f1, left) \ - subcc %left, 8, %left; \ - bl,pn %xcc, 205f; \ - faligndata %f0, %f1, %f48; \ - std %f48, [%dest]; \ - add %dest, 8, %dest; - -#define UNEVEN_VISCHUNK(dest, f0, f1, left) \ - subcc %left, 8, %left; \ - bl,pn %xcc, 205f; \ - fsrc1 %f0, %f1; \ - ba,a,pt %xcc, 204f; - - /* Macros for non-VIS memcpy code. */ -#define MOVE_BIGCHUNK(src, dst, offset, t0, t1, t2, t3) \ - ldx [%src + offset + 0x00], %t0; \ - ldx [%src + offset + 0x08], %t1; \ - ldx [%src + offset + 0x10], %t2; \ - ldx [%src + offset + 0x18], %t3; \ - stw %t0, [%dst + offset + 0x04]; \ - srlx %t0, 32, %t0; \ - stw %t0, [%dst + offset + 0x00]; \ - stw %t1, [%dst + offset + 0x0c]; \ - srlx %t1, 32, %t1; \ - stw %t1, [%dst + offset + 0x08]; \ - stw %t2, [%dst + offset + 0x14]; \ - srlx %t2, 32, %t2; \ - stw %t2, [%dst + offset + 0x10]; \ - stw %t3, [%dst + offset + 0x1c]; \ - srlx %t3, 32, %t3; \ - stw %t3, [%dst + offset + 0x18]; - -#define MOVE_BIGALIGNCHUNK(src, dst, offset, t0, t1, t2, t3) \ - ldx [%src + offset + 0x00], %t0; \ - ldx [%src + offset + 0x08], %t1; \ - ldx [%src + offset + 0x10], %t2; \ - ldx [%src + offset + 0x18], %t3; \ - stx %t0, [%dst + offset + 0x00]; \ - stx %t1, [%dst + offset + 0x08]; \ - stx %t2, [%dst + offset + 0x10]; \ - stx %t3, [%dst + offset + 0x18]; \ - ldx [%src + offset + 0x20], %t0; \ - ldx [%src + offset + 0x28], %t1; \ - ldx [%src + offset + 0x30], %t2; \ - ldx [%src + offset + 0x38], %t3; \ - stx %t0, [%dst + offset + 0x20]; \ - stx %t1, [%dst + offset + 0x28]; \ - stx %t2, [%dst + offset + 0x30]; \ - stx %t3, [%dst + offset + 0x38]; - -#define MOVE_LASTCHUNK(src, dst, offset, t0, t1, t2, t3) \ - ldx [%src - offset - 0x10], %t0; \ - ldx [%src - offset - 0x08], %t1; \ - stw %t0, [%dst - offset - 0x0c]; \ - srlx %t0, 32, %t2; \ - stw %t2, [%dst - offset - 0x10]; \ - stw %t1, [%dst - offset - 0x04]; \ - srlx %t1, 32, %t3; \ - stw %t3, [%dst - offset - 0x08]; - -#define MOVE_LASTALIGNCHUNK(src, dst, offset, t0, t1) \ - ldx [%src - offset - 0x10], %t0; \ - ldx [%src - offset - 0x08], %t1; \ - stx %t0, [%dst - offset - 0x10]; \ - stx %t1, [%dst - offset - 0x08]; - - /* Macros for non-VIS memmove code. */ -#define RMOVE_BIGCHUNK(src, dst, offset, t0, t1, t2, t3) \ - ldx [%src - offset - 0x20], %t0; \ - ldx [%src - offset - 0x18], %t1; \ - ldx [%src - offset - 0x10], %t2; \ - ldx [%src - offset - 0x08], %t3; \ - stw %t0, [%dst - offset - 0x1c]; \ - srlx %t0, 32, %t0; \ - stw %t0, [%dst - offset - 0x20]; \ - stw %t1, [%dst - offset - 0x14]; \ - srlx %t1, 32, %t1; \ - stw %t1, [%dst - offset - 0x18]; \ - stw %t2, [%dst - offset - 0x0c]; \ - srlx %t2, 32, %t2; \ - stw %t2, [%dst - offset - 0x10]; \ - stw %t3, [%dst - offset - 0x04]; \ - srlx %t3, 32, %t3; \ - stw %t3, [%dst - offset - 0x08]; - -#define RMOVE_BIGALIGNCHUNK(src, dst, offset, t0, t1, t2, t3) \ - ldx [%src - offset - 0x20], %t0; \ - ldx [%src - offset - 0x18], %t1; \ - ldx [%src - offset - 0x10], %t2; \ - ldx [%src - offset - 0x08], %t3; \ - stx %t0, [%dst - offset - 0x20]; \ - stx %t1, [%dst - offset - 0x18]; \ - stx %t2, [%dst - offset - 0x10]; \ - stx %t3, [%dst - offset - 0x08]; \ - ldx [%src - offset - 0x40], %t0; \ - ldx [%src - offset - 0x38], %t1; \ - ldx [%src - offset - 0x30], %t2; \ - ldx [%src - offset - 0x28], %t3; \ - stx %t0, [%dst - offset - 0x40]; \ - stx %t1, [%dst - offset - 0x38]; \ - stx %t2, [%dst - offset - 0x30]; \ - stx %t3, [%dst - offset - 0x28]; - -#define RMOVE_LASTCHUNK(src, dst, offset, t0, t1, t2, t3) \ - ldx [%src + offset + 0x00], %t0; \ - ldx [%src + offset + 0x08], %t1; \ - stw %t0, [%dst + offset + 0x04]; \ - srlx %t0, 32, %t2; \ - stw %t2, [%dst + offset + 0x00]; \ - stw %t1, [%dst + offset + 0x0c]; \ - srlx %t1, 32, %t3; \ - stw %t3, [%dst + offset + 0x08]; - -#define RMOVE_LASTALIGNCHUNK(src, dst, offset, t0, t1) \ - ldx [%src + offset + 0x00], %t0; \ - ldx [%src + offset + 0x08], %t1; \ - stx %t0, [%dst + offset + 0x00]; \ - stx %t1, [%dst + offset + 0x08]; - - .text - .align 32 - -#ifdef __UCLIBC_SUSV3_LEGACY__ -ENTRY(bcopy) - sub %o1, %o0, %o4 /* IEU0 Group */ - mov %o0, %g3 /* IEU1 */ - cmp %o4, %o2 /* IEU1 Group */ - mov %o1, %o0 /* IEU0 */ - bgeu,pt %XCC, 210f /* CTI */ - mov %g3, %o1 /* IEU0 Group */ -#ifndef USE_BPR - srl %o2, 0, %o2 /* IEU1 */ -#endif - brnz,pn %o2, 220f /* CTI Group */ - add %o0, %o2, %o0 /* IEU0 */ - retl - nop -END(bcopy) -#endif - - .align 32 -200: be,pt %xcc, 201f /* CTI */ - andcc %o0, 0x38, %g5 /* IEU1 Group */ - mov 8, %g1 /* IEU0 */ - sub %g1, %g2, %g2 /* IEU0 Group */ - andcc %o0, 1, %g0 /* IEU1 */ - be,pt %icc, 2f /* CTI */ - sub %o2, %g2, %o2 /* IEU0 Group */ -1: ldub [%o1], %o5 /* Load Group */ - add %o1, 1, %o1 /* IEU0 */ - add %o0, 1, %o0 /* IEU1 */ - subcc %g2, 1, %g2 /* IEU1 Group */ - be,pn %xcc, 3f /* CTI */ - stb %o5, [%o0 - 1] /* Store */ -2: ldub [%o1], %o5 /* Load Group */ - add %o0, 2, %o0 /* IEU0 */ - ldub [%o1 + 1], %g3 /* Load Group */ - subcc %g2, 2, %g2 /* IEU1 Group */ - stb %o5, [%o0 - 2] /* Store */ - add %o1, 2, %o1 /* IEU0 */ - bne,pt %xcc, 2b /* CTI Group */ - stb %g3, [%o0 - 1] /* Store */ -3: andcc %o0, 0x38, %g5 /* IEU1 Group */ -201: be,pt %icc, 202f /* CTI */ - mov 64, %g1 /* IEU0 */ - fmovd %f0, %f2 /* FPU */ - sub %g1, %g5, %g5 /* IEU0 Group */ - alignaddr %o1, %g0, %g1 /* GRU Group */ - ldd [%g1], %f4 /* Load Group */ - sub %o2, %g5, %o2 /* IEU0 */ -1: ldd [%g1 + 0x8], %f6 /* Load Group */ - add %g1, 0x8, %g1 /* IEU0 Group */ - subcc %g5, 8, %g5 /* IEU1 */ - faligndata %f4, %f6, %f0 /* GRU Group */ - std %f0, [%o0] /* Store */ - add %o1, 8, %o1 /* IEU0 Group */ - be,pn %xcc, 202f /* CTI */ - add %o0, 8, %o0 /* IEU1 */ - ldd [%g1 + 0x8], %f4 /* Load Group */ - add %g1, 8, %g1 /* IEU0 */ - subcc %g5, 8, %g5 /* IEU1 */ - faligndata %f6, %f4, %f0 /* GRU Group */ - std %f0, [%o0] /* Store */ - add %o1, 8, %o1 /* IEU0 */ - bne,pt %xcc, 1b /* CTI Group */ - add %o0, 8, %o0 /* IEU0 */ -202: membar #LoadStore | #StoreStore | #StoreLoad /* LSU Group */ - wr %g0, ASI_BLK_P, %asi /* LSU Group */ - subcc %o2, 0x40, %g6 /* IEU1 Group */ - mov %o1, %g1 /* IEU0 */ - andncc %g6, (0x40 - 1), %g6 /* IEU1 Group */ - srl %g1, 3, %g2 /* IEU0 */ - sub %o2, %g6, %g3 /* IEU0 Group */ - andn %o1, (0x40 - 1), %o1 /* IEU1 */ - and %g2, 7, %g2 /* IEU0 Group */ - andncc %g3, 0x7, %g3 /* IEU1 */ - fmovd %f0, %f2 /* FPU */ - sub %g3, 0x10, %g3 /* IEU0 Group */ - sub %o2, %g6, %o2 /* IEU1 */ - alignaddr %g1, %g0, %g0 /* GRU Group */ - add %g1, %g6, %g1 /* IEU0 Group */ - subcc %o2, %g3, %o2 /* IEU1 */ - ldda [%o1 + 0x00] %asi, %f0 /* LSU Group */ - add %g1, %g3, %g1 /* IEU0 */ - ldda [%o1 + 0x40] %asi, %f16 /* LSU Group */ - sub %g6, 0x80, %g6 /* IEU0 */ - ldda [%o1 + 0x80] %asi, %f32 /* LSU Group */ - /* Clk1 Group 8-( */ - /* Clk2 Group 8-( */ - /* Clk3 Group 8-( */ - /* Clk4 Group 8-( */ -203: rd %pc, %g5 /* PDU Group 8-( */ - addcc %g5, %lo(300f - 203b), %g5 /* IEU1 Group */ - sll %g2, 9, %g2 /* IEU0 */ - jmpl %g5 + %g2, %g0 /* CTI Group brk forced*/ - addcc %o1, 0xc0, %o1 /* IEU1 Group */ - - .align 512 /* OK, here comes the fun part... */ -300: FREG_FROB(f0, f2, f4, f6, f8, f10,f12,f14,f16) LOOP_CHUNK1(o1, o0, g6, 301f) - FREG_FROB(f16,f18,f20,f22,f24,f26,f28,f30,f32) LOOP_CHUNK2(o1, o0, g6, 302f) - FREG_FROB(f32,f34,f36,f38,f40,f42,f44,f46,f0) LOOP_CHUNK3(o1, o0, g6, 303f) - b,pt %xcc, 300b+4; faligndata %f0, %f2, %f48 -301: FREG_FROB(f16,f18,f20,f22,f24,f26,f28,f30,f32) STORE_SYNC(o0, f48) membar #Sync - FREG_FROB(f32,f34,f36,f38,f40,f42,f44,f46,f0) STORE_JUMP(o0, f48, 400f) membar #Sync -302: FREG_FROB(f32,f34,f36,f38,f40,f42,f44,f46,f0) STORE_SYNC(o0, f48) membar #Sync - FREG_FROB(f0, f2, f4, f6, f8, f10,f12,f14,f16) STORE_JUMP(o0, f48, 416f) membar #Sync -303: FREG_FROB(f0, f2, f4, f6, f8, f10,f12,f14,f16) STORE_SYNC(o0, f48) membar #Sync - FREG_FROB(f16,f18,f20,f22,f24,f26,f28,f30,f32) STORE_JUMP(o0, f48, 432f) membar #Sync - VISLOOP_PAD -310: FREG_FROB(f2, f4, f6, f8, f10,f12,f14,f16,f18) LOOP_CHUNK1(o1, o0, g6, 311f) - FREG_FROB(f18,f20,f22,f24,f26,f28,f30,f32,f34) LOOP_CHUNK2(o1, o0, g6, 312f) - FREG_FROB(f34,f36,f38,f40,f42,f44,f46,f0, f2) LOOP_CHUNK3(o1, o0, g6, 313f) - b,pt %xcc, 310b+4; faligndata %f2, %f4, %f48 -311: FREG_FROB(f18,f20,f22,f24,f26,f28,f30,f32,f34) STORE_SYNC(o0, f48) membar #Sync - FREG_FROB(f34,f36,f38,f40,f42,f44,f46,f0, f2) STORE_JUMP(o0, f48, 402f) membar #Sync -312: FREG_FROB(f34,f36,f38,f40,f42,f44,f46,f0, f2) STORE_SYNC(o0, f48) membar #Sync - FREG_FROB(f2, f4, f6, f8, f10,f12,f14,f16,f18) STORE_JUMP(o0, f48, 418f) membar #Sync -313: FREG_FROB(f2, f4, f6, f8, f10,f12,f14,f16,f18) STORE_SYNC(o0, f48) membar #Sync - FREG_FROB(f18,f20,f22,f24,f26,f28,f30,f32,f34) STORE_JUMP(o0, f48, 434f) membar #Sync - VISLOOP_PAD -320: FREG_FROB(f4, f6, f8, f10,f12,f14,f16,f18,f20) LOOP_CHUNK1(o1, o0, g6, 321f) - FREG_FROB(f20,f22,f24,f26,f28,f30,f32,f34,f36) LOOP_CHUNK2(o1, o0, g6, 322f) - FREG_FROB(f36,f38,f40,f42,f44,f46,f0, f2, f4) LOOP_CHUNK3(o1, o0, g6, 323f) - b,pt %xcc, 320b+4; faligndata %f4, %f6, %f48 -321: FREG_FROB(f20,f22,f24,f26,f28,f30,f32,f34,f36) STORE_SYNC(o0, f48) membar #Sync - FREG_FROB(f36,f38,f40,f42,f44,f46,f0, f2, f4) STORE_JUMP(o0, f48, 404f) membar #Sync -322: FREG_FROB(f36,f38,f40,f42,f44,f46,f0, f2, f4) STORE_SYNC(o0, f48) membar #Sync - FREG_FROB(f4, f6, f8, f10,f12,f14,f16,f18,f20) STORE_JUMP(o0, f48, 420f) membar #Sync -323: FREG_FROB(f4, f6, f8, f10,f12,f14,f16,f18,f20) STORE_SYNC(o0, f48) membar #Sync - FREG_FROB(f20,f22,f24,f26,f28,f30,f32,f34,f36) STORE_JUMP(o0, f48, 436f) membar #Sync - VISLOOP_PAD -330: FREG_FROB(f6, f8, f10,f12,f14,f16,f18,f20,f22) LOOP_CHUNK1(o1, o0, g6, 331f) - FREG_FROB(f22,f24,f26,f28,f30,f32,f34,f36,f38) LOOP_CHUNK2(o1, o0, g6, 332f) - FREG_FROB(f38,f40,f42,f44,f46,f0, f2, f4, f6) LOOP_CHUNK3(o1, o0, g6, 333f) - b,pt %xcc, 330b+4; faligndata %f6, %f8, %f48 -331: FREG_FROB(f22,f24,f26,f28,f30,f32,f34,f36,f38) STORE_SYNC(o0, f48) membar #Sync - FREG_FROB(f38,f40,f42,f44,f46,f0, f2, f4, f6) STORE_JUMP(o0, f48, 406f) membar #Sync -332: FREG_FROB(f38,f40,f42,f44,f46,f0, f2, f4, f6) STORE_SYNC(o0, f48) membar #Sync - FREG_FROB(f6, f8, f10,f12,f14,f16,f18,f20,f22) STORE_JUMP(o0, f48, 422f) membar #Sync -333: FREG_FROB(f6, f8, f10,f12,f14,f16,f18,f20,f22) STORE_SYNC(o0, f48) membar #Sync - FREG_FROB(f22,f24,f26,f28,f30,f32,f34,f36,f38) STORE_JUMP(o0, f48, 438f) membar #Sync - VISLOOP_PAD -340: FREG_FROB(f8, f10,f12,f14,f16,f18,f20,f22,f24) LOOP_CHUNK1(o1, o0, g6, 341f) - FREG_FROB(f24,f26,f28,f30,f32,f34,f36,f38,f40) LOOP_CHUNK2(o1, o0, g6, 342f) - FREG_FROB(f40,f42,f44,f46,f0, f2, f4, f6, f8) LOOP_CHUNK3(o1, o0, g6, 343f) - b,pt %xcc, 340b+4; faligndata %f8, %f10, %f48 -341: FREG_FROB(f24,f26,f28,f30,f32,f34,f36,f38,f40) STORE_SYNC(o0, f48) membar #Sync - FREG_FROB(f40,f42,f44,f46,f0, f2, f4, f6, f8) STORE_JUMP(o0, f48, 408f) membar #Sync -342: FREG_FROB(f40,f42,f44,f46,f0, f2, f4, f6, f8) STORE_SYNC(o0, f48) membar #Sync - FREG_FROB(f8, f10,f12,f14,f16,f18,f20,f22,f24) STORE_JUMP(o0, f48, 424f) membar #Sync -343: FREG_FROB(f8, f10,f12,f14,f16,f18,f20,f22,f24) STORE_SYNC(o0, f48) membar #Sync - FREG_FROB(f24,f26,f28,f30,f32,f34,f36,f38,f40) STORE_JUMP(o0, f48, 440f) membar #Sync - VISLOOP_PAD -350: FREG_FROB(f10,f12,f14,f16,f18,f20,f22,f24,f26) LOOP_CHUNK1(o1, o0, g6, 351f) - FREG_FROB(f26,f28,f30,f32,f34,f36,f38,f40,f42) LOOP_CHUNK2(o1, o0, g6, 352f) - FREG_FROB(f42,f44,f46,f0, f2, f4, f6, f8, f10) LOOP_CHUNK3(o1, o0, g6, 353f) - b,pt %xcc, 350b+4; faligndata %f10, %f12, %f48 -351: FREG_FROB(f26,f28,f30,f32,f34,f36,f38,f40,f42) STORE_SYNC(o0, f48) membar #Sync - FREG_FROB(f42,f44,f46,f0, f2, f4, f6, f8, f10) STORE_JUMP(o0, f48, 410f) membar #Sync -352: FREG_FROB(f42,f44,f46,f0, f2, f4, f6, f8, f10) STORE_SYNC(o0, f48) membar #Sync - FREG_FROB(f10,f12,f14,f16,f18,f20,f22,f24,f26) STORE_JUMP(o0, f48, 426f) membar #Sync -353: FREG_FROB(f10,f12,f14,f16,f18,f20,f22,f24,f26) STORE_SYNC(o0, f48) membar #Sync - FREG_FROB(f26,f28,f30,f32,f34,f36,f38,f40,f42) STORE_JUMP(o0, f48, 442f) membar #Sync - VISLOOP_PAD -360: FREG_FROB(f12,f14,f16,f18,f20,f22,f24,f26,f28) LOOP_CHUNK1(o1, o0, g6, 361f) - FREG_FROB(f28,f30,f32,f34,f36,f38,f40,f42,f44) LOOP_CHUNK2(o1, o0, g6, 362f) - FREG_FROB(f44,f46,f0, f2, f4, f6, f8, f10,f12) LOOP_CHUNK3(o1, o0, g6, 363f) - b,pt %xcc, 360b+4; faligndata %f12, %f14, %f48 -361: FREG_FROB(f28,f30,f32,f34,f36,f38,f40,f42,f44) STORE_SYNC(o0, f48) membar #Sync - FREG_FROB(f44,f46,f0, f2, f4, f6, f8, f10,f12) STORE_JUMP(o0, f48, 412f) membar #Sync -362: FREG_FROB(f44,f46,f0, f2, f4, f6, f8, f10,f12) STORE_SYNC(o0, f48) membar #Sync - FREG_FROB(f12,f14,f16,f18,f20,f22,f24,f26,f28) STORE_JUMP(o0, f48, 428f) membar #Sync -363: FREG_FROB(f12,f14,f16,f18,f20,f22,f24,f26,f28) STORE_SYNC(o0, f48) membar #Sync - FREG_FROB(f28,f30,f32,f34,f36,f38,f40,f42,f44) STORE_JUMP(o0, f48, 444f) membar #Sync - VISLOOP_PAD -370: FREG_FROB(f14,f16,f18,f20,f22,f24,f26,f28,f30) LOOP_CHUNK1(o1, o0, g6, 371f) - FREG_FROB(f30,f32,f34,f36,f38,f40,f42,f44,f46) LOOP_CHUNK2(o1, o0, g6, 372f) - FREG_FROB(f46,f0, f2, f4, f6, f8, f10,f12,f14) LOOP_CHUNK3(o1, o0, g6, 373f) - b,pt %xcc, 370b+4; faligndata %f14, %f16, %f48 -371: FREG_FROB(f30,f32,f34,f36,f38,f40,f42,f44,f46) STORE_SYNC(o0, f48) membar #Sync - FREG_FROB(f46,f0, f2, f4, f6, f8, f10,f12,f14) STORE_JUMP(o0, f48, 414f) membar #Sync -372: FREG_FROB(f46,f0, f2, f4, f6, f8, f10,f12,f14) STORE_SYNC(o0, f48) membar #Sync - FREG_FROB(f14,f16,f18,f20,f22,f24,f26,f28,f30) STORE_JUMP(o0, f48, 430f) membar #Sync -373: FREG_FROB(f14,f16,f18,f20,f22,f24,f26,f28,f30) STORE_SYNC(o0, f48) membar #Sync - FREG_FROB(f30,f32,f34,f36,f38,f40,f42,f44,f46) STORE_JUMP(o0, f48, 446f) membar #Sync - VISLOOP_PAD -400: FINISH_VISCHUNK(o0, f0, f2, g3) -402: FINISH_VISCHUNK(o0, f2, f4, g3) -404: FINISH_VISCHUNK(o0, f4, f6, g3) -406: FINISH_VISCHUNK(o0, f6, f8, g3) -408: FINISH_VISCHUNK(o0, f8, f10, g3) -410: FINISH_VISCHUNK(o0, f10, f12, g3) -412: FINISH_VISCHUNK(o0, f12, f14, g3) -414: UNEVEN_VISCHUNK(o0, f14, f0, g3) -416: FINISH_VISCHUNK(o0, f16, f18, g3) -418: FINISH_VISCHUNK(o0, f18, f20, g3) -420: FINISH_VISCHUNK(o0, f20, f22, g3) -422: FINISH_VISCHUNK(o0, f22, f24, g3) -424: FINISH_VISCHUNK(o0, f24, f26, g3) -426: FINISH_VISCHUNK(o0, f26, f28, g3) -428: FINISH_VISCHUNK(o0, f28, f30, g3) -430: UNEVEN_VISCHUNK(o0, f30, f0, g3) -432: FINISH_VISCHUNK(o0, f32, f34, g3) -434: FINISH_VISCHUNK(o0, f34, f36, g3) -436: FINISH_VISCHUNK(o0, f36, f38, g3) -438: FINISH_VISCHUNK(o0, f38, f40, g3) -440: FINISH_VISCHUNK(o0, f40, f42, g3) -442: FINISH_VISCHUNK(o0, f42, f44, g3) -444: FINISH_VISCHUNK(o0, f44, f46, g3) -446: UNEVEN_VISCHUNK(o0, f46, f0, g3) -204: ldd [%o1], %f2 /* Load Group */ - add %o1, 8, %o1 /* IEU0 */ - subcc %g3, 8, %g3 /* IEU1 */ - faligndata %f0, %f2, %f8 /* GRU Group */ - std %f8, [%o0] /* Store */ - bl,pn %xcc, 205f /* CTI */ - add %o0, 8, %o0 /* IEU0 Group */ - ldd [%o1], %f0 /* Load Group */ - add %o1, 8, %o1 /* IEU0 */ - subcc %g3, 8, %g3 /* IEU1 */ - faligndata %f2, %f0, %f8 /* GRU Group */ - std %f8, [%o0] /* Store */ - bge,pt %xcc, 204b /* CTI */ - add %o0, 8, %o0 /* IEU0 Group */ -205: brz,pt %o2, 207f /* CTI Group */ - mov %g1, %o1 /* IEU0 */ -206: ldub [%o1], %g5 /* LOAD */ - add %o1, 1, %o1 /* IEU0 */ - add %o0, 1, %o0 /* IEU1 */ - subcc %o2, 1, %o2 /* IEU1 */ - bne,pt %xcc, 206b /* CTI */ - stb %g5, [%o0 - 1] /* Store Group */ -207: membar #StoreLoad | #StoreStore /* LSU Group */ - wr %g0, FPRS_FEF, %fprs - retl - mov %g4, %o0 - -208: andcc %o2, 1, %g0 /* IEU1 Group */ - be,pt %icc, 2f+4 /* CTI */ -1: ldub [%o1], %g5 /* LOAD Group */ - add %o1, 1, %o1 /* IEU0 */ - add %o0, 1, %o0 /* IEU1 */ - subcc %o2, 1, %o2 /* IEU1 Group */ - be,pn %xcc, 209f /* CTI */ - stb %g5, [%o0 - 1] /* Store */ -2: ldub [%o1], %g5 /* LOAD Group */ - add %o0, 2, %o0 /* IEU0 */ - ldub [%o1 + 1], %o5 /* LOAD Group */ - add %o1, 2, %o1 /* IEU0 */ - subcc %o2, 2, %o2 /* IEU1 Group */ - stb %g5, [%o0 - 2] /* Store */ - bne,pt %xcc, 2b /* CTI */ - stb %o5, [%o0 - 1] /* Store */ -209: retl - mov %g4, %o0 - -#ifdef USE_BPR - - /* void *__align_cpy_4(void *dest, void *src, size_t n) - * SPARC v9 SYSV ABI - * Like memcpy, but results are undefined if (!n || ((dest | src | n) & 3)) - */ - - .align 32 -ENTRY(__align_cpy_4) - mov %o0, %g4 /* IEU0 Group */ - cmp %o2, 15 /* IEU1 */ - bleu,pn %xcc, 208b /* CTI */ - cmp %o2, (64 * 6) /* IEU1 Group */ - bgeu,pn %xcc, 200b /* CTI */ - andcc %o0, 7, %g2 /* IEU1 Group */ - ba,pt %xcc, 216f /* CTI */ - andcc %o1, 4, %g0 /* IEU1 Group */ -END(__align_cpy_4) - - /* void *__align_cpy_8(void *dest, void *src, size_t n) - * SPARC v9 SYSV ABI - * Like memcpy, but results are undefined if (!n || ((dest | src | n) & 7)) - */ - - .align 32 -ENTRY(__align_cpy_8) - mov %o0, %g4 /* IEU0 Group */ - cmp %o2, 15 /* IEU1 */ - bleu,pn %xcc, 208b /* CTI */ - cmp %o2, (64 * 6) /* IEU1 Group */ - bgeu,pn %xcc, 201b /* CTI */ - andcc %o0, 0x38, %g5 /* IEU1 Group */ - andcc %o2, -128, %g6 /* IEU1 Group */ - bne,a,pt %xcc, 82f + 4 /* CTI */ - ldx [%o1], %g1 /* Load */ - ba,pt %xcc, 41f /* CTI Group */ - andcc %o2, 0x70, %g6 /* IEU1 */ -END(__align_cpy_8) - - /* void *__align_cpy_16(void *dest, void *src, size_t n) - * SPARC v9 SYSV ABI - * Like memcpy, but results are undefined if (!n || ((dest | src | n) & 15)) - */ - - .align 32 -ENTRY(__align_cpy_16) - mov %o0, %g4 /* IEU0 Group */ - cmp %o2, (64 * 6) /* IEU1 */ - bgeu,pn %xcc, 201b /* CTI */ - andcc %o0, 0x38, %g5 /* IEU1 Group */ - andcc %o2, -128, %g6 /* IEU1 Group */ - bne,a,pt %xcc, 82f + 4 /* CTI */ - ldx [%o1], %g1 /* Load */ - ba,pt %xcc, 41f /* CTI Group */ - andcc %o2, 0x70, %g6 /* IEU1 */ -END(__align_cpy_16) - -#endif - - .align 32 -ENTRY(memcpy) -210: -#ifndef USE_BPR - srl %o2, 0, %o2 /* IEU1 Group */ -#endif - brz,pn %o2, 209b /* CTI Group */ - mov %o0, %g4 /* IEU0 */ -218: cmp %o2, 15 /* IEU1 Group */ - b