aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/sparc/sparc32/sparcv8/urem.S
blob: 81e123f3da1d7d47100ac37dce7dbfa5f61da71b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
/*
 * Sparc v8 has divide.
 */

#include <sysdep.h>

ENTRY(.urem)

	wr	%g0, 0, %y
	udiv	%o0, %o1, %o2
	umul	%o2, %o1, %o2
	retl
	 sub	%o0, %o2, %o0

END(.urem)