about summary refs log tree commit diff
path: root/sysdeps/sparc/sparc32/sparcv8
diff options
context:
space:
mode:
authorRichard Henderson <rth@redhat.com>1999-03-29 13:25:15 +0000
committerRichard Henderson <rth@redhat.com>1999-03-29 13:25:15 +0000
commitae6b87303186d9c11aaaf87b7a9500262c0f8c5a (patch)
treed6903bcec84aaf26f4e51de65f48f81f654eaab9 /sysdeps/sparc/sparc32/sparcv8
parentb47516084bfba8471da0bdb58641c0d27e6e48b5 (diff)
downloadglibc-ae6b87303186d9c11aaaf87b7a9500262c0f8c5a.tar.gz
glibc-ae6b87303186d9c11aaaf87b7a9500262c0f8c5a.tar.xz
glibc-ae6b87303186d9c11aaaf87b7a9500262c0f8c5a.zip
Sparc string routines from Jakub.
1999-03-29  Jakub Jelinek  <jj@ultra.linux.cz>

	* sysdeps/sparc/sparc32/sparcv8/Makefile: New file.
	* sysdeps/sparc/sparc32/sparcv8/rem.S: Delay after write %y.
	* sysdeps/sparc/sparc32/sparcv8/sdiv.S: Likewise.
	* sysdeps/sparc/sparc32/sparcv8/udiv.S: Likewise.
	* sysdeps/sparc/sparc32/sparcv8/urem.S: Likewise.

	* sysdeps/sparc/sparc32/sparcv9/bcopy.c: New file.
	* sysdeps/sparc/sparc32/sparcv9/bzero.c: New file.
	* sysdeps/sparc/sparc32/sparcv9/memchr.S: New file.
	* sysdeps/sparc/sparc32/sparcv9/memcmp.S: New file.
	* sysdeps/sparc/sparc32/sparcv9/memcpy.S: New file.
	* sysdeps/sparc/sparc32/sparcv9/memset.S: New file.
	* sysdeps/sparc/sparc32/sparcv9/stpcpy.S: New file.
	* sysdeps/sparc/sparc32/sparcv9/strcat.S: New file.
	* sysdeps/sparc/sparc32/sparcv9/strchr.S: New file.
	* sysdeps/sparc/sparc32/sparcv9/strcmp.S: New file.
	* sysdeps/sparc/sparc32/sparcv9/strcpy.S: New file.
	* sysdeps/sparc/sparc32/sparcv9/strcspn.S: New file.
	* sysdeps/sparc/sparc32/sparcv9/strlen.S: New file.
	* sysdeps/sparc/sparc32/sparcv9/strncpy.S: New file.
	* sysdeps/sparc/sparc32/sparcv9/strpbrk.S: New file.
	* sysdeps/sparc/sparc32/sparcv9/strrchr.c: New file.
	* sysdeps/sparc/sparc32/sparcv9/strspn.S: New file.
	* sysdeps/sparc/sparc32/sparcv9/dotmul.S: New file.
	* sysdeps/sparc/sparc32/sparcv9/rem.S: New file.
	* sysdeps/sparc/sparc32/sparcv9/sdiv.S: New file.
	* sysdeps/sparc/sparc32/sparcv9/udiv.S: New file.
	* sysdeps/sparc/sparc32/sparcv9/umul.S: New file.
	* sysdeps/sparc/sparc32/sparcv9/urem.S: New file.
	* sysdeps/sparc/sparc32/sparcv9/Makefile: New file.
	* sysdeps/sparc/sparc32/sparcv9/stpncpy.S: New file.
	* sysdeps/sparc/sparc32/sparcv9/strncmp.S: New file.

	* sysdeps/sparc/sparc32/bcopy.c: New file.
	* sysdeps/sparc/sparc32/bzero.c: New file.
	* sysdeps/sparc/sparc32/memchr.S: New file.
	* sysdeps/sparc/sparc32/memcpy.S: New file.
	* sysdeps/sparc/sparc32/memmove.c: New file.
	* sysdeps/sparc/sparc32/memset.S: New file.
	* sysdeps/sparc/sparc32/stpcpy.S: New file.
	* sysdeps/sparc/sparc32/strchr.S: New file.
	* sysdeps/sparc/sparc32/strrchr.c: New file.
	* sysdeps/sparc/sparc32/strcpy.S: New file.
	* sysdeps/sparc/sparc32/strlen.S: New file.
	* sysdeps/sparc/sparc32/strcat.S: New file.
	* sysdeps/sparc/sparc32/strcmp.S: New file.

	* sysdeps/sparc/sparc64/bcopy.c: New file.
	* sysdeps/sparc/sparc64/bzero.c: New file.
	* sysdeps/sparc/sparc64/memchr.S: New file.
	* sysdeps/sparc/sparc64/memcmp.S: New file.
	* sysdeps/sparc/sparc64/memcpy.S: New file.
	* sysdeps/sparc/sparc64/memset.S: New file.
	* sysdeps/sparc/sparc64/stpcpy.S: New file.
	* sysdeps/sparc/sparc64/strcat.S: New file.
	* sysdeps/sparc/sparc64/strchr.S: New file.
	* sysdeps/sparc/sparc64/strcmp.S: New file.
	* sysdeps/sparc/sparc64/strcpy.S: New file.
	* sysdeps/sparc/sparc64/strcspn.S: New file.
	* sysdeps/sparc/sparc64/strlen.S: New file.
	* sysdeps/sparc/sparc64/strncpy.S: New file.
	* sysdeps/sparc/sparc64/strpbrk.S: New file.
	* sysdeps/sparc/sparc64/strrchr.c: New file.
	* sysdeps/sparc/sparc64/strspn.S: New file.
	* sysdeps/sparc/sparc64/stpncpy.S: New file.
	* sysdeps/sparc/sparc64/strncmp.S: New file.

	* sysdeps/unix/sysv/linux/sparc/sparc32/Makefile (ASFLAGS-.os):
	Append -fPIC, don't replace.

	* configure.in: Recognize sparcv8plus / sparcv9.
