about summary refs log tree commit diff
path: root/sysdeps/sparc/sparc32/sparcv8/sdiv.S
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/sparc/sparc32/sparcv8/sdiv.S')
-rw-r--r--sysdeps/sparc/sparc32/sparcv8/sdiv.S14
1 files changed, 14 insertions, 0 deletions
diff --git a/sysdeps/sparc/sparc32/sparcv8/sdiv.S b/sysdeps/sparc/sparc32/sparcv8/sdiv.S
new file mode 100644
index 0000000000..81c3ac1c97
--- /dev/null
+++ b/sysdeps/sparc/sparc32/sparcv8/sdiv.S
@@ -0,0 +1,14 @@
+/*
+ * Sparc v8 has divide.
+ */
+
+#include <sysdep.h>
+
+ENTRY(.div)
+
+	sra	%o0, 31, %o2
+	wr	%o2, 0, %y
+	ret
+	 sdiv	%o0, %o1, %o0
+
+END(.div)