xref: /original-bsd/sys/tahoe/align/Ashrq.c (revision 7c3db03c)
1 /*-
2  * Copyright (c) 1986 The Regents of the University of California.
3  * All rights reserved.
4  *
5  * This code is derived from software contributed to Berkeley by
6  * Computer Consoles Inc.
7  *
8  * %sccs.include.redist.c%
9  *
10  *	@(#)Ashrq.c	7.1 (Berkeley) 12/06/90
11  */
12 
13 #include "align.h"
14 shrq(infop) 	process_info *infop;
15 /*
16 /*	Shift right quadword.
17 /*
18 /********************************/
19 {
20 	register	long	Register_12;	/* Has to be first reg ! */
21 	register 	long	Register_11;
22 	register 	long	Register_10;
23 	register	long	*Register_9;
24 	quadword	result;
25 
26 	Register_12 = operand(infop,0)->data;	/* Counter */
27 	Register_9 = &operand(infop,1)->data;	/* Source */
28 
29 	Register_10=psl;
30 	Set_psl(r10);	/* restore the user psl */
31 	asm ("	shrq	r12,(r9),r10");
32 	asm ("	movpsl	r12");
33 	New_cc (Register_12);
34 	result.high = Register_10;
35 	result.low  = Register_11;
36 	write_quadword (infop, result, operand(infop,2));
37 }
38