xref: /csrg-svn/sys/tahoe/align/Ashal.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  *	@(#)Ashal.c	7.1 (Berkeley) 12/06/90
11*45760Sbostic  */
1229631Ssam 
1345699Sbostic #include "align.h"
shal(infop)1429631Ssam shal(infop)	process_info *infop;
1529631Ssam /*
1629631Ssam /*	Shift arithmetic left (longword).
1729631Ssam /*	Checks for overflow.
1829631Ssam /*
1929631Ssam /*******************************/
2029631Ssam {
2129631Ssam 	register	long	Register_12;	/* Has to be first reg ! */
2229631Ssam 	register	long	Register_11;
2329631Ssam 	register	long	Register_10;
2429631Ssam 
2529631Ssam 	Register_12 = operand(infop,0)->data;
2629631Ssam 	Register_11 = operand(infop,1)->data;
2729631Ssam 	Register_10=psl;
2829631Ssam 	Set_psl(r10);	/* restore the user psl */
2929631Ssam 	asm ("	shal	r12,r11,r10");
3029631Ssam 	asm ("	movpsl	r12");
3129631Ssam 	New_cc (Register_12);
3229631Ssam 	write_back (infop, Register_10, operand(infop,2));
3329631Ssam }
34