xref: /csrg-svn/sys/tahoe/align/Ashrq.c (revision 45699)
1*45699Sbostic /*	Ashrq.c	1.2	90/12/04	*/
229635Ssam 
3*45699Sbostic #include "align.h"
429635Ssam shrq(infop) 	process_info *infop;
529635Ssam /*
629635Ssam /*	Shift right quadword.
729635Ssam /*
829635Ssam /********************************/
929635Ssam {
1029635Ssam 	register	long	Register_12;	/* Has to be first reg ! */
1129635Ssam 	register 	long	Register_11;
1229635Ssam 	register 	long	Register_10;
1329635Ssam 	register	long	*Register_9;
1429635Ssam 	quadword	result;
1529635Ssam 
1629635Ssam 	Register_12 = operand(infop,0)->data;	/* Counter */
1729635Ssam 	Register_9 = &operand(infop,1)->data;	/* Source */
1829635Ssam 
1929635Ssam 	Register_10=psl;
2029635Ssam 	Set_psl(r10);	/* restore the user psl */
2129635Ssam 	asm ("	shrq	r12,(r9),r10");
2229635Ssam 	asm ("	movpsl	r12");
2329635Ssam 	New_cc (Register_12);
2429635Ssam 	result.high = Register_10;
2529635Ssam 	result.low  = Register_11;
2629635Ssam 	write_quadword (infop, result, operand(infop,2));
2729635Ssam }
28