import gdb-1999-08-30 snapshot
[deliverable/binutils-gdb.git] / sim / i960 / sem.c
1 /* Simulator instruction semantics for i960base.
2
3 THIS FILE IS MACHINE GENERATED WITH CGEN.
4
5 Copyright (C) 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
6
7 This file is part of the GNU Simulators.
8
9 This program is free software; you can redistribute it and/or modify
10 it under the terms of the GNU General Public License as published by
11 the Free Software Foundation; either version 2, or (at your option)
12 any later version.
13
14 This program is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 GNU General Public License for more details.
18
19 You should have received a copy of the GNU General Public License along
20 with this program; if not, write to the Free Software Foundation, Inc.,
21 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
22
23 */
24
25 #define WANT_CPU i960base
26 #define WANT_CPU_I960BASE
27
28 #include "sim-main.h"
29 #include "cgen-mem.h"
30 #include "cgen-ops.h"
31
32 #undef GET_ATTR
33 #define GET_ATTR(cpu, num, attr) CGEN_ATTR_VALUE (NULL, abuf->idesc->attrs, CGEN_INSN_##attr)
34
35 /* This is used so that we can compile two copies of the semantic code,
36 one with full feature support and one without that runs fast(er).
37 FAST_P, when desired, is defined on the command line, -DFAST_P=1. */
38 #if FAST_P
39 #define SEM_FN_NAME(cpu,fn) XCONCAT3 (cpu,_semf_,fn)
40 #undef TRACE_RESULT
41 #define TRACE_RESULT(cpu, abuf, name, type, val)
42 #else
43 #define SEM_FN_NAME(cpu,fn) XCONCAT3 (cpu,_sem_,fn)
44 #endif
45
46 /* x-invalid: --invalid-- */
47
48 static SEM_PC
49 SEM_FN_NAME (i960base,x_invalid) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
50 {
51 #define FLD(f) abuf->fields.fmt_empty.f
52 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
53 int UNUSED written = 0;
54 IADDR UNUSED pc = abuf->addr;
55 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 0);
56
57 {
58 #if WITH_SCACHE
59 /* Update the recorded pc in the cpu state struct. */
60 SET_H_PC (pc);
61 #endif
62 sim_engine_invalid_insn (current_cpu, pc);
63 sim_io_error (CPU_STATE (current_cpu), "invalid insn not handled\n");
64 /* NOTREACHED */
65 }
66
67 return vpc;
68 #undef FLD
69 }
70
71 /* x-after: --after-- */
72
73 static SEM_PC
74 SEM_FN_NAME (i960base,x_after) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
75 {
76 #define FLD(f) abuf->fields.fmt_empty.f
77 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
78 int UNUSED written = 0;
79 IADDR UNUSED pc = abuf->addr;
80 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 0);
81
82 {
83 #if WITH_SCACHE_PBB_I960BASE
84 i960base_pbb_after (current_cpu, sem_arg);
85 #endif
86 }
87
88 return vpc;
89 #undef FLD
90 }
91
92 /* x-before: --before-- */
93
94 static SEM_PC
95 SEM_FN_NAME (i960base,x_before) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
96 {
97 #define FLD(f) abuf->fields.fmt_empty.f
98 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
99 int UNUSED written = 0;
100 IADDR UNUSED pc = abuf->addr;
101 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 0);
102
103 {
104 #if WITH_SCACHE_PBB_I960BASE
105 i960base_pbb_before (current_cpu, sem_arg);
106 #endif
107 }
108
109 return vpc;
110 #undef FLD
111 }
112
113 /* x-cti-chain: --cti-chain-- */
114
115 static SEM_PC
116 SEM_FN_NAME (i960base,x_cti_chain) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
117 {
118 #define FLD(f) abuf->fields.fmt_empty.f
119 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
120 int UNUSED written = 0;
121 IADDR UNUSED pc = abuf->addr;
122 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 0);
123
124 {
125 #if WITH_SCACHE_PBB_I960BASE
126 #ifdef DEFINE_SWITCH
127 vpc = i960base_pbb_cti_chain (current_cpu, sem_arg,
128 pbb_br_type, pbb_br_npc);
129 BREAK (sem);
130 #else
131 /* FIXME: Allow provision of explicit ifmt spec in insn spec. */
132 vpc = i960base_pbb_cti_chain (current_cpu, sem_arg,
133 CPU_PBB_BR_TYPE (current_cpu),
134 CPU_PBB_BR_NPC (current_cpu));
135 #endif
136 #endif
137 }
138
139 return vpc;
140 #undef FLD
141 }
142
143 /* x-chain: --chain-- */
144
145 static SEM_PC
146 SEM_FN_NAME (i960base,x_chain) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
147 {
148 #define FLD(f) abuf->fields.fmt_empty.f
149 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
150 int UNUSED written = 0;
151 IADDR UNUSED pc = abuf->addr;
152 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 0);
153
154 {
155 #if WITH_SCACHE_PBB_I960BASE
156 vpc = i960base_pbb_chain (current_cpu, sem_arg);
157 #ifdef DEFINE_SWITCH
158 BREAK (sem);
159 #endif
160 #endif
161 }
162
163 return vpc;
164 #undef FLD
165 }
166
167 /* x-begin: --begin-- */
168
169 static SEM_PC
170 SEM_FN_NAME (i960base,x_begin) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
171 {
172 #define FLD(f) abuf->fields.fmt_empty.f
173 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
174 int UNUSED written = 0;
175 IADDR UNUSED pc = abuf->addr;
176 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 0);
177
178 {
179 #if WITH_SCACHE_PBB_I960BASE
180 #ifdef DEFINE_SWITCH
181 /* In the switch case FAST_P is a constant, allowing several optimizations
182 in any called inline functions. */
183 vpc = i960base_pbb_begin (current_cpu, FAST_P);
184 #else
185 vpc = i960base_pbb_begin (current_cpu, STATE_RUN_FAST_P (CPU_STATE (current_cpu)));
186 #endif
187 #endif
188 }
189
190 return vpc;
191 #undef FLD
192 }
193
194 /* mulo: mulo $src1, $src2, $dst */
195
196 static SEM_PC
197 SEM_FN_NAME (i960base,mulo) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
198 {
199 #define FLD(f) abuf->fields.sfmt_emul.f
200 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
201 int UNUSED written = 0;
202 IADDR UNUSED pc = abuf->addr;
203 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
204
205 {
206 SI opval = MULSI (* FLD (i_src1), * FLD (i_src2));
207 * FLD (i_dst) = opval;
208 TRACE_RESULT (current_cpu, abuf, "dst", 'x', opval);
209 }
210
211 return vpc;
212 #undef FLD
213 }
214
215 /* mulo1: mulo $lit1, $src2, $dst */
216
217 static SEM_PC
218 SEM_FN_NAME (i960base,mulo1) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
219 {
220 #define FLD(f) abuf->fields.sfmt_emul1.f
221 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
222 int UNUSED written = 0;
223 IADDR UNUSED pc = abuf->addr;
224 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
225
226 {
227 SI opval = MULSI (FLD (f_src1), * FLD (i_src2));
228 * FLD (i_dst) = opval;
229 TRACE_RESULT (current_cpu, abuf, "dst", 'x', opval);
230 }
231
232 return vpc;
233 #undef FLD
234 }
235
236 /* mulo2: mulo $src1, $lit2, $dst */
237
238 static SEM_PC
239 SEM_FN_NAME (i960base,mulo2) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
240 {
241 #define FLD(f) abuf->fields.sfmt_emul2.f
242 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
243 int UNUSED written = 0;
244 IADDR UNUSED pc = abuf->addr;
245 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
246
247 {
248 SI opval = MULSI (* FLD (i_src1), FLD (f_src2));
249 * FLD (i_dst) = opval;
250 TRACE_RESULT (current_cpu, abuf, "dst", 'x', opval);
251 }
252
253 return vpc;
254 #undef FLD
255 }
256
257 /* mulo3: mulo $lit1, $lit2, $dst */
258
259 static SEM_PC
260 SEM_FN_NAME (i960base,mulo3) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
261 {
262 #define FLD(f) abuf->fields.sfmt_emul3.f
263 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
264 int UNUSED written = 0;
265 IADDR UNUSED pc = abuf->addr;
266 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
267
268 {
269 SI opval = MULSI (FLD (f_src1), FLD (f_src2));
270 * FLD (i_dst) = opval;
271 TRACE_RESULT (current_cpu, abuf, "dst", 'x', opval);
272 }
273
274 return vpc;
275 #undef FLD
276 }
277
278 /* remo: remo $src1, $src2, $dst */
279
280 static SEM_PC
281 SEM_FN_NAME (i960base,remo) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
282 {
283 #define FLD(f) abuf->fields.sfmt_emul.f
284 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
285 int UNUSED written = 0;
286 IADDR UNUSED pc = abuf->addr;
287 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
288
289 {
290 SI opval = UMODSI (* FLD (i_src2), * FLD (i_src1));
291 * FLD (i_dst) = opval;
292 TRACE_RESULT (current_cpu, abuf, "dst", 'x', opval);
293 }
294
295 return vpc;
296 #undef FLD
297 }
298
299 /* remo1: remo $lit1, $src2, $dst */
300
301 static SEM_PC
302 SEM_FN_NAME (i960base,remo1) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
303 {
304 #define FLD(f) abuf->fields.sfmt_emul1.f
305 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
306 int UNUSED written = 0;
307 IADDR UNUSED pc = abuf->addr;
308 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
309
310 {
311 SI opval = UMODSI (* FLD (i_src2), FLD (f_src1));
312 * FLD (i_dst) = opval;
313 TRACE_RESULT (current_cpu, abuf, "dst", 'x', opval);
314 }
315
316 return vpc;
317 #undef FLD
318 }
319
320 /* remo2: remo $src1, $lit2, $dst */
321
322 static SEM_PC
323 SEM_FN_NAME (i960base,remo2) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
324 {
325 #define FLD(f) abuf->fields.sfmt_emul2.f
326 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
327 int UNUSED written = 0;
328 IADDR UNUSED pc = abuf->addr;
329 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
330
331 {
332 SI opval = UMODSI (FLD (f_src2), * FLD (i_src1));
333 * FLD (i_dst) = opval;
334 TRACE_RESULT (current_cpu, abuf, "dst", 'x', opval);
335 }
336
337 return vpc;
338 #undef FLD
339 }
340
341 /* remo3: remo $lit1, $lit2, $dst */
342
343 static SEM_PC
344 SEM_FN_NAME (i960base,remo3) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
345 {
346 #define FLD(f) abuf->fields.sfmt_emul3.f
347 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
348 int UNUSED written = 0;
349 IADDR UNUSED pc = abuf->addr;
350 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
351
352 {
353 SI opval = UMODSI (FLD (f_src2), FLD (f_src1));
354 * FLD (i_dst) = opval;
355 TRACE_RESULT (current_cpu, abuf, "dst", 'x', opval);
356 }
357
358 return vpc;
359 #undef FLD
360 }
361
362 /* divo: divo $src1, $src2, $dst */
363
364 static SEM_PC
365 SEM_FN_NAME (i960base,divo) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
366 {
367 #define FLD(f) abuf->fields.sfmt_emul.f
368 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
369 int UNUSED written = 0;
370 IADDR UNUSED pc = abuf->addr;
371 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
372
373 {
374 SI opval = UDIVSI (* FLD (i_src2), * FLD (i_src1));
375 * FLD (i_dst) = opval;
376 TRACE_RESULT (current_cpu, abuf, "dst", 'x', opval);
377 }
378
379 return vpc;
380 #undef FLD
381 }
382
383 /* divo1: divo $lit1, $src2, $dst */
384
385 static SEM_PC
386 SEM_FN_NAME (i960base,divo1) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
387 {
388 #define FLD(f) abuf->fields.sfmt_emul1.f
389 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
390 int UNUSED written = 0;
391 IADDR UNUSED pc = abuf->addr;
392 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
393
394 {
395 SI opval = UDIVSI (* FLD (i_src2), FLD (f_src1));
396 * FLD (i_dst) = opval;
397 TRACE_RESULT (current_cpu, abuf, "dst", 'x', opval);
398 }
399
400 return vpc;
401 #undef FLD
402 }
403
404 /* divo2: divo $src1, $lit2, $dst */
405
406 static SEM_PC
407 SEM_FN_NAME (i960base,divo2) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
408 {
409 #define FLD(f) abuf->fields.sfmt_emul2.f
410 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
411 int UNUSED written = 0;
412 IADDR UNUSED pc = abuf->addr;
413 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
414
415 {
416 SI opval = UDIVSI (FLD (f_src2), * FLD (i_src1));
417 * FLD (i_dst) = opval;
418 TRACE_RESULT (current_cpu, abuf, "dst", 'x', opval);
419 }
420
421 return vpc;
422 #undef FLD
423 }
424
425 /* divo3: divo $lit1, $lit2, $dst */
426
427 static SEM_PC
428 SEM_FN_NAME (i960base,divo3) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
429 {
430 #define FLD(f) abuf->fields.sfmt_emul3.f
431 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
432 int UNUSED written = 0;
433 IADDR UNUSED pc = abuf->addr;
434 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
435
436 {
437 SI opval = UDIVSI (FLD (f_src2), FLD (f_src1));
438 * FLD (i_dst) = opval;
439 TRACE_RESULT (current_cpu, abuf, "dst", 'x', opval);
440 }
441
442 return vpc;
443 #undef FLD
444 }
445
446 /* remi: remi $src1, $src2, $dst */
447
448 static SEM_PC
449 SEM_FN_NAME (i960base,remi) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
450 {
451 #define FLD(f) abuf->fields.sfmt_emul.f
452 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
453 int UNUSED written = 0;
454 IADDR UNUSED pc = abuf->addr;
455 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
456
457 {
458 SI opval = MODSI (* FLD (i_src2), * FLD (i_src1));
459 * FLD (i_dst) = opval;
460 TRACE_RESULT (current_cpu, abuf, "dst", 'x', opval);
461 }
462
463 return vpc;
464 #undef FLD
465 }
466
467 /* remi1: remi $lit1, $src2, $dst */
468
469 static SEM_PC
470 SEM_FN_NAME (i960base,remi1) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
471 {
472 #define FLD(f) abuf->fields.sfmt_emul1.f
473 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
474 int UNUSED written = 0;
475 IADDR UNUSED pc = abuf->addr;
476 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
477
478 {
479 SI opval = MODSI (* FLD (i_src2), FLD (f_src1));
480 * FLD (i_dst) = opval;
481 TRACE_RESULT (current_cpu, abuf, "dst", 'x', opval);
482 }
483
484 return vpc;
485 #undef FLD
486 }
487
488 /* remi2: remi $src1, $lit2, $dst */
489
490 static SEM_PC
491 SEM_FN_NAME (i960base,remi2) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
492 {
493 #define FLD(f) abuf->fields.sfmt_emul2.f
494 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
495 int UNUSED written = 0;
496 IADDR UNUSED pc = abuf->addr;
497 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
498
499 {
500 SI opval = MODSI (FLD (f_src2), * FLD (i_src1));
501 * FLD (i_dst) = opval;
502 TRACE_RESULT (current_cpu, abuf, "dst", 'x', opval);
503 }
504
505 return vpc;
506 #undef FLD
507 }
508
509 /* remi3: remi $lit1, $lit2, $dst */
510
511 static SEM_PC
512 SEM_FN_NAME (i960base,remi3) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
513 {
514 #define FLD(f) abuf->fields.sfmt_emul3.f
515 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
516 int UNUSED written = 0;
517 IADDR UNUSED pc = abuf->addr;
518 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
519
520 {
521 SI opval = MODSI (FLD (f_src2), FLD (f_src1));
522 * FLD (i_dst) = opval;
523 TRACE_RESULT (current_cpu, abuf, "dst", 'x', opval);
524 }
525
526 return vpc;
527 #undef FLD
528 }
529
530 /* divi: divi $src1, $src2, $dst */
531
532 static SEM_PC
533 SEM_FN_NAME (i960base,divi) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
534 {
535 #define FLD(f) abuf->fields.sfmt_emul.f
536 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
537 int UNUSED written = 0;
538 IADDR UNUSED pc = abuf->addr;
539 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
540
541 {
542 SI opval = DIVSI (* FLD (i_src2), * FLD (i_src1));
543 * FLD (i_dst) = opval;
544 TRACE_RESULT (current_cpu, abuf, "dst", 'x', opval);
545 }
546
547 return vpc;
548 #undef FLD
549 }
550
551 /* divi1: divi $lit1, $src2, $dst */
552
553 static SEM_PC
554 SEM_FN_NAME (i960base,divi1) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
555 {
556 #define FLD(f) abuf->fields.sfmt_emul1.f
557 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
558 int UNUSED written = 0;
559 IADDR UNUSED pc = abuf->addr;
560 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
561
562 {
563 SI opval = DIVSI (* FLD (i_src2), FLD (f_src1));
564 * FLD (i_dst) = opval;
565 TRACE_RESULT (current_cpu, abuf, "dst", 'x', opval);
566 }
567
568 return vpc;
569 #undef FLD
570 }
571
572 /* divi2: divi $src1, $lit2, $dst */
573
574 static SEM_PC
575 SEM_FN_NAME (i960base,divi2) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
576 {
577 #define FLD(f) abuf->fields.sfmt_emul2.f
578 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
579 int UNUSED written = 0;
580 IADDR UNUSED pc = abuf->addr;
581 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
582
583 {
584 SI opval = DIVSI (FLD (f_src2), * FLD (i_src1));
585 * FLD (i_dst) = opval;
586 TRACE_RESULT (current_cpu, abuf, "dst", 'x', opval);
587 }
588
589 return vpc;
590 #undef FLD
591 }
592
593 /* divi3: divi $lit1, $lit2, $dst */
594
595 static SEM_PC
596 SEM_FN_NAME (i960base,divi3) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
597 {
598 #define FLD(f) abuf->fields.sfmt_emul3.f
599 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
600 int UNUSED written = 0;
601 IADDR UNUSED pc = abuf->addr;
602 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
603
604 {
605 SI opval = DIVSI (FLD (f_src2), FLD (f_src1));
606 * FLD (i_dst) = opval;
607 TRACE_RESULT (current_cpu, abuf, "dst", 'x', opval);
608 }
609
610 return vpc;
611 #undef FLD
612 }
613
614 /* addo: addo $src1, $src2, $dst */
615
616 static SEM_PC
617 SEM_FN_NAME (i960base,addo) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
618 {
619 #define FLD(f) abuf->fields.sfmt_emul.f
620 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
621 int UNUSED written = 0;
622 IADDR UNUSED pc = abuf->addr;
623 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
624
625 {
626 SI opval = ADDSI (* FLD (i_src1), * FLD (i_src2));
627 * FLD (i_dst) = opval;
628 TRACE_RESULT (current_cpu, abuf, "dst", 'x', opval);
629 }
630
631 return vpc;
632 #undef FLD
633 }
634
635 /* addo1: addo $lit1, $src2, $dst */
636
637 static SEM_PC
638 SEM_FN_NAME (i960base,addo1) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
639 {
640 #define FLD(f) abuf->fields.sfmt_emul1.f
641 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
642 int UNUSED written = 0;
643 IADDR UNUSED pc = abuf->addr;
644 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
645
646 {
647 SI opval = ADDSI (FLD (f_src1), * FLD (i_src2));
648 * FLD (i_dst) = opval;
649 TRACE_RESULT (current_cpu, abuf, "dst", 'x', opval);
650 }
651
652 return vpc;
653 #undef FLD
654 }
655
656 /* addo2: addo $src1, $lit2, $dst */
657
658 static SEM_PC
659 SEM_FN_NAME (i960base,addo2) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
660 {
661 #define FLD(f) abuf->fields.sfmt_emul2.f
662 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
663 int UNUSED written = 0;
664 IADDR UNUSED pc = abuf->addr;
665 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
666
667 {
668 SI opval = ADDSI (* FLD (i_src1), FLD (f_src2));
669 * FLD (i_dst) = opval;
670 TRACE_RESULT (current_cpu, abuf, "dst", 'x', opval);
671 }
672
673 return vpc;
674 #undef FLD
675 }
676
677 /* addo3: addo $lit1, $lit2, $dst */
678
679 static SEM_PC
680 SEM_FN_NAME (i960base,addo3) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
681 {
682 #define FLD(f) abuf->fields.sfmt_emul3.f
683 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
684 int UNUSED written = 0;
685 IADDR UNUSED pc = abuf->addr;
686 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
687
688 {
689 SI opval = ADDSI (FLD (f_src1), FLD (f_src2));
690 * FLD (i_dst) = opval;
691 TRACE_RESULT (current_cpu, abuf, "dst", 'x', opval);
692 }
693
694 return vpc;
695 #undef FLD
696 }
697
698 /* subo: subo $src1, $src2, $dst */
699
700 static SEM_PC
701 SEM_FN_NAME (i960base,subo) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
702 {
703 #define FLD(f) abuf->fields.sfmt_emul.f
704 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
705 int UNUSED written = 0;
706 IADDR UNUSED pc = abuf->addr;
707 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
708
709 {
710 SI opval = SUBSI (* FLD (i_src2), * FLD (i_src1));
711 * FLD (i_dst) = opval;
712 TRACE_RESULT (current_cpu, abuf, "dst", 'x', opval);
713 }
714
715 return vpc;
716 #undef FLD
717 }
718
719 /* subo1: subo $lit1, $src2, $dst */
720
721 static SEM_PC
722 SEM_FN_NAME (i960base,subo1) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
723 {
724 #define FLD(f) abuf->fields.sfmt_emul1.f
725 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
726 int UNUSED written = 0;
727 IADDR UNUSED pc = abuf->addr;
728 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
729
730 {
731 SI opval = SUBSI (* FLD (i_src2), FLD (f_src1));
732 * FLD (i_dst) = opval;
733 TRACE_RESULT (current_cpu, abuf, "dst", 'x', opval);
734 }
735
736 return vpc;
737 #undef FLD
738 }
739
740 /* subo2: subo $src1, $lit2, $dst */
741
742 static SEM_PC
743 SEM_FN_NAME (i960base,subo2) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
744 {
745 #define FLD(f) abuf->fields.sfmt_emul2.f
746 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
747 int UNUSED written = 0;
748 IADDR UNUSED pc = abuf->addr;
749 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
750
751 {
752 SI opval = SUBSI (FLD (f_src2), * FLD (i_src1));
753 * FLD (i_dst) = opval;
754 TRACE_RESULT (current_cpu, abuf, "dst", 'x', opval);
755 }
756
757 return vpc;
758 #undef FLD
759 }
760
761 /* subo3: subo $lit1, $lit2, $dst */
762
763 static SEM_PC
764 SEM_FN_NAME (i960base,subo3) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
765 {
766 #define FLD(f) abuf->fields.sfmt_emul3.f
767 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
768 int UNUSED written = 0;
769 IADDR UNUSED pc = abuf->addr;
770 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
771
772 {
773 SI opval = SUBSI (FLD (f_src2), FLD (f_src1));
774 * FLD (i_dst) = opval;
775 TRACE_RESULT (current_cpu, abuf, "dst", 'x', opval);
776 }
777
778 return vpc;
779 #undef FLD
780 }
781
782 /* notbit: notbit $src1, $src2, $dst */
783
784 static SEM_PC
785 SEM_FN_NAME (i960base,notbit) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
786 {
787 #define FLD(f) abuf->fields.sfmt_emul.f
788 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
789 int UNUSED written = 0;
790 IADDR UNUSED pc = abuf->addr;
791 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
792
793 {
794 SI opval = XORSI (SLLSI (1, * FLD (i_src1)), * FLD (i_src2));
795 * FLD (i_dst) = opval;
796 TRACE_RESULT (current_cpu, abuf, "dst", 'x', opval);
797 }
798
799 return vpc;
800 #undef FLD
801 }
802
803 /* notbit1: notbit $lit1, $src2, $dst */
804
805 static SEM_PC
806 SEM_FN_NAME (i960base,notbit1) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
807 {
808 #define FLD(f) abuf->fields.sfmt_emul1.f
809 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
810 int UNUSED written = 0;
811 IADDR UNUSED pc = abuf->addr;
812 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
813
814 {
815 SI opval = XORSI (SLLSI (1, FLD (f_src1)), * FLD (i_src2));
816 * FLD (i_dst) = opval;
817 TRACE_RESULT (current_cpu, abuf, "dst", 'x', opval);
818 }
819
820 return vpc;
821 #undef FLD
822 }
823
824 /* notbit2: notbit $src1, $lit2, $dst */
825
826 static SEM_PC
827 SEM_FN_NAME (i960base,notbit2) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
828 {
829 #define FLD(f) abuf->fields.sfmt_emul2.f
830 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
831 int UNUSED written = 0;
832 IADDR UNUSED pc = abuf->addr;
833 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
834
835 {
836 SI opval = XORSI (SLLSI (1, * FLD (i_src1)), FLD (f_src2));
837 * FLD (i_dst) = opval;
838 TRACE_RESULT (current_cpu, abuf, "dst", 'x', opval);
839 }
840
841 return vpc;
842 #undef FLD
843 }
844
845 /* notbit3: notbit $lit1, $lit2, $dst */
846
847 static SEM_PC
848 SEM_FN_NAME (i960base,notbit3) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
849 {
850 #define FLD(f) abuf->fields.sfmt_emul3.f
851 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
852 int UNUSED written = 0;
853 IADDR UNUSED pc = abuf->addr;
854 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
855
856 {
857 SI opval = XORSI (SLLSI (1, FLD (f_src1)), FLD (f_src2));
858 * FLD (i_dst) = opval;
859 TRACE_RESULT (current_cpu, abuf, "dst", 'x', opval);
860 }
861
862 return vpc;
863 #undef FLD
864 }
865
866 /* and: and $src1, $src2, $dst */
867
868 static SEM_PC
869 SEM_FN_NAME (i960base,and) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
870 {
871 #define FLD(f) abuf->fields.sfmt_emul.f
872 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
873 int UNUSED written = 0;
874 IADDR UNUSED pc = abuf->addr;
875 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
876
877 {
878 SI opval = ANDSI (* FLD (i_src1), * FLD (i_src2));
879 * FLD (i_dst) = opval;
880 TRACE_RESULT (current_cpu, abuf, "dst", 'x', opval);
881 }
882
883 return vpc;
884 #undef FLD
885 }
886
887 /* and1: and $lit1, $src2, $dst */
888
889 static SEM_PC
890 SEM_FN_NAME (i960base,and1) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
891 {
892 #define FLD(f) abuf->fields.sfmt_emul1.f
893 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
894 int UNUSED written = 0;
895 IADDR UNUSED pc = abuf->addr;
896 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
897
898 {
899 SI opval = ANDSI (FLD (f_src1), * FLD (i_src2));
900 * FLD (i_dst) = opval;
901 TRACE_RESULT (current_cpu, abuf, "dst", 'x', opval);
902 }
903
904 return vpc;
905 #undef FLD
906 }
907
908 /* and2: and $src1, $lit2, $dst */
909
910 static SEM_PC
911 SEM_FN_NAME (i960base,and2) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
912 {
913 #define FLD(f) abuf->fields.sfmt_emul2.f
914 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
915 int UNUSED written = 0;
916 IADDR UNUSED pc = abuf->addr;
917 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
918
919 {
920 SI opval = ANDSI (* FLD (i_src1), FLD (f_src2));
921 * FLD (i_dst) = opval;
922 TRACE_RESULT (current_cpu, abuf, "dst", 'x', opval);
923 }
924
925 return vpc;
926 #undef FLD
927 }
928
929 /* and3: and $lit1, $lit2, $dst */
930
931 static SEM_PC
932 SEM_FN_NAME (i960base,and3) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
933 {
934 #define FLD(f) abuf->fields.sfmt_emul3.f
935 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
936 int UNUSED written = 0;
937 IADDR UNUSED pc = abuf->addr;
938 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
939
940 {
941 SI opval = ANDSI (FLD (f_src1), FLD (f_src2));
942 * FLD (i_dst) = opval;
943 TRACE_RESULT (current_cpu, abuf, "dst", 'x', opval);
944 }
945
946 return vpc;
947 #undef FLD
948 }
949
950 /* andnot: andnot $src1, $src2, $dst */
951
952 static SEM_PC
953 SEM_FN_NAME (i960base,andnot) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
954 {
955 #define FLD(f) abuf->fields.sfmt_emul.f
956 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
957 int UNUSED written = 0;
958 IADDR UNUSED pc = abuf->addr;
959 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
960
961 {
962 SI opval = ANDSI (* FLD (i_src2), INVSI (* FLD (i_src1)));
963 * FLD (i_dst) = opval;
964 TRACE_RESULT (current_cpu, abuf, "dst", 'x', opval);
965 }
966
967 return vpc;
968 #undef FLD
969 }
970
971 /* andnot1: andnot $lit1, $src2, $dst */
972
973 static SEM_PC
974 SEM_FN_NAME (i960base,andnot1) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
975 {
976 #define FLD(f) abuf->fields.sfmt_emul1.f
977 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
978 int UNUSED written = 0;
979 IADDR UNUSED pc = abuf->addr;
980 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
981
982 {
983 SI opval = ANDSI (* FLD (i_src2), INVSI (FLD (f_src1)));
984 * FLD (i_dst) = opval;
985 TRACE_RESULT (current_cpu, abuf, "dst", 'x', opval);
986 }
987
988 return vpc;
989 #undef FLD
990 }
991
992 /* andnot2: andnot $src1, $lit2, $dst */
993
994 static SEM_PC
995 SEM_FN_NAME (i960base,andnot2) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
996 {
997 #define FLD(f) abuf->fields.sfmt_emul2.f
998 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
999 int UNUSED written = 0;
1000 IADDR UNUSED pc = abuf->addr;
1001 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
1002
1003 {
1004 SI opval = ANDSI (FLD (f_src2), INVSI (* FLD (i_src1)));
1005 * FLD (i_dst) = opval;
1006 TRACE_RESULT (current_cpu, abuf, "dst", 'x', opval);
1007 }
1008
1009 return vpc;
1010 #undef FLD
1011 }
1012
1013 /* andnot3: andnot $lit1, $lit2, $dst */
1014
1015 static SEM_PC
1016 SEM_FN_NAME (i960base,andnot3) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
1017 {
1018 #define FLD(f) abuf->fields.sfmt_emul3.f
1019 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
1020 int UNUSED written = 0;
1021 IADDR UNUSED pc = abuf->addr;
1022 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
1023
1024 {
1025 SI opval = ANDSI (FLD (f_src2), INVSI (FLD (f_src1)));
1026 * FLD (i_dst) = opval;
1027 TRACE_RESULT (current_cpu, abuf, "dst", 'x', opval);
1028 }
1029
1030 return vpc;
1031 #undef FLD
1032 }
1033
1034 /* setbit: setbit $src1, $src2, $dst */
1035
1036 static SEM_PC
1037 SEM_FN_NAME (i960base,setbit) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
1038 {
1039 #define FLD(f) abuf->fields.sfmt_emul.f
1040 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
1041 int UNUSED written = 0;
1042 IADDR UNUSED pc = abuf->addr;
1043 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
1044
1045 {
1046 SI opval = ORSI (SLLSI (1, * FLD (i_src1)), * FLD (i_src2));
1047 * FLD (i_dst) = opval;
1048 TRACE_RESULT (current_cpu, abuf, "dst", 'x', opval);
1049 }
1050
1051 return vpc;
1052 #undef FLD
1053 }
1054
1055 /* setbit1: setbit $lit1, $src2, $dst */
1056
1057 static SEM_PC
1058 SEM_FN_NAME (i960base,setbit1) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
1059 {
1060 #define FLD(f) abuf->fields.sfmt_emul1.f
1061 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
1062 int UNUSED written = 0;
1063 IADDR UNUSED pc = abuf->addr;
1064 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
1065
1066 {
1067 SI opval = ORSI (SLLSI (1, FLD (f_src1)), * FLD (i_src2));
1068 * FLD (i_dst) = opval;
1069 TRACE_RESULT (current_cpu, abuf, "dst", 'x', opval);
1070 }
1071
1072 return vpc;
1073 #undef FLD
1074 }
1075
1076 /* setbit2: setbit $src1, $lit2, $dst */
1077
1078 static SEM_PC
1079 SEM_FN_NAME (i960base,setbit2) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
1080 {
1081 #define FLD(f) abuf->fields.sfmt_emul2.f
1082 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
1083 int UNUSED written = 0;
1084 IADDR UNUSED pc = abuf->addr;
1085 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
1086
1087 {
1088 SI opval = ORSI (SLLSI (1, * FLD (i_src1)), FLD (f_src2));
1089 * FLD (i_dst) = opval;
1090 TRACE_RESULT (current_cpu, abuf, "dst", 'x', opval);
1091 }
1092
1093 return vpc;
1094 #undef FLD
1095 }
1096
1097 /* setbit3: setbit $lit1, $lit2, $dst */
1098
1099 static SEM_PC
1100 SEM_FN_NAME (i960base,setbit3) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
1101 {
1102 #define FLD(f) abuf->fields.sfmt_emul3.f
1103 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
1104 int UNUSED written = 0;
1105 IADDR UNUSED pc = abuf->addr;
1106 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
1107
1108 {
1109 SI opval = ORSI (SLLSI (1, FLD (f_src1)), FLD (f_src2));
1110 * FLD (i_dst) = opval;
1111 TRACE_RESULT (current_cpu, abuf, "dst", 'x', opval);
1112 }
1113
1114 return vpc;
1115 #undef FLD
1116 }
1117
1118 /* notand: notand $src1, $src2, $dst */
1119
1120 static SEM_PC
1121 SEM_FN_NAME (i960base,notand) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
1122 {
1123 #define FLD(f) abuf->fields.sfmt_emul.f
1124 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
1125 int UNUSED written = 0;
1126 IADDR UNUSED pc = abuf->addr;
1127 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
1128
1129 {
1130 SI opval = ANDSI (INVSI (* FLD (i_src2)), * FLD (i_src1));
1131 * FLD (i_dst) = opval;
1132 TRACE_RESULT (current_cpu, abuf, "dst", 'x', opval);
1133 }
1134
1135 return vpc;
1136 #undef FLD
1137 }
1138
1139 /* notand1: notand $lit1, $src2, $dst */
1140
1141 static SEM_PC
1142 SEM_FN_NAME (i960base,notand1) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
1143 {
1144 #define FLD(f) abuf->fields.sfmt_emul1.f
1145 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
1146 int UNUSED written = 0;
1147 IADDR UNUSED pc = abuf->addr;
1148 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
1149
1150 {
1151 SI opval = ANDSI (INVSI (* FLD (i_src2)), FLD (f_src1));
1152 * FLD (i_dst) = opval;
1153 TRACE_RESULT (current_cpu, abuf, "dst", 'x', opval);
1154 }
1155
1156 return vpc;
1157 #undef FLD
1158 }
1159
1160 /* notand2: notand $src1, $lit2, $dst */
1161
1162 static SEM_PC
1163 SEM_FN_NAME (i960base,notand2) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
1164 {
1165 #define FLD(f) abuf->fields.sfmt_emul2.f
1166 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
1167 int UNUSED written = 0;
1168 IADDR UNUSED pc = abuf->addr;
1169 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
1170
1171 {
1172 SI opval = ANDSI (INVSI (FLD (f_src2)), * FLD (i_src1));
1173 * FLD (i_dst) = opval;
1174 TRACE_RESULT (current_cpu, abuf, "dst", 'x', opval);
1175 }
1176
1177 return vpc;
1178 #undef FLD
1179 }
1180
1181 /* notand3: notand $lit1, $lit2, $dst */
1182
1183 static SEM_PC
1184 SEM_FN_NAME (i960base,notand3) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
1185 {
1186 #define FLD(f) abuf->fields.sfmt_emul3.f
1187 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
1188 int UNUSED written = 0;
1189 IADDR UNUSED pc = abuf->addr;
1190 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
1191
1192 {
1193 SI opval = ANDSI (INVSI (FLD (f_src2)), FLD (f_src1));
1194 * FLD (i_dst) = opval;
1195 TRACE_RESULT (current_cpu, abuf, "dst", 'x', opval);
1196 }
1197
1198 return vpc;
1199 #undef FLD
1200 }
1201
1202 /* xor: xor $src1, $src2, $dst */
1203
1204 static SEM_PC
1205 SEM_FN_NAME (i960base,xor) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
1206 {
1207 #define FLD(f) abuf->fields.sfmt_emul.f
1208 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
1209 int UNUSED written = 0;
1210 IADDR UNUSED pc = abuf->addr;
1211 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
1212
1213 {
1214 SI opval = XORSI (* FLD (i_src1), * FLD (i_src2));
1215 * FLD (i_dst) = opval;
1216 TRACE_RESULT (current_cpu, abuf, "dst", 'x', opval);
1217 }
1218
1219 return vpc;
1220 #undef FLD
1221 }
1222
1223 /* xor1: xor $lit1, $src2, $dst */
1224
1225 static SEM_PC
1226 SEM_FN_NAME (i960base,xor1) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
1227 {
1228 #define FLD(f) abuf->fields.sfmt_emul1.f
1229 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
1230 int UNUSED written = 0;
1231 IADDR UNUSED pc = abuf->addr;
1232 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
1233
1234 {
1235 SI opval = XORSI (FLD (f_src1), * FLD (i_src2));
1236 * FLD (i_dst) = opval;
1237 TRACE_RESULT (current_cpu, abuf, "dst", 'x', opval);
1238 }
1239
1240 return vpc;
1241 #undef FLD
1242 }
1243
1244 /* xor2: xor $src1, $lit2, $dst */
1245
1246 static SEM_PC
1247 SEM_FN_NAME (i960base,xor2) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
1248 {
1249 #define FLD(f) abuf->fields.sfmt_emul2.f
1250 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
1251 int UNUSED written = 0;
1252 IADDR UNUSED pc = abuf->addr;
1253 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
1254
1255 {
1256 SI opval = XORSI (* FLD (i_src1), FLD (f_src2));
1257 * FLD (i_dst) = opval;
1258 TRACE_RESULT (current_cpu, abuf, "dst", 'x', opval);
1259 }
1260
1261 return vpc;
1262 #undef FLD
1263 }
1264
1265 /* xor3: xor $lit1, $lit2, $dst */
1266
1267 static SEM_PC
1268 SEM_FN_NAME (i960base,xor3) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
1269 {
1270 #define FLD(f) abuf->fields.sfmt_emul3.f
1271 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
1272 int UNUSED written = 0;
1273 IADDR UNUSED pc = abuf->addr;
1274 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
1275
1276 {
1277 SI opval = XORSI (FLD (f_src1), FLD (f_src2));
1278 * FLD (i_dst) = opval;
1279 TRACE_RESULT (current_cpu, abuf, "dst", 'x', opval);
1280 }
1281
1282 return vpc;
1283 #undef FLD
1284 }
1285
1286 /* or: or $src1, $src2, $dst */
1287
1288 static SEM_PC
1289 SEM_FN_NAME (i960base,or) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
1290 {
1291 #define FLD(f) abuf->fields.sfmt_emul.f
1292 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
1293 int UNUSED written = 0;
1294 IADDR UNUSED pc = abuf->addr;
1295 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
1296
1297 {
1298 SI opval = ORSI (* FLD (i_src1), * FLD (i_src2));
1299 * FLD (i_dst) = opval;
1300 TRACE_RESULT (current_cpu, abuf, "dst", 'x', opval);
1301 }
1302
1303 return vpc;
1304 #undef FLD
1305 }
1306
1307 /* or1: or $lit1, $src2, $dst */
1308
1309 static SEM_PC
1310 SEM_FN_NAME (i960base,or1) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
1311 {
1312 #define FLD(f) abuf->fields.sfmt_emul1.f
1313 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
1314 int UNUSED written = 0;
1315 IADDR UNUSED pc = abuf->addr;
1316 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
1317
1318 {
1319 SI opval = ORSI (FLD (f_src1), * FLD (i_src2));
1320 * FLD (i_dst) = opval;
1321 TRACE_RESULT (current_cpu, abuf, "dst", 'x', opval);
1322 }
1323
1324 return vpc;
1325 #undef FLD
1326 }
1327
1328 /* or2: or $src1, $lit2, $dst */
1329
1330 static SEM_PC
1331 SEM_FN_NAME (i960base,or2) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
1332 {
1333 #define FLD(f) abuf->fields.sfmt_emul2.f
1334 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
1335 int UNUSED written = 0;
1336 IADDR UNUSED pc = abuf->addr;
1337 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
1338
1339 {
1340 SI opval = ORSI (* FLD (i_src1), FLD (f_src2));
1341 * FLD (i_dst) = opval;
1342 TRACE_RESULT (current_cpu, abuf, "dst", 'x', opval);
1343 }
1344
1345 return vpc;
1346 #undef FLD
1347 }
1348
1349 /* or3: or $lit1, $lit2, $dst */
1350
1351 static SEM_PC
1352 SEM_FN_NAME (i960base,or3) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
1353 {
1354 #define FLD(f) abuf->fields.sfmt_emul3.f
1355 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
1356 int UNUSED written = 0;
1357 IADDR UNUSED pc = abuf->addr;
1358 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
1359
1360 {
1361 SI opval = ORSI (FLD (f_src1), FLD (f_src2));
1362 * FLD (i_dst) = opval;
1363 TRACE_RESULT (current_cpu, abuf, "dst", 'x', opval);
1364 }
1365
1366 return vpc;
1367 #undef FLD
1368 }
1369
1370 /* nor: nor $src1, $src2, $dst */
1371
1372 static SEM_PC
1373 SEM_FN_NAME (i960base,nor) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
1374 {
1375 #define FLD(f) abuf->fields.sfmt_emul.f
1376 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
1377 int UNUSED written = 0;
1378 IADDR UNUSED pc = abuf->addr;
1379 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
1380
1381 {
1382 SI opval = ANDSI (INVSI (* FLD (i_src2)), INVSI (* FLD (i_src1)));
1383 * FLD (i_dst) = opval;
1384 TRACE_RESULT (current_cpu, abuf, "dst", 'x', opval);
1385 }
1386
1387 return vpc;
1388 #undef FLD
1389 }
1390
1391 /* nor1: nor $lit1, $src2, $dst */
1392
1393 static SEM_PC
1394 SEM_FN_NAME (i960base,nor1) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
1395 {
1396 #define FLD(f) abuf->fields.sfmt_emul1.f
1397 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
1398 int UNUSED written = 0;
1399 IADDR UNUSED pc = abuf->addr;
1400 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
1401
1402 {
1403 SI opval = ANDSI (INVSI (* FLD (i_src2)), INVSI (FLD (f_src1)));
1404 * FLD (i_dst) = opval;
1405 TRACE_RESULT (current_cpu, abuf, "dst", 'x', opval);
1406 }
1407
1408 return vpc;
1409 #undef FLD
1410 }
1411
1412 /* nor2: nor $src1, $lit2, $dst */
1413
1414 static SEM_PC
1415 SEM_FN_NAME (i960base,nor2) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
1416 {
1417 #define FLD(f) abuf->fields.sfmt_emul2.f
1418 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
1419 int UNUSED written = 0;
1420 IADDR UNUSED pc = abuf->addr;
1421 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
1422
1423 {
1424 SI opval = ANDSI (INVSI (FLD (f_src2)), INVSI (* FLD (i_src1)));
1425 * FLD (i_dst) = opval;
1426 TRACE_RESULT (current_cpu, abuf, "dst", 'x', opval);
1427 }
1428
1429 return vpc;
1430 #undef FLD
1431 }
1432
1433 /* nor3: nor $lit1, $lit2, $dst */
1434
1435 static SEM_PC
1436 SEM_FN_NAME (i960base,nor3) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
1437 {
1438 #define FLD(f) abuf->fields.sfmt_emul3.f
1439 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
1440 int UNUSED written = 0;
1441 IADDR UNUSED pc = abuf->addr;
1442 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
1443
1444 {
1445 SI opval = ANDSI (INVSI (FLD (f_src2)), INVSI (FLD (f_src1)));
1446 * FLD (i_dst) = opval;
1447 TRACE_RESULT (current_cpu, abuf, "dst", 'x', opval);
1448 }
1449
1450 return vpc;
1451 #undef FLD
1452 }
1453
1454 /* xnor: xnor $src1, $src2, $dst */
1455
1456 static SEM_PC
1457 SEM_FN_NAME (i960base,xnor) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
1458 {
1459 #define FLD(f) abuf->fields.sfmt_emul.f
1460 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
1461 int UNUSED written = 0;
1462 IADDR UNUSED pc = abuf->addr;
1463 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
1464
1465 {
1466 SI opval = INVSI (XORSI (* FLD (i_src1), * FLD (i_src2)));
1467 * FLD (i_dst) = opval;
1468 TRACE_RESULT (current_cpu, abuf, "dst", 'x', opval);
1469 }
1470
1471 return vpc;
1472 #undef FLD
1473 }
1474
1475 /* xnor1: xnor $lit1, $src2, $dst */
1476
1477 static SEM_PC
1478 SEM_FN_NAME (i960base,xnor1) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
1479 {
1480 #define FLD(f) abuf->fields.sfmt_emul1.f
1481 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
1482 int UNUSED written = 0;
1483 IADDR UNUSED pc = abuf->addr;
1484 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
1485
1486 {
1487 SI opval = INVSI (XORSI (FLD (f_src1), * FLD (i_src2)));
1488 * FLD (i_dst) = opval;
1489 TRACE_RESULT (current_cpu, abuf, "dst", 'x', opval);
1490 }
1491
1492 return vpc;
1493 #undef FLD
1494 }
1495
1496 /* xnor2: xnor $src1, $lit2, $dst */
1497
1498 static SEM_PC
1499 SEM_FN_NAME (i960base,xnor2) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
1500 {
1501 #define FLD(f) abuf->fields.sfmt_emul2.f
1502 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
1503 int UNUSED written = 0;
1504 IADDR UNUSED pc = abuf->addr;
1505 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
1506
1507 {
1508 SI opval = INVSI (XORSI (* FLD (i_src1), FLD (f_src2)));
1509 * FLD (i_dst) = opval;
1510 TRACE_RESULT (current_cpu, abuf, "dst", 'x', opval);
1511 }
1512
1513 return vpc;
1514 #undef FLD
1515 }
1516
1517 /* xnor3: xnor $lit1, $lit2, $dst */
1518
1519 static SEM_PC
1520 SEM_FN_NAME (i960base,xnor3) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
1521 {
1522 #define FLD(f) abuf->fields.sfmt_emul3.f
1523 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
1524 int UNUSED written = 0;
1525 IADDR UNUSED pc = abuf->addr;
1526 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
1527
1528 {
1529 SI opval = INVSI (XORSI (FLD (f_src1), FLD (f_src2)));
1530 * FLD (i_dst) = opval;
1531 TRACE_RESULT (current_cpu, abuf, "dst", 'x', opval);
1532 }
1533
1534 return vpc;
1535 #undef FLD
1536 }
1537
1538 /* not: not $src1, $src2, $dst */
1539
1540 static SEM_PC
1541 SEM_FN_NAME (i960base,not) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
1542 {
1543 #define FLD(f) abuf->fields.sfmt_emul2.f
1544 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
1545 int UNUSED written = 0;
1546 IADDR UNUSED pc = abuf->addr;
1547 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
1548
1549 {
1550 SI opval = INVSI (* FLD (i_src1));
1551 * FLD (i_dst) = opval;
1552 TRACE_RESULT (current_cpu, abuf, "dst", 'x', opval);
1553 }
1554
1555 return vpc;
1556 #undef FLD
1557 }
1558
1559 /* not1: not $lit1, $src2, $dst */
1560
1561 static SEM_PC
1562 SEM_FN_NAME (i960base,not1) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
1563 {
1564 #define FLD(f) abuf->fields.sfmt_emul3.f
1565 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
1566 int UNUSED written = 0;
1567 IADDR UNUSED pc = abuf->addr;
1568 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
1569
1570 {
1571 SI opval = INVSI (FLD (f_src1));
1572 * FLD (i_dst) = opval;
1573 TRACE_RESULT (current_cpu, abuf, "dst", 'x', opval);
1574 }
1575
1576 return vpc;
1577 #undef FLD
1578 }
1579
1580 /* not2: not $src1, $lit2, $dst */
1581
1582 static SEM_PC
1583 SEM_FN_NAME (i960base,not2) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
1584 {
1585 #define FLD(f) abuf->fields.sfmt_emul2.f
1586 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
1587 int UNUSED written = 0;
1588 IADDR UNUSED pc = abuf->addr;
1589 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
1590
1591 {
1592 SI opval = INVSI (* FLD (i_src1));
1593 * FLD (i_dst) = opval;
1594 TRACE_RESULT (current_cpu, abuf, "dst", 'x', opval);
1595 }
1596
1597 return vpc;
1598 #undef FLD
1599 }
1600
1601 /* not3: not $lit1, $lit2, $dst */
1602
1603 static SEM_PC
1604 SEM_FN_NAME (i960base,not3) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
1605 {
1606 #define FLD(f) abuf->fields.sfmt_emul3.f
1607 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
1608 int UNUSED written = 0;
1609 IADDR UNUSED pc = abuf->addr;
1610 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
1611
1612 {
1613 SI opval = INVSI (FLD (f_src1));
1614 * FLD (i_dst) = opval;
1615 TRACE_RESULT (current_cpu, abuf, "dst", 'x', opval);
1616 }
1617
1618 return vpc;
1619 #undef FLD
1620 }
1621
1622 /* ornot: ornot $src1, $src2, $dst */
1623
1624 static SEM_PC
1625 SEM_FN_NAME (i960base,ornot) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
1626 {
1627 #define FLD(f) abuf->fields.sfmt_emul.f
1628 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
1629 int UNUSED written = 0;
1630 IADDR UNUSED pc = abuf->addr;
1631 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
1632
1633 {
1634 SI opval = ORSI (* FLD (i_src2), INVSI (* FLD (i_src1)));
1635 * FLD (i_dst) = opval;
1636 TRACE_RESULT (current_cpu, abuf, "dst", 'x', opval);
1637 }
1638
1639 return vpc;
1640 #undef FLD
1641 }
1642
1643 /* ornot1: ornot $lit1, $src2, $dst */
1644
1645 static SEM_PC
1646 SEM_FN_NAME (i960base,ornot1) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
1647 {
1648 #define FLD(f) abuf->fields.sfmt_emul1.f
1649 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
1650 int UNUSED written = 0;
1651 IADDR UNUSED pc = abuf->addr;
1652 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
1653
1654 {
1655 SI opval = ORSI (* FLD (i_src2), INVSI (FLD (f_src1)));
1656 * FLD (i_dst) = opval;
1657 TRACE_RESULT (current_cpu, abuf, "dst", 'x', opval);
1658 }
1659
1660 return vpc;
1661 #undef FLD
1662 }
1663
1664 /* ornot2: ornot $src1, $lit2, $dst */
1665
1666 static SEM_PC
1667 SEM_FN_NAME (i960base,ornot2) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
1668 {
1669 #define FLD(f) abuf->fields.sfmt_emul2.f
1670 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
1671 int UNUSED written = 0;
1672 IADDR UNUSED pc = abuf->addr;
1673 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
1674
1675 {
1676 SI opval = ORSI (FLD (f_src2), INVSI (* FLD (i_src1)));
1677 * FLD (i_dst) = opval;
1678 TRACE_RESULT (current_cpu, abuf, "dst", 'x', opval);
1679 }
1680
1681 return vpc;
1682 #undef FLD
1683 }
1684
1685 /* ornot3: ornot $lit1, $lit2, $dst */
1686
1687 static SEM_PC
1688 SEM_FN_NAME (i960base,ornot3) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
1689 {
1690 #define FLD(f) abuf->fields.sfmt_emul3.f
1691 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
1692 int UNUSED written = 0;
1693 IADDR UNUSED pc = abuf->addr;
1694 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
1695
1696 {
1697 SI opval = ORSI (FLD (f_src2), INVSI (FLD (f_src1)));
1698 * FLD (i_dst) = opval;
1699 TRACE_RESULT (current_cpu, abuf, "dst", 'x', opval);
1700 }
1701
1702 return vpc;
1703 #undef FLD
1704 }
1705
1706 /* clrbit: clrbit $src1, $src2, $dst */
1707
1708 static SEM_PC
1709 SEM_FN_NAME (i960base,clrbit) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
1710 {
1711 #define FLD(f) abuf->fields.sfmt_emul.f
1712 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
1713 int UNUSED written = 0;
1714 IADDR UNUSED pc = abuf->addr;
1715 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
1716
1717 {
1718 SI opval = ANDSI (INVSI (SLLSI (1, * FLD (i_src1))), * FLD (i_src2));
1719 * FLD (i_dst) = opval;
1720 TRACE_RESULT (current_cpu, abuf, "dst", 'x', opval);
1721 }
1722
1723 return vpc;
1724 #undef FLD
1725 }
1726
1727 /* clrbit1: clrbit $lit1, $src2, $dst */
1728
1729 static SEM_PC
1730 SEM_FN_NAME (i960base,clrbit1) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
1731 {
1732 #define FLD(f) abuf->fields.sfmt_emul1.f
1733 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
1734 int UNUSED written = 0;
1735 IADDR UNUSED pc = abuf->addr;
1736 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
1737
1738 {
1739 SI opval = ANDSI (INVSI (SLLSI (1, FLD (f_src1))), * FLD (i_src2));
1740 * FLD (i_dst) = opval;
1741 TRACE_RESULT (current_cpu, abuf, "dst", 'x', opval);
1742 }
1743
1744 return vpc;
1745 #undef FLD
1746 }
1747
1748 /* clrbit2: clrbit $src1, $lit2, $dst */
1749
1750 static SEM_PC
1751 SEM_FN_NAME (i960base,clrbit2) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
1752 {
1753 #define FLD(f) abuf->fields.sfmt_emul2.f
1754 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
1755 int UNUSED written = 0;
1756 IADDR UNUSED pc = abuf->addr;
1757 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
1758
1759 {
1760 SI opval = ANDSI (INVSI (SLLSI (1, * FLD (i_src1))), FLD (f_src2));
1761 * FLD (i_dst) = opval;
1762 TRACE_RESULT (current_cpu, abuf, "dst", 'x', opval);
1763 }
1764
1765 return vpc;
1766 #undef FLD
1767 }
1768
1769 /* clrbit3: clrbit $lit1, $lit2, $dst */
1770
1771 static SEM_PC
1772 SEM_FN_NAME (i960base,clrbit3) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
1773 {
1774 #define FLD(f) abuf->fields.sfmt_emul3.f
1775 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
1776 int UNUSED written = 0;
1777 IADDR UNUSED pc = abuf->addr;
1778 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
1779
1780 {
1781 SI opval = ANDSI (INVSI (SLLSI (1, FLD (f_src1))), FLD (f_src2));
1782 * FLD (i_dst) = opval;
1783 TRACE_RESULT (current_cpu, abuf, "dst", 'x', opval);
1784 }
1785
1786 return vpc;
1787 #undef FLD
1788 }
1789
1790 /* shlo: shlo $src1, $src2, $dst */
1791
1792 static SEM_PC
1793 SEM_FN_NAME (i960base,shlo) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
1794 {
1795 #define FLD(f) abuf->fields.sfmt_emul.f
1796 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
1797 int UNUSED written = 0;
1798 IADDR UNUSED pc = abuf->addr;
1799 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
1800
1801 {
1802 SI opval = (GEUSI (* FLD (i_src1), 32)) ? (0) : (SLLSI (* FLD (i_src2), * FLD (i_src1)));
1803 * FLD (i_dst) = opval;
1804 TRACE_RESULT (current_cpu, abuf, "dst", 'x', opval);
1805 }
1806
1807 return vpc;
1808 #undef FLD
1809 }
1810
1811 /* shlo1: shlo $lit1, $src2, $dst */
1812
1813 static SEM_PC
1814 SEM_FN_NAME (i960base,shlo1) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
1815 {
1816 #define FLD(f) abuf->fields.sfmt_emul1.f
1817 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
1818 int UNUSED written = 0;
1819 IADDR UNUSED pc = abuf->addr;
1820 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
1821
1822 {
1823 SI opval = (GEUSI (FLD (f_src1), 32)) ? (0) : (SLLSI (* FLD (i_src2), FLD (f_src1)));
1824 * FLD (i_dst) = opval;
1825 TRACE_RESULT (current_cpu, abuf, "dst", 'x', opval);
1826 }
1827
1828 return vpc;
1829 #undef FLD
1830 }
1831
1832 /* shlo2: shlo $src1, $lit2, $dst */
1833
1834 static SEM_PC
1835 SEM_FN_NAME (i960base,shlo2) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
1836 {
1837 #define FLD(f) abuf->fields.sfmt_emul2.f
1838 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
1839 int UNUSED written = 0;
1840 IADDR UNUSED pc = abuf->addr;
1841 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
1842
1843 {
1844 SI opval = (GEUSI (* FLD (i_src1), 32)) ? (0) : (SLLSI (FLD (f_src2), * FLD (i_src1)));
1845 * FLD (i_dst) = opval;
1846 TRACE_RESULT (current_cpu, abuf, "dst", 'x', opval);
1847 }
1848
1849 return vpc;
1850 #undef FLD
1851 }
1852
1853 /* shlo3: shlo $lit1, $lit2, $dst */
1854
1855 static SEM_PC
1856 SEM_FN_NAME (i960base,shlo3) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
1857 {
1858 #define FLD(f) abuf->fields.sfmt_emul3.f
1859 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
1860 int UNUSED written = 0;
1861 IADDR UNUSED pc = abuf->addr;
1862 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
1863
1864 {
1865 SI opval = (GEUSI (FLD (f_src1), 32)) ? (0) : (SLLSI (FLD (f_src2), FLD (f_src1)));
1866 * FLD (i_dst) = opval;
1867 TRACE_RESULT (current_cpu, abuf, "dst", 'x', opval);
1868 }
1869
1870 return vpc;
1871 #undef FLD
1872 }
1873
1874 /* shro: shro $src1, $src2, $dst */
1875
1876 static SEM_PC
1877 SEM_FN_NAME (i960base,shro) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
1878 {
1879 #define FLD(f) abuf->fields.sfmt_emul.f
1880 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
1881 int UNUSED written = 0;
1882 IADDR UNUSED pc = abuf->addr;
1883 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
1884
1885 {
1886 SI opval = (GEUSI (* FLD (i_src1), 32)) ? (0) : (SRLSI (* FLD (i_src2), * FLD (i_src1)));
1887 * FLD (i_dst) = opval;
1888 TRACE_RESULT (current_cpu, abuf, "dst", 'x', opval);
1889 }
1890
1891 return vpc;
1892 #undef FLD
1893 }
1894
1895 /* shro1: shro $lit1, $src2, $dst */
1896
1897 static SEM_PC
1898 SEM_FN_NAME (i960base,shro1) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
1899 {
1900 #define FLD(f) abuf->fields.sfmt_emul1.f
1901 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
1902 int UNUSED written = 0;
1903 IADDR UNUSED pc = abuf->addr;
1904 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
1905
1906 {
1907 SI opval = (GEUSI (FLD (f_src1), 32)) ? (0) : (SRLSI (* FLD (i_src2), FLD (f_src1)));
1908 * FLD (i_dst) = opval;
1909 TRACE_RESULT (current_cpu, abuf, "dst", 'x', opval);
1910 }
1911
1912 return vpc;
1913 #undef FLD
1914 }
1915
1916 /* shro2: shro $src1, $lit2, $dst */
1917
1918 static SEM_PC
1919 SEM_FN_NAME (i960base,shro2) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
1920 {
1921 #define FLD(f) abuf->fields.sfmt_emul2.f
1922 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
1923 int UNUSED written = 0;
1924 IADDR UNUSED pc = abuf->addr;
1925 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
1926
1927 {
1928 SI opval = (GEUSI (* FLD (i_src1), 32)) ? (0) : (SRLSI (FLD (f_src2), * FLD (i_src1)));
1929 * FLD (i_dst) = opval;
1930 TRACE_RESULT (current_cpu, abuf, "dst", 'x', opval);
1931 }
1932
1933 return vpc;
1934 #undef FLD
1935 }
1936
1937 /* shro3: shro $lit1, $lit2, $dst */
1938
1939 static SEM_PC
1940 SEM_FN_NAME (i960base,shro3) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
1941 {
1942 #define FLD(f) abuf->fields.sfmt_emul3.f
1943 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
1944 int UNUSED written = 0;
1945 IADDR UNUSED pc = abuf->addr;
1946 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
1947
1948 {
1949 SI opval = (GEUSI (FLD (f_src1), 32)) ? (0) : (SRLSI (FLD (f_src2), FLD (f_src1)));
1950 * FLD (i_dst) = opval;
1951 TRACE_RESULT (current_cpu, abuf, "dst", 'x', opval);
1952 }
1953
1954 return vpc;
1955 #undef FLD
1956 }
1957
1958 /* shli: shli $src1, $src2, $dst */
1959
1960 static SEM_PC
1961 SEM_FN_NAME (i960base,shli) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
1962 {
1963 #define FLD(f) abuf->fields.sfmt_emul.f
1964 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
1965 int UNUSED written = 0;
1966 IADDR UNUSED pc = abuf->addr;
1967 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
1968
1969 {
1970 SI opval = (GEUSI (* FLD (i_src1), 32)) ? (0) : (SLLSI (* FLD (i_src2), * FLD (i_src1)));
1971 * FLD (i_dst) = opval;
1972 TRACE_RESULT (current_cpu, abuf, "dst", 'x', opval);
1973 }
1974
1975 return vpc;
1976 #undef FLD
1977 }
1978
1979 /* shli1: shli $lit1, $src2, $dst */
1980
1981 static SEM_PC
1982 SEM_FN_NAME (i960base,shli1) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
1983 {
1984 #define FLD(f) abuf->fields.sfmt_emul1.f
1985 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
1986 int UNUSED written = 0;
1987 IADDR UNUSED pc = abuf->addr;
1988 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
1989
1990 {
1991 SI opval = (GEUSI (FLD (f_src1), 32)) ? (0) : (SLLSI (* FLD (i_src2), FLD (f_src1)));
1992 * FLD (i_dst) = opval;
1993 TRACE_RESULT (current_cpu, abuf, "dst", 'x', opval);
1994 }
1995
1996 return vpc;
1997 #undef FLD
1998 }
1999
2000 /* shli2: shli $src1, $lit2, $dst */
2001
2002 static SEM_PC
2003 SEM_FN_NAME (i960base,shli2) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
2004 {
2005 #define FLD(f) abuf->fields.sfmt_emul2.f
2006 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
2007 int UNUSED written = 0;
2008 IADDR UNUSED pc = abuf->addr;
2009 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
2010
2011 {
2012 SI opval = (GEUSI (* FLD (i_src1), 32)) ? (0) : (SLLSI (FLD (f_src2), * FLD (i_src1)));
2013 * FLD (i_dst) = opval;
2014 TRACE_RESULT (current_cpu, abuf, "dst", 'x', opval);
2015 }
2016
2017 return vpc;
2018 #undef FLD
2019 }
2020
2021 /* shli3: shli $lit1, $lit2, $dst */
2022
2023 static SEM_PC
2024 SEM_FN_NAME (i960base,shli3) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
2025 {
2026 #define FLD(f) abuf->fields.sfmt_emul3.f
2027 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
2028 int UNUSED written = 0;
2029 IADDR UNUSED pc = abuf->addr;
2030 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
2031
2032 {
2033 SI opval = (GEUSI (FLD (f_src1), 32)) ? (0) : (SLLSI (FLD (f_src2), FLD (f_src1)));
2034 * FLD (i_dst) = opval;
2035 TRACE_RESULT (current_cpu, abuf, "dst", 'x', opval);
2036 }
2037
2038 return vpc;
2039 #undef FLD
2040 }
2041
2042 /* shri: shri $src1, $src2, $dst */
2043
2044 static SEM_PC
2045 SEM_FN_NAME (i960base,shri) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
2046 {
2047 #define FLD(f) abuf->fields.sfmt_emul.f
2048 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
2049 int UNUSED written = 0;
2050 IADDR UNUSED pc = abuf->addr;
2051 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
2052
2053 {
2054 SI opval = (GEUSI (* FLD (i_src1), 32)) ? (SRASI (* FLD (i_src2), 31)) : (SRASI (* FLD (i_src2), * FLD (i_src1)));
2055 * FLD (i_dst) = opval;
2056 TRACE_RESULT (current_cpu, abuf, "dst", 'x', opval);
2057 }
2058
2059 return vpc;
2060 #undef FLD
2061 }
2062
2063 /* shri1: shri $lit1, $src2, $dst */
2064
2065 static SEM_PC
2066 SEM_FN_NAME (i960base,shri1) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
2067 {
2068 #define FLD(f) abuf->fields.sfmt_emul1.f
2069 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
2070 int UNUSED written = 0;
2071 IADDR UNUSED pc = abuf->addr;
2072 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
2073
2074 {
2075 SI opval = (GEUSI (FLD (f_src1), 32)) ? (SRASI (* FLD (i_src2), 31)) : (SRASI (* FLD (i_src2), FLD (f_src1)));
2076 * FLD (i_dst) = opval;
2077 TRACE_RESULT (current_cpu, abuf, "dst", 'x', opval);
2078 }
2079
2080 return vpc;
2081 #undef FLD
2082 }
2083
2084 /* shri2: shri $src1, $lit2, $dst */
2085
2086 static SEM_PC
2087 SEM_FN_NAME (i960base,shri2) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
2088 {
2089 #define FLD(f) abuf->fields.sfmt_emul2.f
2090 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
2091 int UNUSED written = 0;
2092 IADDR UNUSED pc = abuf->addr;
2093 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
2094
2095 {
2096 SI opval = (GEUSI (* FLD (i_src1), 32)) ? (SRASI (FLD (f_src2), 31)) : (SRASI (FLD (f_src2), * FLD (i_src1)));
2097 * FLD (i_dst) = opval;
2098 TRACE_RESULT (current_cpu, abuf, "dst", 'x', opval);
2099 }
2100
2101 return vpc;
2102 #undef FLD
2103 }
2104
2105 /* shri3: shri $lit1, $lit2, $dst */
2106
2107 static SEM_PC
2108 SEM_FN_NAME (i960base,shri3) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
2109 {
2110 #define FLD(f) abuf->fields.sfmt_emul3.f
2111 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
2112 int UNUSED written = 0;
2113 IADDR UNUSED pc = abuf->addr;
2114 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
2115
2116 {
2117 SI opval = (GEUSI (FLD (f_src1), 32)) ? (SRASI (FLD (f_src2), 31)) : (SRASI (FLD (f_src2), FLD (f_src1)));
2118 * FLD (i_dst) = opval;
2119 TRACE_RESULT (current_cpu, abuf, "dst", 'x', opval);
2120 }
2121
2122 return vpc;
2123 #undef FLD
2124 }
2125
2126 /* emul: emul $src1, $src2, $dst */
2127
2128 static SEM_PC
2129 SEM_FN_NAME (i960base,emul) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
2130 {
2131 #define FLD(f) abuf->fields.sfmt_emul.f
2132 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
2133 int UNUSED written = 0;
2134 IADDR UNUSED pc = abuf->addr;
2135 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
2136
2137 {
2138 DI tmp_temp;
2139 SI tmp_dregno;
2140 tmp_temp = MULDI (ZEXTSIDI (* FLD (i_src1)), ZEXTSIDI (* FLD (i_src2)));
2141 tmp_dregno = FLD (f_srcdst);
2142 {
2143 SI opval = TRUNCDISI (tmp_temp);
2144 * FLD (i_dst) = opval;
2145 TRACE_RESULT (current_cpu, abuf, "dst", 'x', opval);
2146 }
2147 {
2148 SI opval = TRUNCDISI (SRLDI (tmp_temp, 32));
2149 CPU (h_gr[((FLD (f_srcdst)) + (1))]) = opval;
2150 TRACE_RESULT (current_cpu, abuf, "gr-add--DFLT-index-of--DFLT-dst-1", 'x', opval);
2151 }
2152 }
2153
2154 return vpc;
2155 #undef FLD
2156 }
2157
2158 /* emul1: emul $lit1, $src2, $dst */
2159
2160 static SEM_PC
2161 SEM_FN_NAME (i960base,emul1) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
2162 {
2163 #define FLD(f) abuf->fields.sfmt_emul1.f
2164 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
2165 int UNUSED written = 0;
2166 IADDR UNUSED pc = abuf->addr;
2167 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
2168
2169 {
2170 DI tmp_temp;
2171 SI tmp_dregno;
2172 tmp_temp = MULDI (ZEXTSIDI (FLD (f_src1)), ZEXTSIDI (* FLD (i_src2)));
2173 tmp_dregno = FLD (f_srcdst);
2174 {
2175 SI opval = TRUNCDISI (tmp_temp);
2176 * FLD (i_dst) = opval;
2177 TRACE_RESULT (current_cpu, abuf, "dst", 'x', opval);
2178 }
2179 {
2180 SI opval = TRUNCDISI (SRLDI (tmp_temp, 32));
2181 CPU (h_gr[((FLD (f_srcdst)) + (1))]) = opval;
2182 TRACE_RESULT (current_cpu, abuf, "gr-add--DFLT-index-of--DFLT-dst-1", 'x', opval);
2183 }
2184 }
2185
2186 return vpc;
2187 #undef FLD
2188 }
2189
2190 /* emul2: emul $src1, $lit2, $dst */
2191
2192 static SEM_PC
2193 SEM_FN_NAME (i960base,emul2) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
2194 {
2195 #define FLD(f) abuf->fields.sfmt_emul2.f
2196 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
2197 int UNUSED written = 0;
2198 IADDR UNUSED pc = abuf->addr;
2199 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
2200
2201 {
2202 DI tmp_temp;
2203 SI tmp_dregno;
2204 tmp_temp = MULDI (ZEXTSIDI (* FLD (i_src1)), ZEXTSIDI (FLD (f_src2)));
2205 tmp_dregno = FLD (f_srcdst);
2206 {
2207 SI opval = TRUNCDISI (tmp_temp);
2208 * FLD (i_dst) = opval;
2209 TRACE_RESULT (current_cpu, abuf, "dst", 'x', opval);
2210 }
2211 {
2212 SI opval = TRUNCDISI (SRLDI (tmp_temp, 32));
2213 CPU (h_gr[((FLD (f_srcdst)) + (1))]) = opval;
2214 TRACE_RESULT (current_cpu, abuf, "gr-add--DFLT-index-of--DFLT-dst-1", 'x', opval);
2215 }
2216 }
2217
2218 return vpc;
2219 #undef FLD
2220 }
2221
2222 /* emul3: emul $lit1, $lit2, $dst */
2223
2224 static SEM_PC
2225 SEM_FN_NAME (i960base,emul3) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
2226 {
2227 #define FLD(f) abuf->fields.sfmt_emul3.f
2228 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
2229 int UNUSED written = 0;
2230 IADDR UNUSED pc = abuf->addr;
2231 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
2232
2233 {
2234 DI tmp_temp;
2235 SI tmp_dregno;
2236 tmp_temp = MULDI (ZEXTSIDI (FLD (f_src1)), ZEXTSIDI (FLD (f_src2)));
2237 tmp_dregno = FLD (f_srcdst);
2238 {
2239 SI opval = TRUNCDISI (tmp_temp);
2240 * FLD (i_dst) = opval;
2241 TRACE_RESULT (current_cpu, abuf, "dst", 'x', opval);
2242 }
2243 {
2244 SI opval = TRUNCDISI (SRLDI (tmp_temp, 32));
2245 CPU (h_gr[((FLD (f_srcdst)) + (1))]) = opval;
2246 TRACE_RESULT (current_cpu, abuf, "gr-add--DFLT-index-of--DFLT-dst-1", 'x', opval);
2247 }
2248 }
2249
2250 return vpc;
2251 #undef FLD
2252 }
2253
2254 /* mov: mov $src1, $dst */
2255
2256 static SEM_PC
2257 SEM_FN_NAME (i960base,mov) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
2258 {
2259 #define FLD(f) abuf->fields.sfmt_emul2.f
2260 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
2261 int UNUSED written = 0;
2262 IADDR UNUSED pc = abuf->addr;
2263 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
2264
2265 {
2266 SI opval = * FLD (i_src1);
2267 * FLD (i_dst) = opval;
2268 TRACE_RESULT (current_cpu, abuf, "dst", 'x', opval);
2269 }
2270
2271 return vpc;
2272 #undef FLD
2273 }
2274
2275 /* mov1: mov $lit1, $dst */
2276
2277 static SEM_PC
2278 SEM_FN_NAME (i960base,mov1) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
2279 {
2280 #define FLD(f) abuf->fields.sfmt_emul3.f
2281 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
2282 int UNUSED written = 0;
2283 IADDR UNUSED pc = abuf->addr;
2284 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
2285
2286 {
2287 SI opval = FLD (f_src1);
2288 * FLD (i_dst) = opval;
2289 TRACE_RESULT (current_cpu, abuf, "dst", 'x', opval);
2290 }
2291
2292 return vpc;
2293 #undef FLD
2294 }
2295
2296 /* movl: movl $src1, $dst */
2297
2298 static SEM_PC
2299 SEM_FN_NAME (i960base,movl) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
2300 {
2301 #define FLD(f) abuf->fields.sfmt_movq.f
2302 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
2303 int UNUSED written = 0;
2304 IADDR UNUSED pc = abuf->addr;
2305 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
2306
2307 {
2308 SI tmp_dregno;
2309 SI tmp_sregno;
2310 tmp_dregno = FLD (f_srcdst);
2311 tmp_sregno = FLD (f_src1);
2312 {
2313 SI opval = * FLD (i_src1);
2314 * FLD (i_dst) = opval;
2315 TRACE_RESULT (current_cpu, abuf, "dst", 'x', opval);
2316 }
2317 {
2318 SI opval = CPU (h_gr[((FLD (f_src1)) + (1))]);
2319 CPU (h_gr[((FLD (f_srcdst)) + (1))]) = opval;
2320 TRACE_RESULT (current_cpu, abuf, "gr-add--DFLT-index-of--DFLT-dst-1", 'x', opval);
2321 }
2322 }
2323
2324 return vpc;
2325 #undef FLD
2326 }
2327
2328 /* movl1: movl $lit1, $dst */
2329
2330 static SEM_PC
2331 SEM_FN_NAME (i960base,movl1) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
2332 {
2333 #define FLD(f) abuf->fields.sfmt_emul3.f
2334 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
2335 int UNUSED written = 0;
2336 IADDR UNUSED pc = abuf->addr;
2337 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
2338
2339 {
2340 SI tmp_dregno;
2341 tmp_dregno = FLD (f_srcdst);
2342 {
2343 SI opval = FLD (f_src1);
2344 * FLD (i_dst) = opval;
2345 TRACE_RESULT (current_cpu, abuf, "dst", 'x', opval);
2346 }
2347 {
2348 SI opval = 0;
2349 CPU (h_gr[((FLD (f_srcdst)) + (1))]) = opval;
2350 TRACE_RESULT (current_cpu, abuf, "gr-add--DFLT-index-of--DFLT-dst-1", 'x', opval);
2351 }
2352 }
2353
2354 return vpc;
2355 #undef FLD
2356 }
2357
2358 /* movt: movt $src1, $dst */
2359
2360 static SEM_PC
2361 SEM_FN_NAME (i960base,movt) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
2362 {
2363 #define FLD(f) abuf->fields.sfmt_movq.f
2364 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
2365 int UNUSED written = 0;
2366 IADDR UNUSED pc = abuf->addr;
2367 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
2368
2369 {
2370 SI tmp_dregno;
2371 SI tmp_sregno;
2372 tmp_dregno = FLD (f_srcdst);
2373 tmp_sregno = FLD (f_src1);
2374 {
2375 SI opval = * FLD (i_src1);
2376 * FLD (i_dst) = opval;
2377 TRACE_RESULT (current_cpu, abuf, "dst", 'x', opval);
2378 }
2379 {
2380 SI opval = CPU (h_gr[((FLD (f_src1)) + (1))]);
2381 CPU (h_gr[((FLD (f_srcdst)) + (1))]) = opval;
2382 TRACE_RESULT (current_cpu, abuf, "gr-add--DFLT-index-of--DFLT-dst-1", 'x', opval);
2383 }
2384 {
2385 SI opval = CPU (h_gr[((FLD (f_src1)) + (2))]);
2386 CPU (h_gr[((FLD (f_srcdst)) + (2))]) = opval;
2387 TRACE_RESULT (current_cpu, abuf, "gr-add--DFLT-index-of--DFLT-dst-2", 'x', opval);
2388 }
2389 }
2390
2391 return vpc;
2392 #undef FLD
2393 }
2394
2395 /* movt1: movt $lit1, $dst */
2396
2397 static SEM_PC
2398 SEM_FN_NAME (i960base,movt1) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
2399 {
2400 #define FLD(f) abuf->fields.sfmt_movq.f
2401 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
2402 int UNUSED written = 0;
2403 IADDR UNUSED pc = abuf->addr;
2404 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
2405
2406 {
2407 SI tmp_dregno;
2408 tmp_dregno = FLD (f_srcdst);
2409 {
2410 SI opval = FLD (f_src1);
2411 * FLD (i_dst) = opval;
2412 TRACE_RESULT (current_cpu, abuf, "dst", 'x', opval);
2413 }
2414 {
2415 SI opval = 0;
2416 CPU (h_gr[((FLD (f_srcdst)) + (1))]) = opval;
2417 TRACE_RESULT (current_cpu, abuf, "gr-add--DFLT-index-of--DFLT-dst-1", 'x', opval);
2418 }
2419 {
2420 SI opval = 0;
2421 CPU (h_gr[((FLD (f_srcdst)) + (2))]) = opval;
2422 TRACE_RESULT (current_cpu, abuf, "gr-add--DFLT-index-of--DFLT-dst-2", 'x', opval);
2423 }
2424 }
2425
2426 return vpc;
2427 #undef FLD
2428 }
2429
2430 /* movq: movq $src1, $dst */
2431
2432 static SEM_PC
2433 SEM_FN_NAME (i960base,movq) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
2434 {
2435 #define FLD(f) abuf->fields.sfmt_movq.f
2436 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
2437 int UNUSED written = 0;
2438 IADDR UNUSED pc = abuf->addr;
2439 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
2440
2441 {
2442 SI tmp_dregno;
2443 SI tmp_sregno;
2444 tmp_dregno = FLD (f_srcdst);
2445 tmp_sregno = FLD (f_src1);
2446 {
2447 SI opval = * FLD (i_src1);
2448 * FLD (i_dst) = opval;
2449 TRACE_RESULT (current_cpu, abuf, "dst", 'x', opval);
2450 }
2451 {
2452 SI opval = CPU (h_gr[((FLD (f_src1)) + (1))]);
2453 CPU (h_gr[((FLD (f_srcdst)) + (1))]) = opval;
2454 TRACE_RESULT (current_cpu, abuf, "gr-add--DFLT-index-of--DFLT-dst-1", 'x', opval);
2455 }
2456 {
2457 SI opval = CPU (h_gr[((FLD (f_src1)) + (2))]);
2458 CPU (h_gr[((FLD (f_srcdst)) + (2))]) = opval;
2459 TRACE_RESULT (current_cpu, abuf, "gr-add--DFLT-index-of--DFLT-dst-2", 'x', opval);
2460 }
2461 {
2462 SI opval = CPU (h_gr[((FLD (f_src1)) + (3))]);
2463 CPU (h_gr[((FLD (f_srcdst)) + (3))]) = opval;
2464 TRACE_RESULT (current_cpu, abuf, "gr-add--DFLT-index-of--DFLT-dst-3", 'x', opval);
2465 }
2466 }
2467
2468 return vpc;
2469 #undef FLD
2470 }
2471
2472 /* movq1: movq $lit1, $dst */
2473
2474 static SEM_PC
2475 SEM_FN_NAME (i960base,movq1) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
2476 {
2477 #define FLD(f) abuf->fields.sfmt_movq.f
2478 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
2479 int UNUSED written = 0;
2480 IADDR UNUSED pc = abuf->addr;
2481 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
2482
2483 {
2484 SI tmp_dregno;
2485 tmp_dregno = FLD (f_srcdst);
2486 {
2487 SI opval = FLD (f_src1);
2488 * FLD (i_dst) = opval;
2489 TRACE_RESULT (current_cpu, abuf, "dst", 'x', opval);
2490 }
2491 {
2492 SI opval = 0;
2493 CPU (h_gr[((FLD (f_srcdst)) + (1))]) = opval;
2494 TRACE_RESULT (current_cpu, abuf, "gr-add--DFLT-index-of--DFLT-dst-1", 'x', opval);
2495 }
2496 {
2497 SI opval = 0;
2498 CPU (h_gr[((FLD (f_srcdst)) + (2))]) = opval;
2499 TRACE_RESULT (current_cpu, abuf, "gr-add--DFLT-index-of--DFLT-dst-2", 'x', opval);
2500 }
2501 {
2502 SI opval = 0;
2503 CPU (h_gr[((FLD (f_srcdst)) + (3))]) = opval;
2504 TRACE_RESULT (current_cpu, abuf, "gr-add--DFLT-index-of--DFLT-dst-3", 'x', opval);
2505 }
2506 }
2507
2508 return vpc;
2509 #undef FLD
2510 }
2511
2512 /* modpc: modpc $src1, $src2, $dst */
2513
2514 static SEM_PC
2515 SEM_FN_NAME (i960base,modpc) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
2516 {
2517 #define FLD(f) abuf->fields.sfmt_emul1.f
2518 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
2519 int UNUSED written = 0;
2520 IADDR UNUSED pc = abuf->addr;
2521 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
2522
2523 {
2524 SI opval = * FLD (i_src2);
2525 * FLD (i_dst) = opval;
2526 TRACE_RESULT (current_cpu, abuf, "dst", 'x', opval);
2527 }
2528
2529 return vpc;
2530 #undef FLD
2531 }
2532
2533 /* modac: modac $src1, $src2, $dst */
2534
2535 static SEM_PC
2536 SEM_FN_NAME (i960base,modac) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
2537 {
2538 #define FLD(f) abuf->fields.sfmt_emul1.f
2539 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
2540 int UNUSED written = 0;
2541 IADDR UNUSED pc = abuf->addr;
2542 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
2543
2544 {
2545 SI opval = * FLD (i_src2);
2546 * FLD (i_dst) = opval;
2547 TRACE_RESULT (current_cpu, abuf, "dst", 'x', opval);
2548 }
2549
2550 return vpc;
2551 #undef FLD
2552 }
2553
2554 /* lda-offset: lda $offset, $dst */
2555
2556 static SEM_PC
2557 SEM_FN_NAME (i960base,lda_offset) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
2558 {
2559 #define FLD(f) abuf->fields.sfmt_ldq_indirect_offset.f
2560 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
2561 int UNUSED written = 0;
2562 IADDR UNUSED pc = abuf->addr;
2563 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
2564
2565 {
2566 SI opval = FLD (f_offset);
2567 * FLD (i_dst) = opval;
2568 TRACE_RESULT (current_cpu, abuf, "dst", 'x', opval);
2569 }
2570
2571 return vpc;
2572 #undef FLD
2573 }
2574
2575 /* lda-indirect-offset: lda $offset($abase), $dst */
2576
2577 static SEM_PC
2578 SEM_FN_NAME (i960base,lda_indirect_offset) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
2579 {
2580 #define FLD(f) abuf->fields.sfmt_ldq_indirect_offset.f
2581 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
2582 int UNUSED written = 0;
2583 IADDR UNUSED pc = abuf->addr;
2584 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
2585
2586 {
2587 SI opval = ADDSI (FLD (f_offset), * FLD (i_abase));
2588 * FLD (i_dst) = opval;
2589 TRACE_RESULT (current_cpu, abuf, "dst", 'x', opval);
2590 }
2591
2592 return vpc;
2593 #undef FLD
2594 }
2595
2596 /* lda-indirect: lda ($abase), $dst */
2597
2598 static SEM_PC
2599 SEM_FN_NAME (i960base,lda_indirect) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
2600 {
2601 #define FLD(f) abuf->fields.sfmt_ldq_indirect_offset.f
2602 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
2603 int UNUSED written = 0;
2604 IADDR UNUSED pc = abuf->addr;
2605 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
2606
2607 {
2608 SI opval = * FLD (i_abase);
2609 * FLD (i_dst) = opval;
2610 TRACE_RESULT (current_cpu, abuf, "dst", 'x', opval);
2611 }
2612
2613 return vpc;
2614 #undef FLD
2615 }
2616
2617 /* lda-indirect-index: lda ($abase)[$index*S$scale], $dst */
2618
2619 static SEM_PC
2620 SEM_FN_NAME (i960base,lda_indirect_index) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
2621 {
2622 #define FLD(f) abuf->fields.sfmt_ldq_indirect_index_disp.f
2623 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
2624 int UNUSED written = 0;
2625 IADDR UNUSED pc = abuf->addr;
2626 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
2627
2628 {
2629 SI opval = ADDSI (* FLD (i_abase), MULSI (* FLD (i_index), SLLSI (1, FLD (f_scale))));
2630 * FLD (i_dst) = opval;
2631 TRACE_RESULT (current_cpu, abuf, "dst", 'x', opval);
2632 }
2633
2634 return vpc;
2635 #undef FLD
2636 }
2637
2638 /* lda-disp: lda $optdisp, $dst */
2639
2640 static SEM_PC
2641 SEM_FN_NAME (i960base,lda_disp) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
2642 {
2643 #define FLD(f) abuf->fields.sfmt_ldq_indirect_index_disp.f
2644 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
2645 int UNUSED written = 0;
2646 IADDR UNUSED pc = abuf->addr;
2647 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 8);
2648
2649 {
2650 SI opval = FLD (f_optdisp);
2651 * FLD (i_dst) = opval;
2652 TRACE_RESULT (current_cpu, abuf, "dst", 'x', opval);
2653 }
2654
2655 return vpc;
2656 #undef FLD
2657 }
2658
2659 /* lda-indirect-disp: lda $optdisp($abase), $dst */
2660
2661 static SEM_PC
2662 SEM_FN_NAME (i960base,lda_indirect_disp) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
2663 {
2664 #define FLD(f) abuf->fields.sfmt_ldq_indirect_index_disp.f
2665 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
2666 int UNUSED written = 0;
2667 IADDR UNUSED pc = abuf->addr;
2668 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 8);
2669
2670 {
2671 SI opval = ADDSI (FLD (f_optdisp), * FLD (i_abase));
2672 * FLD (i_dst) = opval;
2673 TRACE_RESULT (current_cpu, abuf, "dst", 'x', opval);
2674 }
2675
2676 return vpc;
2677 #undef FLD
2678 }
2679
2680 /* lda-index-disp: lda $optdisp[$index*S$scale], $dst */
2681
2682 static SEM_PC
2683 SEM_FN_NAME (i960base,lda_index_disp) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
2684 {
2685 #define FLD(f) abuf->fields.sfmt_ldq_indirect_index_disp.f
2686 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
2687 int UNUSED written = 0;
2688 IADDR UNUSED pc = abuf->addr;
2689 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 8);
2690
2691 {
2692 SI opval = ADDSI (FLD (f_optdisp), MULSI (* FLD (i_index), SLLSI (1, FLD (f_scale))));
2693 * FLD (i_dst) = opval;
2694 TRACE_RESULT (current_cpu, abuf, "dst", 'x', opval);
2695 }
2696
2697 return vpc;
2698 #undef FLD
2699 }
2700
2701 /* lda-indirect-index-disp: lda $optdisp($abase)[$index*S$scale], $dst */
2702
2703 static SEM_PC
2704 SEM_FN_NAME (i960base,lda_indirect_index_disp) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
2705 {
2706 #define FLD(f) abuf->fields.sfmt_ldq_indirect_index_disp.f
2707 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
2708 int UNUSED written = 0;
2709 IADDR UNUSED pc = abuf->addr;
2710 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 8);
2711
2712 {
2713 SI opval = ADDSI (FLD (f_optdisp), ADDSI (* FLD (i_abase), MULSI (* FLD (i_index), SLLSI (1, FLD (f_scale)))));
2714 * FLD (i_dst) = opval;
2715 TRACE_RESULT (current_cpu, abuf, "dst", 'x', opval);
2716 }
2717
2718 return vpc;
2719 #undef FLD
2720 }
2721
2722 /* ld-offset: ld $offset, $dst */
2723
2724 static SEM_PC
2725 SEM_FN_NAME (i960base,ld_offset) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
2726 {
2727 #define FLD(f) abuf->fields.sfmt_ldq_indirect_offset.f
2728 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
2729 int UNUSED written = 0;
2730 IADDR UNUSED pc = abuf->addr;
2731 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
2732
2733 {
2734 SI opval = GETMEMSI (current_cpu, pc, FLD (f_offset));
2735 * FLD (i_dst) = opval;
2736 TRACE_RESULT (current_cpu, abuf, "dst", 'x', opval);
2737 }
2738
2739 return vpc;
2740 #undef FLD
2741 }
2742
2743 /* ld-indirect-offset: ld $offset($abase), $dst */
2744
2745 static SEM_PC
2746 SEM_FN_NAME (i960base,ld_indirect_offset) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
2747 {
2748 #define FLD(f) abuf->fields.sfmt_ldq_indirect_offset.f
2749 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
2750 int UNUSED written = 0;
2751 IADDR UNUSED pc = abuf->addr;
2752 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
2753
2754 {
2755 SI opval = GETMEMSI (current_cpu, pc, ADDSI (FLD (f_offset), * FLD (i_abase)));
2756 * FLD (i_dst) = opval;
2757 TRACE_RESULT (current_cpu, abuf, "dst", 'x', opval);
2758 }
2759
2760 return vpc;
2761 #undef FLD
2762 }
2763
2764 /* ld-indirect: ld ($abase), $dst */
2765
2766 static SEM_PC
2767 SEM_FN_NAME (i960base,ld_indirect) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
2768 {
2769 #define FLD(f) abuf->fields.sfmt_ldq_indirect_offset.f
2770 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
2771 int UNUSED written = 0;
2772 IADDR UNUSED pc = abuf->addr;
2773 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
2774
2775 {
2776 SI opval = GETMEMSI (current_cpu, pc, * FLD (i_abase));
2777 * FLD (i_dst) = opval;
2778 TRACE_RESULT (current_cpu, abuf, "dst", 'x', opval);
2779 }
2780
2781 return vpc;
2782 #undef FLD
2783 }
2784
2785 /* ld-indirect-index: ld ($abase)[$index*S$scale], $dst */
2786
2787 static SEM_PC
2788 SEM_FN_NAME (i960base,ld_indirect_index) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
2789 {
2790 #define FLD(f) abuf->fields.sfmt_ldq_indirect_index_disp.f
2791 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
2792 int UNUSED written = 0;
2793 IADDR UNUSED pc = abuf->addr;
2794 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
2795
2796 {
2797 SI opval = GETMEMSI (current_cpu, pc, ADDSI (* FLD (i_abase), MULSI (* FLD (i_index), SLLSI (1, FLD (f_scale)))));
2798 * FLD (i_dst) = opval;
2799 TRACE_RESULT (current_cpu, abuf, "dst", 'x', opval);
2800 }
2801
2802 return vpc;
2803 #undef FLD
2804 }
2805
2806 /* ld-disp: ld $optdisp, $dst */
2807
2808 static SEM_PC
2809 SEM_FN_NAME (i960base,ld_disp) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
2810 {
2811 #define FLD(f) abuf->fields.sfmt_ldq_indirect_index_disp.f
2812 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
2813 int UNUSED written = 0;
2814 IADDR UNUSED pc = abuf->addr;
2815 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 8);
2816
2817 {
2818 SI opval = GETMEMSI (current_cpu, pc, FLD (f_optdisp));
2819 * FLD (i_dst) = opval;
2820 TRACE_RESULT (current_cpu, abuf, "dst", 'x', opval);
2821 }
2822
2823 return vpc;
2824 #undef FLD
2825 }
2826
2827 /* ld-indirect-disp: ld $optdisp($abase), $dst */
2828
2829 static SEM_PC
2830 SEM_FN_NAME (i960base,ld_indirect_disp) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
2831 {
2832 #define FLD(f) abuf->fields.sfmt_ldq_indirect_index_disp.f
2833 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
2834 int UNUSED written = 0;
2835 IADDR UNUSED pc = abuf->addr;
2836 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 8);
2837
2838 {
2839 SI opval = GETMEMSI (current_cpu, pc, ADDSI (FLD (f_optdisp), * FLD (i_abase)));
2840 * FLD (i_dst) = opval;
2841 TRACE_RESULT (current_cpu, abuf, "dst", 'x', opval);
2842 }
2843
2844 return vpc;
2845 #undef FLD
2846 }
2847
2848 /* ld-index-disp: ld $optdisp[$index*S$scale], $dst */
2849
2850 static SEM_PC
2851 SEM_FN_NAME (i960base,ld_index_disp) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
2852 {
2853 #define FLD(f) abuf->fields.sfmt_ldq_indirect_index_disp.f
2854 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
2855 int UNUSED written = 0;
2856 IADDR UNUSED pc = abuf->addr;
2857 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 8);
2858
2859 {
2860 SI opval = GETMEMSI (current_cpu, pc, ADDSI (FLD (f_optdisp), MULSI (* FLD (i_index), SLLSI (1, FLD (f_scale)))));
2861 * FLD (i_dst) = opval;
2862 TRACE_RESULT (current_cpu, abuf, "dst", 'x', opval);
2863 }
2864
2865 return vpc;
2866 #undef FLD
2867 }
2868
2869 /* ld-indirect-index-disp: ld $optdisp($abase)[$index*S$scale], $dst */
2870
2871 static SEM_PC
2872 SEM_FN_NAME (i960base,ld_indirect_index_disp) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
2873 {
2874 #define FLD(f) abuf->fields.sfmt_ldq_indirect_index_disp.f
2875 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
2876 int UNUSED written = 0;
2877 IADDR UNUSED pc = abuf->addr;
2878 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 8);
2879
2880 {
2881 SI opval = GETMEMSI (current_cpu, pc, ADDSI (FLD (f_optdisp), ADDSI (* FLD (i_abase), MULSI (* FLD (i_index), SLLSI (1, FLD (f_scale))))));
2882 * FLD (i_dst) = opval;
2883 TRACE_RESULT (current_cpu, abuf, "dst", 'x', opval);
2884 }
2885
2886 return vpc;
2887 #undef FLD
2888 }
2889
2890 /* ldob-offset: ldob $offset, $dst */
2891
2892 static SEM_PC
2893 SEM_FN_NAME (i960base,ldob_offset) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
2894 {
2895 #define FLD(f) abuf->fields.sfmt_ldq_indirect_offset.f
2896 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
2897 int UNUSED written = 0;
2898 IADDR UNUSED pc = abuf->addr;
2899 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
2900
2901 {
2902 SI opval = GETMEMUQI (current_cpu, pc, FLD (f_offset));
2903 * FLD (i_dst) = opval;
2904 TRACE_RESULT (current_cpu, abuf, "dst", 'x', opval);
2905 }
2906
2907 return vpc;
2908 #undef FLD
2909 }
2910
2911 /* ldob-indirect-offset: ldob $offset($abase), $dst */
2912
2913 static SEM_PC
2914 SEM_FN_NAME (i960base,ldob_indirect_offset) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
2915 {
2916 #define FLD(f) abuf->fields.sfmt_ldq_indirect_offset.f
2917 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
2918 int UNUSED written = 0;
2919 IADDR UNUSED pc = abuf->addr;
2920 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
2921
2922 {
2923 SI opval = GETMEMUQI (current_cpu, pc, ADDSI (FLD (f_offset), * FLD (i_abase)));
2924 * FLD (i_dst) = opval;
2925 TRACE_RESULT (current_cpu, abuf, "dst", 'x', opval);
2926 }
2927
2928 return vpc;
2929 #undef FLD
2930 }
2931
2932 /* ldob-indirect: ldob ($abase), $dst */
2933
2934 static SEM_PC
2935 SEM_FN_NAME (i960base,ldob_indirect) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
2936 {
2937 #define FLD(f) abuf->fields.sfmt_ldq_indirect_offset.f
2938 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
2939 int UNUSED written = 0;
2940 IADDR UNUSED pc = abuf->addr;
2941 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
2942
2943 {
2944 SI opval = GETMEMUQI (current_cpu, pc, * FLD (i_abase));
2945 * FLD (i_dst) = opval;
2946 TRACE_RESULT (current_cpu, abuf, "dst", 'x', opval);
2947 }
2948
2949 return vpc;
2950 #undef FLD
2951 }
2952
2953 /* ldob-indirect-index: ldob ($abase)[$index*S$scale], $dst */
2954
2955 static SEM_PC
2956 SEM_FN_NAME (i960base,ldob_indirect_index) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
2957 {
2958 #define FLD(f) abuf->fields.sfmt_ldq_indirect_index_disp.f
2959 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
2960 int UNUSED written = 0;
2961 IADDR UNUSED pc = abuf->addr;
2962 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
2963
2964 {
2965 SI opval = GETMEMUQI (current_cpu, pc, ADDSI (* FLD (i_abase), MULSI (* FLD (i_index), SLLSI (1, FLD (f_scale)))));
2966 * FLD (i_dst) = opval;
2967 TRACE_RESULT (current_cpu, abuf, "dst", 'x', opval);
2968 }
2969
2970 return vpc;
2971 #undef FLD
2972 }
2973
2974 /* ldob-disp: ldob $optdisp, $dst */
2975
2976 static SEM_PC
2977 SEM_FN_NAME (i960base,ldob_disp) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
2978 {
2979 #define FLD(f) abuf->fields.sfmt_ldq_indirect_index_disp.f
2980 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
2981 int UNUSED written = 0;
2982 IADDR UNUSED pc = abuf->addr;
2983 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 8);
2984
2985 {
2986 SI opval = GETMEMUQI (current_cpu, pc, FLD (f_optdisp));
2987 * FLD (i_dst) = opval;
2988 TRACE_RESULT (current_cpu, abuf, "dst", 'x', opval);
2989 }
2990
2991 return vpc;
2992 #undef FLD
2993 }
2994
2995 /* ldob-indirect-disp: ldob $optdisp($abase), $dst */
2996
2997 static SEM_PC
2998 SEM_FN_NAME (i960base,ldob_indirect_disp) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
2999 {
3000 #define FLD(f) abuf->fields.sfmt_ldq_indirect_index_disp.f
3001 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
3002 int UNUSED written = 0;
3003 IADDR UNUSED pc = abuf->addr;
3004 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 8);
3005
3006 {
3007 SI opval = GETMEMUQI (current_cpu, pc, ADDSI (FLD (f_optdisp), * FLD (i_abase)));
3008 * FLD (i_dst) = opval;
3009 TRACE_RESULT (current_cpu, abuf, "dst", 'x', opval);
3010 }
3011
3012 return vpc;
3013 #undef FLD
3014 }
3015
3016 /* ldob-index-disp: ldob $optdisp[$index*S$scale], $dst */
3017
3018 static SEM_PC
3019 SEM_FN_NAME (i960base,ldob_index_disp) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
3020 {
3021 #define FLD(f) abuf->fields.sfmt_ldq_indirect_index_disp.f
3022 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
3023 int UNUSED written = 0;
3024 IADDR UNUSED pc = abuf->addr;
3025 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 8);
3026
3027 {
3028 SI opval = GETMEMUQI (current_cpu, pc, ADDSI (FLD (f_optdisp), MULSI (* FLD (i_index), SLLSI (1, FLD (f_scale)))));
3029 * FLD (i_dst) = opval;
3030 TRACE_RESULT (current_cpu, abuf, "dst", 'x', opval);
3031 }
3032
3033 return vpc;
3034 #undef FLD
3035 }
3036
3037 /* ldob-indirect-index-disp: ldob $optdisp($abase)[$index*S$scale], $dst */
3038
3039 static SEM_PC
3040 SEM_FN_NAME (i960base,ldob_indirect_index_disp) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
3041 {
3042 #define FLD(f) abuf->fields.sfmt_ldq_indirect_index_disp.f
3043 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
3044 int UNUSED written = 0;
3045 IADDR UNUSED pc = abuf->addr;
3046 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 8);
3047
3048 {
3049 SI opval = GETMEMUQI (current_cpu, pc, ADDSI (FLD (f_optdisp), ADDSI (* FLD (i_abase), MULSI (* FLD (i_index), SLLSI (1, FLD (f_scale))))));
3050 * FLD (i_dst) = opval;
3051 TRACE_RESULT (current_cpu, abuf, "dst", 'x', opval);
3052 }
3053
3054 return vpc;
3055 #undef FLD
3056 }
3057
3058 /* ldos-offset: ldos $offset, $dst */
3059
3060 static SEM_PC
3061 SEM_FN_NAME (i960base,ldos_offset) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
3062 {
3063 #define FLD(f) abuf->fields.sfmt_ldq_indirect_offset.f
3064 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
3065 int UNUSED written = 0;
3066 IADDR UNUSED pc = abuf->addr;
3067 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
3068
3069 {
3070 SI opval = GETMEMUHI (current_cpu, pc, FLD (f_offset));
3071 * FLD (i_dst) = opval;
3072 TRACE_RESULT (current_cpu, abuf, "dst", 'x', opval);
3073 }
3074
3075 return vpc;
3076 #undef FLD
3077 }
3078
3079 /* ldos-indirect-offset: ldos $offset($abase), $dst */
3080
3081 static SEM_PC
3082 SEM_FN_NAME (i960base,ldos_indirect_offset) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
3083 {
3084 #define FLD(f) abuf->fields.sfmt_ldq_indirect_offset.f
3085 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
3086 int UNUSED written = 0;
3087 IADDR UNUSED pc = abuf->addr;
3088 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
3089
3090 {
3091 SI opval = GETMEMUHI (current_cpu, pc, ADDSI (FLD (f_offset), * FLD (i_abase)));
3092 * FLD (i_dst) = opval;
3093 TRACE_RESULT (current_cpu, abuf, "dst", 'x', opval);
3094 }
3095
3096 return vpc;
3097 #undef FLD
3098 }
3099
3100 /* ldos-indirect: ldos ($abase), $dst */
3101
3102 static SEM_PC
3103 SEM_FN_NAME (i960base,ldos_indirect) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
3104 {
3105 #define FLD(f) abuf->fields.sfmt_ldq_indirect_offset.f
3106 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
3107 int UNUSED written = 0;
3108 IADDR UNUSED pc = abuf->addr;
3109 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
3110
3111 {
3112 SI opval = GETMEMUHI (current_cpu, pc, * FLD (i_abase));
3113 * FLD (i_dst) = opval;
3114 TRACE_RESULT (current_cpu, abuf, "dst", 'x', opval);
3115 }
3116
3117 return vpc;
3118 #undef FLD
3119 }
3120
3121 /* ldos-indirect-index: ldos ($abase)[$index*S$scale], $dst */
3122
3123 static SEM_PC
3124 SEM_FN_NAME (i960base,ldos_indirect_index) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
3125 {
3126 #define FLD(f) abuf->fields.sfmt_ldq_indirect_index_disp.f
3127 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
3128 int UNUSED written = 0;
3129 IADDR UNUSED pc = abuf->addr;
3130 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
3131
3132 {
3133 SI opval = GETMEMUHI (current_cpu, pc, ADDSI (* FLD (i_abase), MULSI (* FLD (i_index), SLLSI (1, FLD (f_scale)))));
3134 * FLD (i_dst) = opval;
3135 TRACE_RESULT (current_cpu, abuf, "dst", 'x', opval);
3136 }
3137
3138 return vpc;
3139 #undef FLD
3140 }
3141
3142 /* ldos-disp: ldos $optdisp, $dst */
3143
3144 static SEM_PC
3145 SEM_FN_NAME (i960base,ldos_disp) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
3146 {
3147 #define FLD(f) abuf->fields.sfmt_ldq_indirect_index_disp.f
3148 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
3149 int UNUSED written = 0;
3150 IADDR UNUSED pc = abuf->addr;
3151 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 8);
3152
3153 {
3154 SI opval = GETMEMUHI (current_cpu, pc, FLD (f_optdisp));
3155 * FLD (i_dst) = opval;
3156 TRACE_RESULT (current_cpu, abuf, "dst", 'x', opval);
3157 }
3158
3159 return vpc;
3160 #undef FLD
3161 }
3162
3163 /* ldos-indirect-disp: ldos $optdisp($abase), $dst */
3164
3165 static SEM_PC
3166 SEM_FN_NAME (i960base,ldos_indirect_disp) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
3167 {
3168 #define FLD(f) abuf->fields.sfmt_ldq_indirect_index_disp.f
3169 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
3170 int UNUSED written = 0;
3171 IADDR UNUSED pc = abuf->addr;
3172 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 8);
3173
3174 {
3175 SI opval = GETMEMUHI (current_cpu, pc, ADDSI (FLD (f_optdisp), * FLD (i_abase)));
3176 * FLD (i_dst) = opval;
3177 TRACE_RESULT (current_cpu, abuf, "dst", 'x', opval);
3178 }
3179
3180 return vpc;
3181 #undef FLD
3182 }
3183
3184 /* ldos-index-disp: ldos $optdisp[$index*S$scale], $dst */
3185
3186 static SEM_PC
3187 SEM_FN_NAME (i960base,ldos_index_disp) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
3188 {
3189 #define FLD(f) abuf->fields.sfmt_ldq_indirect_index_disp.f
3190 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
3191 int UNUSED written = 0;
3192 IADDR UNUSED pc = abuf->addr;
3193 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 8);
3194
3195 {
3196 SI opval = GETMEMUHI (current_cpu, pc, ADDSI (FLD (f_optdisp), MULSI (* FLD (i_index), SLLSI (1, FLD (f_scale)))));
3197 * FLD (i_dst) = opval;
3198 TRACE_RESULT (current_cpu, abuf, "dst", 'x', opval);
3199 }
3200
3201 return vpc;
3202 #undef FLD
3203 }
3204
3205 /* ldos-indirect-index-disp: ldos $optdisp($abase)[$index*S$scale], $dst */
3206
3207 static SEM_PC
3208 SEM_FN_NAME (i960base,ldos_indirect_index_disp) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
3209 {
3210 #define FLD(f) abuf->fields.sfmt_ldq_indirect_index_disp.f
3211 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
3212 int UNUSED written = 0;
3213 IADDR UNUSED pc = abuf->addr;
3214 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 8);
3215
3216 {
3217 SI opval = GETMEMUHI (current_cpu, pc, ADDSI (FLD (f_optdisp), ADDSI (* FLD (i_abase), MULSI (* FLD (i_index), SLLSI (1, FLD (f_scale))))));
3218 * FLD (i_dst) = opval;
3219 TRACE_RESULT (current_cpu, abuf, "dst", 'x', opval);
3220 }
3221
3222 return vpc;
3223 #undef FLD
3224 }
3225
3226 /* ldib-offset: ldib $offset, $dst */
3227
3228 static SEM_PC
3229 SEM_FN_NAME (i960base,ldib_offset) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
3230 {
3231 #define FLD(f) abuf->fields.sfmt_ldq_indirect_offset.f
3232 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
3233 int UNUSED written = 0;
3234 IADDR UNUSED pc = abuf->addr;
3235 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
3236
3237 {
3238 SI opval = GETMEMQI (current_cpu, pc, FLD (f_offset));
3239 * FLD (i_dst) = opval;
3240 TRACE_RESULT (current_cpu, abuf, "dst", 'x', opval);
3241 }
3242
3243 return vpc;
3244 #undef FLD
3245 }
3246
3247 /* ldib-indirect-offset: ldib $offset($abase), $dst */
3248
3249 static SEM_PC
3250 SEM_FN_NAME (i960base,ldib_indirect_offset) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
3251 {
3252 #define FLD(f) abuf->fields.sfmt_ldq_indirect_offset.f
3253 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
3254 int UNUSED written = 0;
3255 IADDR UNUSED pc = abuf->addr;
3256 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
3257
3258 {
3259 SI opval = GETMEMQI (current_cpu, pc, ADDSI (FLD (f_offset), * FLD (i_abase)));
3260 * FLD (i_dst) = opval;
3261 TRACE_RESULT (current_cpu, abuf, "dst", 'x', opval);
3262 }
3263
3264 return vpc;
3265 #undef FLD
3266 }
3267
3268 /* ldib-indirect: ldib ($abase), $dst */
3269
3270 static SEM_PC
3271 SEM_FN_NAME (i960base,ldib_indirect) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
3272 {
3273 #define FLD(f) abuf->fields.sfmt_ldq_indirect_offset.f
3274 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
3275 int UNUSED written = 0;
3276 IADDR UNUSED pc = abuf->addr;
3277 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
3278
3279 {
3280 SI opval = GETMEMQI (current_cpu, pc, * FLD (i_abase));
3281 * FLD (i_dst) = opval;
3282 TRACE_RESULT (current_cpu, abuf, "dst", 'x', opval);
3283 }
3284
3285 return vpc;
3286 #undef FLD
3287 }
3288
3289 /* ldib-indirect-index: ldib ($abase)[$index*S$scale], $dst */
3290
3291 static SEM_PC
3292 SEM_FN_NAME (i960base,ldib_indirect_index) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
3293 {
3294 #define FLD(f) abuf->fields.sfmt_ldq_indirect_index_disp.f
3295 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
3296 int UNUSED written = 0;
3297 IADDR UNUSED pc = abuf->addr;
3298 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
3299
3300 {
3301 SI opval = GETMEMQI (current_cpu, pc, ADDSI (* FLD (i_abase), MULSI (* FLD (i_index), SLLSI (1, FLD (f_scale)))));
3302 * FLD (i_dst) = opval;
3303 TRACE_RESULT (current_cpu, abuf, "dst", 'x', opval);
3304 }
3305
3306 return vpc;
3307 #undef FLD
3308 }
3309
3310 /* ldib-disp: ldib $optdisp, $dst */
3311
3312 static SEM_PC
3313 SEM_FN_NAME (i960base,ldib_disp) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
3314 {
3315 #define FLD(f) abuf->fields.sfmt_ldq_indirect_index_disp.f
3316 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
3317 int UNUSED written = 0;
3318 IADDR UNUSED pc = abuf->addr;
3319 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 8);
3320
3321 {
3322 SI opval = GETMEMQI (current_cpu, pc, FLD (f_optdisp));
3323 * FLD (i_dst) = opval;
3324 TRACE_RESULT (current_cpu, abuf, "dst", 'x', opval);
3325 }
3326
3327 return vpc;
3328 #undef FLD
3329 }
3330
3331 /* ldib-indirect-disp: ldib $optdisp($abase), $dst */
3332
3333 static SEM_PC
3334 SEM_FN_NAME (i960base,ldib_indirect_disp) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
3335 {
3336 #define FLD(f) abuf->fields.sfmt_ldq_indirect_index_disp.f
3337 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
3338 int UNUSED written = 0;
3339 IADDR UNUSED pc = abuf->addr;
3340 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 8);
3341
3342 {
3343 SI opval = GETMEMQI (current_cpu, pc, ADDSI (FLD (f_optdisp), * FLD (i_abase)));
3344 * FLD (i_dst) = opval;
3345 TRACE_RESULT (current_cpu, abuf, "dst", 'x', opval);
3346 }
3347
3348 return vpc;
3349 #undef FLD
3350 }
3351
3352 /* ldib-index-disp: ldib $optdisp[$index*S$scale], $dst */
3353
3354 static SEM_PC
3355 SEM_FN_NAME (i960base,ldib_index_disp) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
3356 {
3357 #define FLD(f) abuf->fields.sfmt_ldq_indirect_index_disp.f
3358 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
3359 int UNUSED written = 0;
3360 IADDR UNUSED pc = abuf->addr;
3361 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 8);
3362
3363 {
3364 SI opval = GETMEMQI (current_cpu, pc, ADDSI (FLD (f_optdisp), MULSI (* FLD (i_index), SLLSI (1, FLD (f_scale)))));
3365 * FLD (i_dst) = opval;
3366 TRACE_RESULT (current_cpu, abuf, "dst", 'x', opval);
3367 }
3368
3369 return vpc;
3370 #undef FLD
3371 }
3372
3373 /* ldib-indirect-index-disp: ldib $optdisp($abase)[$index*S$scale], $dst */
3374
3375 static SEM_PC
3376 SEM_FN_NAME (i960base,ldib_indirect_index_disp) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
3377 {
3378 #define FLD(f) abuf->fields.sfmt_ldq_indirect_index_disp.f
3379 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
3380 int UNUSED written = 0;
3381 IADDR UNUSED pc = abuf->addr;
3382 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 8);
3383
3384 {
3385 SI opval = GETMEMQI (current_cpu, pc, ADDSI (FLD (f_optdisp), ADDSI (* FLD (i_abase), MULSI (* FLD (i_index), SLLSI (1, FLD (f_scale))))));
3386 * FLD (i_dst) = opval;
3387 TRACE_RESULT (current_cpu, abuf, "dst", 'x', opval);
3388 }
3389
3390 return vpc;
3391 #undef FLD
3392 }
3393
3394 /* ldis-offset: ldis $offset, $dst */
3395
3396 static SEM_PC
3397 SEM_FN_NAME (i960base,ldis_offset) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
3398 {
3399 #define FLD(f) abuf->fields.sfmt_ldq_indirect_offset.f
3400 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
3401 int UNUSED written = 0;
3402 IADDR UNUSED pc = abuf->addr;
3403 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
3404
3405 {
3406 SI opval = GETMEMHI (current_cpu, pc, FLD (f_offset));
3407 * FLD (i_dst) = opval;
3408 TRACE_RESULT (current_cpu, abuf, "dst", 'x', opval);
3409 }
3410
3411 return vpc;
3412 #undef FLD
3413 }
3414
3415 /* ldis-indirect-offset: ldis $offset($abase), $dst */
3416
3417 static SEM_PC
3418 SEM_FN_NAME (i960base,ldis_indirect_offset) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
3419 {
3420 #define FLD(f) abuf->fields.sfmt_ldq_indirect_offset.f
3421 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
3422 int UNUSED written = 0;
3423 IADDR UNUSED pc = abuf->addr;
3424 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
3425
3426 {
3427 SI opval = GETMEMHI (current_cpu, pc, ADDSI (FLD (f_offset), * FLD (i_abase)));
3428 * FLD (i_dst) = opval;
3429 TRACE_RESULT (current_cpu, abuf, "dst", 'x', opval);
3430 }
3431
3432 return vpc;
3433 #undef FLD
3434 }
3435
3436 /* ldis-indirect: ldis ($abase), $dst */
3437
3438 static SEM_PC
3439 SEM_FN_NAME (i960base,ldis_indirect) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
3440 {
3441 #define FLD(f) abuf->fields.sfmt_ldq_indirect_offset.f
3442 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
3443 int UNUSED written = 0;
3444 IADDR UNUSED pc = abuf->addr;
3445 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
3446
3447 {
3448 SI opval = GETMEMHI (current_cpu, pc, * FLD (i_abase));
3449 * FLD (i_dst) = opval;
3450 TRACE_RESULT (current_cpu, abuf, "dst", 'x', opval);
3451 }
3452
3453 return vpc;
3454 #undef FLD
3455 }
3456
3457 /* ldis-indirect-index: ldis ($abase)[$index*S$scale], $dst */
3458
3459 static SEM_PC
3460 SEM_FN_NAME (i960base,ldis_indirect_index) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
3461 {
3462 #define FLD(f) abuf->fields.sfmt_ldq_indirect_index_disp.f
3463 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
3464 int UNUSED written = 0;
3465 IADDR UNUSED pc = abuf->addr;
3466 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
3467
3468 {
3469 SI opval = GETMEMHI (current_cpu, pc, ADDSI (* FLD (i_abase), MULSI (* FLD (i_index), SLLSI (1, FLD (f_scale)))));
3470 * FLD (i_dst) = opval;
3471 TRACE_RESULT (current_cpu, abuf, "dst", 'x', opval);
3472 }
3473
3474 return vpc;
3475 #undef FLD
3476 }
3477
3478 /* ldis-disp: ldis $optdisp, $dst */
3479
3480 static SEM_PC
3481 SEM_FN_NAME (i960base,ldis_disp) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
3482 {
3483 #define FLD(f) abuf->fields.sfmt_ldq_indirect_index_disp.f
3484 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
3485 int UNUSED written = 0;
3486 IADDR UNUSED pc = abuf->addr;
3487 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 8);
3488
3489 {
3490 SI opval = GETMEMHI (current_cpu, pc, FLD (f_optdisp));
3491 * FLD (i_dst) = opval;
3492 TRACE_RESULT (current_cpu, abuf, "dst", 'x', opval);
3493 }
3494
3495 return vpc;
3496 #undef FLD
3497 }
3498
3499 /* ldis-indirect-disp: ldis $optdisp($abase), $dst */
3500
3501 static SEM_PC
3502 SEM_FN_NAME (i960base,ldis_indirect_disp) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
3503 {
3504 #define FLD(f) abuf->fields.sfmt_ldq_indirect_index_disp.f
3505 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
3506 int UNUSED written = 0;
3507 IADDR UNUSED pc = abuf->addr;
3508 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 8);
3509
3510 {
3511 SI opval = GETMEMHI (current_cpu, pc, ADDSI (FLD (f_optdisp), * FLD (i_abase)));
3512 * FLD (i_dst) = opval;
3513 TRACE_RESULT (current_cpu, abuf, "dst", 'x', opval);
3514 }
3515
3516 return vpc;
3517 #undef FLD
3518 }
3519
3520 /* ldis-index-disp: ldis $optdisp[$index*S$scale], $dst */
3521
3522 static SEM_PC
3523 SEM_FN_NAME (i960base,ldis_index_disp) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
3524 {
3525 #define FLD(f) abuf->fields.sfmt_ldq_indirect_index_disp.f
3526 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
3527 int UNUSED written = 0;
3528 IADDR UNUSED pc = abuf->addr;
3529 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 8);
3530
3531 {
3532 SI opval = GETMEMHI (current_cpu, pc, ADDSI (FLD (f_optdisp), MULSI (* FLD (i_index), SLLSI (1, FLD (f_scale)))));
3533 * FLD (i_dst) = opval;
3534 TRACE_RESULT (current_cpu, abuf, "dst", 'x', opval);
3535 }
3536
3537 return vpc;
3538 #undef FLD
3539 }
3540
3541 /* ldis-indirect-index-disp: ldis $optdisp($abase)[$index*S$scale], $dst */
3542
3543 static SEM_PC
3544 SEM_FN_NAME (i960base,ldis_indirect_index_disp) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
3545 {
3546 #define FLD(f) abuf->fields.sfmt_ldq_indirect_index_disp.f
3547 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
3548 int UNUSED written = 0;
3549 IADDR UNUSED pc = abuf->addr;
3550 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 8);
3551
3552 {
3553 SI opval = GETMEMHI (current_cpu, pc, ADDSI (FLD (f_optdisp), ADDSI (* FLD (i_abase), MULSI (* FLD (i_index), SLLSI (1, FLD (f_scale))))));
3554 * FLD (i_dst) = opval;
3555 TRACE_RESULT (current_cpu, abuf, "dst", 'x', opval);
3556 }
3557
3558 return vpc;
3559 #undef FLD
3560 }
3561
3562 /* ldl-offset: ldl $offset, $dst */
3563
3564 static SEM_PC
3565 SEM_FN_NAME (i960base,ldl_offset) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
3566 {
3567 #define FLD(f) abuf->fields.sfmt_ldq_indirect_offset.f
3568 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
3569 int UNUSED written = 0;
3570 IADDR UNUSED pc = abuf->addr;
3571 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
3572
3573 {
3574 SI tmp_temp;
3575 SI tmp_dregno;
3576 tmp_dregno = FLD (f_srcdst);
3577 tmp_temp = FLD (f_offset);
3578 {
3579 SI opval = GETMEMSI (current_cpu, pc, tmp_temp);
3580 * FLD (i_dst) = opval;
3581 TRACE_RESULT (current_cpu, abuf, "dst", 'x', opval);
3582 }
3583 {
3584 SI opval = GETMEMSI (current_cpu, pc, ADDSI (tmp_temp, 4));
3585 CPU (h_gr[((FLD (f_srcdst)) + (1))]) = opval;
3586 TRACE_RESULT (current_cpu, abuf, "gr-add--DFLT-index-of--DFLT-dst-1", 'x', opval);
3587 }
3588 }
3589
3590 return vpc;
3591 #undef FLD
3592 }
3593
3594 /* ldl-indirect-offset: ldl $offset($abase), $dst */
3595
3596 static SEM_PC
3597 SEM_FN_NAME (i960base,ldl_indirect_offset) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
3598 {
3599 #define FLD(f) abuf->fields.sfmt_ldq_indirect_offset.f
3600 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
3601 int UNUSED written = 0;
3602 IADDR UNUSED pc = abuf->addr;
3603 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
3604
3605 {
3606 SI tmp_temp;
3607 SI tmp_dregno;
3608 tmp_dregno = FLD (f_srcdst);
3609 tmp_temp = ADDSI (FLD (f_offset), * FLD (i_abase));
3610 {
3611 SI opval = GETMEMSI (current_cpu, pc, tmp_temp);
3612 * FLD (i_dst) = opval;
3613 TRACE_RESULT (current_cpu, abuf, "dst", 'x', opval);
3614 }
3615 {
3616 SI opval = GETMEMSI (current_cpu, pc, ADDSI (tmp_temp, 4));
3617 CPU (h_gr[((FLD (f_srcdst)) + (1))]) = opval;
3618 TRACE_RESULT (current_cpu, abuf, "gr-add--DFLT-index-of--DFLT-dst-1", 'x', opval);
3619 }
3620 }
3621
3622 return vpc;
3623 #undef FLD
3624 }
3625
3626 /* ldl-indirect: ldl ($abase), $dst */
3627
3628 static SEM_PC
3629 SEM_FN_NAME (i960base,ldl_indirect) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
3630 {
3631 #define FLD(f) abuf->fields.sfmt_ldq_indirect_offset.f
3632 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
3633 int UNUSED written = 0;
3634 IADDR UNUSED pc = abuf->addr;
3635 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
3636
3637 {
3638 SI tmp_temp;
3639 SI tmp_dregno;
3640 tmp_dregno = FLD (f_srcdst);
3641 tmp_temp = * FLD (i_abase);
3642 {
3643 SI opval = GETMEMSI (current_cpu, pc, tmp_temp);
3644 * FLD (i_dst) = opval;
3645 TRACE_RESULT (current_cpu, abuf, "dst", 'x', opval);
3646 }
3647 {
3648 SI opval = GETMEMSI (current_cpu, pc, ADDSI (tmp_temp, 4));
3649 CPU (h_gr[((FLD (f_srcdst)) + (1))]) = opval;
3650 TRACE_RESULT (current_cpu, abuf, "gr-add--DFLT-index-of--DFLT-dst-1", 'x', opval);
3651 }
3652 }
3653
3654 return vpc;
3655 #undef FLD
3656 }
3657
3658 /* ldl-indirect-index: ldl ($abase)[$index*S$scale], $dst */
3659
3660 static SEM_PC
3661 SEM_FN_NAME (i960base,ldl_indirect_index) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
3662 {
3663 #define FLD(f) abuf->fields.sfmt_ldq_indirect_index_disp.f
3664 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
3665 int UNUSED written = 0;
3666 IADDR UNUSED pc = abuf->addr;
3667 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
3668
3669 {
3670 SI tmp_temp;
3671 SI tmp_dregno;
3672 tmp_dregno = FLD (f_srcdst);
3673 tmp_temp = ADDSI (* FLD (i_abase), MULSI (* FLD (i_index), SLLSI (1, FLD (f_scale))));
3674 {
3675 SI opval = GETMEMSI (current_cpu, pc, tmp_temp);
3676 * FLD (i_dst) = opval;
3677 TRACE_RESULT (current_cpu, abuf, "dst", 'x', opval);
3678 }
3679 {
3680 SI opval = GETMEMSI (current_cpu, pc, ADDSI (tmp_temp, 4));
3681 CPU (h_gr[((FLD (f_srcdst)) + (1))]) = opval;
3682 TRACE_RESULT (current_cpu, abuf, "gr-add--DFLT-index-of--DFLT-dst-1", 'x', opval);
3683 }
3684 }
3685
3686 return vpc;
3687 #undef FLD
3688 }
3689
3690 /* ldl-disp: ldl $optdisp, $dst */
3691
3692 static SEM_PC
3693 SEM_FN_NAME (i960base,ldl_disp) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
3694 {
3695 #define FLD(f) abuf->fields.sfmt_ldq_indirect_index_disp.f
3696 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
3697 int UNUSED written = 0;
3698 IADDR UNUSED pc = abuf->addr;
3699 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 8);
3700
3701 {
3702 SI tmp_temp;
3703 SI tmp_dregno;
3704 tmp_dregno = FLD (f_srcdst);
3705 tmp_temp = FLD (f_optdisp);
3706 {
3707 SI opval = GETMEMSI (current_cpu, pc, tmp_temp);
3708 * FLD (i_dst) = opval;
3709 TRACE_RESULT (current_cpu, abuf, "dst", 'x', opval);
3710 }
3711 {
3712 SI opval = GETMEMSI (current_cpu, pc, ADDSI (tmp_temp, 4));
3713 CPU (h_gr[((FLD (f_srcdst)) + (1))]) = opval;
3714 TRACE_RESULT (current_cpu, abuf, "gr-add--DFLT-index-of--DFLT-dst-1", 'x', opval);
3715 }
3716 }
3717
3718 return vpc;
3719 #undef FLD
3720 }
3721
3722 /* ldl-indirect-disp: ldl $optdisp($abase), $dst */
3723
3724 static SEM_PC
3725 SEM_FN_NAME (i960base,ldl_indirect_disp) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
3726 {
3727 #define FLD(f) abuf->fields.sfmt_ldq_indirect_index_disp.f
3728 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
3729 int UNUSED written = 0;
3730 IADDR UNUSED pc = abuf->addr;
3731 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 8);
3732
3733 {
3734 SI tmp_temp;
3735 SI tmp_dregno;
3736 tmp_dregno = FLD (f_srcdst);
3737 tmp_temp = ADDSI (FLD (f_optdisp), * FLD (i_abase));
3738 {
3739 SI opval = GETMEMSI (current_cpu, pc, tmp_temp);
3740 * FLD (i_dst) = opval;
3741 TRACE_RESULT (current_cpu, abuf, "dst", 'x', opval);
3742 }
3743 {
3744 SI opval = GETMEMSI (current_cpu, pc, ADDSI (tmp_temp, 4));
3745 CPU (h_gr[((FLD (f_srcdst)) + (1))]) = opval;
3746 TRACE_RESULT (current_cpu, abuf, "gr-add--DFLT-index-of--DFLT-dst-1", 'x', opval);
3747 }
3748 }
3749
3750 return vpc;
3751 #undef FLD
3752 }
3753
3754 /* ldl-index-disp: ldl $optdisp[$index*S$scale], $dst */
3755
3756 static SEM_PC
3757 SEM_FN_NAME (i960base,ldl_index_disp) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
3758 {
3759 #define FLD(f) abuf->fields.sfmt_ldq_indirect_index_disp.f
3760 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
3761 int UNUSED written = 0;
3762 IADDR UNUSED pc = abuf->addr;
3763 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 8);
3764
3765 {
3766 SI tmp_temp;
3767 SI tmp_dregno;
3768 tmp_dregno = FLD (f_srcdst);
3769 tmp_temp = ADDSI (FLD (f_optdisp), MULSI (* FLD (i_index), SLLSI (1, FLD (f_scale))));
3770 {
3771 SI opval = GETMEMSI (current_cpu, pc, tmp_temp);
3772 * FLD (i_dst) = opval;
3773 TRACE_RESULT (current_cpu, abuf, "dst", 'x', opval);
3774 }
3775 {
3776 SI opval = GETMEMSI (current_cpu, pc, ADDSI (tmp_temp, 4));
3777 CPU (h_gr[((FLD (f_srcdst)) + (1))]) = opval;
3778 TRACE_RESULT (current_cpu, abuf, "gr-add--DFLT-index-of--DFLT-dst-1", 'x', opval);
3779 }
3780 }
3781
3782 return vpc;
3783 #undef FLD
3784 }
3785
3786 /* ldl-indirect-index-disp: ldl $optdisp($abase)[$index*S$scale], $dst */
3787
3788 static SEM_PC
3789 SEM_FN_NAME (i960base,ldl_indirect_index_disp) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
3790 {
3791 #define FLD(f) abuf->fields.sfmt_ldq_indirect_index_disp.f
3792 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
3793 int UNUSED written = 0;
3794 IADDR UNUSED pc = abuf->addr;
3795 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 8);
3796
3797 {
3798 SI tmp_temp;
3799 SI tmp_dregno;
3800 tmp_dregno = FLD (f_srcdst);
3801 tmp_temp = ADDSI (FLD (f_optdisp), ADDSI (* FLD (i_abase), MULSI (* FLD (i_index), SLLSI (1, FLD (f_scale)))));
3802 {
3803 SI opval = GETMEMSI (current_cpu, pc, tmp_temp);
3804 * FLD (i_dst) = opval;
3805 TRACE_RESULT (current_cpu, abuf, "dst", 'x', opval);
3806 }
3807 {
3808 SI opval = GETMEMSI (current_cpu, pc, ADDSI (tmp_temp, 4));
3809 CPU (h_gr[((FLD (f_srcdst)) + (1))]) = opval;
3810 TRACE_RESULT (current_cpu, abuf, "gr-add--DFLT-index-of--DFLT-dst-1", 'x', opval);
3811 }
3812 }
3813
3814 return vpc;
3815 #undef FLD
3816 }
3817
3818 /* ldt-offset: ldt $offset, $dst */
3819
3820 static SEM_PC
3821 SEM_FN_NAME (i960base,ldt_offset) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
3822 {
3823 #define FLD(f) abuf->fields.sfmt_ldq_indirect_offset.f
3824 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
3825 int UNUSED written = 0;
3826 IADDR UNUSED pc = abuf->addr;
3827 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
3828
3829 {
3830 SI tmp_temp;
3831 SI tmp_dregno;
3832 tmp_dregno = FLD (f_srcdst);
3833 tmp_temp = FLD (f_offset);
3834 {
3835 SI opval = GETMEMSI (current_cpu, pc, tmp_temp);
3836 * FLD (i_dst) = opval;
3837 TRACE_RESULT (current_cpu, abuf, "dst", 'x', opval);
3838 }
3839 {
3840 SI opval = GETMEMSI (current_cpu, pc, ADDSI (tmp_temp, 4));
3841 CPU (h_gr[((FLD (f_srcdst)) + (1))]) = opval;
3842 TRACE_RESULT (current_cpu, abuf, "gr-add--DFLT-index-of--DFLT-dst-1", 'x', opval);
3843 }
3844 {
3845 SI opval = GETMEMSI (current_cpu, pc, ADDSI (tmp_temp, 8));
3846 CPU (h_gr[((FLD (f_srcdst)) + (2))]) = opval;
3847 TRACE_RESULT (current_cpu, abuf, "gr-add--DFLT-index-of--DFLT-dst-2", 'x', opval);
3848 }
3849 }
3850
3851 return vpc;
3852 #undef FLD
3853 }
3854
3855 /* ldt-indirect-offset: ldt $offset($abase), $dst */
3856
3857 static SEM_PC
3858 SEM_FN_NAME (i960base,ldt_indirect_offset) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
3859 {
3860 #define FLD(f) abuf->fields.sfmt_ldq_indirect_offset.f
3861 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
3862 int UNUSED written = 0;
3863 IADDR UNUSED pc = abuf->addr;
3864 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
3865
3866 {
3867 SI tmp_temp;
3868 SI tmp_dregno;
3869 tmp_dregno = FLD (f_srcdst);
3870 tmp_temp = ADDSI (FLD (f_offset), * FLD (i_abase));
3871 {
3872 SI opval = GETMEMSI (current_cpu, pc, tmp_temp);
3873 * FLD (i_dst) = opval;
3874 TRACE_RESULT (current_cpu, abuf, "dst", 'x', opval);
3875 }
3876 {
3877 SI opval = GETMEMSI (current_cpu, pc, ADDSI (tmp_temp, 4));
3878 CPU (h_gr[((FLD (f_srcdst)) + (1))]) = opval;
3879 TRACE_RESULT (current_cpu, abuf, "gr-add--DFLT-index-of--DFLT-dst-1", 'x', opval);
3880 }
3881 {
3882 SI opval = GETMEMSI (current_cpu, pc, ADDSI (tmp_temp, 8));
3883 CPU (h_gr[((FLD (f_srcdst)) + (2))]) = opval;
3884 TRACE_RESULT (current_cpu, abuf, "gr-add--DFLT-index-of--DFLT-dst-2", 'x', opval);
3885 }
3886 }
3887
3888 return vpc;
3889 #undef FLD
3890 }
3891
3892 /* ldt-indirect: ldt ($abase), $dst */
3893
3894 static SEM_PC
3895 SEM_FN_NAME (i960base,ldt_indirect) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
3896 {
3897 #define FLD(f) abuf->fields.sfmt_ldq_indirect_offset.f
3898 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
3899 int UNUSED written = 0;
3900 IADDR UNUSED pc = abuf->addr;
3901 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
3902
3903 {
3904 SI tmp_temp;
3905 SI tmp_dregno;
3906 tmp_dregno = FLD (f_srcdst);
3907 tmp_temp = * FLD (i_abase);
3908 {
3909 SI opval = GETMEMSI (current_cpu, pc, tmp_temp);
3910 * FLD (i_dst) = opval;
3911 TRACE_RESULT (current_cpu, abuf, "dst", 'x', opval);
3912 }
3913 {
3914 SI opval = GETMEMSI (current_cpu, pc, ADDSI (tmp_temp, 4));
3915 CPU (h_gr[((FLD (f_srcdst)) + (1))]) = opval;
3916 TRACE_RESULT (current_cpu, abuf, "gr-add--DFLT-index-of--DFLT-dst-1", 'x', opval);
3917 }
3918 {
3919 SI opval = GETMEMSI (current_cpu, pc, ADDSI (tmp_temp, 8));
3920 CPU (h_gr[((FLD (f_srcdst)) + (2))]) = opval;
3921 TRACE_RESULT (current_cpu, abuf, "gr-add--DFLT-index-of--DFLT-dst-2", 'x', opval);
3922 }
3923 }
3924
3925 return vpc;
3926 #undef FLD
3927 }
3928
3929 /* ldt-indirect-index: ldt ($abase)[$index*S$scale], $dst */
3930
3931 static SEM_PC
3932 SEM_FN_NAME (i960base,ldt_indirect_index) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
3933 {
3934 #define FLD(f) abuf->fields.sfmt_ldq_indirect_index_disp.f
3935 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
3936 int UNUSED written = 0;
3937 IADDR UNUSED pc = abuf->addr;
3938 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
3939
3940 {
3941 SI tmp_temp;
3942 SI tmp_dregno;
3943 tmp_dregno = FLD (f_srcdst);
3944 tmp_temp = ADDSI (* FLD (i_abase), MULSI (* FLD (i_index), SLLSI (1, FLD (f_scale))));
3945 {
3946 SI opval = GETMEMSI (current_cpu, pc, tmp_temp);
3947 * FLD (i_dst) = opval;
3948 TRACE_RESULT (current_cpu, abuf, "dst", 'x', opval);
3949 }
3950 {
3951 SI opval = GETMEMSI (current_cpu, pc, ADDSI (tmp_temp, 4));
3952 CPU (h_gr[((FLD (f_srcdst)) + (1))]) = opval;
3953 TRACE_RESULT (current_cpu, abuf, "gr-add--DFLT-index-of--DFLT-dst-1", 'x', opval);
3954 }
3955 {
3956 SI opval = GETMEMSI (current_cpu, pc, ADDSI (tmp_temp, 8));
3957 CPU (h_gr[((FLD (f_srcdst)) + (2))]) = opval;
3958 TRACE_RESULT (current_cpu, abuf, "gr-add--DFLT-index-of--DFLT-dst-2", 'x', opval);
3959 }
3960 }
3961
3962 return vpc;
3963 #undef FLD
3964 }
3965
3966 /* ldt-disp: ldt $optdisp, $dst */
3967
3968 static SEM_PC
3969 SEM_FN_NAME (i960base,ldt_disp) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
3970 {
3971 #define FLD(f) abuf->fields.sfmt_ldq_indirect_index_disp.f
3972 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
3973 int UNUSED written = 0;
3974 IADDR UNUSED pc = abuf->addr;
3975 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 8);
3976
3977 {
3978 SI tmp_temp;
3979 SI tmp_dregno;
3980 tmp_dregno = FLD (f_srcdst);
3981 tmp_temp = FLD (f_optdisp);
3982 {
3983 SI opval = GETMEMSI (current_cpu, pc, tmp_temp);
3984 * FLD (i_dst) = opval;
3985 TRACE_RESULT (current_cpu, abuf, "dst", 'x', opval);
3986 }
3987 {
3988 SI opval = GETMEMSI (current_cpu, pc, ADDSI (tmp_temp, 4));
3989 CPU (h_gr[((FLD (f_srcdst)) + (1))]) = opval;
3990 TRACE_RESULT (current_cpu, abuf, "gr-add--DFLT-index-of--DFLT-dst-1", 'x', opval);
3991 }
3992 {
3993 SI opval = GETMEMSI (current_cpu, pc, ADDSI (tmp_temp, 8));
3994 CPU (h_gr[((FLD (f_srcdst)) + (2))]) = opval;
3995 TRACE_RESULT (current_cpu, abuf, "gr-add--DFLT-index-of--DFLT-dst-2", 'x', opval);
3996 }
3997 }
3998
3999 return vpc;
4000 #undef FLD
4001 }
4002
4003 /* ldt-indirect-disp: ldt $optdisp($abase), $dst */
4004
4005 static SEM_PC
4006 SEM_FN_NAME (i960base,ldt_indirect_disp) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
4007 {
4008 #define FLD(f) abuf->fields.sfmt_ldq_indirect_index_disp.f
4009 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
4010 int UNUSED written = 0;
4011 IADDR UNUSED pc = abuf->addr;
4012 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 8);
4013
4014 {
4015 SI tmp_temp;
4016 SI tmp_dregno;
4017 tmp_dregno = FLD (f_srcdst);
4018 tmp_temp = ADDSI (FLD (f_optdisp), * FLD (i_abase));
4019 {
4020 SI opval = GETMEMSI (current_cpu, pc, tmp_temp);
4021 * FLD (i_dst) = opval;
4022 TRACE_RESULT (current_cpu, abuf, "dst", 'x', opval);
4023 }
4024 {
4025 SI opval = GETMEMSI (current_cpu, pc, ADDSI (tmp_temp, 4));
4026 CPU (h_gr[((FLD (f_srcdst)) + (1))]) = opval;
4027 TRACE_RESULT (current_cpu, abuf, "gr-add--DFLT-index-of--DFLT-dst-1", 'x', opval);
4028 }
4029 {
4030 SI opval = GETMEMSI (current_cpu, pc, ADDSI (tmp_temp, 8));
4031 CPU (h_gr[((FLD (f_srcdst)) + (2))]) = opval;
4032 TRACE_RESULT (current_cpu, abuf, "gr-add--DFLT-index-of--DFLT-dst-2", 'x', opval);
4033 }
4034 }
4035
4036 return vpc;
4037 #undef FLD
4038 }
4039
4040 /* ldt-index-disp: ldt $optdisp[$index*S$scale], $dst */
4041
4042 static SEM_PC
4043 SEM_FN_NAME (i960base,ldt_index_disp) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
4044 {
4045 #define FLD(f) abuf->fields.sfmt_ldq_indirect_index_disp.f
4046 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
4047 int UNUSED written = 0;
4048 IADDR UNUSED pc = abuf->addr;
4049 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 8);
4050
4051 {
4052 SI tmp_temp;
4053 SI tmp_dregno;
4054 tmp_dregno = FLD (f_srcdst);
4055 tmp_temp = ADDSI (FLD (f_optdisp), MULSI (* FLD (i_index), SLLSI (1, FLD (f_scale))));
4056 {
4057 SI opval = GETMEMSI (current_cpu, pc, tmp_temp);
4058 * FLD (i_dst) = opval;
4059 TRACE_RESULT (current_cpu, abuf, "dst", 'x', opval);
4060 }
4061 {
4062 SI opval = GETMEMSI (current_cpu, pc, ADDSI (tmp_temp, 4));
4063 CPU (h_gr[((FLD (f_srcdst)) + (1))]) = opval;
4064 TRACE_RESULT (current_cpu, abuf, "gr-add--DFLT-index-of--DFLT-dst-1", 'x', opval);
4065 }
4066 {
4067 SI opval = GETMEMSI (current_cpu, pc, ADDSI (tmp_temp, 8));
4068 CPU (h_gr[((FLD (f_srcdst)) + (2))]) = opval;
4069 TRACE_RESULT (current_cpu, abuf, "gr-add--DFLT-index-of--DFLT-dst-2", 'x', opval);
4070 }
4071 }
4072
4073 return vpc;
4074 #undef FLD
4075 }
4076
4077 /* ldt-indirect-index-disp: ldt $optdisp($abase)[$index*S$scale], $dst */
4078
4079 static SEM_PC
4080 SEM_FN_NAME (i960base,ldt_indirect_index_disp) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
4081 {
4082 #define FLD(f) abuf->fields.sfmt_ldq_indirect_index_disp.f
4083 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
4084 int UNUSED written = 0;
4085 IADDR UNUSED pc = abuf->addr;
4086 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 8);
4087
4088 {
4089 SI tmp_temp;
4090 SI tmp_dregno;
4091 tmp_dregno = FLD (f_srcdst);
4092 tmp_temp = ADDSI (FLD (f_optdisp), ADDSI (* FLD (i_abase), MULSI (* FLD (i_index), SLLSI (1, FLD (f_scale)))));
4093 {
4094 SI opval = GETMEMSI (current_cpu, pc, tmp_temp);
4095 * FLD (i_dst) = opval;
4096 TRACE_RESULT (current_cpu, abuf, "dst", 'x', opval);
4097 }
4098 {
4099 SI opval = GETMEMSI (current_cpu, pc, ADDSI (tmp_temp, 4));
4100 CPU (h_gr[((FLD (f_srcdst)) + (1))]) = opval;
4101 TRACE_RESULT (current_cpu, abuf, "gr-add--DFLT-index-of--DFLT-dst-1", 'x', opval);
4102 }
4103 {
4104 SI opval = GETMEMSI (current_cpu, pc, ADDSI (tmp_temp, 8));
4105 CPU (h_gr[((FLD (f_srcdst)) + (2))]) = opval;
4106 TRACE_RESULT (current_cpu, abuf, "gr-add--DFLT-index-of--DFLT-dst-2", 'x', opval);
4107 }
4108 }
4109
4110 return vpc;
4111 #undef FLD
4112 }
4113
4114 /* ldq-offset: ldq $offset, $dst */
4115
4116 static SEM_PC
4117 SEM_FN_NAME (i960base,ldq_offset) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
4118 {
4119 #define FLD(f) abuf->fields.sfmt_ldq_indirect_offset.f
4120 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
4121 int UNUSED written = 0;
4122 IADDR UNUSED pc = abuf->addr;
4123 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
4124
4125 {
4126 SI tmp_temp;
4127 SI tmp_dregno;
4128 tmp_dregno = FLD (f_srcdst);
4129 tmp_temp = FLD (f_offset);
4130 {
4131 SI opval = GETMEMSI (current_cpu, pc, tmp_temp);
4132 * FLD (i_dst) = opval;
4133 TRACE_RESULT (current_cpu, abuf, "dst", 'x', opval);
4134 }
4135 {
4136 SI opval = GETMEMSI (current_cpu, pc, ADDSI (tmp_temp, 4));
4137 CPU (h_gr[((FLD (f_srcdst)) + (1))]) = opval;
4138 TRACE_RESULT (current_cpu, abuf, "gr-add--DFLT-index-of--DFLT-dst-1", 'x', opval);
4139 }
4140 {
4141 SI opval = GETMEMSI (current_cpu, pc, ADDSI (tmp_temp, 8));
4142 CPU (h_gr[((FLD (f_srcdst)) + (2))]) = opval;
4143 TRACE_RESULT (current_cpu, abuf, "gr-add--DFLT-index-of--DFLT-dst-2", 'x', opval);
4144 }
4145 {
4146 SI opval = GETMEMSI (current_cpu, pc, ADDSI (tmp_temp, 12));
4147 CPU (h_gr[((FLD (f_srcdst)) + (3))]) = opval;
4148 TRACE_RESULT (current_cpu, abuf, "gr-add--DFLT-index-of--DFLT-dst-3", 'x', opval);
4149 }
4150 }
4151
4152 return vpc;
4153 #undef FLD
4154 }
4155
4156 /* ldq-indirect-offset: ldq $offset($abase), $dst */
4157
4158 static SEM_PC
4159 SEM_FN_NAME (i960base,ldq_indirect_offset) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
4160 {
4161 #define FLD(f) abuf->fields.sfmt_ldq_indirect_offset.f
4162 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
4163 int UNUSED written = 0;
4164 IADDR UNUSED pc = abuf->addr;
4165 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
4166
4167 {
4168 SI tmp_temp;
4169 SI tmp_dregno;
4170 tmp_dregno = FLD (f_srcdst);
4171 tmp_temp = ADDSI (FLD (f_offset), * FLD (i_abase));
4172 {
4173 SI opval = GETMEMSI (current_cpu, pc, tmp_temp);
4174 * FLD (i_dst) = opval;
4175 TRACE_RESULT (current_cpu, abuf, "dst", 'x', opval);
4176 }
4177 {
4178 SI opval = GETMEMSI (current_cpu, pc, ADDSI (tmp_temp, 4));
4179 CPU (h_gr[((FLD (f_srcdst)) + (1))]) = opval;
4180 TRACE_RESULT (current_cpu, abuf, "gr-add--DFLT-index-of--DFLT-dst-1", 'x', opval);
4181 }
4182 {
4183 SI opval = GETMEMSI (current_cpu, pc, ADDSI (tmp_temp, 8));
4184 CPU (h_gr[((FLD (f_srcdst)) + (2))]) = opval;
4185 TRACE_RESULT (current_cpu, abuf, "gr-add--DFLT-index-of--DFLT-dst-2", 'x', opval);
4186 }
4187 {
4188 SI opval = GETMEMSI (current_cpu, pc, ADDSI (tmp_temp, 12));
4189 CPU (h_gr[((FLD (f_srcdst)) + (3))]) = opval;
4190 TRACE_RESULT (current_cpu, abuf, "gr-add--DFLT-index-of--DFLT-dst-3", 'x', opval);
4191 }
4192 }
4193
4194 return vpc;
4195 #undef FLD
4196 }
4197
4198 /* ldq-indirect: ldq ($abase), $dst */
4199
4200 static SEM_PC
4201 SEM_FN_NAME (i960base,ldq_indirect) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
4202 {
4203 #define FLD(f) abuf->fields.sfmt_ldq_indirect_offset.f
4204 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
4205 int UNUSED written = 0;
4206 IADDR UNUSED pc = abuf->addr;
4207 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
4208
4209 {
4210 SI tmp_temp;
4211 SI tmp_dregno;
4212 tmp_dregno = FLD (f_srcdst);
4213 tmp_temp = * FLD (i_abase);
4214 {
4215 SI opval = GETMEMSI (current_cpu, pc, tmp_temp);
4216 * FLD (i_dst) = opval;
4217 TRACE_RESULT (current_cpu, abuf, "dst", 'x', opval);
4218 }
4219 {
4220 SI opval = GETMEMSI (current_cpu, pc, ADDSI (tmp_temp, 4));
4221 CPU (h_gr[((FLD (f_srcdst)) + (1))]) = opval;
4222 TRACE_RESULT (current_cpu, abuf, "gr-add--DFLT-index-of--DFLT-dst-1", 'x', opval);
4223 }
4224 {
4225 SI opval = GETMEMSI (current_cpu, pc, ADDSI (tmp_temp, 8));
4226 CPU (h_gr[((FLD (f_srcdst)) + (2))]) = opval;
4227 TRACE_RESULT (current_cpu, abuf, "gr-add--DFLT-index-of--DFLT-dst-2", 'x', opval);
4228 }
4229 {
4230 SI opval = GETMEMSI (current_cpu, pc, ADDSI (tmp_temp, 12));
4231 CPU (h_gr[((FLD (f_srcdst)) + (3))]) = opval;
4232 TRACE_RESULT (current_cpu, abuf, "gr-add--DFLT-index-of--DFLT-dst-3", 'x', opval);
4233 }
4234 }
4235
4236 return vpc;
4237 #undef FLD
4238 }
4239
4240 /* ldq-indirect-index: ldq ($abase)[$index*S$scale], $dst */
4241
4242 static SEM_PC
4243 SEM_FN_NAME (i960base,ldq_indirect_index) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
4244 {
4245 #define FLD(f) abuf->fields.sfmt_ldq_indirect_index_disp.f
4246 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
4247 int UNUSED written = 0;
4248 IADDR UNUSED pc = abuf->addr;
4249 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
4250
4251 {
4252 SI tmp_temp;
4253 SI tmp_dregno;
4254 tmp_dregno = FLD (f_srcdst);
4255 tmp_temp = ADDSI (* FLD (i_abase), MULSI (* FLD (i_index), SLLSI (1, FLD (f_scale))));
4256 {
4257 SI opval = GETMEMSI (current_cpu, pc, tmp_temp);
4258 * FLD (i_dst) = opval;
4259 TRACE_RESULT (current_cpu, abuf, "dst", 'x', opval);
4260 }
4261 {
4262 SI opval = GETMEMSI (current_cpu, pc, ADDSI (tmp_temp, 4));
4263 CPU (h_gr[((FLD (f_srcdst)) + (1))]) = opval;
4264 TRACE_RESULT (current_cpu, abuf, "gr-add--DFLT-index-of--DFLT-dst-1", 'x', opval);
4265 }
4266 {
4267 SI opval = GETMEMSI (current_cpu, pc, ADDSI (tmp_temp, 8));
4268 CPU (h_gr[((FLD (f_srcdst)) + (2))]) = opval;
4269 TRACE_RESULT (current_cpu, abuf, "gr-add--DFLT-index-of--DFLT-dst-2", 'x', opval);
4270 }
4271 {
4272 SI opval = GETMEMSI (current_cpu, pc, ADDSI (tmp_temp, 12));
4273 CPU (h_gr[((FLD (f_srcdst)) + (3))]) = opval;
4274 TRACE_RESULT (current_cpu, abuf, "gr-add--DFLT-index-of--DFLT-dst-3", 'x', opval);
4275 }
4276 }
4277
4278 return vpc;
4279 #undef FLD
4280 }
4281
4282 /* ldq-disp: ldq $optdisp, $dst */
4283
4284 static SEM_PC
4285 SEM_FN_NAME (i960base,ldq_disp) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
4286 {
4287 #define FLD(f) abuf->fields.sfmt_ldq_indirect_index_disp.f
4288 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
4289 int UNUSED written = 0;
4290 IADDR UNUSED pc = abuf->addr;
4291 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 8);
4292
4293 {
4294 SI tmp_temp;
4295 SI tmp_dregno;
4296 tmp_dregno = FLD (f_srcdst);
4297 tmp_temp = FLD (f_optdisp);
4298 {
4299 SI opval = GETMEMSI (current_cpu, pc, tmp_temp);
4300 * FLD (i_dst) = opval;
4301 TRACE_RESULT (current_cpu, abuf, "dst", 'x', opval);
4302 }
4303 {
4304 SI opval = GETMEMSI (current_cpu, pc, ADDSI (tmp_temp, 4));
4305 CPU (h_gr[((FLD (f_srcdst)) + (1))]) = opval;
4306 TRACE_RESULT (current_cpu, abuf, "gr-add--DFLT-index-of--DFLT-dst-1", 'x', opval);
4307 }
4308 {
4309 SI opval = GETMEMSI (current_cpu, pc, ADDSI (tmp_temp, 8));
4310 CPU (h_gr[((FLD (f_srcdst)) + (2))]) = opval;
4311 TRACE_RESULT (current_cpu, abuf, "gr-add--DFLT-index-of--DFLT-dst-2", 'x', opval);
4312 }
4313 {
4314 SI opval = GETMEMSI (current_cpu, pc, ADDSI (tmp_temp, 12));
4315 CPU (h_gr[((FLD (f_srcdst)) + (3))]) = opval;
4316 TRACE_RESULT (current_cpu, abuf, "gr-add--DFLT-index-of--DFLT-dst-3", 'x', opval);
4317 }
4318 }
4319
4320 return vpc;
4321 #undef FLD
4322 }
4323
4324 /* ldq-indirect-disp: ldq $optdisp($abase), $dst */
4325
4326 static SEM_PC
4327 SEM_FN_NAME (i960base,ldq_indirect_disp) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
4328 {
4329 #define FLD(f) abuf->fields.sfmt_ldq_indirect_index_disp.f
4330 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
4331 int UNUSED written = 0;
4332 IADDR UNUSED pc = abuf->addr;
4333 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 8);
4334
4335 {
4336 SI tmp_temp;
4337 SI tmp_dregno;
4338 tmp_dregno = FLD (f_srcdst);
4339 tmp_temp = ADDSI (FLD (f_optdisp), * FLD (i_abase));
4340 {
4341 SI opval = GETMEMSI (current_cpu, pc, tmp_temp);
4342 * FLD (i_dst) = opval;
4343 TRACE_RESULT (current_cpu, abuf, "dst", 'x', opval);
4344 }
4345 {
4346 SI opval = GETMEMSI (current_cpu, pc, ADDSI (tmp_temp, 4));
4347 CPU (h_gr[((FLD (f_srcdst)) + (1))]) = opval;
4348 TRACE_RESULT (current_cpu, abuf, "gr-add--DFLT-index-of--DFLT-dst-1", 'x', opval);
4349 }
4350 {
4351 SI opval = GETMEMSI (current_cpu, pc, ADDSI (tmp_temp, 8));
4352 CPU (h_gr[((FLD (f_srcdst)) + (2))]) = opval;
4353 TRACE_RESULT (current_cpu, abuf, "gr-add--DFLT-index-of--DFLT-dst-2", 'x', opval);
4354 }
4355 {
4356 SI opval = GETMEMSI (current_cpu, pc, ADDSI (tmp_temp, 12));
4357 CPU (h_gr[((FLD (f_srcdst)) + (3))]) = opval;
4358 TRACE_RESULT (current_cpu, abuf, "gr-add--DFLT-index-of--DFLT-dst-3", 'x', opval);
4359 }
4360 }
4361
4362 return vpc;
4363 #undef FLD
4364 }
4365
4366 /* ldq-index-disp: ldq $optdisp[$index*S$scale], $dst */
4367
4368 static SEM_PC
4369 SEM_FN_NAME (i960base,ldq_index_disp) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
4370 {
4371 #define FLD(f) abuf->fields.sfmt_ldq_indirect_index_disp.f
4372 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
4373 int UNUSED written = 0;
4374 IADDR UNUSED pc = abuf->addr;
4375 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 8);
4376
4377 {
4378 SI tmp_temp;
4379 SI tmp_dregno;
4380 tmp_dregno = FLD (f_srcdst);
4381 tmp_temp = ADDSI (FLD (f_optdisp), MULSI (* FLD (i_index), SLLSI (1, FLD (f_scale))));
4382 {
4383 SI opval = GETMEMSI (current_cpu, pc, tmp_temp);
4384 * FLD (i_dst) = opval;
4385 TRACE_RESULT (current_cpu, abuf, "dst", 'x', opval);
4386 }
4387 {
4388 SI opval = GETMEMSI (current_cpu, pc, ADDSI (tmp_temp, 4));
4389 CPU (h_gr[((FLD (f_srcdst)) + (1))]) = opval;
4390 TRACE_RESULT (current_cpu, abuf, "gr-add--DFLT-index-of--DFLT-dst-1", 'x', opval);
4391 }
4392 {
4393 SI opval = GETMEMSI (current_cpu, pc, ADDSI (tmp_temp, 8));
4394 CPU (h_gr[((FLD (f_srcdst)) + (2))]) = opval;
4395 TRACE_RESULT (current_cpu, abuf, "gr-add--DFLT-index-of--DFLT-dst-2", 'x', opval);
4396 }
4397 {
4398 SI opval = GETMEMSI (current_cpu, pc, ADDSI (tmp_temp, 12));
4399 CPU (h_gr[((FLD (f_srcdst)) + (3))]) = opval;
4400 TRACE_RESULT (current_cpu, abuf, "gr-add--DFLT-index-of--DFLT-dst-3", 'x', opval);
4401 }
4402 }
4403
4404 return vpc;
4405 #undef FLD
4406 }
4407
4408 /* ldq-indirect-index-disp: ldq $optdisp($abase)[$index*S$scale], $dst */
4409
4410 static SEM_PC
4411 SEM_FN_NAME (i960base,ldq_indirect_index_disp) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
4412 {
4413 #define FLD(f) abuf->fields.sfmt_ldq_indirect_index_disp.f
4414 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
4415 int UNUSED written = 0;
4416 IADDR UNUSED pc = abuf->addr;
4417 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 8);
4418
4419 {
4420 SI tmp_temp;
4421 SI tmp_dregno;
4422 tmp_dregno = FLD (f_srcdst);
4423 tmp_temp = ADDSI (FLD (f_optdisp), ADDSI (* FLD (i_abase), MULSI (* FLD (i_index), SLLSI (1, FLD (f_scale)))));
4424 {
4425 SI opval = GETMEMSI (current_cpu, pc, tmp_temp);
4426 * FLD (i_dst) = opval;
4427 TRACE_RESULT (current_cpu, abuf, "dst", 'x', opval);
4428 }
4429 {
4430 SI opval = GETMEMSI (current_cpu, pc, ADDSI (tmp_temp, 4));
4431 CPU (h_gr[((FLD (f_srcdst)) + (1))]) = opval;
4432 TRACE_RESULT (current_cpu, abuf, "gr-add--DFLT-index-of--DFLT-dst-1", 'x', opval);
4433 }
4434 {
4435 SI opval = GETMEMSI (current_cpu, pc, ADDSI (tmp_temp, 8));
4436 CPU (h_gr[((FLD (f_srcdst)) + (2))]) = opval;
4437 TRACE_RESULT (current_cpu, abuf, "gr-add--DFLT-index-of--DFLT-dst-2", 'x', opval);
4438 }
4439 {
4440 SI opval = GETMEMSI (current_cpu, pc, ADDSI (tmp_temp, 12));
4441 CPU (h_gr[((FLD (f_srcdst)) + (3))]) = opval;
4442 TRACE_RESULT (current_cpu, abuf, "gr-add--DFLT-index-of--DFLT-dst-3", 'x', opval);
4443 }
4444 }
4445
4446 return vpc;
4447 #undef FLD
4448 }
4449
4450 /* st-offset: st $st_src, $offset */
4451
4452 static SEM_PC
4453 SEM_FN_NAME (i960base,st_offset) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
4454 {
4455 #define FLD(f) abuf->fields.sfmt_stq_indirect_offset.f
4456 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
4457 int UNUSED written = 0;
4458 IADDR UNUSED pc = abuf->addr;
4459 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
4460
4461 {
4462 SI opval = * FLD (i_st_src);
4463 SETMEMSI (current_cpu, pc, FLD (f_offset), opval);
4464 TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
4465 }
4466
4467 return vpc;
4468 #undef FLD
4469 }
4470
4471 /* st-indirect-offset: st $st_src, $offset($abase) */
4472
4473 static SEM_PC
4474 SEM_FN_NAME (i960base,st_indirect_offset) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
4475 {
4476 #define FLD(f) abuf->fields.sfmt_stq_indirect_offset.f
4477 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
4478 int UNUSED written = 0;
4479 IADDR UNUSED pc = abuf->addr;
4480 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
4481
4482 {
4483 SI opval = * FLD (i_st_src);
4484 SETMEMSI (current_cpu, pc, ADDSI (FLD (f_offset), * FLD (i_abase)), opval);
4485 TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
4486 }
4487
4488 return vpc;
4489 #undef FLD
4490 }
4491
4492 /* st-indirect: st $st_src, ($abase) */
4493
4494 static SEM_PC
4495 SEM_FN_NAME (i960base,st_indirect) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
4496 {
4497 #define FLD(f) abuf->fields.sfmt_stq_indirect_offset.f
4498 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
4499 int UNUSED written = 0;
4500 IADDR UNUSED pc = abuf->addr;
4501 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
4502
4503 {
4504 SI opval = * FLD (i_st_src);
4505 SETMEMSI (current_cpu, pc, * FLD (i_abase), opval);
4506 TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
4507 }
4508
4509 return vpc;
4510 #undef FLD
4511 }
4512
4513 /* st-indirect-index: st $st_src, ($abase)[$index*S$scale] */
4514
4515 static SEM_PC
4516 SEM_FN_NAME (i960base,st_indirect_index) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
4517 {
4518 #define FLD(f) abuf->fields.sfmt_stq_indirect_index_disp.f
4519 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
4520 int UNUSED written = 0;
4521 IADDR UNUSED pc = abuf->addr;
4522 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
4523
4524 {
4525 SI opval = * FLD (i_st_src);
4526 SETMEMSI (current_cpu, pc, ADDSI (* FLD (i_abase), MULSI (* FLD (i_index), SLLSI (1, FLD (f_scale)))), opval);
4527 TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
4528 }
4529
4530 return vpc;
4531 #undef FLD
4532 }
4533
4534 /* st-disp: st $st_src, $optdisp */
4535
4536 static SEM_PC
4537 SEM_FN_NAME (i960base,st_disp) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
4538 {
4539 #define FLD(f) abuf->fields.sfmt_stq_indirect_index_disp.f
4540 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
4541 int UNUSED written = 0;
4542 IADDR UNUSED pc = abuf->addr;
4543 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 8);
4544
4545 {
4546 SI opval = * FLD (i_st_src);
4547 SETMEMSI (current_cpu, pc, FLD (f_optdisp), opval);
4548 TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
4549 }
4550
4551 return vpc;
4552 #undef FLD
4553 }
4554
4555 /* st-indirect-disp: st $st_src, $optdisp($abase) */
4556
4557 static SEM_PC
4558 SEM_FN_NAME (i960base,st_indirect_disp) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
4559 {
4560 #define FLD(f) abuf->fields.sfmt_stq_indirect_index_disp.f
4561 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
4562 int UNUSED written = 0;
4563 IADDR UNUSED pc = abuf->addr;
4564 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 8);
4565
4566 {
4567 SI opval = * FLD (i_st_src);
4568 SETMEMSI (current_cpu, pc, ADDSI (FLD (f_optdisp), * FLD (i_abase)), opval);
4569 TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
4570 }
4571
4572 return vpc;
4573 #undef FLD
4574 }
4575
4576 /* st-index-disp: st $st_src, $optdisp[$index*S$scale */
4577
4578 static SEM_PC
4579 SEM_FN_NAME (i960base,st_index_disp) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
4580 {
4581 #define FLD(f) abuf->fields.sfmt_stq_indirect_index_disp.f
4582 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
4583 int UNUSED written = 0;
4584 IADDR UNUSED pc = abuf->addr;
4585 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 8);
4586
4587 {
4588 SI opval = * FLD (i_st_src);
4589 SETMEMSI (current_cpu, pc, ADDSI (FLD (f_optdisp), MULSI (* FLD (i_index), SLLSI (1, FLD (f_scale)))), opval);
4590 TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
4591 }
4592
4593 return vpc;
4594 #undef FLD
4595 }
4596
4597 /* st-indirect-index-disp: st $st_src, $optdisp($abase)[$index*S$scale] */
4598
4599 static SEM_PC
4600 SEM_FN_NAME (i960base,st_indirect_index_disp) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
4601 {
4602 #define FLD(f) abuf->fields.sfmt_stq_indirect_index_disp.f
4603 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
4604 int UNUSED written = 0;
4605 IADDR UNUSED pc = abuf->addr;
4606 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 8);
4607
4608 {
4609 SI opval = * FLD (i_st_src);
4610 SETMEMSI (current_cpu, pc, ADDSI (FLD (f_optdisp), ADDSI (* FLD (i_abase), MULSI (* FLD (i_index), SLLSI (1, FLD (f_scale))))), opval);
4611 TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
4612 }
4613
4614 return vpc;
4615 #undef FLD
4616 }
4617
4618 /* stob-offset: stob $st_src, $offset */
4619
4620 static SEM_PC
4621 SEM_FN_NAME (i960base,stob_offset) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
4622 {
4623 #define FLD(f) abuf->fields.sfmt_stq_indirect_offset.f
4624 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
4625 int UNUSED written = 0;
4626 IADDR UNUSED pc = abuf->addr;
4627 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
4628
4629 {
4630 QI opval = * FLD (i_st_src);
4631 SETMEMQI (current_cpu, pc, FLD (f_offset), opval);
4632 TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
4633 }
4634
4635 return vpc;
4636 #undef FLD
4637 }
4638
4639 /* stob-indirect-offset: stob $st_src, $offset($abase) */
4640
4641 static SEM_PC
4642 SEM_FN_NAME (i960base,stob_indirect_offset) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
4643 {
4644 #define FLD(f) abuf->fields.sfmt_stq_indirect_offset.f
4645 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
4646 int UNUSED written = 0;
4647 IADDR UNUSED pc = abuf->addr;
4648 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
4649
4650 {
4651 QI opval = * FLD (i_st_src);
4652 SETMEMQI (current_cpu, pc, ADDSI (FLD (f_offset), * FLD (i_abase)), opval);
4653 TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
4654 }
4655
4656 return vpc;
4657 #undef FLD
4658 }
4659
4660 /* stob-indirect: stob $st_src, ($abase) */
4661
4662 static SEM_PC
4663 SEM_FN_NAME (i960base,stob_indirect) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
4664 {
4665 #define FLD(f) abuf->fields.sfmt_stq_indirect_offset.f
4666 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
4667 int UNUSED written = 0;
4668 IADDR UNUSED pc = abuf->addr;
4669 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
4670
4671 {
4672 QI opval = * FLD (i_st_src);
4673 SETMEMQI (current_cpu, pc, * FLD (i_abase), opval);
4674 TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
4675 }
4676
4677 return vpc;
4678 #undef FLD
4679 }
4680
4681 /* stob-indirect-index: stob $st_src, ($abase)[$index*S$scale] */
4682
4683 static SEM_PC
4684 SEM_FN_NAME (i960base,stob_indirect_index) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
4685 {
4686 #define FLD(f) abuf->fields.sfmt_stq_indirect_index_disp.f
4687 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
4688 int UNUSED written = 0;
4689 IADDR UNUSED pc = abuf->addr;
4690 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
4691
4692 {
4693 QI opval = * FLD (i_st_src);
4694 SETMEMQI (current_cpu, pc, ADDSI (* FLD (i_abase), MULSI (* FLD (i_index), SLLSI (1, FLD (f_scale)))), opval);
4695 TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
4696 }
4697
4698 return vpc;
4699 #undef FLD
4700 }
4701
4702 /* stob-disp: stob $st_src, $optdisp */
4703
4704 static SEM_PC
4705 SEM_FN_NAME (i960base,stob_disp) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
4706 {
4707 #define FLD(f) abuf->fields.sfmt_stq_indirect_index_disp.f
4708 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
4709 int UNUSED written = 0;
4710 IADDR UNUSED pc = abuf->addr;
4711 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 8);
4712
4713 {
4714 QI opval = * FLD (i_st_src);
4715 SETMEMQI (current_cpu, pc, FLD (f_optdisp), opval);
4716 TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
4717 }
4718
4719 return vpc;
4720 #undef FLD
4721 }
4722
4723 /* stob-indirect-disp: stob $st_src, $optdisp($abase) */
4724
4725 static SEM_PC
4726 SEM_FN_NAME (i960base,stob_indirect_disp) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
4727 {
4728 #define FLD(f) abuf->fields.sfmt_stq_indirect_index_disp.f
4729 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
4730 int UNUSED written = 0;
4731 IADDR UNUSED pc = abuf->addr;
4732 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 8);
4733
4734 {
4735 QI opval = * FLD (i_st_src);
4736 SETMEMQI (current_cpu, pc, ADDSI (FLD (f_optdisp), * FLD (i_abase)), opval);
4737 TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
4738 }
4739
4740 return vpc;
4741 #undef FLD
4742 }
4743
4744 /* stob-index-disp: stob $st_src, $optdisp[$index*S$scale */
4745
4746 static SEM_PC
4747 SEM_FN_NAME (i960base,stob_index_disp) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
4748 {
4749 #define FLD(f) abuf->fields.sfmt_stq_indirect_index_disp.f
4750 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
4751 int UNUSED written = 0;
4752 IADDR UNUSED pc = abuf->addr;
4753 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 8);
4754
4755 {
4756 QI opval = * FLD (i_st_src);
4757 SETMEMQI (current_cpu, pc, ADDSI (FLD (f_optdisp), MULSI (* FLD (i_index), SLLSI (1, FLD (f_scale)))), opval);
4758 TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
4759 }
4760
4761 return vpc;
4762 #undef FLD
4763 }
4764
4765 /* stob-indirect-index-disp: stob $st_src, $optdisp($abase)[$index*S$scale] */
4766
4767 static SEM_PC
4768 SEM_FN_NAME (i960base,stob_indirect_index_disp) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
4769 {
4770 #define FLD(f) abuf->fields.sfmt_stq_indirect_index_disp.f
4771 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
4772 int UNUSED written = 0;
4773 IADDR UNUSED pc = abuf->addr;
4774 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 8);
4775
4776 {
4777 QI opval = * FLD (i_st_src);
4778 SETMEMQI (current_cpu, pc, ADDSI (FLD (f_optdisp), ADDSI (* FLD (i_abase), MULSI (* FLD (i_index), SLLSI (1, FLD (f_scale))))), opval);
4779 TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
4780 }
4781
4782 return vpc;
4783 #undef FLD
4784 }
4785
4786 /* stos-offset: stos $st_src, $offset */
4787
4788 static SEM_PC
4789 SEM_FN_NAME (i960base,stos_offset) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
4790 {
4791 #define FLD(f) abuf->fields.sfmt_stq_indirect_offset.f
4792 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
4793 int UNUSED written = 0;
4794 IADDR UNUSED pc = abuf->addr;
4795 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
4796
4797 {
4798 HI opval = * FLD (i_st_src);
4799 SETMEMHI (current_cpu, pc, FLD (f_offset), opval);
4800 TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
4801 }
4802
4803 return vpc;
4804 #undef FLD
4805 }
4806
4807 /* stos-indirect-offset: stos $st_src, $offset($abase) */
4808
4809 static SEM_PC
4810 SEM_FN_NAME (i960base,stos_indirect_offset) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
4811 {
4812 #define FLD(f) abuf->fields.sfmt_stq_indirect_offset.f
4813 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
4814 int UNUSED written = 0;
4815 IADDR UNUSED pc = abuf->addr;
4816 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
4817
4818 {
4819 HI opval = * FLD (i_st_src);
4820 SETMEMHI (current_cpu, pc, ADDSI (FLD (f_offset), * FLD (i_abase)), opval);
4821 TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
4822 }
4823
4824 return vpc;
4825 #undef FLD
4826 }
4827
4828 /* stos-indirect: stos $st_src, ($abase) */
4829
4830 static SEM_PC
4831 SEM_FN_NAME (i960base,stos_indirect) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
4832 {
4833 #define FLD(f) abuf->fields.sfmt_stq_indirect_offset.f
4834 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
4835 int UNUSED written = 0;
4836 IADDR UNUSED pc = abuf->addr;
4837 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
4838
4839 {
4840 HI opval = * FLD (i_st_src);
4841 SETMEMHI (current_cpu, pc, * FLD (i_abase), opval);
4842 TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
4843 }
4844
4845 return vpc;
4846 #undef FLD
4847 }
4848
4849 /* stos-indirect-index: stos $st_src, ($abase)[$index*S$scale] */
4850
4851 static SEM_PC
4852 SEM_FN_NAME (i960base,stos_indirect_index) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
4853 {
4854 #define FLD(f) abuf->fields.sfmt_stq_indirect_index_disp.f
4855 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
4856 int UNUSED written = 0;
4857 IADDR UNUSED pc = abuf->addr;
4858 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
4859
4860 {
4861 HI opval = * FLD (i_st_src);
4862 SETMEMHI (current_cpu, pc, ADDSI (* FLD (i_abase), MULSI (* FLD (i_index), SLLSI (1, FLD (f_scale)))), opval);
4863 TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
4864 }
4865
4866 return vpc;
4867 #undef FLD
4868 }
4869
4870 /* stos-disp: stos $st_src, $optdisp */
4871
4872 static SEM_PC
4873 SEM_FN_NAME (i960base,stos_disp) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
4874 {
4875 #define FLD(f) abuf->fields.sfmt_stq_indirect_index_disp.f
4876 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
4877 int UNUSED written = 0;
4878 IADDR UNUSED pc = abuf->addr;
4879 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 8);
4880
4881 {
4882 HI opval = * FLD (i_st_src);
4883 SETMEMHI (current_cpu, pc, FLD (f_optdisp), opval);
4884 TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
4885 }
4886
4887 return vpc;
4888 #undef FLD
4889 }
4890
4891 /* stos-indirect-disp: stos $st_src, $optdisp($abase) */
4892
4893 static SEM_PC
4894 SEM_FN_NAME (i960base,stos_indirect_disp) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
4895 {
4896 #define FLD(f) abuf->fields.sfmt_stq_indirect_index_disp.f
4897 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
4898 int UNUSED written = 0;
4899 IADDR UNUSED pc = abuf->addr;
4900 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 8);
4901
4902 {
4903 HI opval = * FLD (i_st_src);
4904 SETMEMHI (current_cpu, pc, ADDSI (FLD (f_optdisp), * FLD (i_abase)), opval);
4905 TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
4906 }
4907
4908 return vpc;
4909 #undef FLD
4910 }
4911
4912 /* stos-index-disp: stos $st_src, $optdisp[$index*S$scale */
4913
4914 static SEM_PC
4915 SEM_FN_NAME (i960base,stos_index_disp) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
4916 {
4917 #define FLD(f) abuf->fields.sfmt_stq_indirect_index_disp.f
4918 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
4919 int UNUSED written = 0;
4920 IADDR UNUSED pc = abuf->addr;
4921 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 8);
4922
4923 {
4924 HI opval = * FLD (i_st_src);
4925 SETMEMHI (current_cpu, pc, ADDSI (FLD (f_optdisp), MULSI (* FLD (i_index), SLLSI (1, FLD (f_scale)))), opval);
4926 TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
4927 }
4928
4929 return vpc;
4930 #undef FLD
4931 }
4932
4933 /* stos-indirect-index-disp: stos $st_src, $optdisp($abase)[$index*S$scale] */
4934
4935 static SEM_PC
4936 SEM_FN_NAME (i960base,stos_indirect_index_disp) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
4937 {
4938 #define FLD(f) abuf->fields.sfmt_stq_indirect_index_disp.f
4939 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
4940 int UNUSED written = 0;
4941 IADDR UNUSED pc = abuf->addr;
4942 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 8);
4943
4944 {
4945 HI opval = * FLD (i_st_src);
4946 SETMEMHI (current_cpu, pc, ADDSI (FLD (f_optdisp), ADDSI (* FLD (i_abase), MULSI (* FLD (i_index), SLLSI (1, FLD (f_scale))))), opval);
4947 TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
4948 }
4949
4950 return vpc;
4951 #undef FLD
4952 }
4953
4954 /* stl-offset: stl $st_src, $offset */
4955
4956 static SEM_PC
4957 SEM_FN_NAME (i960base,stl_offset) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
4958 {
4959 #define FLD(f) abuf->fields.sfmt_stq_indirect_offset.f
4960 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
4961 int UNUSED written = 0;
4962 IADDR UNUSED pc = abuf->addr;
4963 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
4964
4965 {
4966 SI tmp_sregno;
4967 tmp_sregno = FLD (f_srcdst);
4968 {
4969 SI opval = * FLD (i_st_src);
4970 SETMEMSI (current_cpu, pc, FLD (f_offset), opval);
4971 TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
4972 }
4973 {
4974 SI opval = CPU (h_gr[((FLD (f_srcdst)) + (1))]);
4975 SETMEMSI (current_cpu, pc, ADDSI (FLD (f_offset), 4), opval);
4976 TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
4977 }
4978 }
4979
4980 return vpc;
4981 #undef FLD
4982 }
4983
4984 /* stl-indirect-offset: stl $st_src, $offset($abase) */
4985
4986 static SEM_PC
4987 SEM_FN_NAME (i960base,stl_indirect_offset) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
4988 {
4989 #define FLD(f) abuf->fields.sfmt_stq_indirect_offset.f
4990 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
4991 int UNUSED written = 0;
4992 IADDR UNUSED pc = abuf->addr;
4993 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
4994
4995 {
4996 SI tmp_sregno;
4997 tmp_sregno = FLD (f_srcdst);
4998 {
4999 SI opval = * FLD (i_st_src);
5000 SETMEMSI (current_cpu, pc, ADDSI (FLD (f_offset), * FLD (i_abase)), opval);
5001 TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
5002 }
5003 {
5004 SI opval = CPU (h_gr[((FLD (f_srcdst)) + (1))]);
5005 SETMEMSI (current_cpu, pc, ADDSI (ADDSI (FLD (f_offset), * FLD (i_abase)), 4), opval);
5006 TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
5007 }
5008 }
5009
5010 return vpc;
5011 #undef FLD
5012 }
5013
5014 /* stl-indirect: stl $st_src, ($abase) */
5015
5016 static SEM_PC
5017 SEM_FN_NAME (i960base,stl_indirect) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
5018 {
5019 #define FLD(f) abuf->fields.sfmt_stq_indirect_offset.f
5020 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
5021 int UNUSED written = 0;
5022 IADDR UNUSED pc = abuf->addr;
5023 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
5024
5025 {
5026 SI tmp_sregno;
5027 tmp_sregno = FLD (f_srcdst);
5028 {
5029 SI opval = * FLD (i_st_src);
5030 SETMEMSI (current_cpu, pc, * FLD (i_abase), opval);
5031 TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
5032 }
5033 {
5034 SI opval = CPU (h_gr[((FLD (f_srcdst)) + (1))]);
5035 SETMEMSI (current_cpu, pc, ADDSI (* FLD (i_abase), 4), opval);
5036 TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
5037 }
5038 }
5039
5040 return vpc;
5041 #undef FLD
5042 }
5043
5044 /* stl-indirect-index: stl $st_src, ($abase)[$index*S$scale] */
5045
5046 static SEM_PC
5047 SEM_FN_NAME (i960base,stl_indirect_index) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
5048 {
5049 #define FLD(f) abuf->fields.sfmt_stq_indirect_index_disp.f
5050 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
5051 int UNUSED written = 0;
5052 IADDR UNUSED pc = abuf->addr;
5053 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
5054
5055 {
5056 SI tmp_sregno;
5057 tmp_sregno = FLD (f_srcdst);
5058 {
5059 SI opval = * FLD (i_st_src);
5060 SETMEMSI (current_cpu, pc, ADDSI (* FLD (i_abase), MULSI (* FLD (i_index), SLLSI (1, FLD (f_scale)))), opval);
5061 TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
5062 }
5063 {
5064 SI opval = CPU (h_gr[((FLD (f_srcdst)) + (1))]);
5065 SETMEMSI (current_cpu, pc, ADDSI (ADDSI (* FLD (i_abase), MULSI (* FLD (i_index), SLLSI (1, FLD (f_scale)))), 4), opval);
5066 TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
5067 }
5068 }
5069
5070 return vpc;
5071 #undef FLD
5072 }
5073
5074 /* stl-disp: stl $st_src, $optdisp */
5075
5076 static SEM_PC
5077 SEM_FN_NAME (i960base,stl_disp) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
5078 {
5079 #define FLD(f) abuf->fields.sfmt_stq_indirect_index_disp.f
5080 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
5081 int UNUSED written = 0;
5082 IADDR UNUSED pc = abuf->addr;
5083 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 8);
5084
5085 {
5086 SI tmp_sregno;
5087 tmp_sregno = FLD (f_srcdst);
5088 {
5089 SI opval = * FLD (i_st_src);
5090 SETMEMSI (current_cpu, pc, FLD (f_optdisp), opval);
5091 TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
5092 }
5093 {
5094 SI opval = CPU (h_gr[((FLD (f_srcdst)) + (1))]);
5095 SETMEMSI (current_cpu, pc, ADDSI (FLD (f_optdisp), 4), opval);
5096 TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
5097 }
5098 }
5099
5100 return vpc;
5101 #undef FLD
5102 }
5103
5104 /* stl-indirect-disp: stl $st_src, $optdisp($abase) */
5105
5106 static SEM_PC
5107 SEM_FN_NAME (i960base,stl_indirect_disp) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
5108 {
5109 #define FLD(f) abuf->fields.sfmt_stq_indirect_index_disp.f
5110 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
5111 int UNUSED written = 0;
5112 IADDR UNUSED pc = abuf->addr;
5113 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 8);
5114
5115 {
5116 SI tmp_sregno;
5117 tmp_sregno = FLD (f_srcdst);
5118 {
5119 SI opval = * FLD (i_st_src);
5120 SETMEMSI (current_cpu, pc, ADDSI (FLD (f_optdisp), * FLD (i_abase)), opval);
5121 TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
5122 }
5123 {
5124 SI opval = CPU (h_gr[((FLD (f_srcdst)) + (1))]);
5125 SETMEMSI (current_cpu, pc, ADDSI (ADDSI (FLD (f_optdisp), * FLD (i_abase)), 4), opval);
5126 TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
5127 }
5128 }
5129
5130 return vpc;
5131 #undef FLD
5132 }
5133
5134 /* stl-index-disp: stl $st_src, $optdisp[$index*S$scale */
5135
5136 static SEM_PC
5137 SEM_FN_NAME (i960base,stl_index_disp) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
5138 {
5139 #define FLD(f) abuf->fields.sfmt_stq_indirect_index_disp.f
5140 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
5141 int UNUSED written = 0;
5142 IADDR UNUSED pc = abuf->addr;
5143 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 8);
5144
5145 {
5146 SI tmp_sregno;
5147 tmp_sregno = FLD (f_srcdst);
5148 {
5149 SI opval = * FLD (i_st_src);
5150 SETMEMSI (current_cpu, pc, ADDSI (FLD (f_optdisp), MULSI (* FLD (i_index), SLLSI (1, FLD (f_scale)))), opval);
5151 TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
5152 }
5153 {
5154 SI opval = CPU (h_gr[((FLD (f_srcdst)) + (1))]);
5155 SETMEMSI (current_cpu, pc, ADDSI (ADDSI (FLD (f_optdisp), MULSI (* FLD (i_index), SLLSI (1, FLD (f_scale)))), 4), opval);
5156 TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
5157 }
5158 }
5159
5160 return vpc;
5161 #undef FLD
5162 }
5163
5164 /* stl-indirect-index-disp: stl $st_src, $optdisp($abase)[$index*S$scale] */
5165
5166 static SEM_PC
5167 SEM_FN_NAME (i960base,stl_indirect_index_disp) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
5168 {
5169 #define FLD(f) abuf->fields.sfmt_stq_indirect_index_disp.f
5170 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
5171 int UNUSED written = 0;
5172 IADDR UNUSED pc = abuf->addr;
5173 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 8);
5174
5175 {
5176 SI tmp_sregno;
5177 tmp_sregno = FLD (f_srcdst);
5178 {
5179 SI opval = * FLD (i_st_src);
5180 SETMEMSI (current_cpu, pc, ADDSI (FLD (f_optdisp), ADDSI (* FLD (i_abase), MULSI (* FLD (i_index), SLLSI (1, FLD (f_scale))))), opval);
5181 TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
5182 }
5183 {
5184 SI opval = CPU (h_gr[((FLD (f_srcdst)) + (1))]);
5185 SETMEMSI (current_cpu, pc, ADDSI (ADDSI (FLD (f_optdisp), ADDSI (* FLD (i_abase), MULSI (* FLD (i_index), SLLSI (1, FLD (f_scale))))), 4), opval);
5186 TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
5187 }
5188 }
5189
5190 return vpc;
5191 #undef FLD
5192 }
5193
5194 /* stt-offset: stt $st_src, $offset */
5195
5196 static SEM_PC
5197 SEM_FN_NAME (i960base,stt_offset) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
5198 {
5199 #define FLD(f) abuf->fields.sfmt_stq_indirect_offset.f
5200 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
5201 int UNUSED written = 0;
5202 IADDR UNUSED pc = abuf->addr;
5203 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
5204
5205 {
5206 SI tmp_sregno;
5207 tmp_sregno = FLD (f_srcdst);
5208 {
5209 SI opval = * FLD (i_st_src);
5210 SETMEMSI (current_cpu, pc, FLD (f_offset), opval);
5211 TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
5212 }
5213 {
5214 SI opval = CPU (h_gr[((FLD (f_srcdst)) + (1))]);
5215 SETMEMSI (current_cpu, pc, ADDSI (FLD (f_offset), 4), opval);
5216 TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
5217 }
5218 {
5219 SI opval = CPU (h_gr[((FLD (f_srcdst)) + (2))]);
5220 SETMEMSI (current_cpu, pc, ADDSI (FLD (f_offset), 8), opval);
5221 TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
5222 }
5223 }
5224
5225 return vpc;
5226 #undef FLD
5227 }
5228
5229 /* stt-indirect-offset: stt $st_src, $offset($abase) */
5230
5231 static SEM_PC
5232 SEM_FN_NAME (i960base,stt_indirect_offset) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
5233 {
5234 #define FLD(f) abuf->fields.sfmt_stq_indirect_offset.f
5235 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
5236 int UNUSED written = 0;
5237 IADDR UNUSED pc = abuf->addr;
5238 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
5239
5240 {
5241 SI tmp_sregno;
5242 tmp_sregno = FLD (f_srcdst);
5243 {
5244 SI opval = * FLD (i_st_src);
5245 SETMEMSI (current_cpu, pc, ADDSI (FLD (f_offset), * FLD (i_abase)), opval);
5246 TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
5247 }
5248 {
5249 SI opval = CPU (h_gr[((FLD (f_srcdst)) + (1))]);
5250 SETMEMSI (current_cpu, pc, ADDSI (ADDSI (FLD (f_offset), * FLD (i_abase)), 4), opval);
5251 TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
5252 }
5253 {
5254 SI opval = CPU (h_gr[((FLD (f_srcdst)) + (2))]);
5255 SETMEMSI (current_cpu, pc, ADDSI (ADDSI (FLD (f_offset), * FLD (i_abase)), 8), opval);
5256 TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
5257 }
5258 }
5259
5260 return vpc;
5261 #undef FLD
5262 }
5263
5264 /* stt-indirect: stt $st_src, ($abase) */
5265
5266 static SEM_PC
5267 SEM_FN_NAME (i960base,stt_indirect) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
5268 {
5269 #define FLD(f) abuf->fields.sfmt_stq_indirect_offset.f
5270 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
5271 int UNUSED written = 0;
5272 IADDR UNUSED pc = abuf->addr;
5273 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
5274
5275 {
5276 SI tmp_sregno;
5277 tmp_sregno = FLD (f_srcdst);
5278 {
5279 SI opval = * FLD (i_st_src);
5280 SETMEMSI (current_cpu, pc, * FLD (i_abase), opval);
5281 TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
5282 }
5283 {
5284 SI opval = CPU (h_gr[((FLD (f_srcdst)) + (1))]);
5285 SETMEMSI (current_cpu, pc, ADDSI (* FLD (i_abase), 4), opval);
5286 TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
5287 }
5288 {
5289 SI opval = CPU (h_gr[((FLD (f_srcdst)) + (2))]);
5290 SETMEMSI (current_cpu, pc, ADDSI (* FLD (i_abase), 8), opval);
5291 TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
5292 }
5293 }
5294
5295 return vpc;
5296 #undef FLD
5297 }
5298
5299 /* stt-indirect-index: stt $st_src, ($abase)[$index*S$scale] */
5300
5301 static SEM_PC
5302 SEM_FN_NAME (i960base,stt_indirect_index) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
5303 {
5304 #define FLD(f) abuf->fields.sfmt_stq_indirect_index_disp.f
5305 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
5306 int UNUSED written = 0;
5307 IADDR UNUSED pc = abuf->addr;
5308 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
5309
5310 {
5311 SI tmp_sregno;
5312 tmp_sregno = FLD (f_srcdst);
5313 {
5314 SI opval = * FLD (i_st_src);
5315 SETMEMSI (current_cpu, pc, ADDSI (* FLD (i_abase), MULSI (* FLD (i_index), SLLSI (1, FLD (f_scale)))), opval);
5316 TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
5317 }
5318 {
5319 SI opval = CPU (h_gr[((FLD (f_srcdst)) + (1))]);
5320 SETMEMSI (current_cpu, pc, ADDSI (ADDSI (* FLD (i_abase), MULSI (* FLD (i_index), SLLSI (1, FLD (f_scale)))), 4), opval);
5321 TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
5322 }
5323 {
5324 SI opval = CPU (h_gr[((FLD (f_srcdst)) + (2))]);
5325 SETMEMSI (current_cpu, pc, ADDSI (ADDSI (* FLD (i_abase), MULSI (* FLD (i_index), SLLSI (1, FLD (f_scale)))), 8), opval);
5326 TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
5327 }
5328 }
5329
5330 return vpc;
5331 #undef FLD
5332 }
5333
5334 /* stt-disp: stt $st_src, $optdisp */
5335
5336 static SEM_PC
5337 SEM_FN_NAME (i960base,stt_disp) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
5338 {
5339 #define FLD(f) abuf->fields.sfmt_stq_indirect_index_disp.f
5340 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
5341 int UNUSED written = 0;
5342 IADDR UNUSED pc = abuf->addr;
5343 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 8);
5344
5345 {
5346 SI tmp_sregno;
5347 tmp_sregno = FLD (f_srcdst);
5348 {
5349 SI opval = * FLD (i_st_src);
5350 SETMEMSI (current_cpu, pc, FLD (f_optdisp), opval);
5351 TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
5352 }
5353 {
5354 SI opval = CPU (h_gr[((FLD (f_srcdst)) + (1))]);
5355 SETMEMSI (current_cpu, pc, ADDSI (FLD (f_optdisp), 4), opval);
5356 TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
5357 }
5358 {
5359 SI opval = CPU (h_gr[((FLD (f_srcdst)) + (2))]);
5360 SETMEMSI (current_cpu, pc, ADDSI (FLD (f_optdisp), 8), opval);
5361 TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
5362 }
5363 }
5364
5365 return vpc;
5366 #undef FLD
5367 }
5368
5369 /* stt-indirect-disp: stt $st_src, $optdisp($abase) */
5370
5371 static SEM_PC
5372 SEM_FN_NAME (i960base,stt_indirect_disp) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
5373 {
5374 #define FLD(f) abuf->fields.sfmt_stq_indirect_index_disp.f
5375 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
5376 int UNUSED written = 0;
5377 IADDR UNUSED pc = abuf->addr;
5378 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 8);
5379
5380 {
5381 SI tmp_sregno;
5382 tmp_sregno = FLD (f_srcdst);
5383 {
5384 SI opval = * FLD (i_st_src);
5385 SETMEMSI (current_cpu, pc, ADDSI (FLD (f_optdisp), * FLD (i_abase)), opval);
5386 TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
5387 }
5388 {
5389 SI opval = CPU (h_gr[((FLD (f_srcdst)) + (1))]);
5390 SETMEMSI (current_cpu, pc, ADDSI (ADDSI (FLD (f_optdisp), * FLD (i_abase)), 4), opval);
5391 TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
5392 }
5393 {
5394 SI opval = CPU (h_gr[((FLD (f_srcdst)) + (2))]);
5395 SETMEMSI (current_cpu, pc, ADDSI (ADDSI (FLD (f_optdisp), * FLD (i_abase)), 8), opval);
5396 TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
5397 }
5398 }
5399
5400 return vpc;
5401 #undef FLD
5402 }
5403
5404 /* stt-index-disp: stt $st_src, $optdisp[$index*S$scale */
5405
5406 static SEM_PC
5407 SEM_FN_NAME (i960base,stt_index_disp) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
5408 {
5409 #define FLD(f) abuf->fields.sfmt_stq_indirect_index_disp.f
5410 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
5411 int UNUSED written = 0;
5412 IADDR UNUSED pc = abuf->addr;
5413 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 8);
5414
5415 {
5416 SI tmp_sregno;
5417 tmp_sregno = FLD (f_srcdst);
5418 {
5419 SI opval = * FLD (i_st_src);
5420 SETMEMSI (current_cpu, pc, ADDSI (FLD (f_optdisp), MULSI (* FLD (i_index), SLLSI (1, FLD (f_scale)))), opval);
5421 TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
5422 }
5423 {
5424 SI opval = CPU (h_gr[((FLD (f_srcdst)) + (1))]);
5425 SETMEMSI (current_cpu, pc, ADDSI (ADDSI (FLD (f_optdisp), MULSI (* FLD (i_index), SLLSI (1, FLD (f_scale)))), 4), opval);
5426 TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
5427 }
5428 {
5429 SI opval = CPU (h_gr[((FLD (f_srcdst)) + (2))]);
5430 SETMEMSI (current_cpu, pc, ADDSI (ADDSI (FLD (f_optdisp), MULSI (* FLD (i_index), SLLSI (1, FLD (f_scale)))), 8), opval);
5431 TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
5432 }
5433 }
5434
5435 return vpc;
5436 #undef FLD
5437 }
5438
5439 /* stt-indirect-index-disp: stt $st_src, $optdisp($abase)[$index*S$scale] */
5440
5441 static SEM_PC
5442 SEM_FN_NAME (i960base,stt_indirect_index_disp) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
5443 {
5444 #define FLD(f) abuf->fields.sfmt_stq_indirect_index_disp.f
5445 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
5446 int UNUSED written = 0;
5447 IADDR UNUSED pc = abuf->addr;
5448 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 8);
5449
5450 {
5451 SI tmp_sregno;
5452 tmp_sregno = FLD (f_srcdst);
5453 {
5454 SI opval = * FLD (i_st_src);
5455 SETMEMSI (current_cpu, pc, ADDSI (FLD (f_optdisp), ADDSI (* FLD (i_abase), MULSI (* FLD (i_index), SLLSI (1, FLD (f_scale))))), opval);
5456 TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
5457 }
5458 {
5459 SI opval = CPU (h_gr[((FLD (f_srcdst)) + (1))]);
5460 SETMEMSI (current_cpu, pc, ADDSI (ADDSI (FLD (f_optdisp), ADDSI (* FLD (i_abase), MULSI (* FLD (i_index), SLLSI (1, FLD (f_scale))))), 4), opval);
5461 TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
5462 }
5463 {
5464 SI opval = CPU (h_gr[((FLD (f_srcdst)) + (2))]);
5465 SETMEMSI (current_cpu, pc, ADDSI (ADDSI (FLD (f_optdisp), ADDSI (* FLD (i_abase), MULSI (* FLD (i_index), SLLSI (1, FLD (f_scale))))), 8), opval);
5466 TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
5467 }
5468 }
5469
5470 return vpc;
5471 #undef FLD
5472 }
5473
5474 /* stq-offset: stq $st_src, $offset */
5475
5476 static SEM_PC
5477 SEM_FN_NAME (i960base,stq_offset) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
5478 {
5479 #define FLD(f) abuf->fields.sfmt_stq_indirect_offset.f
5480 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
5481 int UNUSED written = 0;
5482 IADDR UNUSED pc = abuf->addr;
5483 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
5484
5485 {
5486 SI tmp_sregno;
5487 tmp_sregno = FLD (f_srcdst);
5488 {
5489 SI opval = * FLD (i_st_src);
5490 SETMEMSI (current_cpu, pc, FLD (f_offset), opval);
5491 TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
5492 }
5493 {
5494 SI opval = CPU (h_gr[((FLD (f_srcdst)) + (1))]);
5495 SETMEMSI (current_cpu, pc, ADDSI (FLD (f_offset), 4), opval);
5496 TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
5497 }
5498 {
5499 SI opval = CPU (h_gr[((FLD (f_srcdst)) + (2))]);
5500 SETMEMSI (current_cpu, pc, ADDSI (FLD (f_offset), 8), opval);
5501 TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
5502 }
5503 {
5504 SI opval = CPU (h_gr[((FLD (f_srcdst)) + (3))]);
5505 SETMEMSI (current_cpu, pc, ADDSI (FLD (f_offset), 12), opval);
5506 TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
5507 }
5508 }
5509
5510 return vpc;
5511 #undef FLD
5512 }
5513
5514 /* stq-indirect-offset: stq $st_src, $offset($abase) */
5515
5516 static SEM_PC
5517 SEM_FN_NAME (i960base,stq_indirect_offset) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
5518 {
5519 #define FLD(f) abuf->fields.sfmt_stq_indirect_offset.f
5520 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
5521 int UNUSED written = 0;
5522 IADDR UNUSED pc = abuf->addr;
5523 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
5524
5525 {
5526 SI tmp_sregno;
5527 tmp_sregno = FLD (f_srcdst);
5528 {
5529 SI opval = * FLD (i_st_src);
5530 SETMEMSI (current_cpu, pc, ADDSI (FLD (f_offset), * FLD (i_abase)), opval);
5531 TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
5532 }
5533 {
5534 SI opval = CPU (h_gr[((FLD (f_srcdst)) + (1))]);
5535 SETMEMSI (current_cpu, pc, ADDSI (ADDSI (FLD (f_offset), * FLD (i_abase)), 4), opval);
5536 TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
5537 }
5538 {
5539 SI opval = CPU (h_gr[((FLD (f_srcdst)) + (2))]);
5540 SETMEMSI (current_cpu, pc, ADDSI (ADDSI (FLD (f_offset), * FLD (i_abase)), 8), opval);
5541 TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
5542 }
5543 {
5544 SI opval = CPU (h_gr[((FLD (f_srcdst)) + (3))]);
5545 SETMEMSI (current_cpu, pc, ADDSI (ADDSI (FLD (f_offset), * FLD (i_abase)), 12), opval);
5546 TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
5547 }
5548 }
5549
5550 return vpc;
5551 #undef FLD
5552 }
5553
5554 /* stq-indirect: stq $st_src, ($abase) */
5555
5556 static SEM_PC
5557 SEM_FN_NAME (i960base,stq_indirect) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
5558 {
5559 #define FLD(f) abuf->fields.sfmt_stq_indirect_offset.f
5560 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
5561 int UNUSED written = 0;
5562 IADDR UNUSED pc = abuf->addr;
5563 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
5564
5565 {
5566 SI tmp_sregno;
5567 tmp_sregno = FLD (f_srcdst);
5568 {
5569 SI opval = * FLD (i_st_src);
5570 SETMEMSI (current_cpu, pc, * FLD (i_abase), opval);
5571 TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
5572 }
5573 {
5574 SI opval = CPU (h_gr[((FLD (f_srcdst)) + (1))]);
5575 SETMEMSI (current_cpu, pc, ADDSI (* FLD (i_abase), 4), opval);
5576 TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
5577 }
5578 {
5579 SI opval = CPU (h_gr[((FLD (f_srcdst)) + (2))]);
5580 SETMEMSI (current_cpu, pc, ADDSI (* FLD (i_abase), 8), opval);
5581 TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
5582 }
5583 {
5584 SI opval = CPU (h_gr[((FLD (f_srcdst)) + (3))]);
5585 SETMEMSI (current_cpu, pc, ADDSI (* FLD (i_abase), 12), opval);
5586 TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
5587 }
5588 }
5589
5590 return vpc;
5591 #undef FLD
5592 }
5593
5594 /* stq-indirect-index: stq $st_src, ($abase)[$index*S$scale] */
5595
5596 static SEM_PC
5597 SEM_FN_NAME (i960base,stq_indirect_index) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
5598 {
5599 #define FLD(f) abuf->fields.sfmt_stq_indirect_index_disp.f
5600 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
5601 int UNUSED written = 0;
5602 IADDR UNUSED pc = abuf->addr;
5603 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
5604
5605 {
5606 SI tmp_sregno;
5607 tmp_sregno = FLD (f_srcdst);
5608 {
5609 SI opval = * FLD (i_st_src);
5610 SETMEMSI (current_cpu, pc, ADDSI (* FLD (i_abase), MULSI (* FLD (i_index), SLLSI (1, FLD (f_scale)))), opval);
5611 TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
5612 }
5613 {
5614 SI opval = CPU (h_gr[((FLD (f_srcdst)) + (1))]);
5615 SETMEMSI (current_cpu, pc, ADDSI (ADDSI (* FLD (i_abase), MULSI (* FLD (i_index), SLLSI (1, FLD (f_scale)))), 4), opval);
5616 TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
5617 }
5618 {
5619 SI opval = CPU (h_gr[((FLD (f_srcdst)) + (2))]);
5620 SETMEMSI (current_cpu, pc, ADDSI (ADDSI (* FLD (i_abase), MULSI (* FLD (i_index), SLLSI (1, FLD (f_scale)))), 8), opval);
5621 TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
5622 }
5623 {
5624 SI opval = CPU (h_gr[((FLD (f_srcdst)) + (3))]);
5625 SETMEMSI (current_cpu, pc, ADDSI (ADDSI (* FLD (i_abase), MULSI (* FLD (i_index), SLLSI (1, FLD (f_scale)))), 12), opval);
5626 TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
5627 }
5628 }
5629
5630 return vpc;
5631 #undef FLD
5632 }
5633
5634 /* stq-disp: stq $st_src, $optdisp */
5635
5636 static SEM_PC
5637 SEM_FN_NAME (i960base,stq_disp) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
5638 {
5639 #define FLD(f) abuf->fields.sfmt_stq_indirect_index_disp.f
5640 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
5641 int UNUSED written = 0;
5642 IADDR UNUSED pc = abuf->addr;
5643 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 8);
5644
5645 {
5646 SI tmp_sregno;
5647 tmp_sregno = FLD (f_srcdst);
5648 {
5649 SI opval = * FLD (i_st_src);
5650 SETMEMSI (current_cpu, pc, FLD (f_optdisp), opval);
5651 TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
5652 }
5653 {
5654 SI opval = CPU (h_gr[((FLD (f_srcdst)) + (1))]);
5655 SETMEMSI (current_cpu, pc, ADDSI (FLD (f_optdisp), 4), opval);
5656 TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
5657 }
5658 {
5659 SI opval = CPU (h_gr[((FLD (f_srcdst)) + (2))]);
5660 SETMEMSI (current_cpu, pc, ADDSI (FLD (f_optdisp), 8), opval);
5661 TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
5662 }
5663 {
5664 SI opval = CPU (h_gr[((FLD (f_srcdst)) + (3))]);
5665 SETMEMSI (current_cpu, pc, ADDSI (FLD (f_optdisp), 12), opval);
5666 TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
5667 }
5668 }
5669
5670 return vpc;
5671 #undef FLD
5672 }
5673
5674 /* stq-indirect-disp: stq $st_src, $optdisp($abase) */
5675
5676 static SEM_PC
5677 SEM_FN_NAME (i960base,stq_indirect_disp) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
5678 {
5679 #define FLD(f) abuf->fields.sfmt_stq_indirect_index_disp.f
5680 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
5681 int UNUSED written = 0;
5682 IADDR UNUSED pc = abuf->addr;
5683 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 8);
5684
5685 {
5686 SI tmp_sregno;
5687 tmp_sregno = FLD (f_srcdst);
5688 {
5689 SI opval = * FLD (i_st_src);
5690 SETMEMSI (current_cpu, pc, ADDSI (FLD (f_optdisp), * FLD (i_abase)), opval);
5691 TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
5692 }
5693 {
5694 SI opval = CPU (h_gr[((FLD (f_srcdst)) + (1))]);
5695 SETMEMSI (current_cpu, pc, ADDSI (ADDSI (FLD (f_optdisp), * FLD (i_abase)), 4), opval);
5696 TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
5697 }
5698 {
5699 SI opval = CPU (h_gr[((FLD (f_srcdst)) + (2))]);
5700 SETMEMSI (current_cpu, pc, ADDSI (ADDSI (FLD (f_optdisp), * FLD (i_abase)), 8), opval);
5701 TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
5702 }
5703 {
5704 SI opval = CPU (h_gr[((FLD (f_srcdst)) + (3))]);
5705 SETMEMSI (current_cpu, pc, ADDSI (ADDSI (FLD (f_optdisp), * FLD (i_abase)), 12), opval);
5706 TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
5707 }
5708 }
5709
5710 return vpc;
5711 #undef FLD
5712 }
5713
5714 /* stq-index-disp: stq $st_src, $optdisp[$index*S$scale */
5715
5716 static SEM_PC
5717 SEM_FN_NAME (i960base,stq_index_disp) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
5718 {
5719 #define FLD(f) abuf->fields.sfmt_stq_indirect_index_disp.f
5720 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
5721 int UNUSED written = 0;
5722 IADDR UNUSED pc = abuf->addr;
5723 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 8);
5724
5725 {
5726 SI tmp_sregno;
5727 tmp_sregno = FLD (f_srcdst);
5728 {
5729 SI opval = * FLD (i_st_src);
5730 SETMEMSI (current_cpu, pc, ADDSI (FLD (f_optdisp), MULSI (* FLD (i_index), SLLSI (1, FLD (f_scale)))), opval);
5731 TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
5732 }
5733 {
5734 SI opval = CPU (h_gr[((FLD (f_srcdst)) + (1))]);
5735 SETMEMSI (current_cpu, pc, ADDSI (ADDSI (FLD (f_optdisp), MULSI (* FLD (i_index), SLLSI (1, FLD (f_scale)))), 4), opval);
5736 TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
5737 }
5738 {
5739 SI opval = CPU (h_gr[((FLD (f_srcdst)) + (2))]);
5740 SETMEMSI (current_cpu, pc, ADDSI (ADDSI (FLD (f_optdisp), MULSI (* FLD (i_index), SLLSI (1, FLD (f_scale)))), 8), opval);
5741 TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
5742 }
5743 {
5744 SI opval = CPU (h_gr[((FLD (f_srcdst)) + (3))]);
5745 SETMEMSI (current_cpu, pc, ADDSI (ADDSI (FLD (f_optdisp), MULSI (* FLD (i_index), SLLSI (1, FLD (f_scale)))), 12), opval);
5746 TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
5747 }
5748 }
5749
5750 return vpc;
5751 #undef FLD
5752 }
5753
5754 /* stq-indirect-index-disp: stq $st_src, $optdisp($abase)[$index*S$scale] */
5755
5756 static SEM_PC
5757 SEM_FN_NAME (i960base,stq_indirect_index_disp) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
5758 {
5759 #define FLD(f) abuf->fields.sfmt_stq_indirect_index_disp.f
5760 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
5761 int UNUSED written = 0;
5762 IADDR UNUSED pc = abuf->addr;
5763 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 8);
5764
5765 {
5766 SI tmp_sregno;
5767 tmp_sregno = FLD (f_srcdst);
5768 {
5769 SI opval = * FLD (i_st_src);
5770 SETMEMSI (current_cpu, pc, ADDSI (FLD (f_optdisp), ADDSI (* FLD (i_abase), MULSI (* FLD (i_index), SLLSI (1, FLD (f_scale))))), opval);
5771 TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
5772 }
5773 {
5774 SI opval = CPU (h_gr[((FLD (f_srcdst)) + (1))]);
5775 SETMEMSI (current_cpu, pc, ADDSI (ADDSI (FLD (f_optdisp), ADDSI (* FLD (i_abase), MULSI (* FLD (i_index), SLLSI (1, FLD (f_scale))))), 4), opval);
5776 TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
5777 }
5778 {
5779 SI opval = CPU (h_gr[((FLD (f_srcdst)) + (2))]);
5780 SETMEMSI (current_cpu, pc, ADDSI (ADDSI (FLD (f_optdisp), ADDSI (* FLD (i_abase), MULSI (* FLD (i_index), SLLSI (1, FLD (f_scale))))), 8), opval);
5781 TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
5782 }
5783 {
5784 SI opval = CPU (h_gr[((FLD (f_srcdst)) + (3))]);
5785 SETMEMSI (current_cpu, pc, ADDSI (ADDSI (FLD (f_optdisp), ADDSI (* FLD (i_abase), MULSI (* FLD (i_index), SLLSI (1, FLD (f_scale))))), 12), opval);
5786 TRACE_RESULT (current_cpu, abuf, "memory", 'x', opval);
5787 }
5788 }
5789
5790 return vpc;
5791 #undef FLD
5792 }
5793
5794 /* cmpobe-reg: cmpobe $br_src1, $br_src2, $br_disp */
5795
5796 static SEM_PC
5797 SEM_FN_NAME (i960base,cmpobe_reg) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
5798 {
5799 #define FLD(f) abuf->fields.sfmt_cmpobe_reg.f
5800 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
5801 int UNUSED written = 0;
5802 IADDR UNUSED pc = abuf->addr;
5803 SEM_BRANCH_INIT
5804 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
5805
5806 if (EQSI (* FLD (i_br_src1), * FLD (i_br_src2))) {
5807 {
5808 USI opval = FLD (i_br_disp);
5809 SEM_BRANCH_VIA_CACHE (current_cpu, sem_arg, opval, vpc);
5810 written |= (1 << 3);
5811 TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval);
5812 }
5813 }
5814
5815 abuf->written = written;
5816 SEM_BRANCH_FINI (vpc);
5817 return vpc;
5818 #undef FLD
5819 }
5820
5821 /* cmpobe-lit: cmpobe $br_lit1, $br_src2, $br_disp */
5822
5823 static SEM_PC
5824 SEM_FN_NAME (i960base,cmpobe_lit) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
5825 {
5826 #define FLD(f) abuf->fields.sfmt_cmpobe_lit.f
5827 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
5828 int UNUSED written = 0;
5829 IADDR UNUSED pc = abuf->addr;
5830 SEM_BRANCH_INIT
5831 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
5832
5833 if (EQSI (FLD (f_br_src1), * FLD (i_br_src2))) {
5834 {
5835 USI opval = FLD (i_br_disp);
5836 SEM_BRANCH_VIA_CACHE (current_cpu, sem_arg, opval, vpc);
5837 written |= (1 << 3);
5838 TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval);
5839 }
5840 }
5841
5842 abuf->written = written;
5843 SEM_BRANCH_FINI (vpc);
5844 return vpc;
5845 #undef FLD
5846 }
5847
5848 /* cmpobne-reg: cmpobne $br_src1, $br_src2, $br_disp */
5849
5850 static SEM_PC
5851 SEM_FN_NAME (i960base,cmpobne_reg) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
5852 {
5853 #define FLD(f) abuf->fields.sfmt_cmpobe_reg.f
5854 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
5855 int UNUSED written = 0;
5856 IADDR UNUSED pc = abuf->addr;
5857 SEM_BRANCH_INIT
5858 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
5859
5860 if (NESI (* FLD (i_br_src1), * FLD (i_br_src2))) {
5861 {
5862 USI opval = FLD (i_br_disp);
5863 SEM_BRANCH_VIA_CACHE (current_cpu, sem_arg, opval, vpc);
5864 written |= (1 << 3);
5865 TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval);
5866 }
5867 }
5868
5869 abuf->written = written;
5870 SEM_BRANCH_FINI (vpc);
5871 return vpc;
5872 #undef FLD
5873 }
5874
5875 /* cmpobne-lit: cmpobne $br_lit1, $br_src2, $br_disp */
5876
5877 static SEM_PC
5878 SEM_FN_NAME (i960base,cmpobne_lit) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
5879 {
5880 #define FLD(f) abuf->fields.sfmt_cmpobe_lit.f
5881 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
5882 int UNUSED written = 0;
5883 IADDR UNUSED pc = abuf->addr;
5884 SEM_BRANCH_INIT
5885 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
5886
5887 if (NESI (FLD (f_br_src1), * FLD (i_br_src2))) {
5888 {
5889 USI opval = FLD (i_br_disp);
5890 SEM_BRANCH_VIA_CACHE (current_cpu, sem_arg, opval, vpc);
5891 written |= (1 << 3);
5892 TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval);
5893 }
5894 }
5895
5896 abuf->written = written;
5897 SEM_BRANCH_FINI (vpc);
5898 return vpc;
5899 #undef FLD
5900 }
5901
5902 /* cmpobl-reg: cmpobl $br_src1, $br_src2, $br_disp */
5903
5904 static SEM_PC
5905 SEM_FN_NAME (i960base,cmpobl_reg) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
5906 {
5907 #define FLD(f) abuf->fields.sfmt_cmpobe_reg.f
5908 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
5909 int UNUSED written = 0;
5910 IADDR UNUSED pc = abuf->addr;
5911 SEM_BRANCH_INIT
5912 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
5913
5914 if (LTUSI (* FLD (i_br_src1), * FLD (i_br_src2))) {
5915 {
5916 USI opval = FLD (i_br_disp);
5917 SEM_BRANCH_VIA_CACHE (current_cpu, sem_arg, opval, vpc);
5918 written |= (1 << 3);
5919 TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval);
5920 }
5921 }
5922
5923 abuf->written = written;
5924 SEM_BRANCH_FINI (vpc);
5925 return vpc;
5926 #undef FLD
5927 }
5928
5929 /* cmpobl-lit: cmpobl $br_lit1, $br_src2, $br_disp */
5930
5931 static SEM_PC
5932 SEM_FN_NAME (i960base,cmpobl_lit) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
5933 {
5934 #define FLD(f) abuf->fields.sfmt_cmpobe_lit.f
5935 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
5936 int UNUSED written = 0;
5937 IADDR UNUSED pc = abuf->addr;
5938 SEM_BRANCH_INIT
5939 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
5940
5941 if (LTUSI (FLD (f_br_src1), * FLD (i_br_src2))) {
5942 {
5943 USI opval = FLD (i_br_disp);
5944 SEM_BRANCH_VIA_CACHE (current_cpu, sem_arg, opval, vpc);
5945 written |= (1 << 3);
5946 TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval);
5947 }
5948 }
5949
5950 abuf->written = written;
5951 SEM_BRANCH_FINI (vpc);
5952 return vpc;
5953 #undef FLD
5954 }
5955
5956 /* cmpoble-reg: cmpoble $br_src1, $br_src2, $br_disp */
5957
5958 static SEM_PC
5959 SEM_FN_NAME (i960base,cmpoble_reg) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
5960 {
5961 #define FLD(f) abuf->fields.sfmt_cmpobe_reg.f
5962 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
5963 int UNUSED written = 0;
5964 IADDR UNUSED pc = abuf->addr;
5965 SEM_BRANCH_INIT
5966 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
5967
5968 if (LEUSI (* FLD (i_br_src1), * FLD (i_br_src2))) {
5969 {
5970 USI opval = FLD (i_br_disp);
5971 SEM_BRANCH_VIA_CACHE (current_cpu, sem_arg, opval, vpc);
5972 written |= (1 << 3);
5973 TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval);
5974 }
5975 }
5976
5977 abuf->written = written;
5978 SEM_BRANCH_FINI (vpc);
5979 return vpc;
5980 #undef FLD
5981 }
5982
5983 /* cmpoble-lit: cmpoble $br_lit1, $br_src2, $br_disp */
5984
5985 static SEM_PC
5986 SEM_FN_NAME (i960base,cmpoble_lit) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
5987 {
5988 #define FLD(f) abuf->fields.sfmt_cmpobe_lit.f
5989 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
5990 int UNUSED written = 0;
5991 IADDR UNUSED pc = abuf->addr;
5992 SEM_BRANCH_INIT
5993 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
5994
5995 if (LEUSI (FLD (f_br_src1), * FLD (i_br_src2))) {
5996 {
5997 USI opval = FLD (i_br_disp);
5998 SEM_BRANCH_VIA_CACHE (current_cpu, sem_arg, opval, vpc);
5999 written |= (1 << 3);
6000 TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval);
6001 }
6002 }
6003
6004 abuf->written = written;
6005 SEM_BRANCH_FINI (vpc);
6006 return vpc;
6007 #undef FLD
6008 }
6009
6010 /* cmpobg-reg: cmpobg $br_src1, $br_src2, $br_disp */
6011
6012 static SEM_PC
6013 SEM_FN_NAME (i960base,cmpobg_reg) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
6014 {
6015 #define FLD(f) abuf->fields.sfmt_cmpobe_reg.f
6016 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
6017 int UNUSED written = 0;
6018 IADDR UNUSED pc = abuf->addr;
6019 SEM_BRANCH_INIT
6020 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
6021
6022 if (GTUSI (* FLD (i_br_src1), * FLD (i_br_src2))) {
6023 {
6024 USI opval = FLD (i_br_disp);
6025 SEM_BRANCH_VIA_CACHE (current_cpu, sem_arg, opval, vpc);
6026 written |= (1 << 3);
6027 TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval);
6028 }
6029 }
6030
6031 abuf->written = written;
6032 SEM_BRANCH_FINI (vpc);
6033 return vpc;
6034 #undef FLD
6035 }
6036
6037 /* cmpobg-lit: cmpobg $br_lit1, $br_src2, $br_disp */
6038
6039 static SEM_PC
6040 SEM_FN_NAME (i960base,cmpobg_lit) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
6041 {
6042 #define FLD(f) abuf->fields.sfmt_cmpobe_lit.f
6043 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
6044 int UNUSED written = 0;
6045 IADDR UNUSED pc = abuf->addr;
6046 SEM_BRANCH_INIT
6047 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
6048
6049 if (GTUSI (FLD (f_br_src1), * FLD (i_br_src2))) {
6050 {
6051 USI opval = FLD (i_br_disp);
6052 SEM_BRANCH_VIA_CACHE (current_cpu, sem_arg, opval, vpc);
6053 written |= (1 << 3);
6054 TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval);
6055 }
6056 }
6057
6058 abuf->written = written;
6059 SEM_BRANCH_FINI (vpc);
6060 return vpc;
6061 #undef FLD
6062 }
6063
6064 /* cmpobge-reg: cmpobge $br_src1, $br_src2, $br_disp */
6065
6066 static SEM_PC
6067 SEM_FN_NAME (i960base,cmpobge_reg) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
6068 {
6069 #define FLD(f) abuf->fields.sfmt_cmpobe_reg.f
6070 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
6071 int UNUSED written = 0;
6072 IADDR UNUSED pc = abuf->addr;
6073 SEM_BRANCH_INIT
6074 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
6075
6076 if (GEUSI (* FLD (i_br_src1), * FLD (i_br_src2))) {
6077 {
6078 USI opval = FLD (i_br_disp);
6079 SEM_BRANCH_VIA_CACHE (current_cpu, sem_arg, opval, vpc);
6080 written |= (1 << 3);
6081 TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval);
6082 }
6083 }
6084
6085 abuf->written = written;
6086 SEM_BRANCH_FINI (vpc);
6087 return vpc;
6088 #undef FLD
6089 }
6090
6091 /* cmpobge-lit: cmpobge $br_lit1, $br_src2, $br_disp */
6092
6093 static SEM_PC
6094 SEM_FN_NAME (i960base,cmpobge_lit) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
6095 {
6096 #define FLD(f) abuf->fields.sfmt_cmpobe_lit.f
6097 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
6098 int UNUSED written = 0;
6099 IADDR UNUSED pc = abuf->addr;
6100 SEM_BRANCH_INIT
6101 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
6102
6103 if (GEUSI (FLD (f_br_src1), * FLD (i_br_src2))) {
6104 {
6105 USI opval = FLD (i_br_disp);
6106 SEM_BRANCH_VIA_CACHE (current_cpu, sem_arg, opval, vpc);
6107 written |= (1 << 3);
6108 TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval);
6109 }
6110 }
6111
6112 abuf->written = written;
6113 SEM_BRANCH_FINI (vpc);
6114 return vpc;
6115 #undef FLD
6116 }
6117
6118 /* cmpibe-reg: cmpibe $br_src1, $br_src2, $br_disp */
6119
6120 static SEM_PC
6121 SEM_FN_NAME (i960base,cmpibe_reg) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
6122 {
6123 #define FLD(f) abuf->fields.sfmt_cmpobe_reg.f
6124 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
6125 int UNUSED written = 0;
6126 IADDR UNUSED pc = abuf->addr;
6127 SEM_BRANCH_INIT
6128 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
6129
6130 if (EQSI (* FLD (i_br_src1), * FLD (i_br_src2))) {
6131 {
6132 USI opval = FLD (i_br_disp);
6133 SEM_BRANCH_VIA_CACHE (current_cpu, sem_arg, opval, vpc);
6134 written |= (1 << 3);
6135 TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval);
6136 }
6137 }
6138
6139 abuf->written = written;
6140 SEM_BRANCH_FINI (vpc);
6141 return vpc;
6142 #undef FLD
6143 }
6144
6145 /* cmpibe-lit: cmpibe $br_lit1, $br_src2, $br_disp */
6146
6147 static SEM_PC
6148 SEM_FN_NAME (i960base,cmpibe_lit) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
6149 {
6150 #define FLD(f) abuf->fields.sfmt_cmpobe_lit.f
6151 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
6152 int UNUSED written = 0;
6153 IADDR UNUSED pc = abuf->addr;
6154 SEM_BRANCH_INIT
6155 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
6156
6157 if (EQSI (FLD (f_br_src1), * FLD (i_br_src2))) {
6158 {
6159 USI opval = FLD (i_br_disp);
6160 SEM_BRANCH_VIA_CACHE (current_cpu, sem_arg, opval, vpc);
6161 written |= (1 << 3);
6162 TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval);
6163 }
6164 }
6165
6166 abuf->written = written;
6167 SEM_BRANCH_FINI (vpc);
6168 return vpc;
6169 #undef FLD
6170 }
6171
6172 /* cmpibne-reg: cmpibne $br_src1, $br_src2, $br_disp */
6173
6174 static SEM_PC
6175 SEM_FN_NAME (i960base,cmpibne_reg) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
6176 {
6177 #define FLD(f) abuf->fields.sfmt_cmpobe_reg.f
6178 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
6179 int UNUSED written = 0;
6180 IADDR UNUSED pc = abuf->addr;
6181 SEM_BRANCH_INIT
6182 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
6183
6184 if (NESI (* FLD (i_br_src1), * FLD (i_br_src2))) {
6185 {
6186 USI opval = FLD (i_br_disp);
6187 SEM_BRANCH_VIA_CACHE (current_cpu, sem_arg, opval, vpc);
6188 written |= (1 << 3);
6189 TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval);
6190 }
6191 }
6192
6193 abuf->written = written;
6194 SEM_BRANCH_FINI (vpc);
6195 return vpc;
6196 #undef FLD
6197 }
6198
6199 /* cmpibne-lit: cmpibne $br_lit1, $br_src2, $br_disp */
6200
6201 static SEM_PC
6202 SEM_FN_NAME (i960base,cmpibne_lit) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
6203 {
6204 #define FLD(f) abuf->fields.sfmt_cmpobe_lit.f
6205 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
6206 int UNUSED written = 0;
6207 IADDR UNUSED pc = abuf->addr;
6208 SEM_BRANCH_INIT
6209 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
6210
6211 if (NESI (FLD (f_br_src1), * FLD (i_br_src2))) {
6212 {
6213 USI opval = FLD (i_br_disp);
6214 SEM_BRANCH_VIA_CACHE (current_cpu, sem_arg, opval, vpc);
6215 written |= (1 << 3);
6216 TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval);
6217 }
6218 }
6219
6220 abuf->written = written;
6221 SEM_BRANCH_FINI (vpc);
6222 return vpc;
6223 #undef FLD
6224 }
6225
6226 /* cmpibl-reg: cmpibl $br_src1, $br_src2, $br_disp */
6227
6228 static SEM_PC
6229 SEM_FN_NAME (i960base,cmpibl_reg) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
6230 {
6231 #define FLD(f) abuf->fields.sfmt_cmpobe_reg.f
6232 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
6233 int UNUSED written = 0;
6234 IADDR UNUSED pc = abuf->addr;
6235 SEM_BRANCH_INIT
6236 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
6237
6238 if (LTSI (* FLD (i_br_src1), * FLD (i_br_src2))) {
6239 {
6240 USI opval = FLD (i_br_disp);
6241 SEM_BRANCH_VIA_CACHE (current_cpu, sem_arg, opval, vpc);
6242 written |= (1 << 3);
6243 TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval);
6244 }
6245 }
6246
6247 abuf->written = written;
6248 SEM_BRANCH_FINI (vpc);
6249 return vpc;
6250 #undef FLD
6251 }
6252
6253 /* cmpibl-lit: cmpibl $br_lit1, $br_src2, $br_disp */
6254
6255 static SEM_PC
6256 SEM_FN_NAME (i960base,cmpibl_lit) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
6257 {
6258 #define FLD(f) abuf->fields.sfmt_cmpobe_lit.f
6259 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
6260 int UNUSED written = 0;
6261 IADDR UNUSED pc = abuf->addr;
6262 SEM_BRANCH_INIT
6263 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
6264
6265 if (LTSI (FLD (f_br_src1), * FLD (i_br_src2))) {
6266 {
6267 USI opval = FLD (i_br_disp);
6268 SEM_BRANCH_VIA_CACHE (current_cpu, sem_arg, opval, vpc);
6269 written |= (1 << 3);
6270 TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval);
6271 }
6272 }
6273
6274 abuf->written = written;
6275 SEM_BRANCH_FINI (vpc);
6276 return vpc;
6277 #undef FLD
6278 }
6279
6280 /* cmpible-reg: cmpible $br_src1, $br_src2, $br_disp */
6281
6282 static SEM_PC
6283 SEM_FN_NAME (i960base,cmpible_reg) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
6284 {
6285 #define FLD(f) abuf->fields.sfmt_cmpobe_reg.f
6286 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
6287 int UNUSED written = 0;
6288 IADDR UNUSED pc = abuf->addr;
6289 SEM_BRANCH_INIT
6290 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
6291
6292 if (LESI (* FLD (i_br_src1), * FLD (i_br_src2))) {
6293 {
6294 USI opval = FLD (i_br_disp);
6295 SEM_BRANCH_VIA_CACHE (current_cpu, sem_arg, opval, vpc);
6296 written |= (1 << 3);
6297 TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval);
6298 }
6299 }
6300
6301 abuf->written = written;
6302 SEM_BRANCH_FINI (vpc);
6303 return vpc;
6304 #undef FLD
6305 }
6306
6307 /* cmpible-lit: cmpible $br_lit1, $br_src2, $br_disp */
6308
6309 static SEM_PC
6310 SEM_FN_NAME (i960base,cmpible_lit) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
6311 {
6312 #define FLD(f) abuf->fields.sfmt_cmpobe_lit.f
6313 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
6314 int UNUSED written = 0;
6315 IADDR UNUSED pc = abuf->addr;
6316 SEM_BRANCH_INIT
6317 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
6318
6319 if (LESI (FLD (f_br_src1), * FLD (i_br_src2))) {
6320 {
6321 USI opval = FLD (i_br_disp);
6322 SEM_BRANCH_VIA_CACHE (current_cpu, sem_arg, opval, vpc);
6323 written |= (1 << 3);
6324 TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval);
6325 }
6326 }
6327
6328 abuf->written = written;
6329 SEM_BRANCH_FINI (vpc);
6330 return vpc;
6331 #undef FLD
6332 }
6333
6334 /* cmpibg-reg: cmpibg $br_src1, $br_src2, $br_disp */
6335
6336 static SEM_PC
6337 SEM_FN_NAME (i960base,cmpibg_reg) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
6338 {
6339 #define FLD(f) abuf->fields.sfmt_cmpobe_reg.f
6340 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
6341 int UNUSED written = 0;
6342 IADDR UNUSED pc = abuf->addr;
6343 SEM_BRANCH_INIT
6344 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
6345
6346 if (GTSI (* FLD (i_br_src1), * FLD (i_br_src2))) {
6347 {
6348 USI opval = FLD (i_br_disp);
6349 SEM_BRANCH_VIA_CACHE (current_cpu, sem_arg, opval, vpc);
6350 written |= (1 << 3);
6351 TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval);
6352 }
6353 }
6354
6355 abuf->written = written;
6356 SEM_BRANCH_FINI (vpc);
6357 return vpc;
6358 #undef FLD
6359 }
6360
6361 /* cmpibg-lit: cmpibg $br_lit1, $br_src2, $br_disp */
6362
6363 static SEM_PC
6364 SEM_FN_NAME (i960base,cmpibg_lit) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
6365 {
6366 #define FLD(f) abuf->fields.sfmt_cmpobe_lit.f
6367 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
6368 int UNUSED written = 0;
6369 IADDR UNUSED pc = abuf->addr;
6370 SEM_BRANCH_INIT
6371 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
6372
6373 if (GTSI (FLD (f_br_src1), * FLD (i_br_src2))) {
6374 {
6375 USI opval = FLD (i_br_disp);
6376 SEM_BRANCH_VIA_CACHE (current_cpu, sem_arg, opval, vpc);
6377 written |= (1 << 3);
6378 TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval);
6379 }
6380 }
6381
6382 abuf->written = written;
6383 SEM_BRANCH_FINI (vpc);
6384 return vpc;
6385 #undef FLD
6386 }
6387
6388 /* cmpibge-reg: cmpibge $br_src1, $br_src2, $br_disp */
6389
6390 static SEM_PC
6391 SEM_FN_NAME (i960base,cmpibge_reg) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
6392 {
6393 #define FLD(f) abuf->fields.sfmt_cmpobe_reg.f
6394 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
6395 int UNUSED written = 0;
6396 IADDR UNUSED pc = abuf->addr;
6397 SEM_BRANCH_INIT
6398 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
6399
6400 if (GESI (* FLD (i_br_src1), * FLD (i_br_src2))) {
6401 {
6402 USI opval = FLD (i_br_disp);
6403 SEM_BRANCH_VIA_CACHE (current_cpu, sem_arg, opval, vpc);
6404 written |= (1 << 3);
6405 TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval);
6406 }
6407 }
6408
6409 abuf->written = written;
6410 SEM_BRANCH_FINI (vpc);
6411 return vpc;
6412 #undef FLD
6413 }
6414
6415 /* cmpibge-lit: cmpibge $br_lit1, $br_src2, $br_disp */
6416
6417 static SEM_PC
6418 SEM_FN_NAME (i960base,cmpibge_lit) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
6419 {
6420 #define FLD(f) abuf->fields.sfmt_cmpobe_lit.f
6421 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
6422 int UNUSED written = 0;
6423 IADDR UNUSED pc = abuf->addr;
6424 SEM_BRANCH_INIT
6425 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
6426
6427 if (GESI (FLD (f_br_src1), * FLD (i_br_src2))) {
6428 {
6429 USI opval = FLD (i_br_disp);
6430 SEM_BRANCH_VIA_CACHE (current_cpu, sem_arg, opval, vpc);
6431 written |= (1 << 3);
6432 TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval);
6433 }
6434 }
6435
6436 abuf->written = written;
6437 SEM_BRANCH_FINI (vpc);
6438 return vpc;
6439 #undef FLD
6440 }
6441
6442 /* bbc-reg: bbc $br_src1, $br_src2, $br_disp */
6443
6444 static SEM_PC
6445 SEM_FN_NAME (i960base,bbc_reg) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
6446 {
6447 #define FLD(f) abuf->fields.sfmt_cmpobe_reg.f
6448 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
6449 int UNUSED written = 0;
6450 IADDR UNUSED pc = abuf->addr;
6451 SEM_BRANCH_INIT
6452 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
6453
6454 if (EQSI (ANDSI (SLLSI (1, * FLD (i_br_src1)), * FLD (i_br_src2)), 0)) {
6455 {
6456 USI opval = FLD (i_br_disp);
6457 SEM_BRANCH_VIA_CACHE (current_cpu, sem_arg, opval, vpc);
6458 written |= (1 << 3);
6459 TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval);
6460 }
6461 }
6462
6463 abuf->written = written;
6464 SEM_BRANCH_FINI (vpc);
6465 return vpc;
6466 #undef FLD
6467 }
6468
6469 /* bbc-lit: bbc $br_lit1, $br_src2, $br_disp */
6470
6471 static SEM_PC
6472 SEM_FN_NAME (i960base,bbc_lit) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
6473 {
6474 #define FLD(f) abuf->fields.sfmt_cmpobe_lit.f
6475 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
6476 int UNUSED written = 0;
6477 IADDR UNUSED pc = abuf->addr;
6478 SEM_BRANCH_INIT
6479 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
6480
6481 if (EQSI (ANDSI (SLLSI (1, FLD (f_br_src1)), * FLD (i_br_src2)), 0)) {
6482 {
6483 USI opval = FLD (i_br_disp);
6484 SEM_BRANCH_VIA_CACHE (current_cpu, sem_arg, opval, vpc);
6485 written |= (1 << 3);
6486 TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval);
6487 }
6488 }
6489
6490 abuf->written = written;
6491 SEM_BRANCH_FINI (vpc);
6492 return vpc;
6493 #undef FLD
6494 }
6495
6496 /* bbs-reg: bbs $br_src1, $br_src2, $br_disp */
6497
6498 static SEM_PC
6499 SEM_FN_NAME (i960base,bbs_reg) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
6500 {
6501 #define FLD(f) abuf->fields.sfmt_cmpobe_reg.f
6502 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
6503 int UNUSED written = 0;
6504 IADDR UNUSED pc = abuf->addr;
6505 SEM_BRANCH_INIT
6506 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
6507
6508 if (NESI (ANDSI (SLLSI (1, * FLD (i_br_src1)), * FLD (i_br_src2)), 0)) {
6509 {
6510 USI opval = FLD (i_br_disp);
6511 SEM_BRANCH_VIA_CACHE (current_cpu, sem_arg, opval, vpc);
6512 written |= (1 << 3);
6513 TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval);
6514 }
6515 }
6516
6517 abuf->written = written;
6518 SEM_BRANCH_FINI (vpc);
6519 return vpc;
6520 #undef FLD
6521 }
6522
6523 /* bbs-lit: bbs $br_lit1, $br_src2, $br_disp */
6524
6525 static SEM_PC
6526 SEM_FN_NAME (i960base,bbs_lit) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
6527 {
6528 #define FLD(f) abuf->fields.sfmt_cmpobe_lit.f
6529 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
6530 int UNUSED written = 0;
6531 IADDR UNUSED pc = abuf->addr;
6532 SEM_BRANCH_INIT
6533 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
6534
6535 if (NESI (ANDSI (SLLSI (1, FLD (f_br_src1)), * FLD (i_br_src2)), 0)) {
6536 {
6537 USI opval = FLD (i_br_disp);
6538 SEM_BRANCH_VIA_CACHE (current_cpu, sem_arg, opval, vpc);
6539 written |= (1 << 3);
6540 TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval);
6541 }
6542 }
6543
6544 abuf->written = written;
6545 SEM_BRANCH_FINI (vpc);
6546 return vpc;
6547 #undef FLD
6548 }
6549
6550 /* cmpi: cmpi $src1, $src2 */
6551
6552 static SEM_PC
6553 SEM_FN_NAME (i960base,cmpi) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
6554 {
6555 #define FLD(f) abuf->fields.sfmt_emul.f
6556 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
6557 int UNUSED written = 0;
6558 IADDR UNUSED pc = abuf->addr;
6559 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
6560
6561 {
6562 SI opval = (LTSI (* FLD (i_src1), * FLD (i_src2))) ? (4) : (EQSI (* FLD (i_src1), * FLD (i_src2))) ? (2) : (1);
6563 CPU (h_cc) = opval;
6564 TRACE_RESULT (current_cpu, abuf, "cc", 'x', opval);
6565 }
6566
6567 return vpc;
6568 #undef FLD
6569 }
6570
6571 /* cmpi1: cmpi $lit1, $src2 */
6572
6573 static SEM_PC
6574 SEM_FN_NAME (i960base,cmpi1) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
6575 {
6576 #define FLD(f) abuf->fields.sfmt_emul1.f
6577 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
6578 int UNUSED written = 0;
6579 IADDR UNUSED pc = abuf->addr;
6580 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
6581
6582 {
6583 SI opval = (LTSI (FLD (f_src1), * FLD (i_src2))) ? (4) : (EQSI (FLD (f_src1), * FLD (i_src2))) ? (2) : (1);
6584 CPU (h_cc) = opval;
6585 TRACE_RESULT (current_cpu, abuf, "cc", 'x', opval);
6586 }
6587
6588 return vpc;
6589 #undef FLD
6590 }
6591
6592 /* cmpi2: cmpi $src1, $lit2 */
6593
6594 static SEM_PC
6595 SEM_FN_NAME (i960base,cmpi2) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
6596 {
6597 #define FLD(f) abuf->fields.sfmt_emul2.f
6598 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
6599 int UNUSED written = 0;
6600 IADDR UNUSED pc = abuf->addr;
6601 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
6602
6603 {
6604 SI opval = (LTSI (* FLD (i_src1), FLD (f_src2))) ? (4) : (EQSI (* FLD (i_src1), FLD (f_src2))) ? (2) : (1);
6605 CPU (h_cc) = opval;
6606 TRACE_RESULT (current_cpu, abuf, "cc", 'x', opval);
6607 }
6608
6609 return vpc;
6610 #undef FLD
6611 }
6612
6613 /* cmpi3: cmpi $lit1, $lit2 */
6614
6615 static SEM_PC
6616 SEM_FN_NAME (i960base,cmpi3) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
6617 {
6618 #define FLD(f) abuf->fields.sfmt_emul3.f
6619 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
6620 int UNUSED written = 0;
6621 IADDR UNUSED pc = abuf->addr;
6622 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
6623
6624 {
6625 SI opval = (LTSI (FLD (f_src1), FLD (f_src2))) ? (4) : (EQSI (FLD (f_src1), FLD (f_src2))) ? (2) : (1);
6626 CPU (h_cc) = opval;
6627 TRACE_RESULT (current_cpu, abuf, "cc", 'x', opval);
6628 }
6629
6630 return vpc;
6631 #undef FLD
6632 }
6633
6634 /* cmpo: cmpo $src1, $src2 */
6635
6636 static SEM_PC
6637 SEM_FN_NAME (i960base,cmpo) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
6638 {
6639 #define FLD(f) abuf->fields.sfmt_emul.f
6640 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
6641 int UNUSED written = 0;
6642 IADDR UNUSED pc = abuf->addr;
6643 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
6644
6645 {
6646 SI opval = (LTUSI (* FLD (i_src1), * FLD (i_src2))) ? (4) : (EQSI (* FLD (i_src1), * FLD (i_src2))) ? (2) : (1);
6647 CPU (h_cc) = opval;
6648 TRACE_RESULT (current_cpu, abuf, "cc", 'x', opval);
6649 }
6650
6651 return vpc;
6652 #undef FLD
6653 }
6654
6655 /* cmpo1: cmpo $lit1, $src2 */
6656
6657 static SEM_PC
6658 SEM_FN_NAME (i960base,cmpo1) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
6659 {
6660 #define FLD(f) abuf->fields.sfmt_emul1.f
6661 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
6662 int UNUSED written = 0;
6663 IADDR UNUSED pc = abuf->addr;
6664 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
6665
6666 {
6667 SI opval = (LTUSI (FLD (f_src1), * FLD (i_src2))) ? (4) : (EQSI (FLD (f_src1), * FLD (i_src2))) ? (2) : (1);
6668 CPU (h_cc) = opval;
6669 TRACE_RESULT (current_cpu, abuf, "cc", 'x', opval);
6670 }
6671
6672 return vpc;
6673 #undef FLD
6674 }
6675
6676 /* cmpo2: cmpo $src1, $lit2 */
6677
6678 static SEM_PC
6679 SEM_FN_NAME (i960base,cmpo2) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
6680 {
6681 #define FLD(f) abuf->fields.sfmt_emul2.f
6682 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
6683 int UNUSED written = 0;
6684 IADDR UNUSED pc = abuf->addr;
6685 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
6686
6687 {
6688 SI opval = (LTUSI (* FLD (i_src1), FLD (f_src2))) ? (4) : (EQSI (* FLD (i_src1), FLD (f_src2))) ? (2) : (1);
6689 CPU (h_cc) = opval;
6690 TRACE_RESULT (current_cpu, abuf, "cc", 'x', opval);
6691 }
6692
6693 return vpc;
6694 #undef FLD
6695 }
6696
6697 /* cmpo3: cmpo $lit1, $lit2 */
6698
6699 static SEM_PC
6700 SEM_FN_NAME (i960base,cmpo3) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
6701 {
6702 #define FLD(f) abuf->fields.sfmt_emul3.f
6703 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
6704 int UNUSED written = 0;
6705 IADDR UNUSED pc = abuf->addr;
6706 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
6707
6708 {
6709 SI opval = (LTUSI (FLD (f_src1), FLD (f_src2))) ? (4) : (EQSI (FLD (f_src1), FLD (f_src2))) ? (2) : (1);
6710 CPU (h_cc) = opval;
6711 TRACE_RESULT (current_cpu, abuf, "cc", 'x', opval);
6712 }
6713
6714 return vpc;
6715 #undef FLD
6716 }
6717
6718 /* testno-reg: testno $br_src1 */
6719
6720 static SEM_PC
6721 SEM_FN_NAME (i960base,testno_reg) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
6722 {
6723 #define FLD(f) abuf->fields.sfmt_testno_reg.f
6724 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
6725 int UNUSED written = 0;
6726 IADDR UNUSED pc = abuf->addr;
6727 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
6728
6729 {
6730 SI opval = EQSI (CPU (h_cc), 0);
6731 * FLD (i_br_src1) = opval;
6732 TRACE_RESULT (current_cpu, abuf, "br_src1", 'x', opval);
6733 }
6734
6735 return vpc;
6736 #undef FLD
6737 }
6738
6739 /* testg-reg: testg $br_src1 */
6740
6741 static SEM_PC
6742 SEM_FN_NAME (i960base,testg_reg) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
6743 {
6744 #define FLD(f) abuf->fields.sfmt_testno_reg.f
6745 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
6746 int UNUSED written = 0;
6747 IADDR UNUSED pc = abuf->addr;
6748 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
6749
6750 {
6751 SI opval = NESI (ANDSI (CPU (h_cc), 1), 0);
6752 * FLD (i_br_src1) = opval;
6753 TRACE_RESULT (current_cpu, abuf, "br_src1", 'x', opval);
6754 }
6755
6756 return vpc;
6757 #undef FLD
6758 }
6759
6760 /* teste-reg: teste $br_src1 */
6761
6762 static SEM_PC
6763 SEM_FN_NAME (i960base,teste_reg) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
6764 {
6765 #define FLD(f) abuf->fields.sfmt_testno_reg.f
6766 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
6767 int UNUSED written = 0;
6768 IADDR UNUSED pc = abuf->addr;
6769 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
6770
6771 {
6772 SI opval = NESI (ANDSI (CPU (h_cc), 2), 0);
6773 * FLD (i_br_src1) = opval;
6774 TRACE_RESULT (current_cpu, abuf, "br_src1", 'x', opval);
6775 }
6776
6777 return vpc;
6778 #undef FLD
6779 }
6780
6781 /* testge-reg: testge $br_src1 */
6782
6783 static SEM_PC
6784 SEM_FN_NAME (i960base,testge_reg) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
6785 {
6786 #define FLD(f) abuf->fields.sfmt_testno_reg.f
6787 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
6788 int UNUSED written = 0;
6789 IADDR UNUSED pc = abuf->addr;
6790 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
6791
6792 {
6793 SI opval = NESI (ANDSI (CPU (h_cc), 3), 0);
6794 * FLD (i_br_src1) = opval;
6795 TRACE_RESULT (current_cpu, abuf, "br_src1", 'x', opval);
6796 }
6797
6798 return vpc;
6799 #undef FLD
6800 }
6801
6802 /* testl-reg: testl $br_src1 */
6803
6804 static SEM_PC
6805 SEM_FN_NAME (i960base,testl_reg) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
6806 {
6807 #define FLD(f) abuf->fields.sfmt_testno_reg.f
6808 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
6809 int UNUSED written = 0;
6810 IADDR UNUSED pc = abuf->addr;
6811 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
6812
6813 {
6814 SI opval = NESI (ANDSI (CPU (h_cc), 4), 0);
6815 * FLD (i_br_src1) = opval;
6816 TRACE_RESULT (current_cpu, abuf, "br_src1", 'x', opval);
6817 }
6818
6819 return vpc;
6820 #undef FLD
6821 }
6822
6823 /* testne-reg: testne $br_src1 */
6824
6825 static SEM_PC
6826 SEM_FN_NAME (i960base,testne_reg) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
6827 {
6828 #define FLD(f) abuf->fields.sfmt_testno_reg.f
6829 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
6830 int UNUSED written = 0;
6831 IADDR UNUSED pc = abuf->addr;
6832 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
6833
6834 {
6835 SI opval = NESI (ANDSI (CPU (h_cc), 5), 0);
6836 * FLD (i_br_src1) = opval;
6837 TRACE_RESULT (current_cpu, abuf, "br_src1", 'x', opval);
6838 }
6839
6840 return vpc;
6841 #undef FLD
6842 }
6843
6844 /* testle-reg: testle $br_src1 */
6845
6846 static SEM_PC
6847 SEM_FN_NAME (i960base,testle_reg) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
6848 {
6849 #define FLD(f) abuf->fields.sfmt_testno_reg.f
6850 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
6851 int UNUSED written = 0;
6852 IADDR UNUSED pc = abuf->addr;
6853 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
6854
6855 {
6856 SI opval = NESI (ANDSI (CPU (h_cc), 6), 0);
6857 * FLD (i_br_src1) = opval;
6858 TRACE_RESULT (current_cpu, abuf, "br_src1", 'x', opval);
6859 }
6860
6861 return vpc;
6862 #undef FLD
6863 }
6864
6865 /* testo-reg: testo $br_src1 */
6866
6867 static SEM_PC
6868 SEM_FN_NAME (i960base,testo_reg) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
6869 {
6870 #define FLD(f) abuf->fields.sfmt_testno_reg.f
6871 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
6872 int UNUSED written = 0;
6873 IADDR UNUSED pc = abuf->addr;
6874 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
6875
6876 {
6877 SI opval = NESI (ANDSI (CPU (h_cc), 7), 0);
6878 * FLD (i_br_src1) = opval;
6879 TRACE_RESULT (current_cpu, abuf, "br_src1", 'x', opval);
6880 }
6881
6882 return vpc;
6883 #undef FLD
6884 }
6885
6886 /* bno: bno $ctrl_disp */
6887
6888 static SEM_PC
6889 SEM_FN_NAME (i960base,bno) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
6890 {
6891 #define FLD(f) abuf->fields.sfmt_bno.f
6892 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
6893 int UNUSED written = 0;
6894 IADDR UNUSED pc = abuf->addr;
6895 SEM_BRANCH_INIT
6896 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
6897
6898 if (EQSI (CPU (h_cc), 0)) {
6899 {
6900 USI opval = FLD (i_ctrl_disp);
6901 SEM_BRANCH_VIA_CACHE (current_cpu, sem_arg, opval, vpc);
6902 written |= (1 << 2);
6903 TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval);
6904 }
6905 }
6906
6907 abuf->written = written;
6908 SEM_BRANCH_FINI (vpc);
6909 return vpc;
6910 #undef FLD
6911 }
6912
6913 /* bg: bg $ctrl_disp */
6914
6915 static SEM_PC
6916 SEM_FN_NAME (i960base,bg) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
6917 {
6918 #define FLD(f) abuf->fields.sfmt_bno.f
6919 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
6920 int UNUSED written = 0;
6921 IADDR UNUSED pc = abuf->addr;
6922 SEM_BRANCH_INIT
6923 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
6924
6925 if (NESI (ANDSI (CPU (h_cc), 1), 0)) {
6926 {
6927 USI opval = FLD (i_ctrl_disp);
6928 SEM_BRANCH_VIA_CACHE (current_cpu, sem_arg, opval, vpc);
6929 written |= (1 << 2);
6930 TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval);
6931 }
6932 }
6933
6934 abuf->written = written;
6935 SEM_BRANCH_FINI (vpc);
6936 return vpc;
6937 #undef FLD
6938 }
6939
6940 /* be: be $ctrl_disp */
6941
6942 static SEM_PC
6943 SEM_FN_NAME (i960base,be) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
6944 {
6945 #define FLD(f) abuf->fields.sfmt_bno.f
6946 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
6947 int UNUSED written = 0;
6948 IADDR UNUSED pc = abuf->addr;
6949 SEM_BRANCH_INIT
6950 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
6951
6952 if (NESI (ANDSI (CPU (h_cc), 2), 0)) {
6953 {
6954 USI opval = FLD (i_ctrl_disp);
6955 SEM_BRANCH_VIA_CACHE (current_cpu, sem_arg, opval, vpc);
6956 written |= (1 << 2);
6957 TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval);
6958 }
6959 }
6960
6961 abuf->written = written;
6962 SEM_BRANCH_FINI (vpc);
6963 return vpc;
6964 #undef FLD
6965 }
6966
6967 /* bge: bge $ctrl_disp */
6968
6969 static SEM_PC
6970 SEM_FN_NAME (i960base,bge) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
6971 {
6972 #define FLD(f) abuf->fields.sfmt_bno.f
6973 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
6974 int UNUSED written = 0;
6975 IADDR UNUSED pc = abuf->addr;
6976 SEM_BRANCH_INIT
6977 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
6978
6979 if (NESI (ANDSI (CPU (h_cc), 3), 0)) {
6980 {
6981 USI opval = FLD (i_ctrl_disp);
6982 SEM_BRANCH_VIA_CACHE (current_cpu, sem_arg, opval, vpc);
6983 written |= (1 << 2);
6984 TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval);
6985 }
6986 }
6987
6988 abuf->written = written;
6989 SEM_BRANCH_FINI (vpc);
6990 return vpc;
6991 #undef FLD
6992 }
6993
6994 /* bl: bl $ctrl_disp */
6995
6996 static SEM_PC
6997 SEM_FN_NAME (i960base,bl) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
6998 {
6999 #define FLD(f) abuf->fields.sfmt_bno.f
7000 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
7001 int UNUSED written = 0;
7002 IADDR UNUSED pc = abuf->addr;
7003 SEM_BRANCH_INIT
7004 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
7005
7006 if (NESI (ANDSI (CPU (h_cc), 4), 0)) {
7007 {
7008 USI opval = FLD (i_ctrl_disp);
7009 SEM_BRANCH_VIA_CACHE (current_cpu, sem_arg, opval, vpc);
7010 written |= (1 << 2);
7011 TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval);
7012 }
7013 }
7014
7015 abuf->written = written;
7016 SEM_BRANCH_FINI (vpc);
7017 return vpc;
7018 #undef FLD
7019 }
7020
7021 /* bne: bne $ctrl_disp */
7022
7023 static SEM_PC
7024 SEM_FN_NAME (i960base,bne) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
7025 {
7026 #define FLD(f) abuf->fields.sfmt_bno.f
7027 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
7028 int UNUSED written = 0;
7029 IADDR UNUSED pc = abuf->addr;
7030 SEM_BRANCH_INIT
7031 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
7032
7033 if (NESI (ANDSI (CPU (h_cc), 5), 0)) {
7034 {
7035 USI opval = FLD (i_ctrl_disp);
7036 SEM_BRANCH_VIA_CACHE (current_cpu, sem_arg, opval, vpc);
7037 written |= (1 << 2);
7038 TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval);
7039 }
7040 }
7041
7042 abuf->written = written;
7043 SEM_BRANCH_FINI (vpc);
7044 return vpc;
7045 #undef FLD
7046 }
7047
7048 /* ble: ble $ctrl_disp */
7049
7050 static SEM_PC
7051 SEM_FN_NAME (i960base,ble) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
7052 {
7053 #define FLD(f) abuf->fields.sfmt_bno.f
7054 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
7055 int UNUSED written = 0;
7056 IADDR UNUSED pc = abuf->addr;
7057 SEM_BRANCH_INIT
7058 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
7059
7060 if (NESI (ANDSI (CPU (h_cc), 6), 0)) {
7061 {
7062 USI opval = FLD (i_ctrl_disp);
7063 SEM_BRANCH_VIA_CACHE (current_cpu, sem_arg, opval, vpc);
7064 written |= (1 << 2);
7065 TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval);
7066 }
7067 }
7068
7069 abuf->written = written;
7070 SEM_BRANCH_FINI (vpc);
7071 return vpc;
7072 #undef FLD
7073 }
7074
7075 /* bo: bo $ctrl_disp */
7076
7077 static SEM_PC
7078 SEM_FN_NAME (i960base,bo) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
7079 {
7080 #define FLD(f) abuf->fields.sfmt_bno.f
7081 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
7082 int UNUSED written = 0;
7083 IADDR UNUSED pc = abuf->addr;
7084 SEM_BRANCH_INIT
7085 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
7086
7087 if (NESI (ANDSI (CPU (h_cc), 7), 0)) {
7088 {
7089 USI opval = FLD (i_ctrl_disp);
7090 SEM_BRANCH_VIA_CACHE (current_cpu, sem_arg, opval, vpc);
7091 written |= (1 << 2);
7092 TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval);
7093 }
7094 }
7095
7096 abuf->written = written;
7097 SEM_BRANCH_FINI (vpc);
7098 return vpc;
7099 #undef FLD
7100 }
7101
7102 /* b: b $ctrl_disp */
7103
7104 static SEM_PC
7105 SEM_FN_NAME (i960base,b) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
7106 {
7107 #define FLD(f) abuf->fields.sfmt_bno.f
7108 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
7109 int UNUSED written = 0;
7110 IADDR UNUSED pc = abuf->addr;
7111 SEM_BRANCH_INIT
7112 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
7113
7114 {
7115 USI opval = FLD (i_ctrl_disp);
7116 SEM_BRANCH_VIA_CACHE (current_cpu, sem_arg, opval, vpc);
7117 TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval);
7118 }
7119
7120 SEM_BRANCH_FINI (vpc);
7121 return vpc;
7122 #undef FLD
7123 }
7124
7125 /* bx-indirect-offset: bx $offset($abase) */
7126
7127 static SEM_PC
7128 SEM_FN_NAME (i960base,bx_indirect_offset) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
7129 {
7130 #define FLD(f) abuf->fields.sfmt_stq_indirect_offset.f
7131 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
7132 int UNUSED written = 0;
7133 IADDR UNUSED pc = abuf->addr;
7134 SEM_BRANCH_INIT
7135 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
7136
7137 {
7138 USI opval = ADDSI (FLD (f_offset), * FLD (i_abase));
7139 SEM_BRANCH_VIA_ADDR (current_cpu, sem_arg, opval, vpc);
7140 TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval);
7141 }
7142
7143 SEM_BRANCH_FINI (vpc);
7144 return vpc;
7145 #undef FLD
7146 }
7147
7148 /* bx-indirect: bx ($abase) */
7149
7150 static SEM_PC
7151 SEM_FN_NAME (i960base,bx_indirect) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
7152 {
7153 #define FLD(f) abuf->fields.sfmt_stq_indirect_offset.f
7154 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
7155 int UNUSED written = 0;
7156 IADDR UNUSED pc = abuf->addr;
7157 SEM_BRANCH_INIT
7158 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
7159
7160 {
7161 USI opval = * FLD (i_abase);
7162 SEM_BRANCH_VIA_ADDR (current_cpu, sem_arg, opval, vpc);
7163 TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval);
7164 }
7165
7166 SEM_BRANCH_FINI (vpc);
7167 return vpc;
7168 #undef FLD
7169 }
7170
7171 /* bx-indirect-index: bx ($abase)[$index*S$scale] */
7172
7173 static SEM_PC
7174 SEM_FN_NAME (i960base,bx_indirect_index) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
7175 {
7176 #define FLD(f) abuf->fields.sfmt_stq_indirect_index_disp.f
7177 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
7178 int UNUSED written = 0;
7179 IADDR UNUSED pc = abuf->addr;
7180 SEM_BRANCH_INIT
7181 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
7182
7183 {
7184 USI opval = ADDSI (* FLD (i_abase), MULSI (* FLD (i_index), SLLSI (1, FLD (f_scale))));
7185 SEM_BRANCH_VIA_ADDR (current_cpu, sem_arg, opval, vpc);
7186 TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval);
7187 }
7188
7189 SEM_BRANCH_FINI (vpc);
7190 return vpc;
7191 #undef FLD
7192 }
7193
7194 /* bx-disp: bx $optdisp */
7195
7196 static SEM_PC
7197 SEM_FN_NAME (i960base,bx_disp) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
7198 {
7199 #define FLD(f) abuf->fields.sfmt_stq_indirect_index_disp.f
7200 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
7201 int UNUSED written = 0;
7202 IADDR UNUSED pc = abuf->addr;
7203 SEM_BRANCH_INIT
7204 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 8);
7205
7206 {
7207 USI opval = FLD (f_optdisp);
7208 SEM_BRANCH_VIA_CACHE (current_cpu, sem_arg, opval, vpc);
7209 TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval);
7210 }
7211
7212 SEM_BRANCH_FINI (vpc);
7213 return vpc;
7214 #undef FLD
7215 }
7216
7217 /* bx-indirect-disp: bx $optdisp($abase) */
7218
7219 static SEM_PC
7220 SEM_FN_NAME (i960base,bx_indirect_disp) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
7221 {
7222 #define FLD(f) abuf->fields.sfmt_stq_indirect_index_disp.f
7223 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
7224 int UNUSED written = 0;
7225 IADDR UNUSED pc = abuf->addr;
7226 SEM_BRANCH_INIT
7227 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 8);
7228
7229 {
7230 USI opval = ADDSI (FLD (f_optdisp), * FLD (i_abase));
7231 SEM_BRANCH_VIA_ADDR (current_cpu, sem_arg, opval, vpc);
7232 TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval);
7233 }
7234
7235 SEM_BRANCH_FINI (vpc);
7236 return vpc;
7237 #undef FLD
7238 }
7239
7240 /* callx-disp: callx $optdisp */
7241
7242 static SEM_PC
7243 SEM_FN_NAME (i960base,callx_disp) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
7244 {
7245 #define FLD(f) abuf->fields.sfmt_callx_disp.f
7246 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
7247 int UNUSED written = 0;
7248 IADDR UNUSED pc = abuf->addr;
7249 SEM_BRANCH_INIT
7250 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 8);
7251
7252 {
7253 SI tmp_temp;
7254 tmp_temp = ANDSI (ADDSI (CPU (h_gr[((UINT) 1)]), 63), INVSI (63));
7255 {
7256 SI opval = ADDSI (pc, 8);
7257 CPU (h_gr[((UINT) 2)]) = opval;
7258 TRACE_RESULT (current_cpu, abuf, "gr-2", 'x', opval);
7259 }
7260 SETMEMSI (current_cpu, pc, ADDSI (CPU (h_gr[((UINT) 31)]), 0), CPU (h_gr[((UINT) 0)]));
7261 SETMEMSI (current_cpu, pc, ADDSI (CPU (h_gr[((UINT) 31)]), 4), CPU (h_gr[((UINT) 1)]));
7262 SETMEMSI (current_cpu, pc, ADDSI (CPU (h_gr[((UINT) 31)]), 8), CPU (h_gr[((UINT) 2)]));
7263 SETMEMSI (current_cpu, pc, ADDSI (CPU (h_gr[((UINT) 31)]), 12), CPU (h_gr[((UINT) 3)]));
7264 SETMEMSI (current_cpu, pc, ADDSI (CPU (h_gr[((UINT) 31)]), 16), CPU (h_gr[((UINT) 4)]));
7265 SETMEMSI (current_cpu, pc, ADDSI (CPU (h_gr[((UINT) 31)]), 20), CPU (h_gr[((UINT) 5)]));
7266 SETMEMSI (current_cpu, pc, ADDSI (CPU (h_gr[((UINT) 31)]), 24), CPU (h_gr[((UINT) 6)]));
7267 SETMEMSI (current_cpu, pc, ADDSI (CPU (h_gr[((UINT) 31)]), 28), CPU (h_gr[((UINT) 7)]));
7268 SETMEMSI (current_cpu, pc, ADDSI (CPU (h_gr[((UINT) 31)]), 32), CPU (h_gr[((UINT) 8)]));
7269 SETMEMSI (current_cpu, pc, ADDSI (CPU (h_gr[((UINT) 31)]), 36), CPU (h_gr[((UINT) 9)]));
7270 SETMEMSI (current_cpu, pc, ADDSI (CPU (h_gr[((UINT) 31)]), 40), CPU (h_gr[((UINT) 10)]));
7271 SETMEMSI (current_cpu, pc, ADDSI (CPU (h_gr[((UINT) 31)]), 44), CPU (h_gr[((UINT) 11)]));
7272 SETMEMSI (current_cpu, pc, ADDSI (CPU (h_gr[((UINT) 31)]), 48), CPU (h_gr[((UINT) 12)]));
7273 SETMEMSI (current_cpu, pc, ADDSI (CPU (h_gr[((UINT) 31)]), 52), CPU (h_gr[((UINT) 13)]));
7274 SETMEMSI (current_cpu, pc, ADDSI (CPU (h_gr[((UINT) 31)]), 56), CPU (h_gr[((UINT) 14)]));
7275 SETMEMSI (current_cpu, pc, ADDSI (CPU (h_gr[((UINT) 31)]), 60), CPU (h_gr[((UINT) 15)]));
7276 {
7277 USI opval = FLD (f_optdisp);
7278 SEM_BRANCH_VIA_CACHE (current_cpu, sem_arg, opval, vpc);
7279 TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval);
7280 }
7281 CPU (h_gr[((UINT) 0)]) = 0xdeadbeef;
7282 CPU (h_gr[((UINT) 1)]) = 0xdeadbeef;
7283 CPU (h_gr[((UINT) 2)]) = 0xdeadbeef;
7284 CPU (h_gr[((UINT) 3)]) = 0xdeadbeef;
7285 CPU (h_gr[((UINT) 4)]) = 0xdeadbeef;
7286 CPU (h_gr[((UINT) 5)]) = 0xdeadbeef;
7287 CPU (h_gr[((UINT) 6)]) = 0xdeadbeef;
7288 CPU (h_gr[((UINT) 7)]) = 0xdeadbeef;
7289 CPU (h_gr[((UINT) 8)]) = 0xdeadbeef;
7290 CPU (h_gr[((UINT) 9)]) = 0xdeadbeef;
7291 CPU (h_gr[((UINT) 10)]) = 0xdeadbeef;
7292 CPU (h_gr[((UINT) 11)]) = 0xdeadbeef;
7293 CPU (h_gr[((UINT) 12)]) = 0xdeadbeef;
7294 CPU (h_gr[((UINT) 13)]) = 0xdeadbeef;
7295 CPU (h_gr[((UINT) 14)]) = 0xdeadbeef;
7296 CPU (h_gr[((UINT) 15)]) = 0xdeadbeef;
7297 {
7298 SI opval = CPU (h_gr[((UINT) 31)]);
7299 CPU (h_gr[((UINT) 0)]) = opval;
7300 TRACE_RESULT (current_cpu, abuf, "gr-0", 'x', opval);
7301 }
7302 {
7303 SI opval = tmp_temp;
7304 CPU (h_gr[((UINT) 31)]) = opval;
7305 TRACE_RESULT (current_cpu, abuf, "gr-31", 'x', opval);
7306 }
7307 {
7308 SI opval = ADDSI (tmp_temp, 64);
7309 CPU (h_gr[((UINT) 1)]) = opval;
7310 TRACE_RESULT (current_cpu, abuf, "gr-1", 'x', opval);
7311 }
7312 }
7313
7314 SEM_BRANCH_FINI (vpc);
7315 return vpc;
7316 #undef FLD
7317 }
7318
7319 /* callx-indirect: callx ($abase) */
7320
7321 static SEM_PC
7322 SEM_FN_NAME (i960base,callx_indirect) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
7323 {
7324 #define FLD(f) abuf->fields.sfmt_callx_indirect_offset.f
7325 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
7326 int UNUSED written = 0;
7327 IADDR UNUSED pc = abuf->addr;
7328 SEM_BRANCH_INIT
7329 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
7330
7331 {
7332 SI tmp_temp;
7333 tmp_temp = ANDSI (ADDSI (CPU (h_gr[((UINT) 1)]), 63), INVSI (63));
7334 {
7335 SI opval = ADDSI (pc, 4);
7336 CPU (h_gr[((UINT) 2)]) = opval;
7337 TRACE_RESULT (current_cpu, abuf, "gr-2", 'x', opval);
7338 }
7339 SETMEMSI (current_cpu, pc, ADDSI (CPU (h_gr[((UINT) 31)]), 0), CPU (h_gr[((UINT) 0)]));
7340 SETMEMSI (current_cpu, pc, ADDSI (CPU (h_gr[((UINT) 31)]), 4), CPU (h_gr[((UINT) 1)]));
7341 SETMEMSI (current_cpu, pc, ADDSI (CPU (h_gr[((UINT) 31)]), 8), CPU (h_gr[((UINT) 2)]));
7342 SETMEMSI (current_cpu, pc, ADDSI (CPU (h_gr[((UINT) 31)]), 12), CPU (h_gr[((UINT) 3)]));
7343 SETMEMSI (current_cpu, pc, ADDSI (CPU (h_gr[((UINT) 31)]), 16), CPU (h_gr[((UINT) 4)]));
7344 SETMEMSI (current_cpu, pc, ADDSI (CPU (h_gr[((UINT) 31)]), 20), CPU (h_gr[((UINT) 5)]));
7345 SETMEMSI (current_cpu, pc, ADDSI (CPU (h_gr[((UINT) 31)]), 24), CPU (h_gr[((UINT) 6)]));
7346 SETMEMSI (current_cpu, pc, ADDSI (CPU (h_gr[((UINT) 31)]), 28), CPU (h_gr[((UINT) 7)]));
7347 SETMEMSI (current_cpu, pc, ADDSI (CPU (h_gr[((UINT) 31)]), 32), CPU (h_gr[((UINT) 8)]));
7348 SETMEMSI (current_cpu, pc, ADDSI (CPU (h_gr[((UINT) 31)]), 36), CPU (h_gr[((UINT) 9)]));
7349 SETMEMSI (current_cpu, pc, ADDSI (CPU (h_gr[((UINT) 31)]), 40), CPU (h_gr[((UINT) 10)]));
7350 SETMEMSI (current_cpu, pc, ADDSI (CPU (h_gr[((UINT) 31)]), 44), CPU (h_gr[((UINT) 11)]));
7351 SETMEMSI (current_cpu, pc, ADDSI (CPU (h_gr[((UINT) 31)]), 48), CPU (h_gr[((UINT) 12)]));
7352 SETMEMSI (current_cpu, pc, ADDSI (CPU (h_gr[((UINT) 31)]), 52), CPU (h_gr[((UINT) 13)]));
7353 SETMEMSI (current_cpu, pc, ADDSI (CPU (h_gr[((UINT) 31)]), 56), CPU (h_gr[((UINT) 14)]));
7354 SETMEMSI (current_cpu, pc, ADDSI (CPU (h_gr[((UINT) 31)]), 60), CPU (h_gr[((UINT) 15)]));
7355 {
7356 USI opval = * FLD (i_abase);
7357 SEM_BRANCH_VIA_ADDR (current_cpu, sem_arg, opval, vpc);
7358 TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval);
7359 }
7360 CPU (h_gr[((UINT) 0)]) = 0xdeadbeef;
7361 CPU (h_gr[((UINT) 1)]) = 0xdeadbeef;
7362 CPU (h_gr[((UINT) 2)]) = 0xdeadbeef;
7363 CPU (h_gr[((UINT) 3)]) = 0xdeadbeef;
7364 CPU (h_gr[((UINT) 4)]) = 0xdeadbeef;
7365 CPU (h_gr[((UINT) 5)]) = 0xdeadbeef;
7366 CPU (h_gr[((UINT) 6)]) = 0xdeadbeef;
7367 CPU (h_gr[((UINT) 7)]) = 0xdeadbeef;
7368 CPU (h_gr[((UINT) 8)]) = 0xdeadbeef;
7369 CPU (h_gr[((UINT) 9)]) = 0xdeadbeef;
7370 CPU (h_gr[((UINT) 10)]) = 0xdeadbeef;
7371 CPU (h_gr[((UINT) 11)]) = 0xdeadbeef;
7372 CPU (h_gr[((UINT) 12)]) = 0xdeadbeef;
7373 CPU (h_gr[((UINT) 13)]) = 0xdeadbeef;
7374 CPU (h_gr[((UINT) 14)]) = 0xdeadbeef;
7375 CPU (h_gr[((UINT) 15)]) = 0xdeadbeef;
7376 {
7377 SI opval = CPU (h_gr[((UINT) 31)]);
7378 CPU (h_gr[((UINT) 0)]) = opval;
7379 TRACE_RESULT (current_cpu, abuf, "gr-0", 'x', opval);
7380 }
7381 {
7382 SI opval = tmp_temp;
7383 CPU (h_gr[((UINT) 31)]) = opval;
7384 TRACE_RESULT (current_cpu, abuf, "gr-31", 'x', opval);
7385 }
7386 {
7387 SI opval = ADDSI (tmp_temp, 64);
7388 CPU (h_gr[((UINT) 1)]) = opval;
7389 TRACE_RESULT (current_cpu, abuf, "gr-1", 'x', opval);
7390 }
7391 }
7392
7393 SEM_BRANCH_FINI (vpc);
7394 return vpc;
7395 #undef FLD
7396 }
7397
7398 /* callx-indirect-offset: callx $offset($abase) */
7399
7400 static SEM_PC
7401 SEM_FN_NAME (i960base,callx_indirect_offset) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
7402 {
7403 #define FLD(f) abuf->fields.sfmt_callx_indirect_offset.f
7404 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
7405 int UNUSED written = 0;
7406 IADDR UNUSED pc = abuf->addr;
7407 SEM_BRANCH_INIT
7408 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
7409
7410 {
7411 SI tmp_temp;
7412 tmp_temp = ANDSI (ADDSI (CPU (h_gr[((UINT) 1)]), 63), INVSI (63));
7413 {
7414 SI opval = ADDSI (pc, 4);
7415 CPU (h_gr[((UINT) 2)]) = opval;
7416 TRACE_RESULT (current_cpu, abuf, "gr-2", 'x', opval);
7417 }
7418 SETMEMSI (current_cpu, pc, ADDSI (CPU (h_gr[((UINT) 31)]), 0), CPU (h_gr[((UINT) 0)]));
7419 SETMEMSI (current_cpu, pc, ADDSI (CPU (h_gr[((UINT) 31)]), 4), CPU (h_gr[((UINT) 1)]));
7420 SETMEMSI (current_cpu, pc, ADDSI (CPU (h_gr[((UINT) 31)]), 8), CPU (h_gr[((UINT) 2)]));
7421 SETMEMSI (current_cpu, pc, ADDSI (CPU (h_gr[((UINT) 31)]), 12), CPU (h_gr[((UINT) 3)]));
7422 SETMEMSI (current_cpu, pc, ADDSI (CPU (h_gr[((UINT) 31)]), 16), CPU (h_gr[((UINT) 4)]));
7423 SETMEMSI (current_cpu, pc, ADDSI (CPU (h_gr[((UINT) 31)]), 20), CPU (h_gr[((UINT) 5)]));
7424 SETMEMSI (current_cpu, pc, ADDSI (CPU (h_gr[((UINT) 31)]), 24), CPU (h_gr[((UINT) 6)]));
7425 SETMEMSI (current_cpu, pc, ADDSI (CPU (h_gr[((UINT) 31)]), 28), CPU (h_gr[((UINT) 7)]));
7426 SETMEMSI (current_cpu, pc, ADDSI (CPU (h_gr[((UINT) 31)]), 32), CPU (h_gr[((UINT) 8)]));
7427 SETMEMSI (current_cpu, pc, ADDSI (CPU (h_gr[((UINT) 31)]), 36), CPU (h_gr[((UINT) 9)]));
7428 SETMEMSI (current_cpu, pc, ADDSI (CPU (h_gr[((UINT) 31)]), 40), CPU (h_gr[((UINT) 10)]));
7429 SETMEMSI (current_cpu, pc, ADDSI (CPU (h_gr[((UINT) 31)]), 44), CPU (h_gr[((UINT) 11)]));
7430 SETMEMSI (current_cpu, pc, ADDSI (CPU (h_gr[((UINT) 31)]), 48), CPU (h_gr[((UINT) 12)]));
7431 SETMEMSI (current_cpu, pc, ADDSI (CPU (h_gr[((UINT) 31)]), 52), CPU (h_gr[((UINT) 13)]));
7432 SETMEMSI (current_cpu, pc, ADDSI (CPU (h_gr[((UINT) 31)]), 56), CPU (h_gr[((UINT) 14)]));
7433 SETMEMSI (current_cpu, pc, ADDSI (CPU (h_gr[((UINT) 31)]), 60), CPU (h_gr[((UINT) 15)]));
7434 {
7435 USI opval = ADDSI (FLD (f_offset), * FLD (i_abase));
7436 SEM_BRANCH_VIA_ADDR (current_cpu, sem_arg, opval, vpc);
7437 TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval);
7438 }
7439 CPU (h_gr[((UINT) 0)]) = 0xdeadbeef;
7440 CPU (h_gr[((UINT) 1)]) = 0xdeadbeef;
7441 CPU (h_gr[((UINT) 2)]) = 0xdeadbeef;
7442 CPU (h_gr[((UINT) 3)]) = 0xdeadbeef;
7443 CPU (h_gr[((UINT) 4)]) = 0xdeadbeef;
7444 CPU (h_gr[((UINT) 5)]) = 0xdeadbeef;
7445 CPU (h_gr[((UINT) 6)]) = 0xdeadbeef;
7446 CPU (h_gr[((UINT) 7)]) = 0xdeadbeef;
7447 CPU (h_gr[((UINT) 8)]) = 0xdeadbeef;
7448 CPU (h_gr[((UINT) 9)]) = 0xdeadbeef;
7449 CPU (h_gr[((UINT) 10)]) = 0xdeadbeef;
7450 CPU (h_gr[((UINT) 11)]) = 0xdeadbeef;
7451 CPU (h_gr[((UINT) 12)]) = 0xdeadbeef;
7452 CPU (h_gr[((UINT) 13)]) = 0xdeadbeef;
7453 CPU (h_gr[((UINT) 14)]) = 0xdeadbeef;
7454 CPU (h_gr[((UINT) 15)]) = 0xdeadbeef;
7455 {
7456 SI opval = CPU (h_gr[((UINT) 31)]);
7457 CPU (h_gr[((UINT) 0)]) = opval;
7458 TRACE_RESULT (current_cpu, abuf, "gr-0", 'x', opval);
7459 }
7460 {
7461 SI opval = tmp_temp;
7462 CPU (h_gr[((UINT) 31)]) = opval;
7463 TRACE_RESULT (current_cpu, abuf, "gr-31", 'x', opval);
7464 }
7465 {
7466 SI opval = ADDSI (tmp_temp, 64);
7467 CPU (h_gr[((UINT) 1)]) = opval;
7468 TRACE_RESULT (current_cpu, abuf, "gr-1", 'x', opval);
7469 }
7470 }
7471
7472 SEM_BRANCH_FINI (vpc);
7473 return vpc;
7474 #undef FLD
7475 }
7476
7477 /* ret: ret */
7478
7479 static SEM_PC
7480 SEM_FN_NAME (i960base,ret) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
7481 {
7482 #define FLD(f) abuf->fields.sfmt_callx_disp.f
7483 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
7484 int UNUSED written = 0;
7485 IADDR UNUSED pc = abuf->addr;
7486 SEM_BRANCH_INIT
7487 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
7488
7489 {
7490 {
7491 SI opval = CPU (h_gr[((UINT) 0)]);
7492 CPU (h_gr[((UINT) 31)]) = opval;
7493 TRACE_RESULT (current_cpu, abuf, "gr-31", 'x', opval);
7494 }
7495 CPU (h_gr[((UINT) 0)]) = GETMEMSI (current_cpu, pc, ADDSI (CPU (h_gr[((UINT) 31)]), 0));
7496 CPU (h_gr[((UINT) 1)]) = GETMEMSI (current_cpu, pc, ADDSI (CPU (h_gr[((UINT) 31)]), 4));
7497 CPU (h_gr[((UINT) 2)]) = GETMEMSI (current_cpu, pc, ADDSI (CPU (h_gr[((UINT) 31)]), 8));
7498 CPU (h_gr[((UINT) 3)]) = GETMEMSI (current_cpu, pc, ADDSI (CPU (h_gr[((UINT) 31)]), 12));
7499 CPU (h_gr[((UINT) 4)]) = GETMEMSI (current_cpu, pc, ADDSI (CPU (h_gr[((UINT) 31)]), 16));
7500 CPU (h_gr[((UINT) 5)]) = GETMEMSI (current_cpu, pc, ADDSI (CPU (h_gr[((UINT) 31)]), 20));
7501 CPU (h_gr[((UINT) 6)]) = GETMEMSI (current_cpu, pc, ADDSI (CPU (h_gr[((UINT) 31)]), 24));
7502 CPU (h_gr[((UINT) 7)]) = GETMEMSI (current_cpu, pc, ADDSI (CPU (h_gr[((UINT) 31)]), 28));
7503 CPU (h_gr[((UINT) 8)]) = GETMEMSI (current_cpu, pc, ADDSI (CPU (h_gr[((UINT) 31)]), 32));
7504 CPU (h_gr[((UINT) 9)]) = GETMEMSI (current_cpu, pc, ADDSI (CPU (h_gr[((UINT) 31)]), 36));
7505 CPU (h_gr[((UINT) 10)]) = GETMEMSI (current_cpu, pc, ADDSI (CPU (h_gr[((UINT) 31)]), 40));
7506 CPU (h_gr[((UINT) 11)]) = GETMEMSI (current_cpu, pc, ADDSI (CPU (h_gr[((UINT) 31)]), 44));
7507 CPU (h_gr[((UINT) 12)]) = GETMEMSI (current_cpu, pc, ADDSI (CPU (h_gr[((UINT) 31)]), 48));
7508 CPU (h_gr[((UINT) 13)]) = GETMEMSI (current_cpu, pc, ADDSI (CPU (h_gr[((UINT) 31)]), 52));
7509 CPU (h_gr[((UINT) 14)]) = GETMEMSI (current_cpu, pc, ADDSI (CPU (h_gr[((UINT) 31)]), 56));
7510 CPU (h_gr[((UINT) 15)]) = GETMEMSI (current_cpu, pc, ADDSI (CPU (h_gr[((UINT) 31)]), 60));
7511 {
7512 USI opval = CPU (h_gr[((UINT) 2)]);
7513 SEM_BRANCH_VIA_ADDR (current_cpu, sem_arg, opval, vpc);
7514 TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval);
7515 }
7516 }
7517
7518 SEM_BRANCH_FINI (vpc);
7519 return vpc;
7520 #undef FLD
7521 }
7522
7523 /* calls: calls $src1 */
7524
7525 static SEM_PC
7526 SEM_FN_NAME (i960base,calls) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
7527 {
7528 #define FLD(f) abuf->fields.sfmt_emul2.f
7529 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
7530 int UNUSED written = 0;
7531 IADDR UNUSED pc = abuf->addr;
7532 SEM_BRANCH_INIT
7533 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
7534
7535 {
7536 SI opval = i960_trap (current_cpu, pc, * FLD (i_src1));
7537 SEM_BRANCH_VIA_ADDR (current_cpu, sem_arg, opval, vpc);
7538 TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval);
7539 }
7540
7541 SEM_BRANCH_FINI (vpc);
7542 return vpc;
7543 #undef FLD
7544 }
7545
7546 /* fmark: fmark */
7547
7548 static SEM_PC
7549 SEM_FN_NAME (i960base,fmark) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
7550 {
7551 #define FLD(f) abuf->fields.fmt_empty.f
7552 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
7553 int UNUSED written = 0;
7554 IADDR UNUSED pc = abuf->addr;
7555 SEM_BRANCH_INIT
7556 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
7557
7558 {
7559 SI opval = i960_breakpoint (current_cpu, pc);
7560 SEM_BRANCH_VIA_ADDR (current_cpu, sem_arg, opval, vpc);
7561 TRACE_RESULT (current_cpu, abuf, "pc", 'x', opval);
7562 }
7563
7564 SEM_BRANCH_FINI (vpc);
7565 return vpc;
7566 #undef FLD
7567 }
7568
7569 /* flushreg: flushreg */
7570
7571 static SEM_PC
7572 SEM_FN_NAME (i960base,flushreg) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
7573 {
7574 #define FLD(f) abuf->fields.fmt_empty.f
7575 ARGBUF *abuf = SEM_ARGBUF (sem_arg);
7576 int UNUSED written = 0;
7577 IADDR UNUSED pc = abuf->addr;
7578 SEM_PC vpc = SEM_NEXT_VPC (sem_arg, pc, 4);
7579
7580 do { } while (0); /*nop*/
7581
7582 return vpc;
7583 #undef FLD
7584 }
7585
7586 /* Table of all semantic fns. */
7587
7588 static const struct sem_fn_desc sem_fns[] = {
7589 { I960BASE_INSN_X_INVALID, SEM_FN_NAME (i960base,x_invalid) },
7590 { I960BASE_INSN_X_AFTER, SEM_FN_NAME (i960base,x_after) },
7591 { I960BASE_INSN_X_BEFORE, SEM_FN_NAME (i960base,x_before) },
7592 { I960BASE_INSN_X_CTI_CHAIN, SEM_FN_NAME (i960base,x_cti_chain) },
7593 { I960BASE_INSN_X_CHAIN, SEM_FN_NAME (i960base,x_chain) },
7594 { I960BASE_INSN_X_BEGIN, SEM_FN_NAME (i960base,x_begin) },
7595 { I960BASE_INSN_MULO, SEM_FN_NAME (i960base,mulo) },
7596 { I960BASE_INSN_MULO1, SEM_FN_NAME (i960base,mulo1) },
7597 { I960BASE_INSN_MULO2, SEM_FN_NAME (i960base,mulo2) },
7598 { I960BASE_INSN_MULO3, SEM_FN_NAME (i960base,mulo3) },
7599 { I960BASE_INSN_REMO, SEM_FN_NAME (i960base,remo) },
7600 { I960BASE_INSN_REMO1, SEM_FN_NAME (i960base,remo1) },
7601 { I960BASE_INSN_REMO2, SEM_FN_NAME (i960base,remo2) },
7602 { I960BASE_INSN_REMO3, SEM_FN_NAME (i960base,remo3) },
7603 { I960BASE_INSN_DIVO, SEM_FN_NAME (i960base,divo) },
7604 { I960BASE_INSN_DIVO1, SEM_FN_NAME (i960base,divo1) },
7605 { I960BASE_INSN_DIVO2, SEM_FN_NAME (i960base,divo2) },
7606 { I960BASE_INSN_DIVO3, SEM_FN_NAME (i960base,divo3) },
7607 { I960BASE_INSN_REMI, SEM_FN_NAME (i960base,remi) },
7608 { I960BASE_INSN_REMI1, SEM_FN_NAME (i960base,remi1) },
7609 { I960BASE_INSN_REMI2, SEM_FN_NAME (i960base,remi2) },
7610 { I960BASE_INSN_REMI3, SEM_FN_NAME (i960base,remi3) },
7611 { I960BASE_INSN_DIVI, SEM_FN_NAME (i960base,divi) },
7612 { I960BASE_INSN_DIVI1, SEM_FN_NAME (i960base,divi1) },
7613 { I960BASE_INSN_DIVI2, SEM_FN_NAME (i960base,divi2) },
7614 { I960BASE_INSN_DIVI3, SEM_FN_NAME (i960base,divi3) },
7615 { I960BASE_INSN_ADDO, SEM_FN_NAME (i960base,addo) },
7616 { I960BASE_INSN_ADDO1, SEM_FN_NAME (i960base,addo1) },
7617 { I960BASE_INSN_ADDO2, SEM_FN_NAME (i960base,addo2) },
7618 { I960BASE_INSN_ADDO3, SEM_FN_NAME (i960base,addo3) },
7619 { I960BASE_INSN_SUBO, SEM_FN_NAME (i960base,subo) },
7620 { I960BASE_INSN_SUBO1, SEM_FN_NAME (i960base,subo1) },
7621 { I960BASE_INSN_SUBO2, SEM_FN_NAME (i960base,subo2) },
7622 { I960BASE_INSN_SUBO3, SEM_FN_NAME (i960base,subo3) },
7623 { I960BASE_INSN_NOTBIT, SEM_FN_NAME (i960base,notbit) },
7624 { I960BASE_INSN_NOTBIT1, SEM_FN_NAME (i960base,notbit1) },
7625 { I960BASE_INSN_NOTBIT2, SEM_FN_NAME (i960base,notbit2) },
7626 { I960BASE_INSN_NOTBIT3, SEM_FN_NAME (i960base,notbit3) },
7627 { I960BASE_INSN_AND, SEM_FN_NAME (i960base,and) },
7628 { I960BASE_INSN_AND1, SEM_FN_NAME (i960base,and1) },
7629 { I960BASE_INSN_AND2, SEM_FN_NAME (i960base,and2) },
7630 { I960BASE_INSN_AND3, SEM_FN_NAME (i960base,and3) },
7631 { I960BASE_INSN_ANDNOT, SEM_FN_NAME (i960base,andnot) },
7632 { I960BASE_INSN_ANDNOT1, SEM_FN_NAME (i960base,andnot1) },
7633 { I960BASE_INSN_ANDNOT2, SEM_FN_NAME (i960base,andnot2) },
7634 { I960BASE_INSN_ANDNOT3, SEM_FN_NAME (i960base,andnot3) },
7635 { I960BASE_INSN_SETBIT, SEM_FN_NAME (i960base,setbit) },
7636 { I960BASE_INSN_SETBIT1, SEM_FN_NAME (i960base,setbit1) },
7637 { I960BASE_INSN_SETBIT2, SEM_FN_NAME (i960base,setbit2) },
7638 { I960BASE_INSN_SETBIT3, SEM_FN_NAME (i960base,setbit3) },
7639 { I960BASE_INSN_NOTAND, SEM_FN_NAME (i960base,notand) },
7640 { I960BASE_INSN_NOTAND1, SEM_FN_NAME (i960base,notand1) },
7641 { I960BASE_INSN_NOTAND2, SEM_FN_NAME (i960base,notand2) },
7642 { I960BASE_INSN_NOTAND3, SEM_FN_NAME (i960base,notand3) },
7643 { I960BASE_INSN_XOR, SEM_FN_NAME (i960base,xor) },
7644 { I960BASE_INSN_XOR1, SEM_FN_NAME (i960base,xor1) },
7645 { I960BASE_INSN_XOR2, SEM_FN_NAME (i960base,xor2) },
7646 { I960BASE_INSN_XOR3, SEM_FN_NAME (i960base,xor3) },
7647 { I960BASE_INSN_OR, SEM_FN_NAME (i960base,or) },
7648 { I960BASE_INSN_OR1, SEM_FN_NAME (i960base,or1) },
7649 { I960BASE_INSN_OR2, SEM_FN_NAME (i960base,or2) },
7650 { I960BASE_INSN_OR3, SEM_FN_NAME (i960base,or3) },
7651 { I960BASE_INSN_NOR, SEM_FN_NAME (i960base,nor) },
7652 { I960BASE_INSN_NOR1, SEM_FN_NAME (i960base,nor1) },
7653 { I960BASE_INSN_NOR2, SEM_FN_NAME (i960base,nor2) },
7654 { I960BASE_INSN_NOR3, SEM_FN_NAME (i960base,nor3) },
7655 { I960BASE_INSN_XNOR, SEM_FN_NAME (i960base,xnor) },
7656 { I960BASE_INSN_XNOR1, SEM_FN_NAME (i960base,xnor1) },
7657 { I960BASE_INSN_XNOR2, SEM_FN_NAME (i960base,xnor2) },
7658 { I960BASE_INSN_XNOR3, SEM_FN_NAME (i960base,xnor3) },
7659 { I960BASE_INSN_NOT, SEM_FN_NAME (i960base,not) },
7660 { I960BASE_INSN_NOT1, SEM_FN_NAME (i960base,not1) },
7661 { I960BASE_INSN_NOT2, SEM_FN_NAME (i960base,not2) },
7662 { I960BASE_INSN_NOT3, SEM_FN_NAME (i960base,not3) },
7663 { I960BASE_INSN_ORNOT, SEM_FN_NAME (i960base,ornot) },
7664 { I960BASE_INSN_ORNOT1, SEM_FN_NAME (i960base,ornot1) },
7665 { I960BASE_INSN_ORNOT2, SEM_FN_NAME (i960base,ornot2) },
7666 { I960BASE_INSN_ORNOT3, SEM_FN_NAME (i960base,ornot3) },
7667 { I960BASE_INSN_CLRBIT, SEM_FN_NAME (i960base,clrbit) },
7668 { I960BASE_INSN_CLRBIT1, SEM_FN_NAME (i960base,clrbit1) },
7669 { I960BASE_INSN_CLRBIT2, SEM_FN_NAME (i960base,clrbit2) },
7670 { I960BASE_INSN_CLRBIT3, SEM_FN_NAME (i960base,clrbit3) },
7671 { I960BASE_INSN_SHLO, SEM_FN_NAME (i960base,shlo) },
7672 { I960BASE_INSN_SHLO1, SEM_FN_NAME (i960base,shlo1) },
7673 { I960BASE_INSN_SHLO2, SEM_FN_NAME (i960base,shlo2) },
7674 { I960BASE_INSN_SHLO3, SEM_FN_NAME (i960base,shlo3) },
7675 { I960BASE_INSN_SHRO, SEM_FN_NAME (i960base,shro) },
7676 { I960BASE_INSN_SHRO1, SEM_FN_NAME (i960base,shro1) },
7677 { I960BASE_INSN_SHRO2, SEM_FN_NAME (i960base,shro2) },
7678 { I960BASE_INSN_SHRO3, SEM_FN_NAME (i960base,shro3) },
7679 { I960BASE_INSN_SHLI, SEM_FN_NAME (i960base,shli) },
7680 { I960BASE_INSN_SHLI1, SEM_FN_NAME (i960base,shli1) },
7681 { I960BASE_INSN_SHLI2, SEM_FN_NAME (i960base,shli2) },
7682 { I960BASE_INSN_SHLI3, SEM_FN_NAME (i960base,shli3) },
7683 { I960BASE_INSN_SHRI, SEM_FN_NAME (i960base,shri) },
7684 { I960BASE_INSN_SHRI1, SEM_FN_NAME (i960base,shri1) },
7685 { I960BASE_INSN_SHRI2, SEM_FN_NAME (i960base,shri2) },
7686 { I960BASE_INSN_SHRI3, SEM_FN_NAME (i960base,shri3) },
7687 { I960BASE_INSN_EMUL, SEM_FN_NAME (i960base,emul) },
7688 { I960BASE_INSN_EMUL1, SEM_FN_NAME (i960base,emul1) },
7689 { I960BASE_INSN_EMUL2, SEM_FN_NAME (i960base,emul2) },
7690 { I960BASE_INSN_EMUL3, SEM_FN_NAME (i960base,emul3) },
7691 { I960BASE_INSN_MOV, SEM_FN_NAME (i960base,mov) },
7692 { I960BASE_INSN_MOV1, SEM_FN_NAME (i960base,mov1) },
7693 { I960BASE_INSN_MOVL, SEM_FN_NAME (i960base,movl) },
7694 { I960BASE_INSN_MOVL1, SEM_FN_NAME (i960base,movl1) },
7695 { I960BASE_INSN_MOVT, SEM_FN_NAME (i960base,movt) },
7696 { I960BASE_INSN_MOVT1, SEM_FN_NAME (i960base,movt1) },
7697 { I960BASE_INSN_MOVQ, SEM_FN_NAME (i960base,movq) },
7698 { I960BASE_INSN_MOVQ1, SEM_FN_NAME (i960base,movq1) },
7699 { I960BASE_INSN_MODPC, SEM_FN_NAME (i960base,modpc) },
7700 { I960BASE_INSN_MODAC, SEM_FN_NAME (i960base,modac) },
7701 { I960BASE_INSN_LDA_OFFSET, SEM_FN_NAME (i960base,lda_offset) },
7702 { I960BASE_INSN_LDA_INDIRECT_OFFSET, SEM_FN_NAME (i960base,lda_indirect_offset) },
7703 { I960BASE_INSN_LDA_INDIRECT, SEM_FN_NAME (i960base,lda_indirect) },
7704 { I960BASE_INSN_LDA_INDIRECT_INDEX, SEM_FN_NAME (i960base,lda_indirect_index) },
7705 { I960BASE_INSN_LDA_DISP, SEM_FN_NAME (i960base,lda_disp) },
7706 { I960BASE_INSN_LDA_INDIRECT_DISP, SEM_FN_NAME (i960base,lda_indirect_disp) },
7707 { I960BASE_INSN_LDA_INDEX_DISP, SEM_FN_NAME (i960base,lda_index_disp) },
7708 { I960BASE_INSN_LDA_INDIRECT_INDEX_DISP, SEM_FN_NAME (i960base,lda_indirect_index_disp) },
7709 { I960BASE_INSN_LD_OFFSET, SEM_FN_NAME (i960base,ld_offset) },
7710 { I960BASE_INSN_LD_INDIRECT_OFFSET, SEM_FN_NAME (i960base,ld_indirect_offset) },
7711 { I960BASE_INSN_LD_INDIRECT, SEM_FN_NAME (i960base,ld_indirect) },
7712 { I960BASE_INSN_LD_INDIRECT_INDEX, SEM_FN_NAME (i960base,ld_indirect_index) },
7713 { I960BASE_INSN_LD_DISP, SEM_FN_NAME (i960base,ld_disp) },
7714 { I960BASE_INSN_LD_INDIRECT_DISP, SEM_FN_NAME (i960base,ld_indirect_disp) },
7715 { I960BASE_INSN_LD_INDEX_DISP, SEM_FN_NAME (i960base,ld_index_disp) },
7716 { I960BASE_INSN_LD_INDIRECT_INDEX_DISP, SEM_FN_NAME (i960base,ld_indirect_index_disp) },
7717 { I960BASE_INSN_LDOB_OFFSET, SEM_FN_NAME (i960base,ldob_offset) },
7718 { I960BASE_INSN_LDOB_INDIRECT_OFFSET, SEM_FN_NAME (i960base,ldob_indirect_offset) },
7719 { I960BASE_INSN_LDOB_INDIRECT, SEM_FN_NAME (i960base,ldob_indirect) },
7720 { I960BASE_INSN_LDOB_INDIRECT_INDEX, SEM_FN_NAME (i960base,ldob_indirect_index) },
7721 { I960BASE_INSN_LDOB_DISP, SEM_FN_NAME (i960base,ldob_disp) },
7722 { I960BASE_INSN_LDOB_INDIRECT_DISP, SEM_FN_NAME (i960base,ldob_indirect_disp) },
7723 { I960BASE_INSN_LDOB_INDEX_DISP, SEM_FN_NAME (i960base,ldob_index_disp) },
7724 { I960BASE_INSN_LDOB_INDIRECT_INDEX_DISP, SEM_FN_NAME (i960base,ldob_indirect_index_disp) },
7725 { I960BASE_INSN_LDOS_OFFSET, SEM_FN_NAME (i960base,ldos_offset) },
7726 { I960BASE_INSN_LDOS_INDIRECT_OFFSET, SEM_FN_NAME (i960base,ldos_indirect_offset) },
7727 { I960BASE_INSN_LDOS_INDIRECT, SEM_FN_NAME (i960base,ldos_indirect) },
7728 { I960BASE_INSN_LDOS_INDIRECT_INDEX, SEM_FN_NAME (i960base,ldos_indirect_index) },
7729 { I960BASE_INSN_LDOS_DISP, SEM_FN_NAME (i960base,ldos_disp) },
7730 { I960BASE_INSN_LDOS_INDIRECT_DISP, SEM_FN_NAME (i960base,ldos_indirect_disp) },
7731 { I960BASE_INSN_LDOS_INDEX_DISP, SEM_FN_NAME (i960base,ldos_index_disp) },
7732 { I960BASE_INSN_LDOS_INDIRECT_INDEX_DISP, SEM_FN_NAME (i960base,ldos_indirect_index_disp) },
7733 { I960BASE_INSN_LDIB_OFFSET, SEM_FN_NAME (i960base,ldib_offset) },
7734 { I960BASE_INSN_LDIB_INDIRECT_OFFSET, SEM_FN_NAME (i960base,ldib_indirect_offset) },
7735 { I960BASE_INSN_LDIB_INDIRECT, SEM_FN_NAME (i960base,ldib_indirect) },
7736 { I960BASE_INSN_LDIB_INDIRECT_INDEX, SEM_FN_NAME (i960base,ldib_indirect_index) },
7737 { I960BASE_INSN_LDIB_DISP, SEM_FN_NAME (i960base,ldib_disp) },
7738 { I960BASE_INSN_LDIB_INDIRECT_DISP, SEM_FN_NAME (i960base,ldib_indirect_disp) },
7739 { I960BASE_INSN_LDIB_INDEX_DISP, SEM_FN_NAME (i960base,ldib_index_disp) },
7740 { I960BASE_INSN_LDIB_INDIRECT_INDEX_DISP, SEM_FN_NAME (i960base,ldib_indirect_index_disp) },
7741 { I960BASE_INSN_LDIS_OFFSET, SEM_FN_NAME (i960base,ldis_offset) },
7742 { I960BASE_INSN_LDIS_INDIRECT_OFFSET, SEM_FN_NAME (i960base,ldis_indirect_offset) },
7743 { I960BASE_INSN_LDIS_INDIRECT, SEM_FN_NAME (i960base,ldis_indirect) },
7744 { I960BASE_INSN_LDIS_INDIRECT_INDEX, SEM_FN_NAME (i960base,ldis_indirect_index) },
7745 { I960BASE_INSN_LDIS_DISP, SEM_FN_NAME (i960base,ldis_disp) },
7746 { I960BASE_INSN_LDIS_INDIRECT_DISP, SEM_FN_NAME (i960base,ldis_indirect_disp) },
7747 { I960BASE_INSN_LDIS_INDEX_DISP, SEM_FN_NAME (i960base,ldis_index_disp) },
7748 { I960BASE_INSN_LDIS_INDIRECT_INDEX_DISP, SEM_FN_NAME (i960base,ldis_indirect_index_disp) },
7749 { I960BASE_INSN_LDL_OFFSET, SEM_FN_NAME (i960base,ldl_offset) },
7750 { I960BASE_INSN_LDL_INDIRECT_OFFSET, SEM_FN_NAME (i960base,ldl_indirect_offset) },
7751 { I960BASE_INSN_LDL_INDIRECT, SEM_FN_NAME (i960base,ldl_indirect) },
7752 { I960BASE_INSN_LDL_INDIRECT_INDEX, SEM_FN_NAME (i960base,ldl_indirect_index) },
7753 { I960BASE_INSN_LDL_DISP, SEM_FN_NAME (i960base,ldl_disp) },
7754 { I960BASE_INSN_LDL_INDIRECT_DISP, SEM_FN_NAME (i960base,ldl_indirect_disp) },
7755 { I960BASE_INSN_LDL_INDEX_DISP, SEM_FN_NAME (i960base,ldl_index_disp) },
7756 { I960BASE_INSN_LDL_INDIRECT_INDEX_DISP, SEM_FN_NAME (i960base,ldl_indirect_index_disp) },
7757 { I960BASE_INSN_LDT_OFFSET, SEM_FN_NAME (i960base,ldt_offset) },
7758 { I960BASE_INSN_LDT_INDIRECT_OFFSET, SEM_FN_NAME (i960base,ldt_indirect_offset) },
7759 { I960BASE_INSN_LDT_INDIRECT, SEM_FN_NAME (i960base,ldt_indirect) },
7760 { I960BASE_INSN_LDT_INDIRECT_INDEX, SEM_FN_NAME (i960base,ldt_indirect_index) },
7761 { I960BASE_INSN_LDT_DISP, SEM_FN_NAME (i960base,ldt_disp) },
7762 { I960BASE_INSN_LDT_INDIRECT_DISP, SEM_FN_NAME (i960base,ldt_indirect_disp) },
7763 { I960BASE_INSN_LDT_INDEX_DISP, SEM_FN_NAME (i960base,ldt_index_disp) },
7764 { I960BASE_INSN_LDT_INDIRECT_INDEX_DISP, SEM_FN_NAME (i960base,ldt_indirect_index_disp) },
7765 { I960BASE_INSN_LDQ_OFFSET, SEM_FN_NAME (i960base,ldq_offset) },
7766 { I960BASE_INSN_LDQ_INDIRECT_OFFSET, SEM_FN_NAME (i960base,ldq_indirect_offset) },
7767 { I960BASE_INSN_LDQ_INDIRECT, SEM_FN_NAME (i960base,ldq_indirect) },
7768 { I960BASE_INSN_LDQ_INDIRECT_INDEX, SEM_FN_NAME (i960base,ldq_indirect_index) },
7769 { I960BASE_INSN_LDQ_DISP, SEM_FN_NAME (i960base,ldq_disp) },
7770 { I960BASE_INSN_LDQ_INDIRECT_DISP, SEM_FN_NAME (i960base,ldq_indirect_disp) },
7771 { I960BASE_INSN_LDQ_INDEX_DISP, SEM_FN_NAME (i960base,ldq_index_disp) },
7772 { I960BASE_INSN_LDQ_INDIRECT_INDEX_DISP, SEM_FN_NAME (i960base,ldq_indirect_index_disp) },
7773 { I960BASE_INSN_ST_OFFSET, SEM_FN_NAME (i960base,st_offset) },
7774 { I960BASE_INSN_ST_INDIRECT_OFFSET, SEM_FN_NAME (i960base,st_indirect_offset) },
7775 { I960BASE_INSN_ST_INDIRECT, SEM_FN_NAME (i960base,st_indirect) },
7776 { I960BASE_INSN_ST_INDIRECT_INDEX, SEM_FN_NAME (i960base,st_indirect_index) },
7777 { I960BASE_INSN_ST_DISP, SEM_FN_NAME (i960base,st_disp) },
7778 { I960BASE_INSN_ST_INDIRECT_DISP, SEM_FN_NAME (i960base,st_indirect_disp) },
7779 { I960BASE_INSN_ST_INDEX_DISP, SEM_FN_NAME (i960base,st_index_disp) },
7780 { I960BASE_INSN_ST_INDIRECT_INDEX_DISP, SEM_FN_NAME (i960base,st_indirect_index_disp) },
7781 { I960BASE_INSN_STOB_OFFSET, SEM_FN_NAME (i960base,stob_offset) },
7782 { I960BASE_INSN_STOB_INDIRECT_OFFSET, SEM_FN_NAME (i960base,stob_indirect_offset) },
7783 { I960BASE_INSN_STOB_INDIRECT, SEM_FN_NAME (i960base,stob_indirect) },
7784 { I960BASE_INSN_STOB_INDIRECT_INDEX, SEM_FN_NAME (i960base,stob_indirect_index) },
7785 { I960BASE_INSN_STOB_DISP, SEM_FN_NAME (i960base,stob_disp) },
7786 { I960BASE_INSN_STOB_INDIRECT_DISP, SEM_FN_NAME (i960base,stob_indirect_disp) },
7787 { I960BASE_INSN_STOB_INDEX_DISP, SEM_FN_NAME (i960base,stob_index_disp) },
7788 { I960BASE_INSN_STOB_INDIRECT_INDEX_DISP, SEM_FN_NAME (i960base,stob_indirect_index_disp) },
7789 { I960BASE_INSN_STOS_OFFSET, SEM_FN_NAME (i960base,stos_offset) },
7790 { I960BASE_INSN_STOS_INDIRECT_OFFSET, SEM_FN_NAME (i960base,stos_indirect_offset) },
7791 { I960BASE_INSN_STOS_INDIRECT, SEM_FN_NAME (i960base,stos_indirect) },
7792 { I960BASE_INSN_STOS_INDIRECT_INDEX, SEM_FN_NAME (i960base,stos_indirect_index) },
7793 { I960BASE_INSN_STOS_DISP, SEM_FN_NAME (i960base,stos_disp) },
7794 { I960BASE_INSN_STOS_INDIRECT_DISP, SEM_FN_NAME (i960base,stos_indirect_disp) },
7795 { I960BASE_INSN_STOS_INDEX_DISP, SEM_FN_NAME (i960base,stos_index_disp) },
7796 { I960BASE_INSN_STOS_INDIRECT_INDEX_DISP, SEM_FN_NAME (i960base,stos_indirect_index_disp) },
7797 { I960BASE_INSN_STL_OFFSET, SEM_FN_NAME (i960base,stl_offset) },
7798 { I960BASE_INSN_STL_INDIRECT_OFFSET, SEM_FN_NAME (i960base,stl_indirect_offset) },
7799 { I960BASE_INSN_STL_INDIRECT, SEM_FN_NAME (i960base,stl_indirect) },
7800 { I960BASE_INSN_STL_INDIRECT_INDEX, SEM_FN_NAME (i960base,stl_indirect_index) },
7801 { I960BASE_INSN_STL_DISP, SEM_FN_NAME (i960base,stl_disp) },
7802 { I960BASE_INSN_STL_INDIRECT_DISP, SEM_FN_NAME (i960base,stl_indirect_disp) },
7803 { I960BASE_INSN_STL_INDEX_DISP, SEM_FN_NAME (i960base,stl_index_disp) },
7804 { I960BASE_INSN_STL_INDIRECT_INDEX_DISP, SEM_FN_NAME (i960base,stl_indirect_index_disp) },
7805 { I960BASE_INSN_STT_OFFSET, SEM_FN_NAME (i960base,stt_offset) },
7806 { I960BASE_INSN_STT_INDIRECT_OFFSET, SEM_FN_NAME (i960base,stt_indirect_offset) },
7807 { I960BASE_INSN_STT_INDIRECT, SEM_FN_NAME (i960base,stt_indirect) },
7808 { I960BASE_INSN_STT_INDIRECT_INDEX, SEM_FN_NAME (i960base,stt_indirect_index) },
7809 { I960BASE_INSN_STT_DISP, SEM_FN_NAME (i960base,stt_disp) },
7810 { I960BASE_INSN_STT_INDIRECT_DISP, SEM_FN_NAME (i960base,stt_indirect_disp) },
7811 { I960BASE_INSN_STT_INDEX_DISP, SEM_FN_NAME (i960base,stt_index_disp) },
7812 { I960BASE_INSN_STT_INDIRECT_INDEX_DISP, SEM_FN_NAME (i960base,stt_indirect_index_disp) },
7813 { I960BASE_INSN_STQ_OFFSET, SEM_FN_NAME (i960base,stq_offset) },
7814 { I960BASE_INSN_STQ_INDIRECT_OFFSET, SEM_FN_NAME (i960base,stq_indirect_offset) },
7815 { I960BASE_INSN_STQ_INDIRECT, SEM_FN_NAME (i960base,stq_indirect) },
7816 { I960BASE_INSN_STQ_INDIRECT_INDEX, SEM_FN_NAME (i960base,stq_indirect_index) },
7817 { I960BASE_INSN_STQ_DISP, SEM_FN_NAME (i960base,stq_disp) },
7818 { I960BASE_INSN_STQ_INDIRECT_DISP, SEM_FN_NAME (i960base,stq_indirect_disp) },
7819 { I960BASE_INSN_STQ_INDEX_DISP, SEM_FN_NAME (i960base,stq_index_disp) },
7820 { I960BASE_INSN_STQ_INDIRECT_INDEX_DISP, SEM_FN_NAME (i960base,stq_indirect_index_disp) },
7821 { I960BASE_INSN_CMPOBE_REG, SEM_FN_NAME (i960base,cmpobe_reg) },
7822 { I960BASE_INSN_CMPOBE_LIT, SEM_FN_NAME (i960base,cmpobe_lit) },
7823 { I960BASE_INSN_CMPOBNE_REG, SEM_FN_NAME (i960base,cmpobne_reg) },
7824 { I960BASE_INSN_CMPOBNE_LIT, SEM_FN_NAME (i960base,cmpobne_lit) },
7825 { I960BASE_INSN_CMPOBL_REG, SEM_FN_NAME (i960base,cmpobl_reg) },
7826 { I960BASE_INSN_CMPOBL_LIT, SEM_FN_NAME (i960base,cmpobl_lit) },
7827 { I960BASE_INSN_CMPOBLE_REG, SEM_FN_NAME (i960base,cmpoble_reg) },
7828 { I960BASE_INSN_CMPOBLE_LIT, SEM_FN_NAME (i960base,cmpoble_lit) },
7829 { I960BASE_INSN_CMPOBG_REG, SEM_FN_NAME (i960base,cmpobg_reg) },
7830 { I960BASE_INSN_CMPOBG_LIT, SEM_FN_NAME (i960base,cmpobg_lit) },
7831 { I960BASE_INSN_CMPOBGE_REG, SEM_FN_NAME (i960base,cmpobge_reg) },
7832 { I960BASE_INSN_CMPOBGE_LIT, SEM_FN_NAME (i960base,cmpobge_lit) },
7833 { I960BASE_INSN_CMPIBE_REG, SEM_FN_NAME (i960base,cmpibe_reg) },
7834 { I960BASE_INSN_CMPIBE_LIT, SEM_FN_NAME (i960base,cmpibe_lit) },
7835 { I960BASE_INSN_CMPIBNE_REG, SEM_FN_NAME (i960base,cmpibne_reg) },
7836 { I960BASE_INSN_CMPIBNE_LIT, SEM_FN_NAME (i960base,cmpibne_lit) },
7837 { I960BASE_INSN_CMPIBL_REG, SEM_FN_NAME (i960base,cmpibl_reg) },
7838 { I960BASE_INSN_CMPIBL_LIT, SEM_FN_NAME (i960base,cmpibl_lit) },
7839 { I960BASE_INSN_CMPIBLE_REG, SEM_FN_NAME (i960base,cmpible_reg) },
7840 { I960BASE_INSN_CMPIBLE_LIT, SEM_FN_NAME (i960base,cmpible_lit) },
7841 { I960BASE_INSN_CMPIBG_REG, SEM_FN_NAME (i960base,cmpibg_reg) },
7842 { I960BASE_INSN_CMPIBG_LIT, SEM_FN_NAME (i960base,cmpibg_lit) },
7843 { I960BASE_INSN_CMPIBGE_REG, SEM_FN_NAME (i960base,cmpibge_reg) },
7844 { I960BASE_INSN_CMPIBGE_LIT, SEM_FN_NAME (i960base,cmpibge_lit) },
7845 { I960BASE_INSN_BBC_REG, SEM_FN_NAME (i960base,bbc_reg) },
7846 { I960BASE_INSN_BBC_LIT, SEM_FN_NAME (i960base,bbc_lit) },
7847 { I960BASE_INSN_BBS_REG, SEM_FN_NAME (i960base,bbs_reg) },
7848 { I960BASE_INSN_BBS_LIT, SEM_FN_NAME (i960base,bbs_lit) },
7849 { I960BASE_INSN_CMPI, SEM_FN_NAME (i960base,cmpi) },
7850 { I960BASE_INSN_CMPI1, SEM_FN_NAME (i960base,cmpi1) },
7851 { I960BASE_INSN_CMPI2, SEM_FN_NAME (i960base,cmpi2) },
7852 { I960BASE_INSN_CMPI3, SEM_FN_NAME (i960base,cmpi3) },
7853 { I960BASE_INSN_CMPO, SEM_FN_NAME (i960base,cmpo) },
7854 { I960BASE_INSN_CMPO1, SEM_FN_NAME (i960base,cmpo1) },
7855 { I960BASE_INSN_CMPO2, SEM_FN_NAME (i960base,cmpo2) },
7856 { I960BASE_INSN_CMPO3, SEM_FN_NAME (i960base,cmpo3) },
7857 { I960BASE_INSN_TESTNO_REG, SEM_FN_NAME (i960base,testno_reg) },
7858 { I960BASE_INSN_TESTG_REG, SEM_FN_NAME (i960base,testg_reg) },
7859 { I960BASE_INSN_TESTE_REG, SEM_FN_NAME (i960base,teste_reg) },
7860 { I960BASE_INSN_TESTGE_REG, SEM_FN_NAME (i960base,testge_reg) },
7861 { I960BASE_INSN_TESTL_REG, SEM_FN_NAME (i960base,testl_reg) },
7862 { I960BASE_INSN_TESTNE_REG, SEM_FN_NAME (i960base,testne_reg) },
7863 { I960BASE_INSN_TESTLE_REG, SEM_FN_NAME (i960base,testle_reg) },
7864 { I960BASE_INSN_TESTO_REG, SEM_FN_NAME (i960base,testo_reg) },
7865 { I960BASE_INSN_BNO, SEM_FN_NAME (i960base,bno) },
7866 { I960BASE_INSN_BG, SEM_FN_NAME (i960base,bg) },
7867 { I960BASE_INSN_BE, SEM_FN_NAME (i960base,be) },
7868 { I960BASE_INSN_BGE, SEM_FN_NAME (i960base,bge) },
7869 { I960BASE_INSN_BL, SEM_FN_NAME (i960base,bl) },
7870 { I960BASE_INSN_BNE, SEM_FN_NAME (i960base,bne) },
7871 { I960BASE_INSN_BLE, SEM_FN_NAME (i960base,ble) },
7872 { I960BASE_INSN_BO, SEM_FN_NAME (i960base,bo) },
7873 { I960BASE_INSN_B, SEM_FN_NAME (i960base,b) },
7874 { I960BASE_INSN_BX_INDIRECT_OFFSET, SEM_FN_NAME (i960base,bx_indirect_offset) },
7875 { I960BASE_INSN_BX_INDIRECT, SEM_FN_NAME (i960base,bx_indirect) },
7876 { I960BASE_INSN_BX_INDIRECT_INDEX, SEM_FN_NAME (i960base,bx_indirect_index) },
7877 { I960BASE_INSN_BX_DISP, SEM_FN_NAME (i960base,bx_disp) },
7878 { I960BASE_INSN_BX_INDIRECT_DISP, SEM_FN_NAME (i960base,bx_indirect_disp) },
7879 { I960BASE_INSN_CALLX_DISP, SEM_FN_NAME (i960base,callx_disp) },
7880 { I960BASE_INSN_CALLX_INDIRECT, SEM_FN_NAME (i960base,callx_indirect) },
7881 { I960BASE_INSN_CALLX_INDIRECT_OFFSET, SEM_FN_NAME (i960base,callx_indirect_offset) },
7882 { I960BASE_INSN_RET, SEM_FN_NAME (i960base,ret) },
7883 { I960BASE_INSN_CALLS, SEM_FN_NAME (i960base,calls) },
7884 { I960BASE_INSN_FMARK, SEM_FN_NAME (i960base,fmark) },
7885 { I960BASE_INSN_FLUSHREG, SEM_FN_NAME (i960base,flushreg) },
7886 { 0, 0 }
7887 };
7888
7889 /* Add the semantic fns to IDESC_TABLE. */
7890
7891 void
7892 SEM_FN_NAME (i960base,init_idesc_table) (SIM_CPU *current_cpu)
7893 {
7894 IDESC *idesc_table = CPU_IDESC (current_cpu);
7895 const struct sem_fn_desc *sf;
7896 int mach_num = MACH_NUM (CPU_MACH (current_cpu));
7897
7898 for (sf = &sem_fns[0]; sf->fn != 0; ++sf)
7899 {
7900 int valid_p = CGEN_INSN_MACH_HAS_P (idesc_table[sf->index].idata, mach_num);
7901 #if FAST_P
7902 if (valid_p)
7903 idesc_table[sf->index].sem_fast = sf->fn;
7904 else
7905 idesc_table[sf->index].sem_fast = SEM_FN_NAME (i960base,x_invalid);
7906 #else
7907 if (valid_p)
7908 idesc_table[sf->index].sem_full = sf->fn;
7909 else
7910 idesc_table[sf->index].sem_full = SEM_FN_NAME (i960base,x_invalid);
7911 #endif
7912 }
7913 }
7914
This page took 0.198684 seconds and 4 git commands to generate.