File: rem.S

package info (click to toggle)
glibc 2.42-1
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 311,512 kB
  • sloc: ansic: 1,060,589; asm: 238,093; makefile: 20,928; python: 13,508; sh: 11,823; cpp: 5,188; awk: 1,794; perl: 317; yacc: 292; pascal: 182; sed: 19
file content (22 lines) | stat: -rw-r--r-- 340 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
/*
 * Sparc v9 has divide.
 * As divx takes 68 cycles and sdivcc only 36,
 * we use sdivcc even though it is deprecated.
 */

#include <sysdep.h>

	.text
	.align		32
ENTRY(.rem)

	sra		%o0, 31, %o2
	wr		%o2, 0, %y
	sdivcc		%o0, %o1, %o2
	xnor		%o2, %g0, %o3
	movvs		%icc, %o3, %o2
	smul		%o2, %o1, %o2
	retl
	 sub		%o0, %o2, %o0

END(.rem)