xref: /csrg-svn/sys/tahoe/align/Awrite_long.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  *	@(#)Awrite_long.c	7.1 (Berkeley) 12/06/90
11*45760Sbostic  */
1229642Ssam 
1345699Sbostic #include	"align.h"
1429642Ssam 
write_longword(infop,longword,where)1529642Ssam write_longword (infop, longword, where)
1629642Ssam process_info	*infop;
1729642Ssam long		longword;
1829642Ssam struct oprnd 	*where;
1929642Ssam /*
2029642Ssam /*	Put the longword at the given address in
2129642Ssam /*	tahoe's memory.
2229642Ssam /*
2329642Ssam /**************************************************/
2429642Ssam {
2529642Ssam 	if (! (where->mode & W)) exception(infop, ILL_ADDRMOD);
2629642Ssam 	switch (where->mode & ADDFIELD)	/* Mask out R/W bits */
2729642Ssam 	{
2829642Ssam 	case Add:
2929642Ssam 	case SPmode:
3029642Ssam 		put_longword (infop, longword, where->address);
3129642Ssam 		break;
3229642Ssam 	case Dir:
3329642Ssam 		Replace (infop, where->reg_number, longword);
3429642Ssam 		break;
3529642Ssam 	default:
3629642Ssam 		printf("Unknown destination in write_long (alignment code)\n");
3729642Ssam 	};
3829642Ssam }
39