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_quad.c 7.1 (Berkeley) 12/06/90
11*45760Sbostic */
1229643Ssam
1345699Sbostic #include "align.h"
1429643Ssam
write_quadword(infop,qword,where)1529643Ssam write_quadword (infop, qword, where)
1629643Ssam process_info *infop;
1729643Ssam quadword qword;
1829643Ssam struct oprnd *where;
1929643Ssam /*
2029643Ssam /* Put the quadword at the given address in memory.
2129643Ssam /*
2229643Ssam /*
2329643Ssam /**************************************************/
2429643Ssam {
2529643Ssam if (! (where->mode & W)) exception(infop, ILL_ADDRMOD);
2629643Ssam switch (where->mode & ADDFIELD) /* Mask out R/W bits */
2729643Ssam {
2829643Ssam case Add:
2929643Ssam put_longword (infop, qword.high, where->address);
3029643Ssam where->address += 4;
3129643Ssam put_longword (infop, qword.low, where->address);
3229643Ssam break;
3329643Ssam case Dir:
3429643Ssam if ( where->reg_number >= SPOINTER || (where->reg_number & 1) == 1 )
3529643Ssam exception (infop, ILL_OPRND);
3629643Ssam Replace (infop, where->reg_number, qword.high);
3729643Ssam Replace (infop, where->reg_number+1, qword.low);
3829643Ssam break;
3929643Ssam case SPmode:
4029643Ssam exception(infop, ILL_ADDRMOD);
4129643Ssam break;
4229643Ssam default:
4329643Ssam printf("Unknown destination in write_quad (alignment code)\n");
4429643Ssam };
4529643Ssam }
46