BSD 4_3_Tahoe development
[unix-history] / usr / src / sys / tahoealign / Awrite_quad.c
CommitLineData
c8cccbb7
C
1/* Awrite_quad.c 1.1 86/07/20 */
2
3#include "../tahoealign/align.h"
4
5write_quadword (infop, qword, where)
6process_info *infop;
7quadword qword;
8struct oprnd *where;
9/*
10/* Put the quadword at the given address in memory.
11/*
12/*
13/**************************************************/
14{
15 if (! (where->mode & W)) exception(infop, ILL_ADDRMOD);
16 switch (where->mode & ADDFIELD) /* Mask out R/W bits */
17 {
18 case Add:
19 put_longword (infop, qword.high, where->address);
20 where->address += 4;
21 put_longword (infop, qword.low, where->address);
22 break;
23 case Dir:
24 if ( where->reg_number >= SPOINTER || (where->reg_number & 1) == 1 )
25 exception (infop, ILL_OPRND);
26 Replace (infop, where->reg_number, qword.high);
27 Replace (infop, where->reg_number+1, qword.low);
28 break;
29 case SPmode:
30 exception(infop, ILL_ADDRMOD);
31 break;
32 default:
33 printf("Unknown destination in write_quad (alignment code)\n");
34 };
35}