1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
|
/* Simulator instruction decoder for iq2000bf.
THIS FILE IS MACHINE GENERATED WITH CGEN.
Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
This file is part of the GNU simulators.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#define WANT_CPU iq2000bf
#define WANT_CPU_IQ2000BF
#include "sim-main.h"
#include "sim-assert.h"
/* The instruction descriptor array.
This is computed at runtime. Space for it is not malloc'd to save a
teensy bit of cpu in the decoder. Moving it to malloc space is trivial
but won't be done until necessary (we don't currently support the runtime
addition of instructions nor an SMP machine with different cpus). */
static IDESC iq2000bf_insn_data[IQ2000BF_INSN_BMB + 1];
/* Commas between elements are contained in the macros.
Some of these are conditionally compiled out. */
static const struct insn_sem iq2000bf_insn_sem[] =
{
{ VIRTUAL_INSN_X_INVALID, IQ2000BF_INSN_X_INVALID, IQ2000BF_SFMT_EMPTY },
{ VIRTUAL_INSN_X_AFTER, IQ2000BF_INSN_X_AFTER, IQ2000BF_SFMT_EMPTY },
{ VIRTUAL_INSN_X_BEFORE, IQ2000BF_INSN_X_BEFORE, IQ2000BF_SFMT_EMPTY },
{ VIRTUAL_INSN_X_CTI_CHAIN, IQ2000BF_INSN_X_CTI_CHAIN, IQ2000BF_SFMT_EMPTY },
{ VIRTUAL_INSN_X_CHAIN, IQ2000BF_INSN_X_CHAIN, IQ2000BF_SFMT_EMPTY },
{ VIRTUAL_INSN_X_BEGIN, IQ2000BF_INSN_X_BEGIN, IQ2000BF_SFMT_EMPTY },
{ IQ2000_INSN_ADD, IQ2000BF_INSN_ADD, IQ2000BF_SFMT_ADD },
{ IQ2000_INSN_ADDI, IQ2000BF_INSN_ADDI, IQ2000BF_SFMT_ADDI },
{ IQ2000_INSN_ADDIU, IQ2000BF_INSN_ADDIU, IQ2000BF_SFMT_ADDI },
{ IQ2000_INSN_ADDU, IQ2000BF_INSN_ADDU, IQ2000BF_SFMT_ADD },
{ IQ2000_INSN_ADO16, IQ2000BF_INSN_ADO16, IQ2000BF_SFMT_ADO16 },
{ IQ2000_INSN_AND, IQ2000BF_INSN_AND, IQ2000BF_SFMT_ADD },
{ IQ2000_INSN_ANDI, IQ2000BF_INSN_ANDI, IQ2000BF_SFMT_ADDI },
{ IQ2000_INSN_ANDOI, IQ2000BF_INSN_ANDOI, IQ2000BF_SFMT_ADDI },
{ IQ2000_INSN_NOR, IQ2000BF_INSN_NOR, IQ2000BF_SFMT_ADD },
{ IQ2000_INSN_OR, IQ2000BF_INSN_OR, IQ2000BF_SFMT_ADD },
{ IQ2000_INSN_ORI, IQ2000BF_INSN_ORI, IQ2000BF_SFMT_ADDI },
{ IQ2000_INSN_RAM, IQ2000BF_INSN_RAM, IQ2000BF_SFMT_RAM },
{ IQ2000_INSN_SLL, IQ2000BF_INSN_SLL, IQ2000BF_SFMT_SLL },
{ IQ2000_INSN_SLLV, IQ2000BF_INSN_SLLV, IQ2000BF_SFMT_ADD },
{ IQ2000_INSN_SLMV, IQ2000BF_INSN_SLMV, IQ2000BF_SFMT_SLMV },
{ IQ2000_INSN_SLT, IQ2000BF_INSN_SLT, IQ2000BF_SFMT_SLT },
{ IQ2000_INSN_SLTI, IQ2000BF_INSN_SLTI, IQ2000BF_SFMT_SLTI },
{ IQ2000_INSN_SLTIU, IQ2000BF_INSN_SLTIU, IQ2000BF_SFMT_SLTI },
{ IQ2000_INSN_SLTU, IQ2000BF_INSN_SLTU, IQ2000BF_SFMT_SLT },
{ IQ2000_INSN_SRA, IQ2000BF_INSN_SRA, IQ2000BF_SFMT_SLL },
{ IQ2000_INSN_SRAV, IQ2000BF_INSN_SRAV, IQ2000BF_SFMT_ADD },
{ IQ2000_INSN_SRL, IQ2000BF_INSN_SRL, IQ2000BF_SFMT_SLL },
{ IQ2000_INSN_SRLV, IQ2000BF_INSN_SRLV, IQ2000BF_SFMT_ADD },
{ IQ2000_INSN_SRMV, IQ2000BF_INSN_SRMV, IQ2000BF_SFMT_SLMV },
{ IQ2000_INSN_SUB, IQ2000BF_INSN_SUB, IQ2000BF_SFMT_ADD },
{ IQ2000_INSN_SUBU, IQ2000BF_INSN_SUBU, IQ2000BF_SFMT_ADD },
{ IQ2000_INSN_XOR, IQ2000BF_INSN_XOR, IQ2000BF_SFMT_ADD },
{ IQ2000_INSN_XORI, IQ2000BF_INSN_XORI, IQ2000BF_SFMT_ADDI },
{ IQ2000_INSN_BBI, IQ2000BF_INSN_BBI, IQ2000BF_SFMT_BBI },
{ IQ2000_INSN_BBIN, IQ2000BF_INSN_BBIN, IQ2000BF_SFMT_BBI },
{ IQ2000_INSN_BBV, IQ2000BF_INSN_BBV, IQ2000BF_SFMT_BBV },
{ IQ2000_INSN_BBVN, IQ2000BF_INSN_BBVN, IQ2000BF_SFMT_BBV },
{ IQ2000_INSN_BEQ, IQ2000BF_INSN_BEQ, IQ2000BF_SFMT_BBV },
{ IQ2000_INSN_BEQL, IQ2000BF_INSN_BEQL, IQ2000BF_SFMT_BBV },
{ IQ2000_INSN_BGEZ, IQ2000BF_INSN_BGEZ, IQ2000BF_SFMT_BGEZ },
{ IQ2000_INSN_BGEZAL, IQ2000BF_INSN_BGEZAL, IQ2000BF_SFMT_BGEZAL },
{ IQ2000_INSN_BGEZALL, IQ2000BF_INSN_BGEZALL, IQ2000BF_SFMT_BGEZAL },
{ IQ2000_INSN_BGEZL, IQ2000BF_INSN_BGEZL, IQ2000BF_SFMT_BGEZ },
{ IQ2000_INSN_BLTZ, IQ2000BF_INSN_BLTZ, IQ2000BF_SFMT_BGEZ },
{ IQ2000_INSN_BLTZL, IQ2000BF_INSN_BLTZL, IQ2000BF_SFMT_BGEZ },
{ IQ2000_INSN_BLTZAL, IQ2000BF_INSN_BLTZAL, IQ2000BF_SFMT_BGEZAL },
{ IQ2000_INSN_BLTZALL, IQ2000BF_INSN_BLTZALL, IQ2000BF_SFMT_BGEZAL },
{ IQ2000_INSN_BMB0, IQ2000BF_INSN_BMB0, IQ2000BF_SFMT_BBV },
{ IQ2000_INSN_BMB1, IQ2000BF_INSN_BMB1, IQ2000BF_SFMT_BBV },
{ IQ2000_INSN_BMB2, IQ2000BF_INSN_BMB2, IQ2000BF_SFMT_BBV },
{ IQ2000_INSN_BMB3, IQ2000BF_INSN_BMB3, IQ2000BF_SFMT_BBV },
{ IQ2000_INSN_BNE, IQ2000BF_INSN_BNE, IQ2000BF_SFMT_BBV },
{ IQ2000_INSN_BNEL, IQ2000BF_INSN_BNEL, IQ2000BF_SFMT_BBV },
{ IQ2000_INSN_JALR, IQ2000BF_INSN_JALR, IQ2000BF_SFMT_JALR },
{ IQ2000_INSN_JR, IQ2000BF_INSN_JR, IQ2000BF_SFMT_JR },
{ IQ2000_INSN_LB, IQ2000BF_INSN_LB, IQ2000BF_SFMT_LB },
{ IQ2000_INSN_LBU, IQ2000BF_INSN_LBU, IQ2000BF_SFMT_LB },
{ IQ2000_INSN_LH, IQ2000BF_INSN_LH, IQ2000BF_SFMT_LH },
{ IQ2000_INSN_LHU, IQ2000BF_INSN_LHU, IQ2000BF_SFMT_LH },
{ IQ2000_INSN_LUI, IQ2000BF_INSN_LUI, IQ2000BF_SFMT_LUI },
{ IQ2000_INSN_LW, IQ2000BF_INSN_LW, IQ2000BF_SFMT_LW },
{ IQ2000_INSN_SB, IQ2000BF_INSN_SB, IQ2000BF_SFMT_SB },
{ IQ2000_INSN_SH, IQ2000BF_INSN_SH, IQ2000BF_SFMT_SH },
{ IQ2000_INSN_SW, IQ2000BF_INSN_SW, IQ2000BF_SFMT_SW },
{ IQ2000_INSN_BREAK, IQ2000BF_INSN_BREAK, IQ2000BF_SFMT_BREAK },
{ IQ2000_INSN_SYSCALL, IQ2000BF_INSN_SYSCALL, IQ2000BF_SFMT_SYSCALL },
{ IQ2000_INSN_ANDOUI, IQ2000BF_INSN_ANDOUI, IQ2000BF_SFMT_ANDOUI },
{ IQ2000_INSN_ORUI, IQ2000BF_INSN_ORUI, IQ2000BF_SFMT_ANDOUI },
{ IQ2000_INSN_BGTZ, IQ2000BF_INSN_BGTZ, IQ2000BF_SFMT_BGEZ },
{ IQ2000_INSN_BGTZL, IQ2000BF_INSN_BGTZL, IQ2000BF_SFMT_BGEZ },
{ IQ2000_INSN_BLEZ, IQ2000BF_INSN_BLEZ, IQ2000BF_SFMT_BGEZ },
{ IQ2000_INSN_BLEZL, IQ2000BF_INSN_BLEZL, IQ2000BF_SFMT_BGEZ },
{ IQ2000_INSN_MRGB, IQ2000BF_INSN_MRGB, IQ2000BF_SFMT_MRGB },
{ IQ2000_INSN_BCTXT, IQ2000BF_INSN_BCTXT, IQ2000BF_SFMT_BCTXT },
{ IQ2000_INSN_BC0F, IQ2000BF_INSN_BC0F, IQ2000BF_SFMT_BCTXT },
{ IQ2000_INSN_BC0FL, IQ2000BF_INSN_BC0FL, IQ2000BF_SFMT_BCTXT },
{ IQ2000_INSN_BC3F, IQ2000BF_INSN_BC3F, IQ2000BF_SFMT_BCTXT },
{ IQ2000_INSN_BC3FL, IQ2000BF_INSN_BC3FL, IQ2000BF_SFMT_BCTXT },
{ IQ2000_INSN_BC0T, IQ2000BF_INSN_BC0T, IQ2000BF_SFMT_BCTXT },
{ IQ2000_INSN_BC0TL, IQ2000BF_INSN_BC0TL, IQ2000BF_SFMT_BCTXT },
{ IQ2000_INSN_BC3T, IQ2000BF_INSN_BC3T, IQ2000BF_SFMT_BCTXT },
{ IQ2000_INSN_BC3TL, IQ2000BF_INSN_BC3TL, IQ2000BF_SFMT_BCTXT },
{ IQ2000_INSN_CFC0, IQ2000BF_INSN_CFC0, IQ2000BF_SFMT_SYSCALL },
{ IQ2000_INSN_CFC1, IQ2000BF_INSN_CFC1, IQ2000BF_SFMT_SYSCALL },
{ IQ2000_INSN_CFC2, IQ2000BF_INSN_CFC2, IQ2000BF_SFMT_SYSCALL },
{ IQ2000_INSN_CFC3, IQ2000BF_INSN_CFC3, IQ2000BF_SFMT_SYSCALL },
{ IQ2000_INSN_CHKHDR, IQ2000BF_INSN_CHKHDR, IQ2000BF_SFMT_SYSCALL },
{ IQ2000_INSN_CTC0, IQ2000BF_INSN_CTC0, IQ2000BF_SFMT_SYSCALL },
{ IQ2000_INSN_CTC1, IQ2000BF_INSN_CTC1, IQ2000BF_SFMT_SYSCALL },
{ IQ2000_INSN_CTC2, IQ2000BF_INSN_CTC2, IQ2000BF_SFMT_SYSCALL },
{ IQ2000_INSN_CTC3, IQ2000BF_INSN_CTC3, IQ2000BF_SFMT_SYSCALL },
{ IQ2000_INSN_JCR, IQ2000BF_INSN_JCR, IQ2000BF_SFMT_BCTXT },
{ IQ2000_INSN_LUC32, IQ2000BF_INSN_LUC32, IQ2000BF_SFMT_SYSCALL },
{ IQ2000_INSN_LUC32L, IQ2000BF_INSN_LUC32L, IQ2000BF_SFMT_SYSCALL },
{ IQ2000_INSN_LUC64, IQ2000BF_INSN_LUC64, IQ2000BF_SFMT_SYSCALL },
{ IQ2000_INSN_LUC64L, IQ2000BF_INSN_LUC64L, IQ2000BF_SFMT_SYSCALL },
{ IQ2000_INSN_LUK, IQ2000BF_INSN_LUK, IQ2000BF_SFMT_SYSCALL },
{ IQ2000_INSN_LULCK, IQ2000BF_INSN_LULCK, IQ2000BF_SFMT_SYSCALL },
{ IQ2000_INSN_LUM32, IQ2000BF_INSN_LUM32, IQ2000BF_SFMT_SYSCALL },
{ IQ2000_INSN_LUM32L, IQ2000BF_INSN_LUM32L, IQ2000BF_SFMT_SYSCALL },
{ IQ2000_INSN_LUM64, IQ2000BF_INSN_LUM64, IQ2000BF_SFMT_SYSCALL },
{ IQ2000_INSN_LUM64L, IQ2000BF_INSN_LUM64L, IQ2000BF_SFMT_SYSCALL },
{ IQ2000_INSN_LUR, IQ2000BF_INSN_LUR, IQ2000BF_SFMT_SYSCALL },
{ IQ2000_INSN_LURL, IQ2000BF_INSN_LURL, IQ2000BF_SFMT_SYSCALL },
{ IQ2000_INSN_LUULCK, IQ2000BF_INSN_LUULCK, IQ2000BF_SFMT_SYSCALL },
{ IQ2000_INSN_MFC0, IQ2000BF_INSN_MFC0, IQ2000BF_SFMT_SYSCALL },
{ IQ2000_INSN_MFC1, IQ2000BF_INSN_MFC1, IQ2000BF_SFMT_SYSCALL },
{ IQ2000_INSN_MFC2, IQ2000BF_INSN_MFC2, IQ2000BF_SFMT_SYSCALL },
{ IQ2000_INSN_MFC3, IQ2000BF_INSN_MFC3, IQ2000BF_SFMT_SYSCALL },
{ IQ2000_INSN_MTC0, IQ2000BF_INSN_MTC0, IQ2000BF_SFMT_SYSCALL },
{ IQ2000_INSN_MTC1, IQ2000BF_INSN_MTC1, IQ2000BF_SFMT_SYSCALL },
{ IQ2000_INSN_MTC2, IQ2000BF_INSN_MTC2, IQ2000BF_SFMT_SYSCALL },
{ IQ2000_INSN_MTC3, IQ2000BF_INSN_MTC3, IQ2000BF_SFMT_SYSCALL },
{ IQ2000_INSN_PKRL, IQ2000BF_INSN_PKRL, IQ2000BF_SFMT_SYSCALL },
{ IQ2000_INSN_PKRLR1, IQ2000BF_INSN_PKRLR1, IQ2000BF_SFMT_SYSCALL },
{ IQ2000_INSN_PKRLR30, IQ2000BF_INSN_PKRLR30, IQ2000BF_SFMT_SYSCALL },
{ IQ2000_INSN_RB, IQ2000BF_INSN_RB, IQ2000BF_SFMT_SYSCALL },
{ IQ2000_INSN_RBR1, IQ2000BF_INSN_RBR1, IQ2000BF_SFMT_SYSCALL },
{ IQ2000_INSN_RBR30, IQ2000BF_INSN_RBR30, IQ2000BF_SFMT_SYSCALL },
{ IQ2000_INSN_RFE, IQ2000BF_INSN_RFE, IQ2000BF_SFMT_SYSCALL },
{ IQ2000_INSN_RX, IQ2000BF_INSN_RX, IQ2000BF_SFMT_SYSCALL },
{ IQ2000_INSN_RXR1, IQ2000BF_INSN_RXR1, IQ2000BF_SFMT_SYSCALL },
{ IQ2000_INSN_RXR30, IQ2000BF_INSN_RXR30, IQ2000BF_SFMT_SYSCALL },
{ IQ2000_INSN_SLEEP, IQ2000BF_INSN_SLEEP, IQ2000BF_SFMT_SYSCALL },
{ IQ2000_INSN_SRRD, IQ2000BF_INSN_SRRD, IQ2000BF_SFMT_SYSCALL },
{ IQ2000_INSN_SRRDL, IQ2000BF_INSN_SRRDL, IQ2000BF_SFMT_SYSCALL },
{ IQ2000_INSN_SRULCK, IQ2000BF_INSN_SRULCK, IQ2000BF_SFMT_SYSCALL },
{ IQ2000_INSN_SRWR, IQ2000BF_INSN_SRWR, IQ2000BF_SFMT_SYSCALL },
{ IQ2000_INSN_SRWRU, IQ2000BF_INSN_SRWRU, IQ2000BF_SFMT_SYSCALL },
{ IQ2000_INSN_TRAPQFL, IQ2000BF_INSN_TRAPQFL, IQ2000BF_SFMT_SYSCALL },
{ IQ2000_INSN_TRAPQNE, IQ2000BF_INSN_TRAPQNE, IQ2000BF_SFMT_SYSCALL },
{ IQ2000_INSN_TRAPREL, IQ2000BF_INSN_TRAPREL, IQ2000BF_SFMT_SYSCALL },
{ IQ2000_INSN_WB, IQ2000BF_INSN_WB, IQ2000BF_SFMT_SYSCALL },
{ IQ2000_INSN_WBU, IQ2000BF_INSN_WBU, IQ2000BF_SFMT_SYSCALL },
{ IQ2000_INSN_WBR1, IQ2000BF_INSN_WBR1, IQ2000BF_SFMT_SYSCALL },
{ IQ2000_INSN_WBR1U, IQ2000BF_INSN_WBR1U, IQ2000BF_SFMT_SYSCALL },
{ IQ2000_INSN_WBR30, IQ2000BF_INSN_WBR30, IQ2000BF_SFMT_SYSCALL },
{ IQ2000_INSN_WBR30U, IQ2000BF_INSN_WBR30U, IQ2000BF_SFMT_SYSCALL },
{ IQ2000_INSN_WX, IQ2000BF_INSN_WX, IQ2000BF_SFMT_SYSCALL },
{ IQ2000_INSN_WXU, IQ2000BF_INSN_WXU, IQ2000BF_SFMT_SYSCALL },
{ IQ2000_INSN_WXR1, IQ2000BF_INSN_WXR1, IQ2000BF_SFMT_SYSCALL },
{ IQ2000_INSN_WXR1U, IQ2000BF_INSN_WXR1U, IQ2000BF_SFMT_SYSCALL },
{ IQ2000_INSN_WXR30, IQ2000BF_INSN_WXR30, IQ2000BF_SFMT_SYSCALL },
{ IQ2000_INSN_WXR30U, IQ2000BF_INSN_WXR30U, IQ2000BF_SFMT_SYSCALL },
{ IQ2000_INSN_LDW, IQ2000BF_INSN_LDW, IQ2000BF_SFMT_LDW },
{ IQ2000_INSN_SDW, IQ2000BF_INSN_SDW, IQ2000BF_SFMT_SDW },
{ IQ2000_INSN_J, IQ2000BF_INSN_J, IQ2000BF_SFMT_J },
{ IQ2000_INSN_JAL, IQ2000BF_INSN_JAL, IQ2000BF_SFMT_JAL },
{ IQ2000_INSN_BMB, IQ2000BF_INSN_BMB, IQ2000BF_SFMT_BBV },
};
static const struct insn_sem iq2000bf_insn_sem_invalid = {
VIRTUAL_INSN_X_INVALID, IQ2000BF_INSN_X_INVALID, IQ2000BF_SFMT_EMPTY
};
/* Initialize an IDESC from the compile-time computable parts. */
static INLINE void
init_idesc (SIM_CPU *cpu, IDESC *id, const struct insn_sem *t)
{
const CGEN_INSN *insn_table = CGEN_CPU_INSN_TABLE (CPU_CPU_DESC (cpu))->init_entries;
id->num = t->index;
id->sfmt = t->sfmt;
if ((int) t->type <= 0)
id->idata = & cgen_virtual_insn_table[- (int) t->type];
else
id->idata = & insn_table[t->type];
id->attrs = CGEN_INSN_ATTRS (id->idata);
/* Oh my god, a magic number. */
id->length = CGEN_INSN_BITSIZE (id->idata) / 8;
#if WITH_PROFILE_MODEL_P
id->timing = & MODEL_TIMING (CPU_MODEL (cpu)) [t->index];
{
SIM_DESC sd = CPU_STATE (cpu);
SIM_ASSERT (t->index == id->timing->num);
}
#endif
/* Semantic pointers are initialized elsewhere. */
}
/* Initialize the instruction descriptor table. */
void
iq2000bf_init_idesc_table (SIM_CPU *cpu)
{
IDESC *id,*tabend;
const struct insn_sem *t,*tend;
int tabsize = sizeof (iq2000bf_insn_data) / sizeof (IDESC);
IDESC *table = iq2000bf_insn_data;
memset (table, 0, tabsize * sizeof (IDESC));
/* First set all entries to the `invalid insn'. */
t = & iq2000bf_insn_sem_invalid;
for (id = table, tabend = table + tabsize; id < tabend; ++id)
init_idesc (cpu, id, t);
/* Now fill in the values for the chosen cpu. */
for (t = iq2000bf_insn_sem, tend = t + sizeof (iq2000bf_insn_sem) / sizeof (*t);
t != tend; ++t)
{
init_idesc (cpu, & table[t->index], t);
}
/* Link the IDESC table into the cpu. */
CPU_IDESC (cpu) = table;
}
/* Given an instruction, return a pointer to its IDESC entry. */
const IDESC *
iq2000bf_decode (SIM_CPU *current_cpu, IADDR pc,
CGEN_INSN_INT base_insn, CGEN_INSN_INT entire_insn,
ARGBUF *abuf)
{
/* Result of decoder. */
IQ2000BF_INSN_TYPE itype;
{
CGEN_INSN_INT insn = base_insn;
{
unsigned int val = (((insn >> 26) & (63 << 0)));
switch (val)
{
case 0 :
{
unsigned int val = (((insn >> 1) & (1 << 4)) | ((insn >> 0) & (15 << 0)));
switch (val)
{
case 0 : itype = IQ2000BF_INSN_SLL;goto extract_sfmt_sll;
case 1 : itype = IQ2000BF_INSN_SLMV;goto extract_sfmt_slmv;
case 2 : itype = IQ2000BF_INSN_SRL;goto extract_sfmt_sll;
case 3 : itype = IQ2000BF_INSN_SRA;goto extract_sfmt_sll;
case 4 : itype = IQ2000BF_INSN_SLLV;goto extract_sfmt_add;
case 5 : itype = IQ2000BF_INSN_SRMV;goto extract_sfmt_slmv;
case 6 : itype = IQ2000BF_INSN_SRLV;goto extract_sfmt_add;
case 7 : itype = IQ2000BF_INSN_SRAV;goto extract_sfmt_add;
case 8 : itype = IQ2000BF_INSN_JR;goto extract_sfmt_jr;
case 9 : itype = IQ2000BF_INSN_JALR;goto extract_sfmt_jalr;
case 10 : itype = IQ2000BF_INSN_JCR;goto extract_sfmt_bctxt;
case 12 : itype = IQ2000BF_INSN_SYSCALL;goto extract_sfmt_syscall;
case 13 : itype = IQ2000BF_INSN_BREAK;goto extract_sfmt_break;
case 14 : itype = IQ2000BF_INSN_SLEEP;goto extract_sfmt_syscall;
case 16 : itype = IQ2000BF_INSN_ADD;goto extract_sfmt_add;
case 17 : itype = IQ2000BF_INSN_ADDU;goto extract_sfmt_add;
case 18 : itype = IQ2000BF_INSN_SUB;goto extract_sfmt_add;
case 19 : itype = IQ2000BF_INSN_SUBU;goto extract_sfmt_add;
case 20 : itype = IQ2000BF_INSN_AND;goto extract_sfmt_add;
case 21 : itype = IQ2000BF_INSN_OR;goto extract_sfmt_add;
case 22 : itype = IQ2000BF_INSN_XOR;goto extract_sfmt_add;
case 23 : itype = IQ2000BF_INSN_NOR;goto extract_sfmt_add;
case 25 : itype = IQ2000BF_INSN_ADO16;goto extract_sfmt_ado16;
case 26 : itype = IQ2000BF_INSN_SLT;goto extract_sfmt_slt;
case 27 : itype = IQ2000BF_INSN_SLTU;goto extract_sfmt_slt;
case 29 : itype = IQ2000BF_INSN_MRGB;goto extract_sfmt_mrgb;
default : itype = IQ2000BF_INSN_X_INVALID; goto extract_sfmt_empty;
}
}
case 1 :
{
unsigned int val = (((insn >> 17) & (1 << 3)) | ((insn >> 16) & (7 << 0)));
switch (val)
{
case 0 : itype = IQ2000BF_INSN_BLTZ;goto extract_sfmt_bgez;
case 1 : itype = IQ2000BF_INSN_BGEZ;goto extract_sfmt_bgez;
case 2 : itype = IQ2000BF_INSN_BLTZL;goto extract_sfmt_bgez;
case 3 : itype = IQ2000BF_INSN_BGEZL;goto extract_sfmt_bgez;
case 6 : itype = IQ2000BF_INSN_BCTXT;goto extract_sfmt_bctxt;
case 8 : itype = IQ2000BF_INSN_BLTZAL;goto extract_sfmt_bgezal;
case 9 : itype = IQ2000BF_INSN_BGEZAL;goto extract_sfmt_bgezal;
case 10 : itype = IQ2000BF_INSN_BLTZALL;goto extract_sfmt_bgezal;
case 11 : itype = IQ2000BF_INSN_BGEZALL;goto extract_sfmt_bgezal;
default : itype = IQ2000BF_INSN_X_INVALID; goto extract_sfmt_empty;
}
}
case 2 : itype = IQ2000BF_INSN_J;goto extract_sfmt_j;
case 3 : itype = IQ2000BF_INSN_JAL;goto extract_sfmt_jal;
case 4 : itype = IQ2000BF_INSN_BEQ;goto extract_sfmt_bbv;
case 5 : itype = IQ2000BF_INSN_BNE;goto extract_sfmt_bbv;
case 6 : itype = IQ2000BF_INSN_BLEZ;goto extract_sfmt_bgez;
case 7 : itype = IQ2000BF_INSN_BGTZ;goto extract_sfmt_bgez;
case 8 : itype = IQ2000BF_INSN_ADDI;goto extract_sfmt_addi;
case 9 : itype = IQ2000BF_INSN_ADDIU;goto extract_sfmt_addi;
case 10 : itype = IQ2000BF_INSN_SLTI;goto extract_sfmt_slti;
case 11 : itype = IQ2000BF_INSN_SLTIU;goto extract_sfmt_slti;
case 12 : itype = IQ2000BF_INSN_ANDI;goto extract_sfmt_addi;
case 13 : itype = IQ2000BF_INSN_ORI;goto extract_sfmt_addi;
case 14 : itype = IQ2000BF_INSN_XORI;goto extract_sfmt_addi;
case 15 : itype = IQ2000BF_INSN_LUI;goto extract_sfmt_lui;
case 16 :
{
unsigned int val = (((insn >> 19) & (15 << 3)) | ((insn >> 15) & (3 << 1)) | ((insn >> 4) & (1 << 0)));
switch (val)
{
case 0 : /* fall through */
case 2 : /* fall through */
case 4 : /* fall through */
case 6 : itype = IQ2000BF_INSN_MFC0;goto extract_sfmt_syscall;
case 8 : /* fall through */
case 10 : /* fall through */
case 12 : /* fall through */
case 14 : itype = IQ2000BF_INSN_CFC0;goto extract_sfmt_syscall;
case 16 : /* fall through */
case 18 : /* fall through */
case 20 : /* fall through */
case 22 : itype = IQ2000BF_INSN_MTC0;goto extract_sfmt_syscall;
case 24 : /* fall through */
case 26 : /* fall through */
case 28 : /* fall through */
case 30 : itype = IQ2000BF_INSN_CTC0;goto extract_sfmt_syscall;
case 32 : /* fall through */
case 33 : itype = IQ2000BF_INSN_BC0F;goto extract_sfmt_bctxt;
case 34 : /* fall through */
case 35 : itype = IQ2000BF_INSN_BC0T;goto extract_sfmt_bctxt;
case 36 : /* fall through */
case 37 : itype = IQ2000BF_INSN_BC0FL;goto extract_sfmt_bctxt;
case 38 : /* fall through */
case 39 : itype = IQ2000BF_INSN_BC0TL;goto extract_sfmt_bctxt;
case 65 : itype = IQ2000BF_INSN_RFE;goto extract_sfmt_syscall;
default : itype = IQ2000BF_INSN_X_INVALID; goto extract_sfmt_empty;
}
}
case 17 :
{
unsigned int val = (((insn >> 22) & (3 << 0)));
switch (val)
{
case 0 : itype = IQ2000BF_INSN_MFC1;goto extract_sfmt_syscall;
case 1 : itype = IQ2000BF_INSN_CFC1;goto extract_sfmt_syscall;
case 2 : itype = IQ2000BF_INSN_MTC1;goto extract_sfmt_syscall;
case 3 : itype = IQ2000BF_INSN_CTC1;goto extract_sfmt_syscall;
default : itype = IQ2000BF_INSN_X_INVALID; goto extract_sfmt_empty;
}
}
case 18 :
{
unsigned int val = (((insn >> 16) & (3 << 5)) | ((insn >> 0) & (31 << 0)));
switch (val)
{
case 0 :
{
unsigned int val = (((insn >> 23) & (1 << 0)));
switch (val)
{
case 0 : itype = IQ2000BF_INSN_MFC2;goto extract_sfmt_syscall;
case 1 : itype = IQ2000BF_INSN_MTC2;goto extract_sfmt_syscall;
default : itype = IQ2000BF_INSN_X_INVALID; goto extract_sfmt_empty;
}
}
case 32 : itype = IQ2000BF_INSN_LUULCK;goto extract_sfmt_syscall;
case 33 : itype = IQ2000BF_INSN_LUR;goto extract_sfmt_syscall;
case 34 : itype = IQ2000BF_INSN_LUM32;goto extract_sfmt_syscall;
case 35 : itype = IQ2000BF_INSN_LUC32;goto extract_sfmt_syscall;
case 36 : itype = IQ2000BF_INSN_LULCK;goto extract_sfmt_syscall;
case 37 : itype = IQ2000BF_INSN_LURL;goto extract_sfmt_syscall;
case 38 : itype = IQ2000BF_INSN_LUM32L;goto extract_sfmt_syscall;
case 39 : itype = IQ2000BF_INSN_LUC32L;goto extract_sfmt_syscall;
case 40 : itype = IQ2000BF_INSN_LUK;goto extract_sfmt_syscall;
case 42 : itype = IQ2000BF_INSN_LUM64;goto extract_sfmt_syscall;
case 43 : itype = IQ2000BF_INSN_LUC64;goto extract_sfmt_syscall;
case 46 : itype = IQ2000BF_INSN_LUM64L;goto extract_sfmt_syscall;
case 47 : itype = IQ2000BF_INSN_LUC64L;goto extract_sfmt_syscall;
case 48 : itype = IQ2000BF_INSN_SRRD;goto extract_sfmt_syscall;
case 49 : itype = IQ2000BF_INSN_SRWR;goto extract_sfmt_syscall;
case 52 : itype = IQ2000BF_INSN_SRRDL;goto extract_sfmt_syscall;
case 53 : itype = IQ2000BF_INSN_SRWRU;goto extract_sfmt_syscall;
case 54 : itype = IQ2000BF_INSN_SRULCK;goto extract_sfmt_syscall;
case 64 :
{
unsigned int val = (((insn >> 23) & (1 << 0)));
switch (val)
{
case 0 : itype = IQ2000BF_INSN_CFC2;goto extract_sfmt_syscall;
case 1 : itype = IQ2000BF_INSN_CTC2;goto extract_sfmt_syscall;
default : itype = IQ2000BF_INSN_X_INVALID; goto extract_sfmt_empty;
}
}
default : itype = IQ2000BF_INSN_X_INVALID; goto extract_sfmt_empty;
}
}
case 19 :
{
unsigned int val = (((insn >> 19) & (31 << 2)) | ((insn >> 0) & (3 << 0)));
switch (val)
{
case 0 : itype = IQ2000BF_INSN_MFC3;goto extract_sfmt_syscall;
case 4 :
{
unsigned int val = (((insn >> 2) & (3 << 0)));
switch (val)
{
case 0 : itype = IQ2000BF_INSN_WB;goto extract_sfmt_syscall;
case 1 : itype = IQ2000BF_INSN_RB;goto extract_sfmt_syscall;
case 2 : itype = IQ2000BF_INSN_TRAPQFL;goto extract_sfmt_syscall;
default : itype = IQ2000BF_INSN_X_INVALID; goto extract_sfmt_empty;
}
}
case 5 :
{
unsigned int val = (((insn >> 3) & (1 << 0)));
switch (val)
{
case 0 : itype = IQ2000BF_INSN_WBU;goto extract_sfmt_syscall;
case 1 : itype = IQ2000BF_INSN_TRAPQNE;goto extract_sfmt_syscall;
default : itype = IQ2000BF_INSN_X_INVALID; goto extract_sfmt_empty;
}
}
case 6 :
{
unsigned int val = (((insn >> 2) & (3 << 0)));
switch (val)
{
case 0 : itype = IQ2000BF_INSN_WX;goto extract_sfmt_syscall;
case 1 : itype = IQ2000BF_INSN_RX;goto extract_sfmt_syscall;
case 2 : itype = IQ2000BF_INSN_TRAPREL;goto extract_sfmt_syscall;
default : itype = IQ2000BF_INSN_X_INVALID; goto extract_sfmt_empty;
}
}
case 7 :
{
unsigned int val = (((insn >> 2) & (1 << 0)));
switch (val)
{
case 0 : itype = IQ2000BF_INSN_WXU;goto extract_sfmt_syscall;
case 1 : itype = IQ2000BF_INSN_PKRL;goto extract_sfmt_syscall;
default : itype = IQ2000BF_INSN_X_INVALID; goto extract_sfmt_empty;
}
}
case 8 : itype = IQ2000BF_INSN_CFC3;goto extract_sfmt_syscall;
case 16 : itype = IQ2000BF_INSN_MTC3;goto extract_sfmt_syscall;
case 24 : itype = IQ2000BF_INSN_CTC3;goto extract_sfmt_syscall;
case 32 : /* fall through */
case 33 : /* fall through */
case 34 : /* fall through */
case 35 :
{
unsigned int val = (((insn >> 16) & (3 << 0)));
switch (val)
{
case 0 : itype = IQ2000BF_INSN_BC3F;goto extract_sfmt_bctxt;
case 1 : itype = IQ2000BF_INSN_BC3T;goto extract_sfmt_bctxt;
case 2 : itype = IQ2000BF_INSN_BC3FL;goto extract_sfmt_bctxt;
case 3 : itype = IQ2000BF_INSN_BC3TL;goto extract_sfmt_bctxt;
default : itype = IQ2000BF_INSN_X_INVALID; goto extract_sfmt_empty;
}
}
case 36 : itype = IQ2000BF_INSN_CHKHDR;goto extract_sfmt_syscall;
case 64 : /* fall through */
case 65 : /* fall through */
case 66 : /* fall through */
case 67 : itype = IQ2000BF_INSN_WBR1;goto extract_sfmt_syscall;
case 68 : /* fall through */
case 69 : /* fall through */
case 70 : /* fall through */
case 71 : itype = IQ2000BF_INSN_WBR1U;goto extract_sfmt_syscall;
case 72 : /* fall through */
case 73 : /* fall through */
case 74 : /* fall through */
case 75 : itype = IQ2000BF_INSN_WBR30;goto extract_sfmt_syscall;
case 76 : /* fall through */
case 77 : /* fall through */
case 78 : /* fall through */
case 79 : itype = IQ2000BF_INSN_WBR30U;goto extract_sfmt_syscall;
case 80 : /* fall through */
case 81 : /* fall through */
case 82 : /* fall through */
case 83 : itype = IQ2000BF_INSN_WXR1;goto extract_sfmt_syscall;
case 84 : /* fall through */
case 85 : /* fall through */
case 86 : /* fall through */
case 87 : itype = IQ2000BF_INSN_WXR1U;goto extract_sfmt_syscall;
case 88 : /* fall through */
case 89 : /* fall through */
case 90 : /* fall through */
case 91 : itype = IQ2000BF_INSN_WXR30;goto extract_sfmt_syscall;
case 92 : /* fall through */
case 93 : /* fall through */
case 94 : /* fall through */
case 95 : itype = IQ2000BF_INSN_WXR30U;goto extract_sfmt_syscall;
case 96 : /* fall through */
case 97 : /* fall through */
case 98 : /* fall through */
case 99 : itype = IQ2000BF_INSN_RBR1;goto extract_sfmt_syscall;
case 104 : /* fall through */
case 105 : /* fall through */
case 106 : /* fall through */
case 107 : itype = IQ2000BF_INSN_RBR30;goto extract_sfmt_syscall;
case 112 : /* fall through */
case 113 : /* fall through */
case 114 : /* fall through */
case 115 : itype = IQ2000BF_INSN_RXR1;goto extract_sfmt_syscall;
case 116 : /* fall through */
case 117 : /* fall through */
case 118 : /* fall through */
case 119 : itype = IQ2000BF_INSN_PKRLR1;goto extract_sfmt_syscall;
case 120 : /* fall through */
case 121 : /* fall through */
case 122 : /* fall through */
case 123 : itype = IQ2000BF_INSN_RXR30;goto extract_sfmt_syscall;
case 124 : /* fall through */
case 125 : /* fall through */
case 126 : /* fall through */
case 127 : itype = IQ2000BF_INSN_PKRLR30;goto extract_sfmt_syscall;
default : itype = IQ2000BF_INSN_X_INVALID; goto extract_sfmt_empty;
}
}
case 20 : itype = IQ2000BF_INSN_BEQL;goto extract_sfmt_bbv;
case 21 : itype = IQ2000BF_INSN_BNEL;goto extract_sfmt_bbv;
case 22 : itype = IQ2000BF_INSN_BLEZL;goto extract_sfmt_bgez;
case 23 : itype = IQ2000BF_INSN_BGTZL;goto extract_sfmt_bgez;
case 24 : itype = IQ2000BF_INSN_BMB0;goto extract_sfmt_bbv;
case 25 : itype = IQ2000BF_INSN_BMB1;goto extract_sfmt_bbv;
case 26 : itype = IQ2000BF_INSN_BMB2;goto extract_sfmt_bbv;
case 27 : itype = IQ2000BF_INSN_BMB3;goto extract_sfmt_bbv;
case 28 : itype = IQ2000BF_INSN_BBI;goto extract_sfmt_bbi;
case 29 : itype = IQ2000BF_INSN_BBV;goto extract_sfmt_bbv;
case 30 : itype = IQ2000BF_INSN_BBIN;goto extract_sfmt_bbi;
case 31 : itype = IQ2000BF_INSN_BBVN;goto extract_sfmt_bbv;
case 32 : itype = IQ2000BF_INSN_LB;goto extract_sfmt_lb;
case 33 : itype = IQ2000BF_INSN_LH;goto extract_sfmt_lh;
case 35 : itype = IQ2000BF_INSN_LW;goto extract_sfmt_lw;
case 36 : itype = IQ2000BF_INSN_LBU;goto extract_sfmt_lb;
case 37 : itype = IQ2000BF_INSN_LHU;goto extract_sfmt_lh;
case 39 : itype = IQ2000BF_INSN_RAM;goto extract_sfmt_ram;
case 40 : itype = IQ2000BF_INSN_SB;goto extract_sfmt_sb;
case 41 : itype = IQ2000BF_INSN_SH;goto extract_sfmt_sh;
case 43 : itype = IQ2000BF_INSN_SW;goto extract_sfmt_sw;
case 44 : itype = IQ2000BF_INSN_ANDOI;goto extract_sfmt_addi;
case 45 : itype = IQ2000BF_INSN_BMB;goto extract_sfmt_bbv;
case 47 : itype = IQ2000BF_INSN_ORUI;goto extract_sfmt_andoui;
case 48 : itype = IQ2000BF_INSN_LDW;goto extract_sfmt_ldw;
case 56 : itype = IQ2000BF_INSN_SDW;goto extract_sfmt_sdw;
case 63 : itype = IQ2000BF_INSN_ANDOUI;goto extract_sfmt_andoui;
default : itype = IQ2000BF_INSN_X_INVALID; goto extract_sfmt_empty;
}
}
}
/* The instruction has been decoded, now extract the fields. */
extract_sfmt_empty:
{
const IDESC *idesc = &iq2000bf_insn_data[itype];
#define FLD(f) abuf->fields.fmt_empty.f
/* Record the fields for the semantic handler. */
TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_empty", (char *) 0));
#undef FLD
return idesc;
}
extract_sfmt_add:
{
const IDESC *idesc = &iq2000bf_insn_data[itype];
CGEN_INSN_INT insn = entire_insn;
#define FLD(f) abuf->fields.sfmt_mrgb.f
UINT f_rs;
UINT f_rt;
UINT f_rd;
f_rs = EXTRACT_LSB0_UINT (insn, 32, 25, 5);
f_rt = EXTRACT_LSB0_UINT (insn, 32, 20, 5);
f_rd = EXTRACT_LSB0_UINT (insn, 32, 15, 5);
/* Record the fields for the semantic handler. */
FLD (f_rs) = f_rs;
FLD (f_rt) = f_rt;
FLD (f_rd) = f_rd;
TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_add", "f_rs 0x%x", 'x', f_rs, "f_rt 0x%x", 'x', f_rt, "f_rd 0x%x", 'x', f_rd, (char *) 0));
#undef FLD
return idesc;
}
extract_sfmt_addi:
{
const IDESC *idesc = &iq2000bf_insn_data[itype];
CGEN_INSN_INT insn = entire_insn;
#define FLD(f) abuf->fields.sfmt_addi.f
UINT f_rs;
UINT f_rt;
UINT f_imm;
f_rs = EXTRACT_LSB0_UINT (insn, 32, 25, 5);
f_rt = EXTRACT_LSB0_UINT (insn, 32, 20, 5);
f_imm = EXTRACT_LSB0_UINT (insn, 32, 15, 16);
/* Record the fields for the semantic handler. */
FLD (f_imm) = f_imm;
FLD (f_rs) = f_rs;
FLD (f_rt) = f_rt;
TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_addi", "f_imm 0x%x", 'x', f_imm, "f_rs 0x%x", 'x', f_rs, "f_rt 0x%x", 'x', f_rt, (char *) 0));
#undef FLD
return idesc;
}
extract_sfmt_ado16:
{
const IDESC *idesc = &iq2000bf_insn_data[itype];
CGEN_INSN_INT insn = entire_insn;
#define FLD(f) abuf->fields.sfmt_mrgb.f
UINT f_rs;
UINT f_rt;
UINT f_rd;
f_rs = EXTRACT_LSB0_UINT (insn, 32, 25, 5);
f_rt = EXTRACT_LSB0_UINT (insn, 32, 20, 5);
f_rd = EXTRACT_LSB0_UINT (insn, 32, 15, 5);
/* Record the fields for the semantic handler. */
FLD (f_rs) = f_rs;
FLD (f_rt) = f_rt;
FLD (f_rd) = f_rd;
TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_ado16", "f_rs 0x%x", 'x', f_rs, "f_rt 0x%x", 'x', f_rt, "f_rd 0x%x", 'x', f_rd, (char *) 0));
#undef FLD
return idesc;
}
extract_sfmt_ram:
{
const IDESC *idesc = &iq2000bf_insn_data[itype];
CGEN_INSN_INT insn = entire_insn;
#define FLD(f) abuf->fields.sfmt_ram.f
UINT f_rs;
UINT f_rt;
UINT f_rd;
UINT f_shamt;
UINT f_maskl;
f_rs = EXTRACT_LSB0_UINT (insn, 32, 25, 5);
f_rt = EXTRACT_LSB0_UINT (insn, 32, 20, 5);
f_rd = EXTRACT_LSB0_UINT (insn, 32, 15, 5);
f_shamt = EXTRACT_LSB0_UINT (insn, 32, 10, 5);
f_maskl = EXTRACT_LSB0_UINT (insn, 32, 4, 5);
/* Record the fields for the semantic handler. */
FLD (f_maskl) = f_maskl;
FLD (f_rs) = f_rs;
FLD (f_rd) = f_rd;
FLD (f_rt) = f_rt;
FLD (f_shamt) = f_shamt;
TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_ram", "f_maskl 0x%x", 'x', f_maskl, "f_rs 0x%x", 'x', f_rs, "f_rd 0x%x", 'x', f_rd, "f_rt 0x%x", 'x', f_rt, "f_shamt 0x%x", 'x', f_shamt, (char *) 0));
#undef FLD
return idesc;
}
extract_sfmt_sll:
{
const IDESC *idesc = &iq2000bf_insn_data[itype];
CGEN_INSN_INT insn = entire_insn;
#define FLD(f) abuf->fields.sfmt_ram.f
UINT f_rt;
UINT f_rd;
UINT f_shamt;
f_rt = EXTRACT_LSB0_UINT (insn, 32, 20, 5);
f_rd = EXTRACT_LSB0_UINT (insn, 32, 15, 5);
f_shamt = EXTRACT_LSB0_UINT (insn, 32, 10, 5);
/* Record the fields for the semantic handler. */
FLD (f_rt) = f_rt;
FLD (f_shamt) = f_shamt;
FLD (f_rd) = f_rd;
TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_sll", "f_rt 0x%x", 'x', f_rt, "f_shamt 0x%x", 'x', f_shamt, "f_rd 0x%x", 'x', f_rd, (char *) 0));
#undef FLD
return idesc;
}
extract_sfmt_slmv:
{
const IDESC *idesc = &iq2000bf_insn_data[itype];
CGEN_INSN_INT insn = entire_insn;
#define FLD(f) abuf->fields.sfmt_ram.f
UINT f_rs;
UINT f_rt;
UINT f_rd;
UINT f_shamt;
f_rs = EXTRACT_LSB0_UINT (insn, 32, 25, 5);
f_rt = EXTRACT_LSB0_UINT (insn, 32, 20, 5);
f_rd = EXTRACT_LSB0_UINT (insn, 32, 15, 5);
f_shamt = EXTRACT_LSB0_UINT (insn, 32, 10, 5);
/* Record the fields for the semantic handler. */
FLD (f_rs) = f_rs;
FLD (f_rt) = f_rt;
FLD (f_shamt) = f_shamt;
FLD (f_rd) = f_rd;
TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_slmv", "f_rs 0x%x", 'x', f_rs, "f_rt 0x%x", 'x', f_rt, "f_shamt 0x%x", 'x', f_shamt, "f_rd 0x%x", 'x', f_rd, (char *) 0));
#undef FLD
return idesc;
}
extract_sfmt_slt:
{
const IDESC *idesc = &iq2000bf_insn_data[itype];
CGEN_INSN_INT insn = entire_insn;
#define FLD(f) abuf->fields.sfmt_mrgb.f
UINT f_rs;
UINT f_rt;
UINT f_rd;
f_rs = EXTRACT_LSB0_UINT (insn, 32, 25, 5);
f_rt = EXTRACT_LSB0_UINT (insn, 32, 20, 5);
f_rd = EXTRACT_LSB0_UINT (insn, 32, 15, 5);
/* Record the fields for the semantic handler. */
FLD (f_rs) = f_rs;
FLD (f_rt) = f_rt;
FLD (f_rd) = f_rd;
TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_slt", "f_rs 0x%x", 'x', f_rs, "f_rt 0x%x", 'x', f_rt, "f_rd 0x%x", 'x', f_rd, (char *) 0));
#undef FLD
return idesc;
}
extract_sfmt_slti:
{
const IDESC *idesc = &iq2000bf_insn_data[itype];
CGEN_INSN_INT insn = entire_insn;
#define FLD(f) abuf->fields.sfmt_addi.f
UINT f_rs;
UINT f_rt;
UINT f_imm;
f_rs = EXTRACT_LSB0_UINT (insn, 32, 25, 5);
f_rt = EXTRACT_LSB0_UINT (insn, 32, 20, 5);
f_imm = EXTRACT_LSB0_UINT (insn, 32, 15, 16);
/* Record the fields for the semantic handler. */
FLD (f_imm) = f_imm;
FLD (f_rs) = f_rs;
FLD (f_rt) = f_rt;
TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_slti", "f_imm 0x%x", 'x', f_imm, "f_rs 0x%x", 'x', f_rs, "f_rt 0x%x", 'x', f_rt, (char *) 0));
#undef FLD
return idesc;
}
extract_sfmt_bbi:
{
const IDESC *idesc = &iq2000bf_insn_data[itype];
CGEN_INSN_INT insn = entire_insn;
#define FLD(f) abuf->fields.sfmt_bbi.f
UINT f_rs;
UINT f_rt;
SI f_offset;
f_rs = EXTRACT_LSB0_UINT (insn, 32, 25, 5);
f_rt = EXTRACT_LSB0_UINT (insn, 32, 20, 5);
f_offset = ((((EXTRACT_LSB0_INT (insn, 32, 15, 16)) << (2))) + (((pc) + (4))));
/* Record the fields for the semantic handler. */
FLD (f_rt) = f_rt;
FLD (f_rs) = f_rs;
FLD (i_offset) = f_offset;
TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_bbi", "f_rt 0x%x", 'x', f_rt, "f_rs 0x%x", 'x', f_rs, "offset 0x%x", 'x', f_offset, (char *) 0));
#if WITH_PROFILE_MODEL_P
/* Record the fields for profiling. */
if (PROFILE_MODEL_P (current_cpu))
{
}
#endif
#undef FLD
return idesc;
}
extract_sfmt_bbv:
{
const IDESC *idesc = &iq2000bf_insn_data[itype];
CGEN_INSN_INT insn = entire_insn;
#define FLD(f) abuf->fields.sfmt_bbi.f
UINT f_rs;
UINT f_rt;
SI f_offset;
f_rs = EXTRACT_LSB0_UINT (insn, 32, 25, 5);
f_rt = EXTRACT_LSB0_UINT (insn, 32, 20, 5);
f_offset = ((((EXTRACT_LSB0_INT (insn, 32, 15, 16)) << (2))) + (((pc) + (4))));
/* Record the fields for the semantic handler. */
FLD (f_rs) = f_rs;
FLD (f_rt) = f_rt;
FLD (i_offset) = f_offset;
TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_bbv", "f_rs 0x%x", 'x', f_rs, "f_rt 0x%x", 'x', f_rt, "offset 0x%x", 'x', f_offset, (char *) 0));
#if WITH_PROFILE_MODEL_P
/* Record the fields for profiling. */
if (PROFILE_MODEL_P (current_cpu))
{
}
#endif
#undef FLD
return idesc;
}
extract_sfmt_bgez:
{
const IDESC *idesc = &iq2000bf_insn_data[itype];
CGEN_INSN_INT insn = entire_insn;
#define FLD(f) abuf->fields.sfmt_bbi.f
UINT f_rs;
SI f_offset;
f_rs = EXTRACT_LSB0_UINT (insn, 32, 25, 5);
f_offset = ((((EXTRACT_LSB0_INT (insn, 32, 15, 16)) << (2))) + (((pc) + (4))));
/* Record the fields for the semantic handler. */
FLD (f_rs) = f_rs;
FLD (i_offset) = f_offset;
TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_bgez", "f_rs 0x%x", 'x', f_rs, "offset 0x%x", 'x', f_offset, (char *) 0));
#if WITH_PROFILE_MODEL_P
/* Record the fields for profiling. */
if (PROFILE_MODEL_P (current_cpu))
{
}
#endif
#undef FLD
return idesc;
}
extract_sfmt_bgezal:
{
const IDESC *idesc = &iq2000bf_insn_data[itype];
CGEN_INSN_INT insn = entire_insn;
#define FLD(f) abuf->fields.sfmt_bbi.f
UINT f_rs;
SI f_offset;
f_rs = EXTRACT_LSB0_UINT (insn, 32, 25, 5);
f_offset = ((((EXTRACT_LSB0_INT (insn, 32, 15, 16)) << (2))) + (((pc) + (4))));
/* Record the fields for the semantic handler. */
FLD (f_rs) = f_rs;
FLD (i_offset) = f_offset;
TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_bgezal", "f_rs 0x%x", 'x', f_rs, "offset 0x%x", 'x', f_offset, (char *) 0));
#if WITH_PROFILE_MODEL_P
/* Record the fields for profiling. */
if (PROFILE_MODEL_P (current_cpu))
{
}
#endif
#undef FLD
return idesc;
}
extract_sfmt_jalr:
{
const IDESC *idesc = &iq2000bf_insn_data[itype];
CGEN_INSN_INT insn = entire_insn;
#define FLD(f) abuf->fields.sfmt_mrgb.f
UINT f_rs;
UINT f_rd;
f_rs = EXTRACT_LSB0_UINT (insn, 32, 25, 5);
f_rd = EXTRACT_LSB0_UINT (insn, 32, 15, 5);
/* Record the fields for the semantic handler. */
FLD (f_rs) = f_rs;
FLD (f_rd) = f_rd;
TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_jalr", "f_rs 0x%x", 'x', f_rs, "f_rd 0x%x", 'x', f_rd, (char *) 0));
#if WITH_PROFILE_MODEL_P
/* Record the fields for profiling. */
if (PROFILE_MODEL_P (current_cpu))
{
}
#endif
#undef FLD
return idesc;
}
extract_sfmt_jr:
{
const IDESC *idesc = &iq2000bf_insn_data[itype];
CGEN_INSN_INT insn = entire_insn;
#define FLD(f) abuf->fields.sfmt_bbi.f
UINT f_rs;
f_rs = EXTRACT_LSB0_UINT (insn, 32, 25, 5);
/* Record the fields for the semantic handler. */
FLD (f_rs) = f_rs;
TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_jr", "f_rs 0x%x", 'x', f_rs, (char *) 0));
#if WITH_PROFILE_MODEL_P
/* Record the fields for profiling. */
if (PROFILE_MODEL_P (current_cpu))
{
}
#endif
#undef FLD
return idesc;
}
extract_sfmt_lb:
{
const IDESC *idesc = &iq2000bf_insn_data[itype];
CGEN_INSN_INT insn = entire_insn;
#define FLD(f) abuf->fields.sfmt_addi.f
UINT f_rs;
UINT f_rt;
UINT f_imm;
f_rs = EXTRACT_LSB0_UINT (insn, 32, 25, 5);
f_rt = EXTRACT_LSB0_UINT (insn, 32, 20, 5);
f_imm = EXTRACT_LSB0_UINT (insn, 32, 15, 16);
/* Record the fields for the semantic handler. */
FLD (f_rs) = f_rs;
FLD (f_imm) = f_imm;
FLD (f_rt) = f_rt;
TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_lb", "f_rs 0x%x", 'x', f_rs, "f_imm 0x%x", 'x', f_imm, "f_rt 0x%x", 'x', f_rt, (char *) 0));
#undef FLD
return idesc;
}
extract_sfmt_lh:
{
const IDESC *idesc = &iq2000bf_insn_data[itype];
CGEN_INSN_INT insn = entire_insn;
#define FLD(f) abuf->fields.sfmt_addi.f
UINT f_rs;
UINT f_rt;
UINT f_imm;
f_rs = EXTRACT_LSB0_UINT (insn, 32, 25, 5);
f_rt = EXTRACT_LSB0_UINT (insn, 32, 20, 5);
f_imm = EXTRACT_LSB0_UINT (insn, 32, 15, 16);
/* Record the fields for the semantic handler. */
FLD (f_rs) = f_rs;
FLD (f_imm) = f_imm;
FLD (f_rt) = f_rt;
TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_lh", "f_rs 0x%x", 'x', f_rs, "f_imm 0x%x", 'x', f_imm, "f_rt 0x%x", 'x', f_rt, (char *) 0));
#undef FLD
return idesc;
}
extract_sfmt_lui:
{
const IDESC *idesc = &iq2000bf_insn_data[itype];
CGEN_INSN_INT insn = entire_insn;
#define FLD(f) abuf->fields.sfmt_addi.f
UINT f_rt;
UINT f_imm;
f_rt = EXTRACT_LSB0_UINT (insn, 32, 20, 5);
f_imm = EXTRACT_LSB0_UINT (insn, 32, 15, 16);
/* Record the fields for the semantic handler. */
FLD (f_imm) = f_imm;
FLD (f_rt) = f_rt;
TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_lui", "f_imm 0x%x", 'x', f_imm, "f_rt 0x%x", 'x', f_rt, (char *) 0));
#undef FLD
return idesc;
}
extract_sfmt_lw:
{
const IDESC *idesc = &iq2000bf_insn_data[itype];
CGEN_INSN_INT insn = entire_insn;
#define FLD(f) abuf->fields.sfmt_addi.f
UINT f_rs;
UINT f_rt;
UINT f_imm;
f_rs = EXTRACT_LSB0_UINT (insn, 32, 25, 5);
f_rt = EXTRACT_LSB0_UINT (insn, 32, 20, 5);
f_imm = EXTRACT_LSB0_UINT (insn, 32, 15, 16);
/* Record the fields for the semantic handler. */
FLD (f_rs) = f_rs;
FLD (f_imm) = f_imm;
FLD (f_rt) = f_rt;
TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_lw", "f_rs 0x%x", 'x', f_rs, "f_imm 0x%x", 'x', f_imm, "f_rt 0x%x", 'x', f_rt, (char *) 0));
#undef FLD
return idesc;
}
extract_sfmt_sb:
{
const IDESC *idesc = &iq2000bf_insn_data[itype];
CGEN_INSN_INT insn = entire_insn;
#define FLD(f) abuf->fields.sfmt_addi.f
UINT f_rs;
UINT f_rt;
UINT f_imm;
f_rs = EXTRACT_LSB0_UINT (insn, 32, 25, 5);
f_rt = EXTRACT_LSB0_UINT (insn, 32, 20, 5);
f_imm = EXTRACT_LSB0_UINT (insn, 32, 15, 16);
/* Record the fields for the semantic handler. */
FLD (f_rs) = f_rs;
FLD (f_imm) = f_imm;
FLD (f_rt) = f_rt;
TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_sb", "f_rs 0x%x", 'x', f_rs, "f_imm 0x%x", 'x', f_imm, "f_rt 0x%x", 'x', f_rt, (char *) 0));
#undef FLD
return idesc;
}
extract_sfmt_sh:
{
const IDESC *idesc = &iq2000bf_insn_data[itype];
CGEN_INSN_INT insn = entire_insn;
#define FLD(f) abuf->fields.sfmt_addi.f
UINT f_rs;
UINT f_rt;
UINT f_imm;
f_rs = EXTRACT_LSB0_UINT (insn, 32, 25, 5);
f_rt = EXTRACT_LSB0_UINT (insn, 32, 20, 5);
f_imm = EXTRACT_LSB0_UINT (insn, 32, 15, 16);
/* Record the fields for the semantic handler. */
FLD (f_rs) = f_rs;
FLD (f_imm) = f_imm;
FLD (f_rt) = f_rt;
TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_sh", "f_rs 0x%x", 'x', f_rs, "f_imm 0x%x", 'x', f_imm, "f_rt 0x%x", 'x', f_rt, (char *) 0));
#undef FLD
return idesc;
}
extract_sfmt_sw:
{
const IDESC *idesc = &iq2000bf_insn_data[itype];
CGEN_INSN_INT insn = entire_insn;
#define FLD(f) abuf->fields.sfmt_addi.f
UINT f_rs;
UINT f_rt;
UINT f_imm;
f_rs = EXTRACT_LSB0_UINT (insn, 32, 25, 5);
f_rt = EXTRACT_LSB0_UINT (insn, 32, 20, 5);
f_imm = EXTRACT_LSB0_UINT (insn, 32, 15, 16);
/* Record the fields for the semantic handler. */
FLD (f_rs) = f_rs;
FLD (f_imm) = f_imm;
FLD (f_rt) = f_rt;
TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_sw", "f_rs 0x%x", 'x', f_rs, "f_imm 0x%x", 'x', f_imm, "f_rt 0x%x", 'x', f_rt, (char *) 0));
#undef FLD
return idesc;
}
extract_sfmt_break:
{
const IDESC *idesc = &iq2000bf_insn_data[itype];
#define FLD(f) abuf->fields.fmt_empty.f
/* Record the fields for the semantic handler. */
TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_break", (char *) 0));
#if WITH_PROFILE_MODEL_P
/* Record the fields for profiling. */
if (PROFILE_MODEL_P (current_cpu))
{
}
#endif
#undef FLD
return idesc;
}
extract_sfmt_syscall:
{
const IDESC *idesc = &iq2000bf_insn_data[itype];
#define FLD(f) abuf->fields.fmt_empty.f
/* Record the fields for the semantic handler. */
TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_syscall", (char *) 0));
#undef FLD
return idesc;
}
extract_sfmt_andoui:
{
const IDESC *idesc = &iq2000bf_insn_data[itype];
CGEN_INSN_INT insn = entire_insn;
#define FLD(f) abuf->fields.sfmt_addi.f
UINT f_rs;
UINT f_rt;
UINT f_imm;
f_rs = EXTRACT_LSB0_UINT (insn, 32, 25, 5);
f_rt = EXTRACT_LSB0_UINT (insn, 32, 20, 5);
f_imm = EXTRACT_LSB0_UINT (insn, 32, 15, 16);
/* Record the fields for the semantic handler. */
FLD (f_imm) = f_imm;
FLD (f_rs) = f_rs;
FLD (f_rt) = f_rt;
TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_andoui", "f_imm 0x%x", 'x', f_imm, "f_rs 0x%x", 'x', f_rs, "f_rt 0x%x", 'x', f_rt, (char *) 0));
#undef FLD
return idesc;
}
extract_sfmt_mrgb:
{
const IDESC *idesc = &iq2000bf_insn_data[itype];
CGEN_INSN_INT insn = entire_insn;
#define FLD(f) abuf->fields.sfmt_mrgb.f
UINT f_rs;
UINT f_rt;
UINT f_rd;
UINT f_mask;
f_rs = EXTRACT_LSB0_UINT (insn, 32, 25, 5);
f_rt = EXTRACT_LSB0_UINT (insn, 32, 20, 5);
f_rd = EXTRACT_LSB0_UINT (insn, 32, 15, 5);
f_mask = EXTRACT_LSB0_UINT (insn, 32, 9, 4);
/* Record the fields for the semantic handler. */
FLD (f_mask) = f_mask;
FLD (f_rs) = f_rs;
FLD (f_rt) = f_rt;
FLD (f_rd) = f_rd;
TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_mrgb", "f_mask 0x%x", 'x', f_mask, "f_rs 0x%x", 'x', f_rs, "f_rt 0x%x", 'x', f_rt, "f_rd 0x%x", 'x', f_rd, (char *) 0));
#undef FLD
return idesc;
}
extract_sfmt_bctxt:
{
const IDESC *idesc = &iq2000bf_insn_data[itype];
#define FLD(f) abuf->fields.fmt_empty.f
/* Record the fields for the semantic handler. */
TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_bctxt", (char *) 0));
#undef FLD
return idesc;
}
extract_sfmt_ldw:
{
const IDESC *idesc = &iq2000bf_insn_data[itype];
CGEN_INSN_INT insn = entire_insn;
#define FLD(f) abuf->fields.sfmt_addi.f
UINT f_rs;
UINT f_rt;
UINT f_imm;
f_rs = EXTRACT_LSB0_UINT (insn, 32, 25, 5);
f_rt = EXTRACT_LSB0_UINT (insn, 32, 20, 5);
f_imm = EXTRACT_LSB0_UINT (insn, 32, 15, 16);
/* Record the fields for the semantic handler. */
FLD (f_rs) = f_rs;
FLD (f_rt) = f_rt;
FLD (f_imm) = f_imm;
TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_ldw", "f_rs 0x%x", 'x', f_rs, "f_rt 0x%x", 'x', f_rt, "f_imm 0x%x", 'x', f_imm, (char *) 0));
#undef FLD
return idesc;
}
extract_sfmt_sdw:
{
const IDESC *idesc = &iq2000bf_insn_data[itype];
CGEN_INSN_INT insn = entire_insn;
#define FLD(f) abuf->fields.sfmt_addi.f
UINT f_rs;
UINT f_rt;
UINT f_imm;
f_rs = EXTRACT_LSB0_UINT (insn, 32, 25, 5);
f_rt = EXTRACT_LSB0_UINT (insn, 32, 20, 5);
f_imm = EXTRACT_LSB0_UINT (insn, 32, 15, 16);
/* Record the fields for the semantic handler. */
FLD (f_rs) = f_rs;
FLD (f_rt) = f_rt;
FLD (f_imm) = f_imm;
TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_sdw", "f_rs 0x%x", 'x', f_rs, "f_rt 0x%x", 'x', f_rt, "f_imm 0x%x", 'x', f_imm, (char *) 0));
#undef FLD
return idesc;
}
extract_sfmt_j:
{
const IDESC *idesc = &iq2000bf_insn_data[itype];
CGEN_INSN_INT insn = entire_insn;
#define FLD(f) abuf->fields.sfmt_j.f
USI f_jtarg;
f_jtarg = ((((pc) & (0xf0000000))) | (((EXTRACT_LSB0_UINT (insn, 32, 15, 16)) << (2))));
/* Record the fields for the semantic handler. */
FLD (i_jmptarg) = f_jtarg;
TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_j", "jmptarg 0x%x", 'x', f_jtarg, (char *) 0));
#if WITH_PROFILE_MODEL_P
/* Record the fields for profiling. */
if (PROFILE_MODEL_P (current_cpu))
{
}
#endif
#undef FLD
return idesc;
}
extract_sfmt_jal:
{
const IDESC *idesc = &iq2000bf_insn_data[itype];
CGEN_INSN_INT insn = entire_insn;
#define FLD(f) abuf->fields.sfmt_j.f
USI f_jtarg;
f_jtarg = ((((pc) & (0xf0000000))) | (((EXTRACT_LSB0_UINT (insn, 32, 15, 16)) << (2))));
/* Record the fields for the semantic handler. */
FLD (i_jmptarg) = f_jtarg;
TRACE_EXTRACT (current_cpu, abuf, (current_cpu, pc, "sfmt_jal", "jmptarg 0x%x", 'x', f_jtarg, (char *) 0));
#if WITH_PROFILE_MODEL_P
/* Record the fields for profiling. */
if (PROFILE_MODEL_P (current_cpu))
{
}
#endif
#undef FLD
return idesc;
}
}
|