xref: /csrg-svn/sys/tahoe/align/Aloadr.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  *	@(#)Aloadr.c	7.1 (Berkeley) 12/06/90
11*45760Sbostic  */
1229615Ssam 
1345699Sbostic #include "align.h"
loadr(infop)1429615Ssam loadr(infop)	process_info *infop;
1529615Ssam /*
1629615Ssam /*	Load multiple registers.
1729615Ssam /*
1829615Ssam /***************************************/
1929615Ssam {
2029615Ssam 	register long mask, next_register, new_address;
2129615Ssam 
2229615Ssam 	mask = operand(infop,0)->data & 0x3fff;	/* Bits 0 to 13 only */
2329615Ssam 	new_address = operand(infop,1)->address;
2429615Ssam 	next_register = 0;				/* Register # */
2529615Ssam 	while (next_register <= 13)
2629615Ssam 	{
2729615Ssam 		if (mask & 1 << next_register)
2829615Ssam 		{
2929615Ssam 			Replace (infop, next_register,
3029615Ssam 				get_longword (infop, new_address));
3129615Ssam 			new_address += 4;
3229615Ssam 		}
3329615Ssam 		next_register++ ;
3429615Ssam 	}
3529615Ssam }
36