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.S10
1 files changed, 8 insertions, 2 deletions
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)