xref: /csrg-svn/sys/tahoe/align/Ashrq.c (revision 45760)
1*45760Sbostic /*-
2*45760Sbostic  * Copyright (c) 1986 The Regents of the University of California.
3*45760Sbostic  * All rights reserved.
4*45760Sbostic  *
5*45760Sbostic  * This code is derived from software contributed to Berkeley by
6*45760Sbostic  * Computer Consoles Inc.
7*45760Sbostic  *
8*45760Sbostic  * %sccs.include.redist.c%
9*45760Sbostic  *
10*45760Sbostic  *	@(#)Ashrq.c	7.1 (Berkeley) 12/06/90
11*45760Sbostic  */
1229635Ssam 
1345699Sbostic #include "align.h"
shrq(infop)1429635Ssam shrq(infop) 	process_info *infop;
1529635Ssam /*
1629635Ssam /*	Shift right quadword.
1729635Ssam /*
1829635Ssam /********************************/
1929635Ssam {
2029635Ssam 	register	long	Register_12;	/* Has to be first reg ! */
2129635Ssam 	register 	long	Register_11;
2229635Ssam 	register 	long	Register_10;
2329635Ssam 	register	long	*Register_9;
2429635Ssam 	quadword	result;
2529635Ssam 
2629635Ssam 	Register_12 = operand(infop,0)->data;	/* Counter */
2729635Ssam 	Register_9 = &operand(infop,1)->data;	/* Source */
2829635Ssam 
2929635Ssam 	Register_10=psl;
3029635Ssam 	Set_psl(r10);	/* restore the user psl */
3129635Ssam 	asm ("	shrq	r12,(r9),r10");
3229635Ssam 	asm ("	movpsl	r12");
3329635Ssam 	New_cc (Register_12);
3429635Ssam 	result.high = Register_10;
3529635Ssam 	result.low  = Register_11;
3629635Ssam 	write_quadword (infop, result, operand(infop,2));
3729635Ssam }
38