aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/sparc/sparc32/sdiv.S
blob: bfc4acf2faeb8a5ca44ea8ce15975a56fe9c86e2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
/*
 * Sparc v8 has divide.
 */

#include <sysdep.h>

ENTRY(.div)

	sra	%o0, 31, %o2
	wr	%o2, 0, %y
	nop
	nop
	nop
	sdivcc	%o0, %o1, %o0
	bvs,a	1f
	 xnor	%o0, %g0, %o0
1:	retl
	 nop

END(.div)