13 /* indexed versions are in 31 */
47 [3] {twi, "twi", Ibranch},
48 [7] {mulli, "mulli", Iarith},
49 [8] {subfic, "subfic", Iarith},
50 [10] {cmpli, "cmpli", Iarith},
51 [11] {cmpi, "cmpi", Iarith},
52 [12] {addic, "addic", Iarith},
53 [13] {addiccc, "addic.", Iarith},
54 [14] {addi, "addi", Iarith},
55 [15] {addis, "addis", Iarith},
56 [16] {bcx, "bc⋯", Ibranch},
57 [17] {sc, "sc", Isyscall},
58 [18] {bx, "b⋯", Ibranch},
59 /* group 19; branch unit */
60 [20] {rlwimi, "rlwimi", Ilog},
61 [21] {rlwinm, "rlwinm", Ilog},
62 [23] {rlwnm, "rlwnm", Ilog},
63 [24] {ori, "ori", Ilog},
64 [25] {oris, "oris", Ilog},
65 [26] {xori, "xori", Ilog},
66 [27] {xoris, "xoris", Ilog},
67 [28] {andicc, "andi.", Ilog},
68 [29] {andiscc, "andis.", Ilog},
69 /* group 31; integer & misc. */
70 [32] {lwz, "lwz", Iload},
71 [33] {lwz, "lwzu", Iload},
72 [34] {lbz, "lbz", Iload},
73 [35] {lbz, "lbzu", Iload},
74 [36] {stw, "stw", Istore},
75 [37] {stw, "stwu", Istore},
76 [38] {stb, "stb", Istore},
77 [39] {stb, "stbu", Istore},
78 [40] {lhz, "lhz", Iload},
79 [41] {lhz, "lhzu", Iload},
80 [42] {lha, "lha", Iload},
81 [43] {lha, "lhau", Iload},
82 [44] {sth, "sth", Istore},
83 [45] {sth, "sthu", Istore},
84 [46] {lmw, "lmw", Iload},
85 [47] {stmw, "stmw", Istore},
86 [48] {lfs, "lfs", Iload},
87 [49] {lfs, "lfsu", Iload},
88 [50] {lfd, "lfd", Iload},
89 [51] {lfd, "lfdu", Iload},
90 [52] {stfs, "stfs", Istore},
91 [53] {stfs, "stfsu", Istore},
92 [54] {stfd, "stfd", Istore},
93 [55] {stfd, "stfdu", Istore},
94 /* group 59; single precision floating point */
95 /* group 63; double precision floating point; fpscr */
99 Inset ops0 = {op0, nelem(op0)-1};
101 static char oemflag[] = {
125 reg.ir = ifetch(reg.pc);
143 if(reg.ir&OE && f < sizeof(oemflag) && oemflag[f])
150 xo = getxo(reg.ir) & 0x1F;
156 xo = getxo(reg.ir) & 0x1F;
157 if(xo < ops63a.nel) {
158 ci = &ops63a.tab[xo];
159 if(ci->func || ci->name)
166 ci = &ops63b.tab[xo];
173 if(ci && ci->name && trace)
174 itrace("%s\t[not yet done]", ci->name);
180 brkchk(reg.pc, Instruction);
192 /* Bprint(bioout, "op=%d op2=%d op3=%d\n", ir>>30, (ir>>21)&0x7, (ir>>19)&0x3f); */
193 Bprint(bioout, "illegal_instruction IR #%.8lux (op=%ld/%ld, pc=#%.8lux)\n", ir, getop(ir), getxo(ir), reg.pc);
194 if(ci && ci->name && ci->func==0)
195 Bprint(bioout, "(%s not yet implemented)\n", ci->name);
202 /* Bprint(bioout, "op=%d op2=%d op3=%d\n", ir>>30, (ir>>21)&0x7, (ir>>19)&0x3f); */
203 Bprint(bioout, "illegal_instruction IR #%.8lux (op=%ld/%ld, pc=#%.8lux) %s not in MPC601\n", ir, getop(ir), getxo(ir), reg.pc, ci->name?ci->name: "-");