Diffstat (limited to 'sysdeps/sparc/sparc32/sparcv8')
-rw-r--r--sysdeps/sparc/sparc32/sparcv8/Makefile1
-rw-r--r--sysdeps/sparc/sparc32/sparcv8/rem.S3
-rw-r--r--sysdeps/sparc/sparc32/sparcv8/sdiv.S10
-rw-r--r--sysdeps/sparc/sparc32/sparcv8/udiv.S2
-rw-r--r--sysdeps/sparc/sparc32/sparcv8/urem.S3
5 files changed, 17 insertions, 2 deletions
diff --git a/sysdeps/sparc/sparc32/sparcv8/Makefile b/sysdeps/sparc/sparc32/sparcv8/Makefile
new file mode 100644
index 0000000000..02139eceb0
--- /dev/null
+++ b/sysdeps/sparc/sparc32/sparcv8/Makefile
@@ -0,0 +1 @@
+CFLAGS += -mv8
diff --git a/sysdeps/sparc/sparc32/sparcv8/rem.S b/sysdeps/sparc/sparc32/sparcv8/rem.S
index 061e80093c..a2694e699e 100644
--- a/sysdeps/sparc/sparc32/sparcv8/rem.S
+++ b/sysdeps/sparc/sparc32/sparcv8/rem.S
@@ -8,6 +8,9 @@ ENTRY(.rem)
 
 	sra	%o0, 31, %o2
 	wr	%o2, 0, %y
+	nop
+	nop
+	nop
 	sdivcc	%o0, %o1, %o2
 	bvs,a	1f
 	 xnor	%o2, %g0, %o2
diff --git a/sysdeps/sparc/sparc32/sparcv8/sdiv.S b/sysdeps/sparc/sparc32/sparcv8/sdiv.S
index 81c3ac1c97..bfc4acf2fa 100644
--- a/sysdeps/sparc/sparc32/sparcv8/sdiv.S
+++ b/sysdeps/sparc/sparc32/sparcv8/sdiv.S
@@ -8,7 +8,13 @@ ENTRY(.div)
 
 	sra	%o0, 31, %o2
 	wr	%o2, 0, %y
-	ret
-	 sdiv	%o0, %o1, %o0
+	nop
+	nop
+	nop
+	sdivcc	%o0, %o1, %o0
+	bvs,a	1f
+	 xnor	%o0, %g0, %o0
+1:	retl
+	 nop
 
 END(.div)
diff --git a/sysdeps/sparc/sparc32/sparcv8/udiv.S b/sysdeps/sparc/sparc32/sparcv8/udiv.S
index 4e3cddc63f..d71954351e 100644
--- a/sysdeps/sparc/sparc32/sparcv8/udiv.S
+++ b/sysdeps/sparc/sparc32/sparcv8/udiv.S
@@ -7,6 +7,8 @@
 ENTRY(.udiv)
 
 	wr	%g0, 0, %y
+	nop
+	nop
 	retl
 	 udiv	%o0, %o1, %o0
 
diff --git a/sysdeps/sparc/sparc32/sparcv8/urem.S b/sysdeps/sparc/sparc32/sparcv8/urem.S
index 81e123f3da..cc2689d514 100644
--- a/sysdeps/sparc/sparc32/sparcv8/urem.S
+++ b/sysdeps/sparc/sparc32/sparcv8/urem.S
@@ -7,6 +7,9 @@
 ENTRY(.urem)
 
 	wr	%g0, 0, %y
+	nop
+	nop
+	nop
 	udiv	%o0, %o1, %o2
 	umul	%o2, %o1, %o2
 	retl