xref: /csrg-svn/sys/tahoe/align/Aediv.c (revision 45699)
1*45699Sbostic /*	Aediv.c	1.2	90/12/04	*/
229606Ssam 
3*45699Sbostic #include "align.h"
429606Ssam int	zzz1,zzz2,zzz3,zzz4,zzz5;
529606Ssam ediv(infop)	process_info *infop;
629606Ssam /*
729606Ssam /*	Extended precision division.
829606Ssam /*
929606Ssam /***************************************/
1029606Ssam {
1129606Ssam 	register long Register_12;	/* Has to be the first reg !! */
1229606Ssam 	register long Register_11;	/* remainder */
1329606Ssam 	register long Register_10;	/* quotient */
1429606Ssam 	register long Register_9;	/* divident least */
1529606Ssam 	register long Register_8;	/* divident most */
1629606Ssam 	register long Register_7;	/* divisor */
1729606Ssam 
1829606Ssam 	Register_7 = operand(infop, 0)->data;
1929606Ssam 	Register_8 = operand(infop, 1)->data;
2029606Ssam 	Register_9 = operand(infop, 1)->data2;
2129606Ssam 	Register_12=psl;
2229606Ssam 	Set_psl(r12);	/* restore the user psl */
2329606Ssam 	asm ("	ediv	r7,r8,r10,r11");
2429606Ssam 	asm ("	movpsl	r12");
2529606Ssam 	New_cc (Register_12);
2629606Ssam 	write_back (infop, Register_10, operand(infop, 2));
2729606Ssam 	write_back (infop, Register_11, operand(infop, 3));
2829606Ssam }
29