aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/sparc/sparc32/sparcv9
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/sparc/sparc32/sparcv9')
-rw-r--r--sysdeps/sparc/sparc32/sparcv9/Makefile1
-rw-r--r--sysdeps/sparc/sparc32/sparcv9/bcopy.c1
-rw-r--r--sysdeps/sparc/sparc32/sparcv9/bzero.c1
-rw-r--r--sysdeps/sparc/sparc32/sparcv9/dotmul.S17
-rw-r--r--sysdeps/sparc/sparc32/sparcv9/memchr.S4
-rw-r--r--sysdeps/sparc/sparc32/sparcv9/memcmp.S4
-rw-r--r--sysdeps/sparc/sparc32/sparcv9/memcpy.S4
-rw-r--r--sysdeps/sparc/sparc32/sparcv9/memset.S4
-rw-r--r--sysdeps/sparc/sparc32/sparcv9/rem.S22
-rw-r--r--sysdeps/sparc/sparc32/sparcv9/sdiv.S20
-rw-r--r--sysdeps/sparc/sparc32/sparcv9/stpcpy.S4
-rw-r--r--sysdeps/sparc/sparc32/sparcv9/stpncpy.S4
-rw-r--r--sysdeps/sparc/sparc32/sparcv9/strcat.S4
-rw-r--r--sysdeps/sparc/sparc32/sparcv9/strchr.S4
-rw-r--r--sysdeps/sparc/sparc32/sparcv9/strcmp.S4
-rw-r--r--sysdeps/sparc/sparc32/sparcv9/strcpy.S4
-rw-r--r--sysdeps/sparc/sparc32/sparcv9/strcspn.S4
-rw-r--r--sysdeps/sparc/sparc32/sparcv9/strlen.S4
-rw-r--r--sysdeps/sparc/sparc32/sparcv9/strncmp.S4
-rw-r--r--sysdeps/sparc/sparc32/sparcv9/strncpy.S4
-rw-r--r--sysdeps/sparc/sparc32/sparcv9/strpbrk.S4
-rw-r--r--sysdeps/sparc/sparc32/sparcv9/strrchr.c1
-rw-r--r--sysdeps/sparc/sparc32/sparcv9/strspn.S4
-rw-r--r--sysdeps/sparc/sparc32/sparcv9/udiv.S17
-rw-r--r--sysdeps/sparc/sparc32/sparcv9/umul.S17
-rw-r--r--sysdeps/sparc/sparc32/sparcv9/urem.S19
26 files changed, 180 insertions, 0 deletions
diff --git a/sysdeps/sparc/sparc32/sparcv9/Makefile b/sysdeps/sparc/sparc32/sparcv9/Makefile
new file mode 100644
index 0000000000..00675fd671
--- /dev/null
+++ b/sysdeps/sparc/sparc32/sparcv9/Makefile
@@ -0,0 +1 @@
+CFLAGS += -mv8 -mtune=ultrasparc
diff --git a/sysdeps/sparc/sparc32/sparcv9/bcopy.c b/sysdeps/sparc/sparc32/sparcv9/bcopy.c
new file mode 100644
index 0000000000..9a455f33c4
--- /dev/null
+++ b/sysdeps/sparc/sparc32/sparcv9/bcopy.c
@@ -0,0 +1 @@
+/* bcopy is in memcpy.S */
diff --git a/sysdeps/sparc/sparc32/sparcv9/bzero.c b/sysdeps/sparc/sparc32/sparcv9/bzero.c
new file mode 100644
index 0000000000..37f0f6f993
--- /dev/null
+++ b/sysdeps/sparc/sparc32/sparcv9/bzero.c
@@ -0,0 +1 @@
+/* bzero is in memset.S */
diff --git a/sysdeps/sparc/sparc32/sparcv9/dotmul.S b/sysdeps/sparc/sparc32/sparcv9/dotmul.S
new file mode 100644
index 0000000000..811cf1e89e
--- /dev/null
+++ b/sysdeps/sparc/sparc32/sparcv9/dotmul.S
@@ -0,0 +1,17 @@
+/*
+ * Sparc v9 has multiply.
+ */
+
+#include <sysdep.h>
+
+ .text
+ .align 32
+ENTRY(.mul)
+
+ sra %o0, 0, %o0
+ sra %o1, 0, %o1
+ mulx %o0, %o1, %o0
+ retl
+ srax %o0, 32, %o1
+
+END(.mul)
diff --git a/sysdeps/sparc/sparc32/sparcv9/memchr.S b/sysdeps/sparc/sparc32/sparcv9/memchr.S
new file mode 100644
index 0000000000..c5dfbef184
--- /dev/null
+++ b/sysdeps/sparc/sparc32/sparcv9/memchr.S
@@ -0,0 +1,4 @@
+#define ASI_PNF 0x82
+#define ASI_BLK_P 0xf0
+#define XCC icc
+#include <sparc64/memchr.S>
diff --git a/sysdeps/sparc/sparc32/sparcv9/memcmp.S b/sysdeps/sparc/sparc32/sparcv9/memcmp.S
new file mode 100644
index 0000000000..44878f4486
--- /dev/null
+++ b/sysdeps/sparc/sparc32/sparcv9/memcmp.S
@@ -0,0 +1,4 @@
+#define ASI_PNF 0x82
+#define ASI_BLK_P 0xf0
+#define XCC icc
+#include <sparc64/memcmp.S>
diff --git a/sysdeps/sparc/sparc32/sparcv9/memcpy.S b/sysdeps/sparc/sparc32/sparcv9/memcpy.S
new file mode 100644
index 0000000000..675ec496b9
--- /dev/null
+++ b/sysdeps/sparc/sparc32/sparcv9/memcpy.S
@@ -0,0 +1,4 @@
+#define ASI_PNF 0x82
+#define ASI_BLK_P 0xf0
+#define XCC icc
+#include <sparc64/memcpy.S>
diff --git a/sysdeps/sparc/sparc32/sparcv9/memset.S b/sysdeps/sparc/sparc32/sparcv9/memset.S
new file mode 100644
index 0000000000..ac67b7ab7c
--- /dev/null
+++ b/sysdeps/sparc/sparc32/sparcv9/memset.S
@@ -0,0 +1,4 @@
+#define ASI_PNF 0x82
+#define ASI_BLK_P 0xf0
+#define XCC icc
+#include <sparc64/memset.S>
diff --git a/sysdeps/sparc/sparc32/sparcv9/rem.S b/sysdeps/sparc/sparc32/sparcv9/rem.S
new file mode 100644
index 0000000000..5385bd8305
--- /dev/null
+++ b/sysdeps/sparc/sparc32/sparcv9/rem.S
@@ -0,0 +1,22 @@
+/*
+ * Sparc v9 has divide.
+ * As divx takes 68 cycles and sdivcc only 36,
+ * we use sdivcc eventhough it is deprecated.
+ */
+
+#include <sysdep.h>
+
+ .text
+ .align 32
+ENTRY(.rem)
+
+ sra %o0, 31, %o2
+ wr %o2, 0, %y
+ sdivcc %o0, %o1, %o2
+ xnor %o2, %g0, %o3
+ movvs %icc, %o3, %o2
+ smul %o2, %o1, %o2
+ retl
+ sub %o0, %o2, %o0
+
+END(.rem)
diff --git a/sysdeps/sparc/sparc32/sparcv9/sdiv.S b/sysdeps/sparc/sparc32/sparcv9/sdiv.S
new file mode 100644
index 0000000000..d765514cea
--- /dev/null
+++ b/sysdeps/sparc/sparc32/sparcv9/sdiv.S
@@ -0,0 +1,20 @@
+/*
+ * Sparc v9 has divide.
+ * As divx takes 68 cycles and sdivcc only 36,
+ * we use sdivcc eventhough it is deprecated.
+ */
+
+#include <sysdep.h>
+
+ .text
+ .align 32
+ENTRY(.div)
+
+ sra %o0, 31, %o2
+ wr %o2, 0, %y
+ sdivcc %o0, %o1, %o0
+ xnor %o0, %g0, %o2
+ retl
+ movvs %icc, %o2, %o0
+
+END(.div)
diff --git a/sysdeps/sparc/sparc32/sparcv9/stpcpy.S b/sysdeps/sparc/sparc32/sparcv9/stpcpy.S
new file mode 100644
index 0000000000..440ad7e215
--- /dev/null
+++ b/sysdeps/sparc/sparc32/sparcv9/stpcpy.S
@@ -0,0 +1,4 @@
+#define ASI_PNF 0x82
+#define ASI_BLK_P 0xf0
+#define XCC icc
+#include <sparc64/stpcpy.S>
diff --git a/sysdeps/sparc/sparc32/sparcv9/stpncpy.S b/sysdeps/sparc/sparc32/sparcv9/stpncpy.S
new file mode 100644
index 0000000000..124136a0b2
--- /dev/null
+++ b/sysdeps/sparc/sparc32/sparcv9/stpncpy.S
@@ -0,0 +1,4 @@
+#define ASI_PNF 0x82
+#define ASI_BLK_P 0xf0
+#define XCC icc
+#include <sparc64/stpncpy.S>
diff --git a/sysdeps/sparc/sparc32/sparcv9/strcat.S b/sysdeps/sparc/sparc32/sparcv9/strcat.S
new file mode 100644
index 0000000000..7a22235703
--- /dev/null
+++ b/sysdeps/sparc/sparc32/sparcv9/strcat.S
@@ -0,0 +1,4 @@
+#define ASI_PNF 0x82
+#define ASI_BLK_P 0xf0
+#define XCC icc
+#include <sparc64/strcat.S>
diff --git a/sysdeps/sparc/sparc32/sparcv9/strchr.S b/sysdeps/sparc/sparc32/sparcv9/strchr.S
new file mode 100644
index 0000000000..ddd32120d4
--- /dev/null
+++ b/sysdeps/sparc/sparc32/sparcv9/strchr.S
@@ -0,0 +1,4 @@
+#define ASI_PNF 0x82
+#define ASI_BLK_P 0xf0
+#define XCC icc
+#include <sparc64/strchr.S>
diff --git a/sysdeps/sparc/sparc32/sparcv9/strcmp.S b/sysdeps/sparc/sparc32/sparcv9/strcmp.S
new file mode 100644
index 0000000000..5330f4359b
--- /dev/null
+++ b/sysdeps/sparc/sparc32/sparcv9/strcmp.S
@@ -0,0 +1,4 @@
+#define ASI_PNF 0x82
+#define ASI_BLK_P 0xf0
+#define XCC icc
+#include <sparc64/strcmp.S>
diff --git a/sysdeps/sparc/sparc32/sparcv9/strcpy.S b/sysdeps/sparc/sparc32/sparcv9/strcpy.S
new file mode 100644
index 0000000000..0b35c9be08
--- /dev/null
+++ b/sysdeps/sparc/sparc32/sparcv9/strcpy.S
@@ -0,0 +1,4 @@
+#define ASI_PNF 0x82
+#define ASI_BLK_P 0xf0
+#define XCC icc
+#include <sparc64/strcpy.S>
diff --git a/sysdeps/sparc/sparc32/sparcv9/strcspn.S b/sysdeps/sparc/sparc32/sparcv9/strcspn.S
new file mode 100644
index 0000000000..f9d6beabe4
--- /dev/null
+++ b/sysdeps/sparc/sparc32/sparcv9/strcspn.S
@@ -0,0 +1,4 @@
+#define ASI_PNF 0x82
+#define ASI_BLK_P 0xf0
+#define XCC icc
+#include <sparc64/strcspn.S>
diff --git a/sysdeps/sparc/sparc32/sparcv9/strlen.S b/sysdeps/sparc/sparc32/sparcv9/strlen.S
new file mode 100644
index 0000000000..b8f4dba4f4
--- /dev/null
+++ b/sysdeps/sparc/sparc32/sparcv9/strlen.S
@@ -0,0 +1,4 @@
+#define ASI_PNF 0x82
+#define ASI_BLK_P 0xf0
+#define XCC icc
+#include <sparc64/strlen.S>
diff --git a/sysdeps/sparc/sparc32/sparcv9/strncmp.S b/sysdeps/sparc/sparc32/sparcv9/strncmp.S
new file mode 100644
index 0000000000..addd89e05b
--- /dev/null
+++ b/sysdeps/sparc/sparc32/sparcv9/strncmp.S
@@ -0,0 +1,4 @@
+#define ASI_PNF 0x82
+#define ASI_BLK_P 0xf0
+#define XCC icc
+#include <sparc64/strncmp.S>
diff --git a/sysdeps/sparc/sparc32/sparcv9/strncpy.S b/sysdeps/sparc/sparc32/sparcv9/strncpy.S
new file mode 100644
index 0000000000..688f9dfd65
--- /dev/null
+++ b/sysdeps/sparc/sparc32/sparcv9/strncpy.S
@@ -0,0 +1,4 @@
+#define ASI_PNF 0x82
+#define ASI_BLK_P 0xf0
+#define XCC icc
+#include <sparc64/strncpy.S>
diff --git a/sysdeps/sparc/sparc32/sparcv9/strpbrk.S b/sysdeps/sparc/sparc32/sparcv9/strpbrk.S
new file mode 100644
index 0000000000..62294c0af4
--- /dev/null
+++ b/sysdeps/sparc/sparc32/sparcv9/strpbrk.S
@@ -0,0 +1,4 @@
+#define ASI_PNF 0x82
+#define ASI_BLK_P 0xf0
+#define XCC icc
+#include <sparc64/strpbrk.S>
diff --git a/sysdeps/sparc/sparc32/sparcv9/strrchr.c b/sysdeps/sparc/sparc32/sparcv9/strrchr.c
new file mode 100644
index 0000000000..ec608d6ab3
--- /dev/null
+++ b/sysdeps/sparc/sparc32/sparcv9/strrchr.c
@@ -0,0 +1 @@
+/* strrchr is in strchr.S */
diff --git a/sysdeps/sparc/sparc32/sparcv9/strspn.S b/sysdeps/sparc/sparc32/sparcv9/strspn.S
new file mode 100644
index 0000000000..291e798085
--- /dev/null
+++ b/sysdeps/sparc/sparc32/sparcv9/strspn.S
@@ -0,0 +1,4 @@
+#define ASI_PNF 0x82
+#define ASI_BLK_P 0xf0
+#define XCC icc
+#include <sparc64/strspn.S>
diff --git a/sysdeps/sparc/sparc32/sparcv9/udiv.S b/sysdeps/sparc/sparc32/sparcv9/udiv.S
new file mode 100644
index 0000000000..de79899756
--- /dev/null
+++ b/sysdeps/sparc/sparc32/sparcv9/udiv.S
@@ -0,0 +1,17 @@
+/*
+ * Sparc v9 has divide.
+ * As divx takes 68 cycles and udiv only 37,
+ * we use udiv eventhough it is deprecated.
+ */
+
+#include <sysdep.h>
+
+ .text
+ .align 32
+ENTRY(.udiv)
+
+ wr %g0, 0, %y
+ retl
+ udiv %o0, %o1, %o0
+
+END(.udiv)
diff --git a/sysdeps/sparc/sparc32/sparcv9/umul.S b/sysdeps/sparc/sparc32/sparcv9/umul.S
new file mode 100644
index 0000000000..608b72aca1
--- /dev/null
+++ b/sysdeps/sparc/sparc32/sparcv9/umul.S
@@ -0,0 +1,17 @@
+/*
+ * Sparc v9 has multiply.
+ */
+
+#include <sysdep.h>
+
+ .text
+ .align 32
+ENTRY(.umul)
+
+ srl %o0, 0, %o0
+ srl %o1, 0, %o1
+ mulx %o0, %o1, %o0
+ retl
+ srlx %o0, 32, %o1
+
+END(.umul)
diff --git a/sysdeps/sparc/sparc32/sparcv9/urem.S b/sysdeps/sparc/sparc32/sparcv9/urem.S
new file mode 100644
index 0000000000..cab16c9193
--- /dev/null
+++ b/sysdeps/sparc/sparc32/sparcv9/urem.S
@@ -0,0 +1,19 @@
+/*
+ * Sparc v9 has divide.
+ * As divx takes 68 cycles and udiv only 37,
+ * we use udiv eventhough it is deprecated.
+ */
+
+#include <sysdep.h>
+
+ .text
+ .align 32
+ENTRY(.urem)
+
+ wr %g0, 0, %y
+ udiv %o0, %o1, %o2
+ umul %o2, %o1, %o2
+ retl
+ sub %o0, %o2, %o0
+
+END(.urem)