summaryrefslogtreecommitdiff
path: root/libc/sysdeps/linux/sparc/sparcv8/sdiv.S
blob: 4ac901a7717be907a88a363aa8e04cdf7e26fe58 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
/*
 * Sparc v8 has divide.
 */

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)