Pristine Ack-5.5
[Ack-5.5.git] / modules / src / em_opt / mkstrct.c
1 #ifndef NORCSID
2 static char rcsid3[] = "$Id: mkstrct.c,v 2.5 1994/06/24 11:14:14 ceriel Exp $";
3 #endif
4
5 #include "nopt.h"
6
7 void
8 EM_mkop(p,opcode)
9         register p_instr p;
10         int opcode;
11 {
12         p->em_type = EM_MNEM;
13         p->em_opcode = opcode;
14         p->em_argtype = 0;
15 }
16
17 void
18 EM_mknarg(p,opcode)
19         register p_instr p;
20         int opcode;
21 {
22         p->em_type = EM_MNEM;
23         p->em_opcode = opcode;
24         p->em_argtype = 0;
25         p->em_cst = 0;
26 }
27
28 void
29 EM_mkilb(p,opcode,lab)
30         register p_instr p;
31         int opcode;
32         label lab;
33 {
34         p->em_type = EM_MNEM;
35         p->em_argtype = ilb_ptyp;
36         p->em_opcode = opcode;
37         p->em_ilb = lab;
38 }
39
40 void
41 EM_mknof(p,opcode,lab,off)
42         register p_instr p;
43         int opcode;
44         label lab;
45         arith off;
46 {
47         p->em_type = EM_MNEM;
48         p->em_argtype = nof_ptyp;
49         p->em_opcode = opcode;
50         p->em_dlb = lab;
51         p->em_off = off;
52 }
53
54 void
55 EM_mksof(p,opcode,name,off)
56         register p_instr p;
57         int opcode;
58         char *name;
59         arith off;
60 {
61         p->em_type = EM_MNEM;
62         p->em_argtype = sof_ptyp;
63         p->em_opcode = opcode;
64         p->em_dnam = OO_freestr(name);
65         p->em_off = off;
66 }
67
68 void
69 EM_mkcst(p,opcode,cst)
70         register p_instr p;
71         int opcode;
72         arith cst;
73 {
74         p->em_type = EM_MNEM;
75         p->em_argtype = cst_ptyp;
76         p->em_opcode = opcode;
77         p->em_cst = cst;
78 }
79
80 void
81 EM_mkpro(p,opcode,pnam)
82         register p_instr p;
83         int opcode;
84         char *pnam;
85 {
86         p->em_type = EM_MNEM;
87         p->em_argtype = pro_ptyp;
88         p->em_opcode = opcode;
89         p->em_pnam = OO_freestr(pnam);
90 }
91
92 void
93 EM_mkdefilb(p,opcode,deflb)
94         register p_instr p;
95         int opcode;
96         label deflb;
97 {
98         p->em_type = EM_DEFILB;
99         p->em_opcode = opcode;
100         p->em_argtype = 0;
101         p->em_ilb = deflb;
102 }
103
104 void
105 EM_Nop(opcode)
106         int opcode;
107 {
108         register p_instr p = GETNXTPATT();
109         p->em_type = EM_MNEM;
110         p->em_opcode = opcode;
111         p->em_argtype = 0;
112 }
113
114 void
115 EM_Nnarg(opcode)
116         int opcode;
117 {
118         register p_instr p = GETNXTPATT();
119         p->em_type = EM_MNEM;
120         p->em_opcode = opcode;
121         p->em_argtype = 0;
122         p->em_cst = 0;
123 }
124
125 void
126 EM_Nilb(opcode,lab)
127         int opcode;
128         label lab;
129 {
130         register p_instr p = GETNXTPATT();
131         p->em_type = EM_MNEM;
132         p->em_argtype = ilb_ptyp;
133         p->em_opcode = opcode;
134         p->em_ilb = lab;
135 }
136
137 void
138 EM_Nnof(opcode,lab,off)
139         int opcode;
140         label lab;
141         arith off;
142 {
143         register p_instr p = GETNXTPATT();
144         p->em_type = EM_MNEM;
145         p->em_argtype = nof_ptyp;
146         p->em_opcode = opcode;
147         p->em_dlb = lab;
148         p->em_off = off;
149 }
150
151 void
152 EM_Nsof(opcode,name,off)
153         int opcode;
154         char *name;
155         arith off;
156 {
157         register p_instr p = GETNXTPATT();
158         p->em_type = EM_MNEM;
159         p->em_argtype = sof_ptyp;
160         p->em_opcode = opcode;
161         p->em_dnam = OO_freestr(name);
162         p->em_off = off;
163 }
164
165 void
166 EM_Ncst(opcode,cst)
167         int opcode;
168         arith cst;
169 {
170         register p_instr p = GETNXTPATT();
171         p->em_type = EM_MNEM;
172         p->em_argtype = cst_ptyp;
173         p->em_opcode = opcode;
174         p->em_cst = cst;
175 }
176
177 void
178 EM_Npro(opcode,pnam)
179         int opcode;
180         char *pnam;
181 {
182         register p_instr p = GETNXTPATT();
183         p->em_type = EM_MNEM;
184         p->em_argtype = pro_ptyp;
185         p->em_opcode = opcode;
186         p->em_pnam = OO_freestr(pnam);
187 }
188
189 void
190 EM_Ndefilb(opcode,deflb)
191         int opcode;
192         label deflb;
193 {
194         register p_instr p = GETNXTPATT();
195         p->em_type = EM_DEFILB;
196         p->em_opcode = opcode;
197         p->em_argtype = 0;
198         p->em_ilb = deflb;
199 }
200
201 void
202 EM_Rop(opcode)
203         int opcode;
204 {
205         register p_instr p = GETNXTREPL();
206         p->em_type = EM_MNEM;
207         p->em_opcode = opcode;
208         p->em_argtype = 0;
209 }
210
211 void
212 EM_Rnarg(opcode)
213         int opcode;
214 {
215         register p_instr p = GETNXTREPL();
216         p->em_type = EM_MNEM;
217         p->em_opcode = opcode;
218         p->em_argtype = 0;
219         p->em_cst = 0;
220 }
221
222 void
223 EM_Rilb(opcode,lab)
224         int opcode;
225         label lab;
226 {
227         register p_instr p = GETNXTREPL();
228         p->em_type = EM_MNEM;
229         p->em_argtype = ilb_ptyp;
230         p->em_opcode = opcode;
231         p->em_ilb = lab;
232 }
233
234 void
235 EM_Rnof(opcode,lab,off)
236         int opcode;
237         label lab;
238         arith off;
239 {
240         register p_instr p = GETNXTREPL();
241         p->em_type = EM_MNEM;
242         p->em_argtype = nof_ptyp;
243         p->em_opcode = opcode;
244         p->em_dlb = lab;
245         p->em_off = off;
246 }
247
248 void
249 EM_Rsof(opcode,name,off)
250         int opcode;
251         char *name;
252         arith off;
253 {
254         register p_instr p = GETNXTREPL();
255         p->em_type = EM_MNEM;
256         p->em_argtype = sof_ptyp;
257         p->em_opcode = opcode;
258         p->em_dnam = OO_freestr(name);
259         p->em_off = off;
260 }
261
262 void
263 EM_Rcst(opcode,cst)
264         int opcode;
265         arith cst;
266 {
267         register p_instr p = GETNXTREPL();
268         p->em_type = EM_MNEM;
269         p->em_argtype = cst_ptyp;
270         p->em_opcode = opcode;
271         p->em_cst = cst;
272 }
273
274 void
275 EM_Rpro(opcode,pnam)
276         int opcode;
277         char *pnam;
278 {
279         register p_instr p = GETNXTREPL();
280         p->em_type = EM_MNEM;
281         p->em_argtype = pro_ptyp;
282         p->em_opcode = opcode;
283         p->em_pnam = OO_freestr(pnam);
284 }
285
286 void
287 EM_Rdefilb(opcode,deflb)
288         int opcode;
289         label deflb;
290 {
291         register p_instr p = GETNXTREPL();
292         p->em_type = EM_DEFILB;
293         p->em_opcode = opcode;
294         p->em_argtype = 0;
295         p->em_ilb = deflb;
296 }