Previous 199869 Revisions Next

r33996 Sunday 21st December, 2014 at 14:43:45 UTC by David Haywood
arcompact: prepare to add more opcodes (nw)
[src/emu/cpu]cpu.mak
[src/emu/cpu/arcompact]arcompact.h arcompact_execute.c arcompactdasm_ops.c

trunk/src/emu/cpu/arcompact/arcompact.h
r242507r242508
1717#define ARCOMPACT_OPERATION ((op & 0xf800) >> 11)
1818
1919
20#define ARCOMPACT_HANDLER04_P11_TYPE(name) \
21ARCOMPACT_RETTYPE arcompact_handle##name##_p11(OPS_16) \
22{ \
23   int M = (op & 0x00000020) >> 5; \
24    \
25   switch (M) \
26   { \
27      case 0x00: return arcompact_handle##name##_p11_m0(PARAMS); \
28      case 0x01: return arcompact_handle##name##_p11_m1(PARAMS); \
29   } \
30    \
31   return 0; \
32}; \
2033
34#define ARCOMPACT_HANDLER04_TYPE(name) \
35ARCOMPACT_RETTYPE arcompact_handle##name(OPS_16) \
36{ \
37   int p = (op & 0x00c00000) >> 22; \
38   \
39   switch (p) \
40   { \
41      case 0x00: return arcompact_handle##name##_p00(PARAMS); \
42      case 0x01: return arcompact_handle##name##_p01(PARAMS); \
43      case 0x02: return arcompact_handle##name##_p10(PARAMS); \
44      case 0x03: return arcompact_handle##name##_p11(PARAMS); \
45   } \
46   \
47   return 0; \
48}; \
49
50
51#define ARCOMPACT_HANDLER04_TYPE_PM(name) \
52   ARCOMPACT_RETTYPE arcompact_handle##name##_p00(OPS_16); \
53   ARCOMPACT_RETTYPE arcompact_handle##name##_p01(OPS_16); \
54   ARCOMPACT_RETTYPE arcompact_handle##name##_p10(OPS_16); \
55   ARCOMPACT_RETTYPE arcompact_handle##name##_p11_m0(OPS_16); \
56   ARCOMPACT_RETTYPE arcompact_handle##name##_p11_m1(OPS_16); \
57   ARCOMPACT_HANDLER04_P11_TYPE(name); \
58   ARCOMPACT_HANDLER04_TYPE(name); \
59
60
2161class arcompact_device : public cpu_device
2262{
2363public:
r242507r242508
136176   ARCOMPACT_RETTYPE arcompact_handle04_1b(OPS_32);
137177   ARCOMPACT_RETTYPE arcompact_handle04_1c(OPS_32);
138178   ARCOMPACT_RETTYPE arcompact_handle04_1d(OPS_32);
139   ARCOMPACT_RETTYPE arcompact_handle04_20(OPS_32);
179//   ARCOMPACT_RETTYPE arcompact_handle04_20(OPS_32);
140180   ARCOMPACT_RETTYPE arcompact_handle04_21(OPS_32);
141181   ARCOMPACT_RETTYPE arcompact_handle04_22(OPS_32);
142182   ARCOMPACT_RETTYPE arcompact_handle04_23(OPS_32);
r242507r242508
727767
728768   ARCOMPACT_RETTYPE get_insruction(OPS_32);
729769
770
771   ARCOMPACT_HANDLER04_TYPE_PM(04_20);
772
773
730774private:
731775   address_space_config m_program_config;
732776
trunk/src/emu/cpu/arcompact/arcompact_execute.c
r242507r242508
5757   int B_temp = (op & 0x00007000) >> 12; \
5858   int breg = b_temp | (B_temp << 3); \
5959
60#define COMMON32_GET_creg \
61   int creg = (op & 0x00000fc0) >> 6; \
62
63#define COMMON32_GET_u6 \
64   int u = (op & 0x00000fc0) >> 6; \
65
66#define COMMON32_GET_areg \
67   int areg = (op & 0x0000003f) >> 0; \
68
69#define COMMON32_GET_areg_reserved \
70   int ares = (op & 0x0000003f) >> 0; \
71
72#define COMMON32_GET_F \
73   int F = (op & 0x00008000) >> 15; \
74
75#define COMMON32_GET_p \
76   int p = (op & 0x00c00000) >> 22; \
77
78
6079#define COMMON32_GET_s12 \
6180      int S_temp = (op & 0x0000003f) >> 0; \
6281      int s_temp = (op & 0x00000fc0) >> 6; \
r242507r242508
118137
119138      switch (instruction) // 32-bit instructions (with optional extra dword for immediate data)
120139      {
121         case 0x00: return arcompact_handle00(PARAMS);   break; // Bcc
122         case 0x01: return arcompact_handle01(PARAMS);   break; // BLcc/BRcc
123         case 0x02: return arcompact_handle02(PARAMS);   break; // LD r+o
124         case 0x03: return arcompact_handle03(PARAMS);   break; // ST r+o
125         case 0x04: return arcompact_handle04(PARAMS);   break; // op a,b,c (basecase)
126         case 0x05: return arcompact_handle05(PARAMS);   break; // op a,b,c (05 ARC ext)
127         case 0x06: return arcompact_handle06(PARAMS);   break; // op a,b,c (06 ARC ext)
128         case 0x07: return arcompact_handle07(PARAMS);   break; // op a,b,c (07 User ext)
129         case 0x08: return arcompact_handle08(PARAMS);   break; // op a,b,c (08 User ext)
130         case 0x09: return arcompact_handle09(PARAMS);   break; // op a,b,c (09 Market ext)
131         case 0x0a: return arcompact_handle0a(PARAMS);   break; // op a,b,c (0a Market ext)
132         case 0x0b: return arcompact_handle0b(PARAMS);   break; // op a,b,c (0b Market ext)
140         case 0x00: return arcompact_handle00(PARAMS);    // Bcc
141         case 0x01: return arcompact_handle01(PARAMS);    // BLcc/BRcc
142         case 0x02: return arcompact_handle02(PARAMS);    // LD r+o
143         case 0x03: return arcompact_handle03(PARAMS);    // ST r+o
144         case 0x04: return arcompact_handle04(PARAMS);    // op a,b,c (basecase)
145         case 0x05: return arcompact_handle05(PARAMS);    // op a,b,c (05 ARC ext)
146         case 0x06: return arcompact_handle06(PARAMS);    // op a,b,c (06 ARC ext)
147         case 0x07: return arcompact_handle07(PARAMS);    // op a,b,c (07 User ext)
148         case 0x08: return arcompact_handle08(PARAMS);    // op a,b,c (08 User ext)
149         case 0x09: return arcompact_handle09(PARAMS);    // op a,b,c (09 Market ext)
150         case 0x0a: return arcompact_handle0a(PARAMS);    // op a,b,c (0a Market ext)
151         case 0x0b: return arcompact_handle0b(PARAMS);    // op a,b,c (0b Market ext)
133152      }
134153   }
135154   else
136155   {
137156      switch (instruction) // 16-bit instructions
138157      {
139         case 0x0c: return arcompact_handle0c(PARAMS);   break; // Load/Add reg-reg
140         case 0x0d: return arcompact_handle0d(PARAMS);   break; // Add/Sub/Shft imm
141         case 0x0e: return arcompact_handle0e(PARAMS);   break; // Mov/Cmp/Add
142         case 0x0f: return arcompact_handle0f(PARAMS);   break; // op_S b,b,c (single 16-bit ops)
143         case 0x10: return arcompact_handle10(PARAMS);   break; // LD_S
144         case 0x11: return arcompact_handle11(PARAMS);   break; // LDB_S
145         case 0x12: return arcompact_handle12(PARAMS);   break; // LDW_S
146         case 0x13: return arcompact_handle13(PARAMS);   break; // LSW_S.X
147         case 0x14: return arcompact_handle14(PARAMS);   break; // ST_S
148         case 0x15: return arcompact_handle15(PARAMS);   break; // STB_S
149         case 0x16: return arcompact_handle16(PARAMS);   break; // STW_S
150         case 0x17: return arcompact_handle17(PARAMS);   break; // Shift/Sub/Bit
151         case 0x18: return arcompact_handle18(PARAMS);   break; // Stack Instr
152         case 0x19: return arcompact_handle19(PARAMS);   break; // GP Instr
153         case 0x1a: return arcompact_handle1a(PARAMS);   break; // PCL Instr
154         case 0x1b: return arcompact_handle1b(PARAMS);   break; // MOV_S
155         case 0x1c: return arcompact_handle1c(PARAMS);   break; // ADD_S/CMP_S
156         case 0x1d: return arcompact_handle1d(PARAMS);   break; // BRcc_S
157         case 0x1e: return arcompact_handle1e(PARAMS);   break; // Bcc_S
158         case 0x1f: return arcompact_handle1f(PARAMS);   break; // BL_S
158         case 0x0c: return arcompact_handle0c(PARAMS);    // Load/Add reg-reg
159         case 0x0d: return arcompact_handle0d(PARAMS);    // Add/Sub/Shft imm
160         case 0x0e: return arcompact_handle0e(PARAMS);    // Mov/Cmp/Add
161         case 0x0f: return arcompact_handle0f(PARAMS);    // op_S b,b,c (single 16-bit ops)
162         case 0x10: return arcompact_handle10(PARAMS);    // LD_S
163         case 0x11: return arcompact_handle11(PARAMS);    // LDB_S
164         case 0x12: return arcompact_handle12(PARAMS);    // LDW_S
165         case 0x13: return arcompact_handle13(PARAMS);    // LSW_S.X
166         case 0x14: return arcompact_handle14(PARAMS);    // ST_S
167         case 0x15: return arcompact_handle15(PARAMS);    // STB_S
168         case 0x16: return arcompact_handle16(PARAMS);    // STW_S
169         case 0x17: return arcompact_handle17(PARAMS);    // Shift/Sub/Bit
170         case 0x18: return arcompact_handle18(PARAMS);    // Stack Instr
171         case 0x19: return arcompact_handle19(PARAMS);    // GP Instr
172         case 0x1a: return arcompact_handle1a(PARAMS);    // PCL Instr
173         case 0x1b: return arcompact_handle1b(PARAMS);    // MOV_S
174         case 0x1c: return arcompact_handle1c(PARAMS);    // ADD_S/CMP_S
175         case 0x1d: return arcompact_handle1d(PARAMS);    // BRcc_S
176         case 0x1e: return arcompact_handle1e(PARAMS);    // Bcc_S
177         case 0x1f: return arcompact_handle1f(PARAMS);    // BL_S
159178      }
160179   }
161180
r242507r242508
168187
169188   switch (subinstr)
170189   {
171      case 0x00: return arcompact_handle00_00(PARAMS); break; // Branch Conditionally
172      case 0x01: return arcompact_handle00_01(PARAMS); break; // Branch Unconditionally Far
190      case 0x00: return arcompact_handle00_00(PARAMS);  // Branch Conditionally
191      case 0x01: return arcompact_handle00_01(PARAMS);  // Branch Unconditionally Far
173192   }
174193
175194   return 0;
r242507r242508
181200
182201   switch (subinstr)
183202   {
184      case 0x00: return arcompact_handle01_00(PARAMS); break; // Branh & Link
185      case 0x01: return arcompact_handle01_01(PARAMS); break; // Branch on Compare
203      case 0x00: return arcompact_handle01_00(PARAMS);  // Branh & Link
204      case 0x01: return arcompact_handle01_01(PARAMS);  // Branch on Compare
186205   }
187206
188207   return 0;
r242507r242508
194213
195214   switch (subinstr2)
196215   {
197      case 0x00: return arcompact_handle01_00_00dasm(PARAMS); break; // Branch and Link Conditionally
198      case 0x01: return arcompact_handle01_00_01dasm(PARAMS); break; // Branch and Link Unconditional Far
216      case 0x00: return arcompact_handle01_00_00dasm(PARAMS);  // Branch and Link Conditionally
217      case 0x01: return arcompact_handle01_00_01dasm(PARAMS);  // Branch and Link Unconditional Far
199218   }
200219
201220   return 0;
r242507r242508
207226
208227   switch (subinstr2)
209228   {
210      case 0x00: return arcompact_handle01_01_00(PARAMS); break; // Branch on Compare Register-Register
211      case 0x01: return arcompact_handle01_01_01(PARAMS); break; // Branch on Compare/Bit Test Register-Immediate
229      case 0x00: return arcompact_handle01_01_00(PARAMS);  // Branch on Compare Register-Register
230      case 0x01: return arcompact_handle01_01_01(PARAMS);  // Branch on Compare/Bit Test Register-Immediate
212231   }
213232
214233   return 0;
r242507r242508
220239
221240   switch (subinstr3)
222241   {
223      case 0x00: return arcompact_handle01_01_00_00(PARAMS); break; // BREQ (reg-reg)
224      case 0x01: return arcompact_handle01_01_00_01(PARAMS); break; // BRNE (reg-reg)
225      case 0x02: return arcompact_handle01_01_00_02(PARAMS); break; // BRLT (reg-reg)
226      case 0x03: return arcompact_handle01_01_00_03(PARAMS); break; // BRGE (reg-reg)
227      case 0x04: return arcompact_handle01_01_00_04(PARAMS); break; // BRLO (reg-reg)
228      case 0x05: return arcompact_handle01_01_00_05(PARAMS); break; // BRHS (reg-reg)
229      case 0x06: return arcompact_handle01_01_00_06(PARAMS); break; // reserved
230      case 0x07: return arcompact_handle01_01_00_07(PARAMS); break; // reserved
231      case 0x08: return arcompact_handle01_01_00_08(PARAMS); break; // reserved
232      case 0x09: return arcompact_handle01_01_00_09(PARAMS); break; // reserved
233      case 0x0a: return arcompact_handle01_01_00_0a(PARAMS); break; // reserved
234      case 0x0b: return arcompact_handle01_01_00_0b(PARAMS); break; // reserved
235      case 0x0c: return arcompact_handle01_01_00_0c(PARAMS); break; // reserved
236      case 0x0d: return arcompact_handle01_01_00_0d(PARAMS); break; // reserved
237      case 0x0e: return arcompact_handle01_01_00_0e(PARAMS); break; // BBIT0 (reg-reg)
238      case 0x0f: return arcompact_handle01_01_00_0f(PARAMS); break; // BBIT1 (reg-reg)
242      case 0x00: return arcompact_handle01_01_00_00(PARAMS);  // BREQ (reg-reg)
243      case 0x01: return arcompact_handle01_01_00_01(PARAMS);  // BRNE (reg-reg)
244      case 0x02: return arcompact_handle01_01_00_02(PARAMS);  // BRLT (reg-reg)
245      case 0x03: return arcompact_handle01_01_00_03(PARAMS);  // BRGE (reg-reg)
246      case 0x04: return arcompact_handle01_01_00_04(PARAMS);  // BRLO (reg-reg)
247      case 0x05: return arcompact_handle01_01_00_05(PARAMS);  // BRHS (reg-reg)
248      case 0x06: return arcompact_handle01_01_00_06(PARAMS);  // reserved
249      case 0x07: return arcompact_handle01_01_00_07(PARAMS);  // reserved
250      case 0x08: return arcompact_handle01_01_00_08(PARAMS);  // reserved
251      case 0x09: return arcompact_handle01_01_00_09(PARAMS);  // reserved
252      case 0x0a: return arcompact_handle01_01_00_0a(PARAMS);  // reserved
253      case 0x0b: return arcompact_handle01_01_00_0b(PARAMS);  // reserved
254      case 0x0c: return arcompact_handle01_01_00_0c(PARAMS);  // reserved
255      case 0x0d: return arcompact_handle01_01_00_0d(PARAMS);  // reserved
256      case 0x0e: return arcompact_handle01_01_00_0e(PARAMS);  // BBIT0 (reg-reg)
257      case 0x0f: return arcompact_handle01_01_00_0f(PARAMS);  // BBIT1 (reg-reg)
239258   }
240259
241260   return 0;
r242507r242508
247266
248267   switch (subinstr3)
249268   {
250      case 0x00: return arcompact_handle01_01_01_00(PARAMS); break; // BREQ (reg-imm)
251      case 0x01: return arcompact_handle01_01_01_01(PARAMS); break; // BRNE (reg-imm)
252      case 0x02: return arcompact_handle01_01_01_02(PARAMS); break; // BRLT (reg-imm)
253      case 0x03: return arcompact_handle01_01_01_03(PARAMS); break; // BRGE (reg-imm)
254      case 0x04: return arcompact_handle01_01_01_04(PARAMS); break; // BRLO (reg-imm)
255      case 0x05: return arcompact_handle01_01_01_05(PARAMS); break; // BRHS (reg-imm)
256      case 0x06: return arcompact_handle01_01_01_06(PARAMS); break; // reserved
257      case 0x07: return arcompact_handle01_01_01_07(PARAMS); break; // reserved
258      case 0x08: return arcompact_handle01_01_01_08(PARAMS); break; // reserved
259      case 0x09: return arcompact_handle01_01_01_09(PARAMS); break; // reserved
260      case 0x0a: return arcompact_handle01_01_01_0a(PARAMS); break; // reserved
261      case 0x0b: return arcompact_handle01_01_01_0b(PARAMS); break; // reserved
262      case 0x0c: return arcompact_handle01_01_01_0c(PARAMS); break; // reserved
263      case 0x0d: return arcompact_handle01_01_01_0d(PARAMS); break; // reserved
264      case 0x0e: return arcompact_handle01_01_01_0e(PARAMS); break; // BBIT0 (reg-imm)
265      case 0x0f: return arcompact_handle01_01_01_0f(PARAMS); break; // BBIT1 (reg-imm)
269      case 0x00: return arcompact_handle01_01_01_00(PARAMS);  // BREQ (reg-imm)
270      case 0x01: return arcompact_handle01_01_01_01(PARAMS);  // BRNE (reg-imm)
271      case 0x02: return arcompact_handle01_01_01_02(PARAMS);  // BRLT (reg-imm)
272      case 0x03: return arcompact_handle01_01_01_03(PARAMS);  // BRGE (reg-imm)
273      case 0x04: return arcompact_handle01_01_01_04(PARAMS);  // BRLO (reg-imm)
274      case 0x05: return arcompact_handle01_01_01_05(PARAMS);  // BRHS (reg-imm)
275      case 0x06: return arcompact_handle01_01_01_06(PARAMS);  // reserved
276      case 0x07: return arcompact_handle01_01_01_07(PARAMS);  // reserved
277      case 0x08: return arcompact_handle01_01_01_08(PARAMS);  // reserved
278      case 0x09: return arcompact_handle01_01_01_09(PARAMS);  // reserved
279      case 0x0a: return arcompact_handle01_01_01_0a(PARAMS);  // reserved
280      case 0x0b: return arcompact_handle01_01_01_0b(PARAMS);  // reserved
281      case 0x0c: return arcompact_handle01_01_01_0c(PARAMS);  // reserved
282      case 0x0d: return arcompact_handle01_01_01_0d(PARAMS);  // reserved
283      case 0x0e: return arcompact_handle01_01_01_0e(PARAMS);  // BBIT0 (reg-imm)
284      case 0x0f: return arcompact_handle01_01_01_0f(PARAMS);  // BBIT1 (reg-imm)
266285   }
267286
268287   return 0;
r242507r242508
274293
275294   switch (subinstr)
276295   {
277      case 0x00: return arcompact_handle04_00(PARAMS); break; // ADD
278      case 0x01: return arcompact_handle04_01(PARAMS); break; // ADC
279      case 0x02: return arcompact_handle04_02(PARAMS); break; // SUB
280      case 0x03: return arcompact_handle04_03(PARAMS); break; // SBC
281      case 0x04: return arcompact_handle04_04(PARAMS); break; // AND
282      case 0x05: return arcompact_handle04_05(PARAMS); break; // OR
283      case 0x06: return arcompact_handle04_06(PARAMS); break; // BIC
284      case 0x07: return arcompact_handle04_07(PARAMS); break; // XOR
285      case 0x08: return arcompact_handle04_08(PARAMS); break; // MAX
286      case 0x09: return arcompact_handle04_09(PARAMS); break; // MIN
287      case 0x0a: return arcompact_handle04_0a(PARAMS); break; // MOV
288      case 0x0b: return arcompact_handle04_0b(PARAMS); break; // TST
289      case 0x0c: return arcompact_handle04_0c(PARAMS); break; // CMP
290      case 0x0d: return arcompact_handle04_0d(PARAMS); break; // RCMP
291      case 0x0e: return arcompact_handle04_0e(PARAMS); break; // RSUB
292      case 0x0f: return arcompact_handle04_0f(PARAMS); break; // BSET
293      case 0x10: return arcompact_handle04_10(PARAMS); break; // BCLR
294      case 0x11: return arcompact_handle04_11(PARAMS); break; // BTST
295      case 0x12: return arcompact_handle04_12(PARAMS); break; // BXOR
296      case 0x13: return arcompact_handle04_13(PARAMS); break; // BMSK
297      case 0x14: return arcompact_handle04_14(PARAMS); break; // ADD1
298      case 0x15: return arcompact_handle04_15(PARAMS); break; // ADD2
299      case 0x16: return arcompact_handle04_16(PARAMS); break; // ADD3
300      case 0x17: return arcompact_handle04_17(PARAMS); break; // SUB1
301      case 0x18: return arcompact_handle04_18(PARAMS); break; // SUB2
302      case 0x19: return arcompact_handle04_19(PARAMS); break; // SUB3
303      case 0x1a: return arcompact_handle04_1a(PARAMS); break; // MPY *
304      case 0x1b: return arcompact_handle04_1b(PARAMS); break; // MPYH *
305      case 0x1c: return arcompact_handle04_1c(PARAMS); break; // MPYHU *
306      case 0x1d: return arcompact_handle04_1d(PARAMS); break; // MPYU *
307      case 0x1e: return arcompact_handle04_1e(PARAMS); break; // illegal
308      case 0x1f: return arcompact_handle04_1f(PARAMS); break; // illegal
309      case 0x20: return arcompact_handle04_20(PARAMS); break; // Jcc
310      case 0x21: return arcompact_handle04_21(PARAMS); break; // Jcc.D
311      case 0x22: return arcompact_handle04_22(PARAMS); break; // JLcc
312      case 0x23: return arcompact_handle04_23(PARAMS); break; // JLcc.D
313      case 0x24: return arcompact_handle04_24(PARAMS); break; // illegal
314      case 0x25: return arcompact_handle04_25(PARAMS); break; // illegal
315      case 0x26: return arcompact_handle04_26(PARAMS); break; // illegal
316      case 0x27: return arcompact_handle04_27(PARAMS); break; // illegal
317      case 0x28: return arcompact_handle04_28(PARAMS); break; // LPcc
318      case 0x29: return arcompact_handle04_29(PARAMS); break; // FLAG
319      case 0x2a: return arcompact_handle04_2a(PARAMS); break; // LR
320      case 0x2b: return arcompact_handle04_2b(PARAMS); break; // SR
321      case 0x2c: return arcompact_handle04_2c(PARAMS); break; // illegal
322      case 0x2d: return arcompact_handle04_2d(PARAMS); break; // illegal
323      case 0x2e: return arcompact_handle04_2e(PARAMS); break; // illegal
324      case 0x2f: return arcompact_handle04_2f(PARAMS); break; // Sub Opcode
325      case 0x30: return arcompact_handle04_30(PARAMS); break; // LD r-r
326      case 0x31: return arcompact_handle04_31(PARAMS); break; // LD r-r
327      case 0x32: return arcompact_handle04_32(PARAMS); break; // LD r-r
328      case 0x33: return arcompact_handle04_33(PARAMS); break; // LD r-r
329      case 0x34: return arcompact_handle04_34(PARAMS); break; // LD r-r
330      case 0x35: return arcompact_handle04_35(PARAMS); break; // LD r-r
331      case 0x36: return arcompact_handle04_36(PARAMS); break; // LD r-r
332      case 0x37: return arcompact_handle04_37(PARAMS); break; // LD r-r
333      case 0x38: return arcompact_handle04_38(PARAMS); break; // illegal
334      case 0x39: return arcompact_handle04_39(PARAMS); break; // illegal
335      case 0x3a: return arcompact_handle04_3a(PARAMS); break; // illegal
336      case 0x3b: return arcompact_handle04_3b(PARAMS); break; // illegal
337      case 0x3c: return arcompact_handle04_3c(PARAMS); break; // illegal
338      case 0x3d: return arcompact_handle04_3d(PARAMS); break; // illegal
339      case 0x3e: return arcompact_handle04_3e(PARAMS); break; // illegal
340      case 0x3f: return arcompact_handle04_3f(PARAMS); break; // illegal
296      case 0x00: return arcompact_handle04_00(PARAMS);  // ADD
297      case 0x01: return arcompact_handle04_01(PARAMS);  // ADC
298      case 0x02: return arcompact_handle04_02(PARAMS);  // SUB
299      case 0x03: return arcompact_handle04_03(PARAMS);  // SBC
300      case 0x04: return arcompact_handle04_04(PARAMS);  // AND
301      case 0x05: return arcompact_handle04_05(PARAMS);  // OR
302      case 0x06: return arcompact_handle04_06(PARAMS);  // BIC
303      case 0x07: return arcompact_handle04_07(PARAMS);  // XOR
304      case 0x08: return arcompact_handle04_08(PARAMS);  // MAX
305      case 0x09: return arcompact_handle04_09(PARAMS);  // MIN
306      case 0x0a: return arcompact_handle04_0a(PARAMS);  // MOV
307      case 0x0b: return arcompact_handle04_0b(PARAMS);  // TST
308      case 0x0c: return arcompact_handle04_0c(PARAMS);  // CMP
309      case 0x0d: return arcompact_handle04_0d(PARAMS);  // RCMP
310      case 0x0e: return arcompact_handle04_0e(PARAMS);  // RSUB
311      case 0x0f: return arcompact_handle04_0f(PARAMS);  // BSET
312      case 0x10: return arcompact_handle04_10(PARAMS);  // BCLR
313      case 0x11: return arcompact_handle04_11(PARAMS);  // BTST
314      case 0x12: return arcompact_handle04_12(PARAMS);  // BXOR
315      case 0x13: return arcompact_handle04_13(PARAMS);  // BMSK
316      case 0x14: return arcompact_handle04_14(PARAMS);  // ADD1
317      case 0x15: return arcompact_handle04_15(PARAMS);  // ADD2
318      case 0x16: return arcompact_handle04_16(PARAMS);  // ADD3
319      case 0x17: return arcompact_handle04_17(PARAMS);  // SUB1
320      case 0x18: return arcompact_handle04_18(PARAMS);  // SUB2
321      case 0x19: return arcompact_handle04_19(PARAMS);  // SUB3
322      case 0x1a: return arcompact_handle04_1a(PARAMS);  // MPY *
323      case 0x1b: return arcompact_handle04_1b(PARAMS);  // MPYH *
324      case 0x1c: return arcompact_handle04_1c(PARAMS);  // MPYHU *
325      case 0x1d: return arcompact_handle04_1d(PARAMS);  // MPYU *
326      case 0x1e: return arcompact_handle04_1e(PARAMS);  // illegal
327      case 0x1f: return arcompact_handle04_1f(PARAMS);  // illegal
328      case 0x20: return arcompact_handle04_20(PARAMS);  // Jcc
329      case 0x21: return arcompact_handle04_21(PARAMS);  // Jcc.D
330      case 0x22: return arcompact_handle04_22(PARAMS);  // JLcc
331      case 0x23: return arcompact_handle04_23(PARAMS);  // JLcc.D
332      case 0x24: return arcompact_handle04_24(PARAMS);  // illegal
333      case 0x25: return arcompact_handle04_25(PARAMS);  // illegal
334      case 0x26: return arcompact_handle04_26(PARAMS);  // illegal
335      case 0x27: return arcompact_handle04_27(PARAMS);  // illegal
336      case 0x28: return arcompact_handle04_28(PARAMS);  // LPcc
337      case 0x29: return arcompact_handle04_29(PARAMS);  // FLAG
338      case 0x2a: return arcompact_handle04_2a(PARAMS);  // LR
339      case 0x2b: return arcompact_handle04_2b(PARAMS);  // SR
340      case 0x2c: return arcompact_handle04_2c(PARAMS);  // illegal
341      case 0x2d: return arcompact_handle04_2d(PARAMS);  // illegal
342      case 0x2e: return arcompact_handle04_2e(PARAMS);  // illegal
343      case 0x2f: return arcompact_handle04_2f(PARAMS);  // Sub Opcode
344      case 0x30: return arcompact_handle04_30(PARAMS);  // LD r-r
345      case 0x31: return arcompact_handle04_31(PARAMS);  // LD r-r
346      case 0x32: return arcompact_handle04_32(PARAMS);  // LD r-r
347      case 0x33: return arcompact_handle04_33(PARAMS);  // LD r-r
348      case 0x34: return arcompact_handle04_34(PARAMS);  // LD r-r
349      case 0x35: return arcompact_handle04_35(PARAMS);  // LD r-r
350      case 0x36: return arcompact_handle04_36(PARAMS);  // LD r-r
351      case 0x37: return arcompact_handle04_37(PARAMS);  // LD r-r
352      case 0x38: return arcompact_handle04_38(PARAMS);  // illegal
353      case 0x39: return arcompact_handle04_39(PARAMS);  // illegal
354      case 0x3a: return arcompact_handle04_3a(PARAMS);  // illegal
355      case 0x3b: return arcompact_handle04_3b(PARAMS);  // illegal
356      case 0x3c: return arcompact_handle04_3c(PARAMS);  // illegal
357      case 0x3d: return arcompact_handle04_3d(PARAMS);  // illegal
358      case 0x3e: return arcompact_handle04_3e(PARAMS);  // illegal
359      case 0x3f: return arcompact_handle04_3f(PARAMS);  // illegal
341360   }
342361
343362   return 0;
r242507r242508
349368
350369   switch (subinstr2)
351370   {
352      case 0x00: return arcompact_handle04_2f_00(PARAMS); break; // ASL
353      case 0x01: return arcompact_handle04_2f_01(PARAMS); break; // ASR
354      case 0x02: return arcompact_handle04_2f_02(PARAMS); break; // LSR
355      case 0x03: return arcompact_handle04_2f_03(PARAMS); break; // ROR
356      case 0x04: return arcompact_handle04_2f_04(PARAMS); break; // RCC
357      case 0x05: return arcompact_handle04_2f_05(PARAMS); break; // SEXB
358      case 0x06: return arcompact_handle04_2f_06(PARAMS); break; // SEXW
359      case 0x07: return arcompact_handle04_2f_07(PARAMS); break; // EXTB
360      case 0x08: return arcompact_handle04_2f_08(PARAMS); break; // EXTW
361      case 0x09: return arcompact_handle04_2f_09(PARAMS); break; // ABS
362      case 0x0a: return arcompact_handle04_2f_0a(PARAMS); break; // NOT
363      case 0x0b: return arcompact_handle04_2f_0b(PARAMS); break; // RLC
364      case 0x0c: return arcompact_handle04_2f_0c(PARAMS); break; // EX
365      case 0x0d: return arcompact_handle04_2f_0d(PARAMS); break; // illegal
366      case 0x0e: return arcompact_handle04_2f_0e(PARAMS); break; // illegal
367      case 0x0f: return arcompact_handle04_2f_0f(PARAMS); break; // illegal
368      case 0x10: return arcompact_handle04_2f_10(PARAMS); break; // illegal
369      case 0x11: return arcompact_handle04_2f_11(PARAMS); break; // illegal
370      case 0x12: return arcompact_handle04_2f_12(PARAMS); break; // illegal
371      case 0x13: return arcompact_handle04_2f_13(PARAMS); break; // illegal
372      case 0x14: return arcompact_handle04_2f_14(PARAMS); break; // illegal
373      case 0x15: return arcompact_handle04_2f_15(PARAMS); break; // illegal
374      case 0x16: return arcompact_handle04_2f_16(PARAMS); break; // illegal
375      case 0x17: return arcompact_handle04_2f_17(PARAMS); break; // illegal
376      case 0x18: return arcompact_handle04_2f_18(PARAMS); break; // illegal
377      case 0x19: return arcompact_handle04_2f_19(PARAMS); break; // illegal
378      case 0x1a: return arcompact_handle04_2f_1a(PARAMS); break; // illegal
379      case 0x1b: return arcompact_handle04_2f_1b(PARAMS); break; // illegal
380      case 0x1c: return arcompact_handle04_2f_1c(PARAMS); break; // illegal
381      case 0x1d: return arcompact_handle04_2f_1d(PARAMS); break; // illegal
382      case 0x1e: return arcompact_handle04_2f_1e(PARAMS); break; // illegal
383      case 0x1f: return arcompact_handle04_2f_1f(PARAMS); break; // illegal
384      case 0x20: return arcompact_handle04_2f_20(PARAMS); break; // illegal
385      case 0x21: return arcompact_handle04_2f_21(PARAMS); break; // illegal
386      case 0x22: return arcompact_handle04_2f_22(PARAMS); break; // illegal
387      case 0x23: return arcompact_handle04_2f_23(PARAMS); break; // illegal
388      case 0x24: return arcompact_handle04_2f_24(PARAMS); break; // illegal
389      case 0x25: return arcompact_handle04_2f_25(PARAMS); break; // illegal
390      case 0x26: return arcompact_handle04_2f_26(PARAMS); break; // illegal
391      case 0x27: return arcompact_handle04_2f_27(PARAMS); break; // illegal
392      case 0x28: return arcompact_handle04_2f_28(PARAMS); break; // illegal
393      case 0x29: return arcompact_handle04_2f_29(PARAMS); break; // illegal
394      case 0x2a: return arcompact_handle04_2f_2a(PARAMS); break; // illegal
395      case 0x2b: return arcompact_handle04_2f_2b(PARAMS); break; // illegal
396      case 0x2c: return arcompact_handle04_2f_2c(PARAMS); break; // illegal
397      case 0x2d: return arcompact_handle04_2f_2d(PARAMS); break; // illegal
398      case 0x2e: return arcompact_handle04_2f_2e(PARAMS); break; // illegal
399      case 0x2f: return arcompact_handle04_2f_2f(PARAMS); break; // illegal
400      case 0x30: return arcompact_handle04_2f_30(PARAMS); break; // illegal
401      case 0x31: return arcompact_handle04_2f_31(PARAMS); break; // illegal
402      case 0x32: return arcompact_handle04_2f_32(PARAMS); break; // illegal
403      case 0x33: return arcompact_handle04_2f_33(PARAMS); break; // illegal
404      case 0x34: return arcompact_handle04_2f_34(PARAMS); break; // illegal
405      case 0x35: return arcompact_handle04_2f_35(PARAMS); break; // illegal
406      case 0x36: return arcompact_handle04_2f_36(PARAMS); break; // illegal
407      case 0x37: return arcompact_handle04_2f_37(PARAMS); break; // illegal
408      case 0x38: return arcompact_handle04_2f_38(PARAMS); break; // illegal
409      case 0x39: return arcompact_handle04_2f_39(PARAMS); break; // illegal
410      case 0x3a: return arcompact_handle04_2f_3a(PARAMS); break; // illegal
411      case 0x3b: return arcompact_handle04_2f_3b(PARAMS); break; // illegal
412      case 0x3c: return arcompact_handle04_2f_3c(PARAMS); break; // illegal
413      case 0x3d: return arcompact_handle04_2f_3d(PARAMS); break; // illegal
414      case 0x3e: return arcompact_handle04_2f_3e(PARAMS); break; // illegal
415      case 0x3f: return arcompact_handle04_2f_3f(PARAMS); break; // ZOPs (Zero Operand Opcodes)
371      case 0x00: return arcompact_handle04_2f_00(PARAMS);  // ASL
372      case 0x01: return arcompact_handle04_2f_01(PARAMS);  // ASR
373      case 0x02: return arcompact_handle04_2f_02(PARAMS);  // LSR
374      case 0x03: return arcompact_handle04_2f_03(PARAMS);  // ROR
375      case 0x04: return arcompact_handle04_2f_04(PARAMS);  // RCC
376      case 0x05: return arcompact_handle04_2f_05(PARAMS);  // SEXB
377      case 0x06: return arcompact_handle04_2f_06(PARAMS);  // SEXW
378      case 0x07: return arcompact_handle04_2f_07(PARAMS);  // EXTB
379      case 0x08: return arcompact_handle04_2f_08(PARAMS);  // EXTW
380      case 0x09: return arcompact_handle04_2f_09(PARAMS);  // ABS
381      case 0x0a: return arcompact_handle04_2f_0a(PARAMS);  // NOT
382      case 0x0b: return arcompact_handle04_2f_0b(PARAMS);  // RLC
383      case 0x0c: return arcompact_handle04_2f_0c(PARAMS);  // EX
384      case 0x0d: return arcompact_handle04_2f_0d(PARAMS);  // illegal
385      case 0x0e: return arcompact_handle04_2f_0e(PARAMS);  // illegal
386      case 0x0f: return arcompact_handle04_2f_0f(PARAMS);  // illegal
387      case 0x10: return arcompact_handle04_2f_10(PARAMS);  // illegal
388      case 0x11: return arcompact_handle04_2f_11(PARAMS);  // illegal
389      case 0x12: return arcompact_handle04_2f_12(PARAMS);  // illegal
390      case 0x13: return arcompact_handle04_2f_13(PARAMS);  // illegal
391      case 0x14: return arcompact_handle04_2f_14(PARAMS);  // illegal
392      case 0x15: return arcompact_handle04_2f_15(PARAMS);  // illegal
393      case 0x16: return arcompact_handle04_2f_16(PARAMS);  // illegal
394      case 0x17: return arcompact_handle04_2f_17(PARAMS);  // illegal
395      case 0x18: return arcompact_handle04_2f_18(PARAMS);  // illegal
396      case 0x19: return arcompact_handle04_2f_19(PARAMS);  // illegal
397      case 0x1a: return arcompact_handle04_2f_1a(PARAMS);  // illegal
398      case 0x1b: return arcompact_handle04_2f_1b(PARAMS);  // illegal
399      case 0x1c: return arcompact_handle04_2f_1c(PARAMS);  // illegal
400      case 0x1d: return arcompact_handle04_2f_1d(PARAMS);  // illegal
401      case 0x1e: return arcompact_handle04_2f_1e(PARAMS);  // illegal
402      case 0x1f: return arcompact_handle04_2f_1f(PARAMS);  // illegal
403      case 0x20: return arcompact_handle04_2f_20(PARAMS);  // illegal
404      case 0x21: return arcompact_handle04_2f_21(PARAMS);  // illegal
405      case 0x22: return arcompact_handle04_2f_22(PARAMS);  // illegal
406      case 0x23: return arcompact_handle04_2f_23(PARAMS);  // illegal
407      case 0x24: return arcompact_handle04_2f_24(PARAMS);  // illegal
408      case 0x25: return arcompact_handle04_2f_25(PARAMS);  // illegal
409      case 0x26: return arcompact_handle04_2f_26(PARAMS);  // illegal
410      case 0x27: return arcompact_handle04_2f_27(PARAMS);  // illegal
411      case 0x28: return arcompact_handle04_2f_28(PARAMS);  // illegal
412      case 0x29: return arcompact_handle04_2f_29(PARAMS);  // illegal
413      case 0x2a: return arcompact_handle04_2f_2a(PARAMS);  // illegal
414      case 0x2b: return arcompact_handle04_2f_2b(PARAMS);  // illegal
415      case 0x2c: return arcompact_handle04_2f_2c(PARAMS);  // illegal
416      case 0x2d: return arcompact_handle04_2f_2d(PARAMS);  // illegal
417      case 0x2e: return arcompact_handle04_2f_2e(PARAMS);  // illegal
418      case 0x2f: return arcompact_handle04_2f_2f(PARAMS);  // illegal
419      case 0x30: return arcompact_handle04_2f_30(PARAMS);  // illegal
420      case 0x31: return arcompact_handle04_2f_31(PARAMS);  // illegal
421      case 0x32: return arcompact_handle04_2f_32(PARAMS);  // illegal
422      case 0x33: return arcompact_handle04_2f_33(PARAMS);  // illegal
423      case 0x34: return arcompact_handle04_2f_34(PARAMS);  // illegal
424      case 0x35: return arcompact_handle04_2f_35(PARAMS);  // illegal
425      case 0x36: return arcompact_handle04_2f_36(PARAMS);  // illegal
426      case 0x37: return arcompact_handle04_2f_37(PARAMS);  // illegal
427      case 0x38: return arcompact_handle04_2f_38(PARAMS);  // illegal
428      case 0x39: return arcompact_handle04_2f_39(PARAMS);  // illegal
429      case 0x3a: return arcompact_handle04_2f_3a(PARAMS);  // illegal
430      case 0x3b: return arcompact_handle04_2f_3b(PARAMS);  // illegal
431      case 0x3c: return arcompact_handle04_2f_3c(PARAMS);  // illegal
432      case 0x3d: return arcompact_handle04_2f_3d(PARAMS);  // illegal
433      case 0x3e: return arcompact_handle04_2f_3e(PARAMS);  // illegal
434      case 0x3f: return arcompact_handle04_2f_3f(PARAMS);  // ZOPs (Zero Operand Opcodes)
416435   }
417436
418437   return 0;
r242507r242508
425444
426445   switch (subinstr2)
427446   {
428      case 0x00: return arcompact_handle05_2f_00(PARAMS); break; // SWAP
429      case 0x01: return arcompact_handle05_2f_01(PARAMS); break; // NORM
430      case 0x02: return arcompact_handle05_2f_02(PARAMS); break; // SAT16
431      case 0x03: return arcompact_handle05_2f_03(PARAMS); break; // RND16
432      case 0x04: return arcompact_handle05_2f_04(PARAMS); break; // ABSSW
433      case 0x05: return arcompact_handle05_2f_05(PARAMS); break; // ABSS
434      case 0x06: return arcompact_handle05_2f_06(PARAMS); break; // NEGSW
435      case 0x07: return arcompact_handle05_2f_07(PARAMS); break; // NEGS
436      case 0x08: return arcompact_handle05_2f_08(PARAMS); break; // NORMW
437      case 0x09: return arcompact_handle05_2f_09(PARAMS); break; // illegal
438      case 0x0a: return arcompact_handle05_2f_0a(PARAMS); break; // illegal
439      case 0x0b: return arcompact_handle05_2f_0b(PARAMS); break; // illegal
440      case 0x0c: return arcompact_handle05_2f_0c(PARAMS); break; // illegal
441      case 0x0d: return arcompact_handle05_2f_0d(PARAMS); break; // illegal
442      case 0x0e: return arcompact_handle05_2f_0e(PARAMS); break; // illegal
443      case 0x0f: return arcompact_handle05_2f_0f(PARAMS); break; // illegal
444      case 0x10: return arcompact_handle05_2f_10(PARAMS); break; // illegal
445      case 0x11: return arcompact_handle05_2f_11(PARAMS); break; // illegal
446      case 0x12: return arcompact_handle05_2f_12(PARAMS); break; // illegal
447      case 0x13: return arcompact_handle05_2f_13(PARAMS); break; // illegal
448      case 0x14: return arcompact_handle05_2f_14(PARAMS); break; // illegal
449      case 0x15: return arcompact_handle05_2f_15(PARAMS); break; // illegal
450      case 0x16: return arcompact_handle05_2f_16(PARAMS); break; // illegal
451      case 0x17: return arcompact_handle05_2f_17(PARAMS); break; // illegal
452      case 0x18: return arcompact_handle05_2f_18(PARAMS); break; // illegal
453      case 0x19: return arcompact_handle05_2f_19(PARAMS); break; // illegal
454      case 0x1a: return arcompact_handle05_2f_1a(PARAMS); break; // illegal
455      case 0x1b: return arcompact_handle05_2f_1b(PARAMS); break; // illegal
456      case 0x1c: return arcompact_handle05_2f_1c(PARAMS); break; // illegal
457      case 0x1d: return arcompact_handle05_2f_1d(PARAMS); break; // illegal
458      case 0x1e: return arcompact_handle05_2f_1e(PARAMS); break; // illegal
459      case 0x1f: return arcompact_handle05_2f_1f(PARAMS); break; // illegal
460      case 0x20: return arcompact_handle05_2f_20(PARAMS); break; // illegal
461      case 0x21: return arcompact_handle05_2f_21(PARAMS); break; // illegal
462      case 0x22: return arcompact_handle05_2f_22(PARAMS); break; // illegal
463      case 0x23: return arcompact_handle05_2f_23(PARAMS); break; // illegal
464      case 0x24: return arcompact_handle05_2f_24(PARAMS); break; // illegal
465      case 0x25: return arcompact_handle05_2f_25(PARAMS); break; // illegal
466      case 0x26: return arcompact_handle05_2f_26(PARAMS); break; // illegal
467      case 0x27: return arcompact_handle05_2f_27(PARAMS); break; // illegal
468      case 0x28: return arcompact_handle05_2f_28(PARAMS); break; // illegal
469      case 0x29: return arcompact_handle05_2f_29(PARAMS); break; // illegal
470      case 0x2a: return arcompact_handle05_2f_2a(PARAMS); break; // illegal
471      case 0x2b: return arcompact_handle05_2f_2b(PARAMS); break; // illegal
472      case 0x2c: return arcompact_handle05_2f_2c(PARAMS); break; // illegal
473      case 0x2d: return arcompact_handle05_2f_2d(PARAMS); break; // illegal
474      case 0x2e: return arcompact_handle05_2f_2e(PARAMS); break; // illegal
475      case 0x2f: return arcompact_handle05_2f_2f(PARAMS); break; // illegal
476      case 0x30: return arcompact_handle05_2f_30(PARAMS); break; // illegal
477      case 0x31: return arcompact_handle05_2f_31(PARAMS); break; // illegal
478      case 0x32: return arcompact_handle05_2f_32(PARAMS); break; // illegal
479      case 0x33: return arcompact_handle05_2f_33(PARAMS); break; // illegal
480      case 0x34: return arcompact_handle05_2f_34(PARAMS); break; // illegal
481      case 0x35: return arcompact_handle05_2f_35(PARAMS); break; // illegal
482      case 0x36: return arcompact_handle05_2f_36(PARAMS); break; // illegal
483      case 0x37: return arcompact_handle05_2f_37(PARAMS); break; // illegal
484      case 0x38: return arcompact_handle05_2f_38(PARAMS); break; // illegal
485      case 0x39: return arcompact_handle05_2f_39(PARAMS); break; // illegal
486      case 0x3a: return arcompact_handle05_2f_3a(PARAMS); break; // illegal
487      case 0x3b: return arcompact_handle05_2f_3b(PARAMS); break; // illegal
488      case 0x3c: return arcompact_handle05_2f_3c(PARAMS); break; // illegal
489      case 0x3d: return arcompact_handle05_2f_3d(PARAMS); break; // illegal
490      case 0x3e: return arcompact_handle05_2f_3e(PARAMS); break; // illegal
491      case 0x3f: return arcompact_handle05_2f_3f(PARAMS); break; // ZOPs (Zero Operand Opcodes)
447      case 0x00: return arcompact_handle05_2f_00(PARAMS);  // SWAP
448      case 0x01: return arcompact_handle05_2f_01(PARAMS);  // NORM
449      case 0x02: return arcompact_handle05_2f_02(PARAMS);  // SAT16
450      case 0x03: return arcompact_handle05_2f_03(PARAMS);  // RND16
451      case 0x04: return arcompact_handle05_2f_04(PARAMS);  // ABSSW
452      case 0x05: return arcompact_handle05_2f_05(PARAMS);  // ABSS
453      case 0x06: return arcompact_handle05_2f_06(PARAMS);  // NEGSW
454      case 0x07: return arcompact_handle05_2f_07(PARAMS);  // NEGS
455      case 0x08: return arcompact_handle05_2f_08(PARAMS);  // NORMW
456      case 0x09: return arcompact_handle05_2f_09(PARAMS);  // illegal
457      case 0x0a: return arcompact_handle05_2f_0a(PARAMS);  // illegal
458      case 0x0b: return arcompact_handle05_2f_0b(PARAMS);  // illegal
459      case 0x0c: return arcompact_handle05_2f_0c(PARAMS);  // illegal
460      case 0x0d: return arcompact_handle05_2f_0d(PARAMS);  // illegal
461      case 0x0e: return arcompact_handle05_2f_0e(PARAMS);  // illegal
462      case 0x0f: return arcompact_handle05_2f_0f(PARAMS);  // illegal
463      case 0x10: return arcompact_handle05_2f_10(PARAMS);  // illegal
464      case 0x11: return arcompact_handle05_2f_11(PARAMS);  // illegal
465      case 0x12: return arcompact_handle05_2f_12(PARAMS);  // illegal
466      case 0x13: return arcompact_handle05_2f_13(PARAMS);  // illegal
467      case 0x14: return arcompact_handle05_2f_14(PARAMS);  // illegal
468      case 0x15: return arcompact_handle05_2f_15(PARAMS);  // illegal
469      case 0x16: return arcompact_handle05_2f_16(PARAMS);  // illegal
470      case 0x17: return arcompact_handle05_2f_17(PARAMS);  // illegal
471      case 0x18: return arcompact_handle05_2f_18(PARAMS);  // illegal
472      case 0x19: return arcompact_handle05_2f_19(PARAMS);  // illegal
473      case 0x1a: return arcompact_handle05_2f_1a(PARAMS);  // illegal
474      case 0x1b: return arcompact_handle05_2f_1b(PARAMS);  // illegal
475      case 0x1c: return arcompact_handle05_2f_1c(PARAMS);  // illegal
476      case 0x1d: return arcompact_handle05_2f_1d(PARAMS);  // illegal
477      case 0x1e: return arcompact_handle05_2f_1e(PARAMS);  // illegal
478      case 0x1f: return arcompact_handle05_2f_1f(PARAMS);  // illegal
479      case 0x20: return arcompact_handle05_2f_20(PARAMS);  // illegal
480      case 0x21: return arcompact_handle05_2f_21(PARAMS);  // illegal
481      case 0x22: return arcompact_handle05_2f_22(PARAMS);  // illegal
482      case 0x23: return arcompact_handle05_2f_23(PARAMS);  // illegal
483      case 0x24: return arcompact_handle05_2f_24(PARAMS);  // illegal
484      case 0x25: return arcompact_handle05_2f_25(PARAMS);  // illegal
485      case 0x26: return arcompact_handle05_2f_26(PARAMS);  // illegal
486      case 0x27: return arcompact_handle05_2f_27(PARAMS);  // illegal
487      case 0x28: return arcompact_handle05_2f_28(PARAMS);  // illegal
488      case 0x29: return arcompact_handle05_2f_29(PARAMS);  // illegal
489      case 0x2a: return arcompact_handle05_2f_2a(PARAMS);  // illegal
490      case 0x2b: return arcompact_handle05_2f_2b(PARAMS);  // illegal
491      case 0x2c: return arcompact_handle05_2f_2c(PARAMS);  // illegal
492      case 0x2d: return arcompact_handle05_2f_2d(PARAMS);  // illegal
493      case 0x2e: return arcompact_handle05_2f_2e(PARAMS);  // illegal
494      case 0x2f: return arcompact_handle05_2f_2f(PARAMS);  // illegal
495      case 0x30: return arcompact_handle05_2f_30(PARAMS);  // illegal
496      case 0x31: return arcompact_handle05_2f_31(PARAMS);  // illegal
497      case 0x32: return arcompact_handle05_2f_32(PARAMS);  // illegal
498      case 0x33: return arcompact_handle05_2f_33(PARAMS);  // illegal
499      case 0x34: return arcompact_handle05_2f_34(PARAMS);  // illegal
500      case 0x35: return arcompact_handle05_2f_35(PARAMS);  // illegal
501      case 0x36: return arcompact_handle05_2f_36(PARAMS);  // illegal
502      case 0x37: return arcompact_handle05_2f_37(PARAMS);  // illegal
503      case 0x38: return arcompact_handle05_2f_38(PARAMS);  // illegal
504      case 0x39: return arcompact_handle05_2f_39(PARAMS);  // illegal
505      case 0x3a: return arcompact_handle05_2f_3a(PARAMS);  // illegal
506      case 0x3b: return arcompact_handle05_2f_3b(PARAMS);  // illegal
507      case 0x3c: return arcompact_handle05_2f_3c(PARAMS);  // illegal
508      case 0x3d: return arcompact_handle05_2f_3d(PARAMS);  // illegal
509      case 0x3e: return arcompact_handle05_2f_3e(PARAMS);  // illegal
510      case 0x3f: return arcompact_handle05_2f_3f(PARAMS);  // ZOPs (Zero Operand Opcodes)
492511   }
493512
494513   return 0;
r242507r242508
501520
502521   switch (subinstr3)
503522   {
504      case 0x00: return arcompact_handle04_2f_3f_00(PARAMS); break; // illegal
505      case 0x01: return arcompact_handle04_2f_3f_01(PARAMS); break; // SLEEP
506      case 0x02: return arcompact_handle04_2f_3f_02(PARAMS); break; // SWI / TRAP9
507      case 0x03: return arcompact_handle04_2f_3f_03(PARAMS); break; // SYNC
508      case 0x04: return arcompact_handle04_2f_3f_04(PARAMS); break; // RTIE
509      case 0x05: return arcompact_handle04_2f_3f_05(PARAMS); break; // BRK
510      case 0x06: return arcompact_handle04_2f_3f_06(PARAMS); break; // illegal
511      case 0x07: return arcompact_handle04_2f_3f_07(PARAMS); break; // illegal
512      case 0x08: return arcompact_handle04_2f_3f_08(PARAMS); break; // illegal
513      case 0x09: return arcompact_handle04_2f_3f_09(PARAMS); break; // illegal
514      case 0x0a: return arcompact_handle04_2f_3f_0a(PARAMS); break; // illegal
515      case 0x0b: return arcompact_handle04_2f_3f_0b(PARAMS); break; // illegal
516      case 0x0c: return arcompact_handle04_2f_3f_0c(PARAMS); break; // illegal
517      case 0x0d: return arcompact_handle04_2f_3f_0d(PARAMS); break; // illegal
518      case 0x0e: return arcompact_handle04_2f_3f_0e(PARAMS); break; // illegal
519      case 0x0f: return arcompact_handle04_2f_3f_0f(PARAMS); break; // illegal
520      case 0x10: return arcompact_handle04_2f_3f_10(PARAMS); break; // illegal
521      case 0x11: return arcompact_handle04_2f_3f_11(PARAMS); break; // illegal
522      case 0x12: return arcompact_handle04_2f_3f_12(PARAMS); break; // illegal
523      case 0x13: return arcompact_handle04_2f_3f_13(PARAMS); break; // illegal
524      case 0x14: return arcompact_handle04_2f_3f_14(PARAMS); break; // illegal
525      case 0x15: return arcompact_handle04_2f_3f_15(PARAMS); break; // illegal
526      case 0x16: return arcompact_handle04_2f_3f_16(PARAMS); break; // illegal
527      case 0x17: return arcompact_handle04_2f_3f_17(PARAMS); break; // illegal
528      case 0x18: return arcompact_handle04_2f_3f_18(PARAMS); break; // illegal
529      case 0x19: return arcompact_handle04_2f_3f_19(PARAMS); break; // illegal
530      case 0x1a: return arcompact_handle04_2f_3f_1a(PARAMS); break; // illegal
531      case 0x1b: return arcompact_handle04_2f_3f_1b(PARAMS); break; // illegal
532      case 0x1c: return arcompact_handle04_2f_3f_1c(PARAMS); break; // illegal
533      case 0x1d: return arcompact_handle04_2f_3f_1d(PARAMS); break; // illegal
534      case 0x1e: return arcompact_handle04_2f_3f_1e(PARAMS); break; // illegal
535      case 0x1f: return arcompact_handle04_2f_3f_1f(PARAMS); break; // illegal
536      case 0x20: return arcompact_handle04_2f_3f_20(PARAMS); break; // illegal
537      case 0x21: return arcompact_handle04_2f_3f_21(PARAMS); break; // illegal
538      case 0x22: return arcompact_handle04_2f_3f_22(PARAMS); break; // illegal
539      case 0x23: return arcompact_handle04_2f_3f_23(PARAMS); break; // illegal
540      case 0x24: return arcompact_handle04_2f_3f_24(PARAMS); break; // illegal
541      case 0x25: return arcompact_handle04_2f_3f_25(PARAMS); break; // illegal
542      case 0x26: return arcompact_handle04_2f_3f_26(PARAMS); break; // illegal
543      case 0x27: return arcompact_handle04_2f_3f_27(PARAMS); break; // illegal
544      case 0x28: return arcompact_handle04_2f_3f_28(PARAMS); break; // illegal
545      case 0x29: return arcompact_handle04_2f_3f_29(PARAMS); break; // illegal
546      case 0x2a: return arcompact_handle04_2f_3f_2a(PARAMS); break; // illegal
547      case 0x2b: return arcompact_handle04_2f_3f_2b(PARAMS); break; // illegal
548      case 0x2c: return arcompact_handle04_2f_3f_2c(PARAMS); break; // illegal
549      case 0x2d: return arcompact_handle04_2f_3f_2d(PARAMS); break; // illegal
550      case 0x2e: return arcompact_handle04_2f_3f_2e(PARAMS); break; // illegal
551      case 0x2f: return arcompact_handle04_2f_3f_2f(PARAMS); break; // illegal
552      case 0x30: return arcompact_handle04_2f_3f_30(PARAMS); break; // illegal
553      case 0x31: return arcompact_handle04_2f_3f_31(PARAMS); break; // illegal
554      case 0x32: return arcompact_handle04_2f_3f_32(PARAMS); break; // illegal
555      case 0x33: return arcompact_handle04_2f_3f_33(PARAMS); break; // illegal
556      case 0x34: return arcompact_handle04_2f_3f_34(PARAMS); break; // illegal
557      case 0x35: return arcompact_handle04_2f_3f_35(PARAMS); break; // illegal
558      case 0x36: return arcompact_handle04_2f_3f_36(PARAMS); break; // illegal
559      case 0x37: return arcompact_handle04_2f_3f_37(PARAMS); break; // illegal
560      case 0x38: return arcompact_handle04_2f_3f_38(PARAMS); break; // illegal
561      case 0x39: return arcompact_handle04_2f_3f_39(PARAMS); break; // illegal
562      case 0x3a: return arcompact_handle04_2f_3f_3a(PARAMS); break; // illegal
563      case 0x3b: return arcompact_handle04_2f_3f_3b(PARAMS); break; // illegal
564      case 0x3c: return arcompact_handle04_2f_3f_3c(PARAMS); break; // illegal
565      case 0x3d: return arcompact_handle04_2f_3f_3d(PARAMS); break; // illegal
566      case 0x3e: return arcompact_handle04_2f_3f_3e(PARAMS); break; // illegal
567      case 0x3f: return arcompact_handle04_2f_3f_3f(PARAMS); break; // illegal
523      case 0x00: return arcompact_handle04_2f_3f_00(PARAMS);  // illegal
524      case 0x01: return arcompact_handle04_2f_3f_01(PARAMS);  // SLEEP
525      case 0x02: return arcompact_handle04_2f_3f_02(PARAMS);  // SWI / TRAP9
526      case 0x03: return arcompact_handle04_2f_3f_03(PARAMS);  // SYNC
527      case 0x04: return arcompact_handle04_2f_3f_04(PARAMS);  // RTIE
528      case 0x05: return arcompact_handle04_2f_3f_05(PARAMS);  // BRK
529      case 0x06: return arcompact_handle04_2f_3f_06(PARAMS);  // illegal
530      case 0x07: return arcompact_handle04_2f_3f_07(PARAMS);  // illegal
531      case 0x08: return arcompact_handle04_2f_3f_08(PARAMS);  // illegal
532      case 0x09: return arcompact_handle04_2f_3f_09(PARAMS);  // illegal
533      case 0x0a: return arcompact_handle04_2f_3f_0a(PARAMS);  // illegal
534      case 0x0b: return arcompact_handle04_2f_3f_0b(PARAMS);  // illegal
535      case 0x0c: return arcompact_handle04_2f_3f_0c(PARAMS);  // illegal
536      case 0x0d: return arcompact_handle04_2f_3f_0d(PARAMS);  // illegal
537      case 0x0e: return arcompact_handle04_2f_3f_0e(PARAMS);  // illegal
538      case 0x0f: return arcompact_handle04_2f_3f_0f(PARAMS);  // illegal
539      case 0x10: return arcompact_handle04_2f_3f_10(PARAMS);  // illegal
540      case 0x11: return arcompact_handle04_2f_3f_11(PARAMS);  // illegal
541      case 0x12: return arcompact_handle04_2f_3f_12(PARAMS);  // illegal
542      case 0x13: return arcompact_handle04_2f_3f_13(PARAMS);  // illegal
543      case 0x14: return arcompact_handle04_2f_3f_14(PARAMS);  // illegal
544      case 0x15: return arcompact_handle04_2f_3f_15(PARAMS);  // illegal
545      case 0x16: return arcompact_handle04_2f_3f_16(PARAMS);  // illegal
546      case 0x17: return arcompact_handle04_2f_3f_17(PARAMS);  // illegal
547      case 0x18: return arcompact_handle04_2f_3f_18(PARAMS);  // illegal
548      case 0x19: return arcompact_handle04_2f_3f_19(PARAMS);  // illegal
549      case 0x1a: return arcompact_handle04_2f_3f_1a(PARAMS);  // illegal
550      case 0x1b: return arcompact_handle04_2f_3f_1b(PARAMS);  // illegal
551      case 0x1c: return arcompact_handle04_2f_3f_1c(PARAMS);  // illegal
552      case 0x1d: return arcompact_handle04_2f_3f_1d(PARAMS);  // illegal
553      case 0x1e: return arcompact_handle04_2f_3f_1e(PARAMS);  // illegal
554      case 0x1f: return arcompact_handle04_2f_3f_1f(PARAMS);  // illegal
555      case 0x20: return arcompact_handle04_2f_3f_20(PARAMS);  // illegal
556      case 0x21: return arcompact_handle04_2f_3f_21(PARAMS);  // illegal
557      case 0x22: return arcompact_handle04_2f_3f_22(PARAMS);  // illegal
558      case 0x23: return arcompact_handle04_2f_3f_23(PARAMS);  // illegal
559      case 0x24: return arcompact_handle04_2f_3f_24(PARAMS);  // illegal
560      case 0x25: return arcompact_handle04_2f_3f_25(PARAMS);  // illegal
561      case 0x26: return arcompact_handle04_2f_3f_26(PARAMS);  // illegal
562      case 0x27: return arcompact_handle04_2f_3f_27(PARAMS);  // illegal
563      case 0x28: return arcompact_handle04_2f_3f_28(PARAMS);  // illegal
564      case 0x29: return arcompact_handle04_2f_3f_29(PARAMS);  // illegal
565      case 0x2a: return arcompact_handle04_2f_3f_2a(PARAMS);  // illegal
566      case 0x2b: return arcompact_handle04_2f_3f_2b(PARAMS);  // illegal
567      case 0x2c: return arcompact_handle04_2f_3f_2c(PARAMS);  // illegal
568      case 0x2d: return arcompact_handle04_2f_3f_2d(PARAMS);  // illegal
569      case 0x2e: return arcompact_handle04_2f_3f_2e(PARAMS);  // illegal
570      case 0x2f: return arcompact_handle04_2f_3f_2f(PARAMS);  // illegal
571      case 0x30: return arcompact_handle04_2f_3f_30(PARAMS);  // illegal
572      case 0x31: return arcompact_handle04_2f_3f_31(PARAMS);  // illegal
573      case 0x32: return arcompact_handle04_2f_3f_32(PARAMS);  // illegal
574      case 0x33: return arcompact_handle04_2f_3f_33(PARAMS);  // illegal
575      case 0x34: return arcompact_handle04_2f_3f_34(PARAMS);  // illegal
576      case 0x35: return arcompact_handle04_2f_3f_35(PARAMS);  // illegal
577      case 0x36: return arcompact_handle04_2f_3f_36(PARAMS);  // illegal
578      case 0x37: return arcompact_handle04_2f_3f_37(PARAMS);  // illegal
579      case 0x38: return arcompact_handle04_2f_3f_38(PARAMS);  // illegal
580      case 0x39: return arcompact_handle04_2f_3f_39(PARAMS);  // illegal
581      case 0x3a: return arcompact_handle04_2f_3f_3a(PARAMS);  // illegal
582      case 0x3b: return arcompact_handle04_2f_3f_3b(PARAMS);  // illegal
583      case 0x3c: return arcompact_handle04_2f_3f_3c(PARAMS);  // illegal
584      case 0x3d: return arcompact_handle04_2f_3f_3d(PARAMS);  // illegal
585      case 0x3e: return arcompact_handle04_2f_3f_3e(PARAMS);  // illegal
586      case 0x3f: return arcompact_handle04_2f_3f_3f(PARAMS);  // illegal
568587   }
569588
570589   return 0;
r242507r242508
578597
579598   switch (subinstr3)
580599   {
581      case 0x00: return arcompact_handle05_2f_3f_00(PARAMS); break; // illegal
582      case 0x01: return arcompact_handle05_2f_3f_01(PARAMS); break; // illegal
583      case 0x02: return arcompact_handle05_2f_3f_02(PARAMS); break; // illegal
584      case 0x03: return arcompact_handle05_2f_3f_03(PARAMS); break; // illegal
585      case 0x04: return arcompact_handle05_2f_3f_04(PARAMS); break; // illegal
586      case 0x05: return arcompact_handle05_2f_3f_05(PARAMS); break; // illegal
587      case 0x06: return arcompact_handle05_2f_3f_06(PARAMS); break; // illegal
588      case 0x07: return arcompact_handle05_2f_3f_07(PARAMS); break; // illegal
589      case 0x08: return arcompact_handle05_2f_3f_08(PARAMS); break; // illegal
590      case 0x09: return arcompact_handle05_2f_3f_09(PARAMS); break; // illegal
591      case 0x0a: return arcompact_handle05_2f_3f_0a(PARAMS); break; // illegal
592      case 0x0b: return arcompact_handle05_2f_3f_0b(PARAMS); break; // illegal
593      case 0x0c: return arcompact_handle05_2f_3f_0c(PARAMS); break; // illegal
594      case 0x0d: return arcompact_handle05_2f_3f_0d(PARAMS); break; // illegal
595      case 0x0e: return arcompact_handle05_2f_3f_0e(PARAMS); break; // illegal
596      case 0x0f: return arcompact_handle05_2f_3f_0f(PARAMS); break; // illegal
597      case 0x10: return arcompact_handle05_2f_3f_10(PARAMS); break; // illegal
598      case 0x11: return arcompact_handle05_2f_3f_11(PARAMS); break; // illegal
599      case 0x12: return arcompact_handle05_2f_3f_12(PARAMS); break; // illegal
600      case 0x13: return arcompact_handle05_2f_3f_13(PARAMS); break; // illegal
601      case 0x14: return arcompact_handle05_2f_3f_14(PARAMS); break; // illegal
602      case 0x15: return arcompact_handle05_2f_3f_15(PARAMS); break; // illegal
603      case 0x16: return arcompact_handle05_2f_3f_16(PARAMS); break; // illegal
604      case 0x17: return arcompact_handle05_2f_3f_17(PARAMS); break; // illegal
605      case 0x18: return arcompact_handle05_2f_3f_18(PARAMS); break; // illegal
606      case 0x19: return arcompact_handle05_2f_3f_19(PARAMS); break; // illegal
607      case 0x1a: return arcompact_handle05_2f_3f_1a(PARAMS); break; // illegal
608      case 0x1b: return arcompact_handle05_2f_3f_1b(PARAMS); break; // illegal
609      case 0x1c: return arcompact_handle05_2f_3f_1c(PARAMS); break; // illegal
610      case 0x1d: return arcompact_handle05_2f_3f_1d(PARAMS); break; // illegal
611      case 0x1e: return arcompact_handle05_2f_3f_1e(PARAMS); break; // illegal
612      case 0x1f: return arcompact_handle05_2f_3f_1f(PARAMS); break; // illegal
613      case 0x20: return arcompact_handle05_2f_3f_20(PARAMS); break; // illegal
614      case 0x21: return arcompact_handle05_2f_3f_21(PARAMS); break; // illegal
615      case 0x22: return arcompact_handle05_2f_3f_22(PARAMS); break; // illegal
616      case 0x23: return arcompact_handle05_2f_3f_23(PARAMS); break; // illegal
617      case 0x24: return arcompact_handle05_2f_3f_24(PARAMS); break; // illegal
618      case 0x25: return arcompact_handle05_2f_3f_25(PARAMS); break; // illegal
619      case 0x26: return arcompact_handle05_2f_3f_26(PARAMS); break; // illegal
620      case 0x27: return arcompact_handle05_2f_3f_27(PARAMS); break; // illegal
621      case 0x28: return arcompact_handle05_2f_3f_28(PARAMS); break; // illegal
622      case 0x29: return arcompact_handle05_2f_3f_29(PARAMS); break; // illegal
623      case 0x2a: return arcompact_handle05_2f_3f_2a(PARAMS); break; // illegal
624      case 0x2b: return arcompact_handle05_2f_3f_2b(PARAMS); break; // illegal
625      case 0x2c: return arcompact_handle05_2f_3f_2c(PARAMS); break; // illegal
626      case 0x2d: return arcompact_handle05_2f_3f_2d(PARAMS); break; // illegal
627      case 0x2e: return arcompact_handle05_2f_3f_2e(PARAMS); break; // illegal
628      case 0x2f: return arcompact_handle05_2f_3f_2f(PARAMS); break; // illegal
629      case 0x30: return arcompact_handle05_2f_3f_30(PARAMS); break; // illegal
630      case 0x31: return arcompact_handle05_2f_3f_31(PARAMS); break; // illegal
631      case 0x32: return arcompact_handle05_2f_3f_32(PARAMS); break; // illegal
632      case 0x33: return arcompact_handle05_2f_3f_33(PARAMS); break; // illegal
633      case 0x34: return arcompact_handle05_2f_3f_34(PARAMS); break; // illegal
634      case 0x35: return arcompact_handle05_2f_3f_35(PARAMS); break; // illegal
635      case 0x36: return arcompact_handle05_2f_3f_36(PARAMS); break; // illegal
636      case 0x37: return arcompact_handle05_2f_3f_37(PARAMS); break; // illegal
637      case 0x38: return arcompact_handle05_2f_3f_38(PARAMS); break; // illegal
638      case 0x39: return arcompact_handle05_2f_3f_39(PARAMS); break; // illegal
639      case 0x3a: return arcompact_handle05_2f_3f_3a(PARAMS); break; // illegal
640      case 0x3b: return arcompact_handle05_2f_3f_3b(PARAMS); break; // illegal
641      case 0x3c: return arcompact_handle05_2f_3f_3c(PARAMS); break; // illegal
642      case 0x3d: return arcompact_handle05_2f_3f_3d(PARAMS); break; // illegal
643      case 0x3e: return arcompact_handle05_2f_3f_3e(PARAMS); break; // illegal
644      case 0x3f: return arcompact_handle05_2f_3f_3f(PARAMS); break; // illegal
600      case 0x00: return arcompact_handle05_2f_3f_00(PARAMS);  // illegal
601      case 0x01: return arcompact_handle05_2f_3f_01(PARAMS);  // illegal
602      case 0x02: return arcompact_handle05_2f_3f_02(PARAMS);  // illegal
603      case 0x03: return arcompact_handle05_2f_3f_03(PARAMS);  // illegal
604      case 0x04: return arcompact_handle05_2f_3f_04(PARAMS);  // illegal
605      case 0x05: return arcompact_handle05_2f_3f_05(PARAMS);  // illegal
606      case 0x06: return arcompact_handle05_2f_3f_06(PARAMS);  // illegal
607      case 0x07: return arcompact_handle05_2f_3f_07(PARAMS);  // illegal
608      case 0x08: return arcompact_handle05_2f_3f_08(PARAMS);  // illegal
609      case 0x09: return arcompact_handle05_2f_3f_09(PARAMS);  // illegal
610      case 0x0a: return arcompact_handle05_2f_3f_0a(PARAMS);  // illegal
611      case 0x0b: return arcompact_handle05_2f_3f_0b(PARAMS);  // illegal
612      case 0x0c: return arcompact_handle05_2f_3f_0c(PARAMS);  // illegal
613      case 0x0d: return arcompact_handle05_2f_3f_0d(PARAMS);  // illegal
614      case 0x0e: return arcompact_handle05_2f_3f_0e(PARAMS);  // illegal
615      case 0x0f: return arcompact_handle05_2f_3f_0f(PARAMS);  // illegal
616      case 0x10: return arcompact_handle05_2f_3f_10(PARAMS);  // illegal
617      case 0x11: return arcompact_handle05_2f_3f_11(PARAMS);  // illegal
618      case 0x12: return arcompact_handle05_2f_3f_12(PARAMS);  // illegal
619      case 0x13: return arcompact_handle05_2f_3f_13(PARAMS);  // illegal
620      case 0x14: return arcompact_handle05_2f_3f_14(PARAMS);  // illegal
621      case 0x15: return arcompact_handle05_2f_3f_15(PARAMS);  // illegal
622      case 0x16: return arcompact_handle05_2f_3f_16(PARAMS);  // illegal
623      case 0x17: return arcompact_handle05_2f_3f_17(PARAMS);  // illegal
624      case 0x18: return arcompact_handle05_2f_3f_18(PARAMS);  // illegal
625      case 0x19: return arcompact_handle05_2f_3f_19(PARAMS);  // illegal
626      case 0x1a: return arcompact_handle05_2f_3f_1a(PARAMS);  // illegal
627      case 0x1b: return arcompact_handle05_2f_3f_1b(PARAMS);  // illegal
628      case 0x1c: return arcompact_handle05_2f_3f_1c(PARAMS);  // illegal
629      case 0x1d: return arcompact_handle05_2f_3f_1d(PARAMS);  // illegal
630      case 0x1e: return arcompact_handle05_2f_3f_1e(PARAMS);  // illegal
631      case 0x1f: return arcompact_handle05_2f_3f_1f(PARAMS);  // illegal
632      case 0x20: return arcompact_handle05_2f_3f_20(PARAMS);  // illegal
633      case 0x21: return arcompact_handle05_2f_3f_21(PARAMS);  // illegal
634      case 0x22: return arcompact_handle05_2f_3f_22(PARAMS);  // illegal
635      case 0x23: return arcompact_handle05_2f_3f_23(PARAMS);  // illegal
636      case 0x24: return arcompact_handle05_2f_3f_24(PARAMS);  // illegal
637      case 0x25: return arcompact_handle05_2f_3f_25(PARAMS);  // illegal
638      case 0x26: return arcompact_handle05_2f_3f_26(PARAMS);  // illegal
639      case 0x27: return arcompact_handle05_2f_3f_27(PARAMS);  // illegal
640      case 0x28: return arcompact_handle05_2f_3f_28(PARAMS);  // illegal
641      case 0x29: return arcompact_handle05_2f_3f_29(PARAMS);  // illegal
642      case 0x2a: return arcompact_handle05_2f_3f_2a(PARAMS);  // illegal
643      case 0x2b: return arcompact_handle05_2f_3f_2b(PARAMS);  // illegal
644      case 0x2c: return arcompact_handle05_2f_3f_2c(PARAMS);  // illegal
645      case 0x2d: return arcompact_handle05_2f_3f_2d(PARAMS);  // illegal
646      case 0x2e: return arcompact_handle05_2f_3f_2e(PARAMS);  // illegal
647      case 0x2f: return arcompact_handle05_2f_3f_2f(PARAMS);  // illegal
648      case 0x30: return arcompact_handle05_2f_3f_30(PARAMS);  // illegal
649      case 0x31: return arcompact_handle05_2f_3f_31(PARAMS);  // illegal
650      case 0x32: return arcompact_handle05_2f_3f_32(PARAMS);  // illegal
651      case 0x33: return arcompact_handle05_2f_3f_33(PARAMS);  // illegal
652      case 0x34: return arcompact_handle05_2f_3f_34(PARAMS);  // illegal
653      case 0x35: return arcompact_handle05_2f_3f_35(PARAMS);  // illegal
654      case 0x36: return arcompact_handle05_2f_3f_36(PARAMS);  // illegal
655      case 0x37: return arcompact_handle05_2f_3f_37(PARAMS);  // illegal
656      case 0x38: return arcompact_handle05_2f_3f_38(PARAMS);  // illegal
657      case 0x39: return arcompact_handle05_2f_3f_39(PARAMS);  // illegal
658      case 0x3a: return arcompact_handle05_2f_3f_3a(PARAMS);  // illegal
659      case 0x3b: return arcompact_handle05_2f_3f_3b(PARAMS);  // illegal
660      case 0x3c: return arcompact_handle05_2f_3f_3c(PARAMS);  // illegal
661      case 0x3d: return arcompact_handle05_2f_3f_3d(PARAMS);  // illegal
662      case 0x3e: return arcompact_handle05_2f_3f_3e(PARAMS);  // illegal
663      case 0x3f: return arcompact_handle05_2f_3f_3f(PARAMS);  // illegal
645664   }
646665
647666   return 0;
r242507r242508
655674
656675   switch (subinstr)
657676   {
658      case 0x00: return arcompact_handle05_00(PARAMS); break; // ASL
659      case 0x01: return arcompact_handle05_01(PARAMS); break; // LSR
660      case 0x02: return arcompact_handle05_02(PARAMS); break; // ASR
661      case 0x03: return arcompact_handle05_03(PARAMS); break; // ROR
662      case 0x04: return arcompact_handle05_04(PARAMS); break; // MUL64
663      case 0x05: return arcompact_handle05_05(PARAMS); break; // MULU64
664      case 0x06: return arcompact_handle05_06(PARAMS); break; // ADDS
665      case 0x07: return arcompact_handle05_07(PARAMS); break; // SUBS
666      case 0x08: return arcompact_handle05_08(PARAMS); break; // DIVAW
667      case 0x09: return arcompact_handle05_09(PARAMS); break; // illegal
668      case 0x0a: return arcompact_handle05_0a(PARAMS); break; // ASLS
669      case 0x0b: return arcompact_handle05_0b(PARAMS); break; // ASRS
670      case 0x0c: return arcompact_handle05_0c(PARAMS); break; // illegal
671      case 0x0d: return arcompact_handle05_0d(PARAMS); break; // illegal
672      case 0x0e: return arcompact_handle05_0e(PARAMS); break; // illegal
673      case 0x0f: return arcompact_handle05_0f(PARAMS); break; // illegal
674      case 0x10: return arcompact_handle05_10(PARAMS); break; // illegal
675      case 0x11: return arcompact_handle05_11(PARAMS); break; // illegal
676      case 0x12: return arcompact_handle05_12(PARAMS); break; // illegal
677      case 0x13: return arcompact_handle05_13(PARAMS); break; // illegal
678      case 0x14: return arcompact_handle05_14(PARAMS); break; // illegal
679      case 0x15: return arcompact_handle05_15(PARAMS); break; // illegal
680      case 0x16: return arcompact_handle05_16(PARAMS); break; // illegal
681      case 0x17: return arcompact_handle05_17(PARAMS); break; // illegal
682      case 0x18: return arcompact_handle05_18(PARAMS); break; // illegal
683      case 0x19: return arcompact_handle05_19(PARAMS); break; // illegal
684      case 0x1a: return arcompact_handle05_1a(PARAMS); break; // illegal
685      case 0x1b: return arcompact_handle05_1b(PARAMS); break; // illegal
686      case 0x1c: return arcompact_handle05_1c(PARAMS); break; // illegal
687      case 0x1d: return arcompact_handle05_1d(PARAMS); break; // illegal
688      case 0x1e: return arcompact_handle05_1e(PARAMS); break; // illegal
689      case 0x1f: return arcompact_handle05_1f(PARAMS); break; // illegal
690      case 0x20: return arcompact_handle05_20(PARAMS); break; // illegal
691      case 0x21: return arcompact_handle05_21(PARAMS); break; // illegal
692      case 0x22: return arcompact_handle05_22(PARAMS); break; // illegal
693      case 0x23: return arcompact_handle05_23(PARAMS); break; // illegal
694      case 0x24: return arcompact_handle05_24(PARAMS); break; // illegal
695      case 0x25: return arcompact_handle05_25(PARAMS); break; // illegal
696      case 0x26: return arcompact_handle05_26(PARAMS); break; // illegal
697      case 0x27: return arcompact_handle05_27(PARAMS); break; // illegal
698      case 0x28: return arcompact_handle05_28(PARAMS); break; // ADDSDW
699      case 0x29: return arcompact_handle05_29(PARAMS); break; // SUBSDW
700      case 0x2a: return arcompact_handle05_2a(PARAMS); break; // illegal
701      case 0x2b: return arcompact_handle05_2b(PARAMS); break; // illegal
702      case 0x2c: return arcompact_handle05_2c(PARAMS); break; // illegal
703      case 0x2d: return arcompact_handle05_2d(PARAMS); break; // illegal
704      case 0x2e: return arcompact_handle05_2e(PARAMS); break; // illegal
705      case 0x2f: return arcompact_handle05_2f(PARAMS); break; // SOPs
706      case 0x30: return arcompact_handle05_30(PARAMS); break; // illegal
707      case 0x31: return arcompact_handle05_31(PARAMS); break; // illegal
708      case 0x32: return arcompact_handle05_32(PARAMS); break; // illegal
709      case 0x33: return arcompact_handle05_33(PARAMS); break; // illegal
710      case 0x34: return arcompact_handle05_34(PARAMS); break; // illegal
711      case 0x35: return arcompact_handle05_35(PARAMS); break; // illegal
712      case 0x36: return arcompact_handle05_36(PARAMS); break; // illegal
713      case 0x37: return arcompact_handle05_37(PARAMS); break; // illegal
714      case 0x38: return arcompact_handle05_38(PARAMS); break; // illegal
715      case 0x39: return arcompact_handle05_39(PARAMS); break; // illegal
716      case 0x3a: return arcompact_handle05_3a(PARAMS); break; // illegal
717      case 0x3b: return arcompact_handle05_3b(PARAMS); break; // illegal
718      case 0x3c: return arcompact_handle05_3c(PARAMS); break; // illegal
719      case 0x3d: return arcompact_handle05_3d(PARAMS); break; // illegal
720      case 0x3e: return arcompact_handle05_3e(PARAMS); break; // illegal
721      case 0x3f: return arcompact_handle05_3f(PARAMS); break; // illegal
677      case 0x00: return arcompact_handle05_00(PARAMS);  // ASL
678      case 0x01: return arcompact_handle05_01(PARAMS);  // LSR
679      case 0x02: return arcompact_handle05_02(PARAMS);  // ASR
680      case 0x03: return arcompact_handle05_03(PARAMS);  // ROR
681      case 0x04: return arcompact_handle05_04(PARAMS);  // MUL64
682      case 0x05: return arcompact_handle05_05(PARAMS);  // MULU64
683      case 0x06: return arcompact_handle05_06(PARAMS);  // ADDS
684      case 0x07: return arcompact_handle05_07(PARAMS);  // SUBS
685      case 0x08: return arcompact_handle05_08(PARAMS);  // DIVAW
686      case 0x09: return arcompact_handle05_09(PARAMS);  // illegal
687      case 0x0a: return arcompact_handle05_0a(PARAMS);  // ASLS
688      case 0x0b: return arcompact_handle05_0b(PARAMS);  // ASRS
689      case 0x0c: return arcompact_handle05_0c(PARAMS);  // illegal
690      case 0x0d: return arcompact_handle05_0d(PARAMS);  // illegal
691      case 0x0e: return arcompact_handle05_0e(PARAMS);  // illegal
692      case 0x0f: return arcompact_handle05_0f(PARAMS);  // illegal
693      case 0x10: return arcompact_handle05_10(PARAMS);  // illegal
694      case 0x11: return arcompact_handle05_11(PARAMS);  // illegal
695      case 0x12: return arcompact_handle05_12(PARAMS);  // illegal
696      case 0x13: return arcompact_handle05_13(PARAMS);  // illegal
697      case 0x14: return arcompact_handle05_14(PARAMS);  // illegal
698      case 0x15: return arcompact_handle05_15(PARAMS);  // illegal
699      case 0x16: return arcompact_handle05_16(PARAMS);  // illegal
700      case 0x17: return arcompact_handle05_17(PARAMS);  // illegal
701      case 0x18: return arcompact_handle05_18(PARAMS);  // illegal
702      case 0x19: return arcompact_handle05_19(PARAMS);  // illegal
703      case 0x1a: return arcompact_handle05_1a(PARAMS);  // illegal
704      case 0x1b: return arcompact_handle05_1b(PARAMS);  // illegal
705      case 0x1c: return arcompact_handle05_1c(PARAMS);  // illegal
706      case 0x1d: return arcompact_handle05_1d(PARAMS);  // illegal
707      case 0x1e: return arcompact_handle05_1e(PARAMS);  // illegal
708      case 0x1f: return arcompact_handle05_1f(PARAMS);  // illegal
709      case 0x20: return arcompact_handle05_20(PARAMS);  // illegal
710      case 0x21: return arcompact_handle05_21(PARAMS);  // illegal
711      case 0x22: return arcompact_handle05_22(PARAMS);  // illegal
712      case 0x23: return arcompact_handle05_23(PARAMS);  // illegal
713      case 0x24: return arcompact_handle05_24(PARAMS);  // illegal
714      case 0x25: return arcompact_handle05_25(PARAMS);  // illegal
715      case 0x26: return arcompact_handle05_26(PARAMS);  // illegal
716      case 0x27: return arcompact_handle05_27(PARAMS);  // illegal
717      case 0x28: return arcompact_handle05_28(PARAMS);  // ADDSDW
718      case 0x29: return arcompact_handle05_29(PARAMS);  // SUBSDW
719      case 0x2a: return arcompact_handle05_2a(PARAMS);  // illegal
720      case 0x2b: return arcompact_handle05_2b(PARAMS);  // illegal
721      case 0x2c: return arcompact_handle05_2c(PARAMS);  // illegal
722      case 0x2d: return arcompact_handle05_2d(PARAMS);  // illegal
723      case 0x2e: return arcompact_handle05_2e(PARAMS);  // illegal
724      case 0x2f: return arcompact_handle05_2f(PARAMS);  // SOPs
725      case 0x30: return arcompact_handle05_30(PARAMS);  // illegal
726      case 0x31: return arcompact_handle05_31(PARAMS);  // illegal
727      case 0x32: return arcompact_handle05_32(PARAMS);  // illegal
728      case 0x33: return arcompact_handle05_33(PARAMS);  // illegal
729      case 0x34: return arcompact_handle05_34(PARAMS);  // illegal
730      case 0x35: return arcompact_handle05_35(PARAMS);  // illegal
731      case 0x36: return arcompact_handle05_36(PARAMS);  // illegal
732      case 0x37: return arcompact_handle05_37(PARAMS);  // illegal
733      case 0x38: return arcompact_handle05_38(PARAMS);  // illegal
734      case 0x39: return arcompact_handle05_39(PARAMS);  // illegal
735      case 0x3a: return arcompact_handle05_3a(PARAMS);  // illegal
736      case 0x3b: return arcompact_handle05_3b(PARAMS);  // illegal
737      case 0x3c: return arcompact_handle05_3c(PARAMS);  // illegal
738      case 0x3d: return arcompact_handle05_3d(PARAMS);  // illegal
739      case 0x3e: return arcompact_handle05_3e(PARAMS);  // illegal
740      case 0x3f: return arcompact_handle05_3f(PARAMS);  // illegal
722741   }
723742
724743   return 0;
r242507r242508
730749
731750   switch (subinstr)
732751   {
733      case 0x00: return arcompact_handle0c_00(PARAMS); break; // LD_S
734      case 0x01: return arcompact_handle0c_01(PARAMS); break; // LDB_S
735      case 0x02: return arcompact_handle0c_02(PARAMS); break; // LDW_S
736      case 0x03: return arcompact_handle0c_03(PARAMS); break; // ADD_S
752      case 0x00: return arcompact_handle0c_00(PARAMS);  // LD_S
753      case 0x01: return arcompact_handle0c_01(PARAMS);  // LDB_S
754      case 0x02: return arcompact_handle0c_02(PARAMS);  // LDW_S
755      case 0x03: return arcompact_handle0c_03(PARAMS);  // ADD_S
737756   }
738757
739758   return 0;
r242507r242508
745764
746765   switch (subinstr)
747766   {
748      case 0x00: return arcompact_handle0d_00(PARAMS); break; // ADD_S
749      case 0x01: return arcompact_handle0d_01(PARAMS); break; // SUB_S
750      case 0x02: return arcompact_handle0d_02(PARAMS); break; // ASL_S
751      case 0x03: return arcompact_handle0d_03(PARAMS); break; // ASR_S
767      case 0x00: return arcompact_handle0d_00(PARAMS);  // ADD_S
768      case 0x01: return arcompact_handle0d_01(PARAMS);  // SUB_S
769      case 0x02: return arcompact_handle0d_02(PARAMS);  // ASL_S
770      case 0x03: return arcompact_handle0d_03(PARAMS);  // ASR_S
752771   }
753772
754773   return 0;
r242507r242508
760779
761780   switch (subinstr)
762781   {
763      case 0x00: return arcompact_handle0e_00(PARAMS); break; // ADD_S
764      case 0x01: return arcompact_handle0e_01(PARAMS); break; // MOV_S
765      case 0x02: return arcompact_handle0e_02(PARAMS); break; // CMP_S
766      case 0x03: return arcompact_handle0e_03(PARAMS); break; // MOV_S
782      case 0x00: return arcompact_handle0e_00(PARAMS);  // ADD_S
783      case 0x01: return arcompact_handle0e_01(PARAMS);  // MOV_S
784      case 0x02: return arcompact_handle0e_02(PARAMS);  // CMP_S
785      case 0x03: return arcompact_handle0e_03(PARAMS);  // MOV_S
767786   }
768787
769788   return 0;
r242507r242508
775794
776795   switch (subinstr)
777796   {
778      case 0x00: return arcompact_handle0f_00(PARAMS); break; // SOPs
779      case 0x01: return arcompact_handle0f_01(PARAMS); break; // 0x01 <illegal>
780      case 0x02: return arcompact_handle0f_02(PARAMS); break; // SUB_S
781      case 0x03: return arcompact_handle0f_03(PARAMS); break; // 0x03 <illegal>
782      case 0x04: return arcompact_handle0f_04(PARAMS); break; // AND_S
783      case 0x05: return arcompact_handle0f_05(PARAMS); break; // OR_S
784      case 0x06: return arcompact_handle0f_06(PARAMS); break; // BIC_S
785      case 0x07: return arcompact_handle0f_07(PARAMS); break; // XOR_S
786      case 0x08: return arcompact_handle0f_08(PARAMS); break; // 0x08 <illegal>
787      case 0x09: return arcompact_handle0f_09(PARAMS); break; // 0x09 <illegal>
788      case 0x0a: return arcompact_handle0f_0a(PARAMS); break; // 0x0a <illegal>
789      case 0x0b: return arcompact_handle0f_0b(PARAMS); break; // TST_S
790      case 0x0c: return arcompact_handle0f_0c(PARAMS); break; // MUL64_S
791      case 0x0d: return arcompact_handle0f_0d(PARAMS); break; // SEXB_S
792      case 0x0e: return arcompact_handle0f_0e(PARAMS); break; // SEXW_S
793      case 0x0f: return arcompact_handle0f_0f(PARAMS); break; // EXTB_S
794      case 0x10: return arcompact_handle0f_10(PARAMS); break; // EXTW_S
795      case 0x11: return arcompact_handle0f_11(PARAMS); break; // ABS_S
796      case 0x12: return arcompact_handle0f_12(PARAMS); break; // NOT_S
797      case 0x13: return arcompact_handle0f_13(PARAMS); break; // NEG_S
798      case 0x14: return arcompact_handle0f_14(PARAMS); break; // ADD1_S
799      case 0x15: return arcompact_handle0f_15(PARAMS); break; // ADD2_S
800      case 0x16: return arcompact_handle0f_16(PARAMS); break; // ADD3_S
801      case 0x17: return arcompact_handle0f_17(PARAMS); break; // 0x17 <illegal>
802      case 0x18: return arcompact_handle0f_18(PARAMS); break; // ASL_S (multiple)
803      case 0x19: return arcompact_handle0f_19(PARAMS); break; // LSR_S (multiple)
804      case 0x1a: return arcompact_handle0f_1a(PARAMS); break; // ASR_S (multiple)
805      case 0x1b: return arcompact_handle0f_1b(PARAMS); break; // ASL_S (single)
806      case 0x1c: return arcompact_handle0f_1c(PARAMS); break; // LSR_S (single)
807      case 0x1d: return arcompact_handle0f_1d(PARAMS); break; // ASR_S (single)
808      case 0x1e: return arcompact_handle0f_1e(PARAMS); break; // TRAP (not a5?)
809      case 0x1f: return arcompact_handle0f_1f(PARAMS); break; // BRK_S ( 0x7fff only? )
797      case 0x00: return arcompact_handle0f_00(PARAMS);  // SOPs
798      case 0x01: return arcompact_handle0f_01(PARAMS);  // 0x01 <illegal>
799      case 0x02: return arcompact_handle0f_02(PARAMS);  // SUB_S
800      case 0x03: return arcompact_handle0f_03(PARAMS);  // 0x03 <illegal>
801      case 0x04: return arcompact_handle0f_04(PARAMS);  // AND_S
802      case 0x05: return arcompact_handle0f_05(PARAMS);  // OR_S
803      case 0x06: return arcompact_handle0f_06(PARAMS);  // BIC_S
804      case 0x07: return arcompact_handle0f_07(PARAMS);  // XOR_S
805      case 0x08: return arcompact_handle0f_08(PARAMS);  // 0x08 <illegal>
806      case 0x09: return arcompact_handle0f_09(PARAMS);  // 0x09 <illegal>
807      case 0x0a: return arcompact_handle0f_0a(PARAMS);  // 0x0a <illegal>
808      case 0x0b: return arcompact_handle0f_0b(PARAMS);  // TST_S
809      case 0x0c: return arcompact_handle0f_0c(PARAMS);  // MUL64_S
810      case 0x0d: return arcompact_handle0f_0d(PARAMS);  // SEXB_S
811      case 0x0e: return arcompact_handle0f_0e(PARAMS);  // SEXW_S
812      case 0x0f: return arcompact_handle0f_0f(PARAMS);  // EXTB_S
813      case 0x10: return arcompact_handle0f_10(PARAMS);  // EXTW_S
814      case 0x11: return arcompact_handle0f_11(PARAMS);  // ABS_S
815      case 0x12: return arcompact_handle0f_12(PARAMS);  // NOT_S
816      case 0x13: return arcompact_handle0f_13(PARAMS);  // NEG_S
817      case 0x14: return arcompact_handle0f_14(PARAMS);  // ADD1_S
818      case 0x15: return arcompact_handle0f_15(PARAMS);  // ADD2_S
819      case 0x16: return arcompact_handle0f_16(PARAMS);  // ADD3_S
820      case 0x17: return arcompact_handle0f_17(PARAMS);  // 0x17 <illegal>
821      case 0x18: return arcompact_handle0f_18(PARAMS);  // ASL_S (multiple)
822      case 0x19: return arcompact_handle0f_19(PARAMS);  // LSR_S (multiple)
823      case 0x1a: return arcompact_handle0f_1a(PARAMS);  // ASR_S (multiple)
824      case 0x1b: return arcompact_handle0f_1b(PARAMS);  // ASL_S (single)
825      case 0x1c: return arcompact_handle0f_1c(PARAMS);  // LSR_S (single)
826      case 0x1d: return arcompact_handle0f_1d(PARAMS);  // ASR_S (single)
827      case 0x1e: return arcompact_handle0f_1e(PARAMS);  // TRAP (not a5?)
828      case 0x1f: return arcompact_handle0f_1f(PARAMS);  // BRK_S ( 0x7fff only? )
810829
811830   }
812831
r242507r242508
819838
820839   switch (subinstr)
821840   {
822      case 0x00: return arcompact_handle0f_00_00(PARAMS); break; // J_S
823      case 0x01: return arcompact_handle0f_00_01(PARAMS); break; // J_S.D
824      case 0x02: return arcompact_handle0f_00_02(PARAMS); break; // JL_S
825      case 0x03: return arcompact_handle0f_00_03(PARAMS); break; // JL_S.D
826      case 0x04: return arcompact_handle0f_00_04(PARAMS); break; // 0x04 <illegal>
827      case 0x05: return arcompact_handle0f_00_05(PARAMS); break; // 0x05 <illegal>
828      case 0x06: return arcompact_handle0f_00_06(PARAMS); break; // SUB_S.NE
829      case 0x07: return arcompact_handle0f_00_07(PARAMS); break; // ZOPs
841      case 0x00: return arcompact_handle0f_00_00(PARAMS);  // J_S
842      case 0x01: return arcompact_handle0f_00_01(PARAMS);  // J_S.D
843      case 0x02: return arcompact_handle0f_00_02(PARAMS);  // JL_S
844      case 0x03: return arcompact_handle0f_00_03(PARAMS);  // JL_S.D
845      case 0x04: return arcompact_handle0f_00_04(PARAMS);  // 0x04 <illegal>
846      case 0x05: return arcompact_handle0f_00_05(PARAMS);  // 0x05 <illegal>
847      case 0x06: return arcompact_handle0f_00_06(PARAMS);  // SUB_S.NE
848      case 0x07: return arcompact_handle0f_00_07(PARAMS);  // ZOPs
830849
831850   }
832851
r242507r242508
839858
840859   switch (subinstr3)
841860   {
842      case 0x00: return arcompact_handle0f_00_07_00(PARAMS); break; // NOP_S
843      case 0x01: return arcompact_handle0f_00_07_01(PARAMS); break; // UNIMP_S
844      case 0x02: return arcompact_handle0f_00_07_02(PARAMS); break; // 0x02 <illegal>
845      case 0x03: return arcompact_handle0f_00_07_03(PARAMS); break; // 0x03 <illegal>
846      case 0x04: return arcompact_handle0f_00_07_04(PARAMS); break; // JEQ_S [BLINK]
847      case 0x05: return arcompact_handle0f_00_07_05(PARAMS); break; // JNE_S [BLINK]
848      case 0x06: return arcompact_handle0f_00_07_06(PARAMS); break; // J_S [BLINK]
849      case 0x07: return arcompact_handle0f_00_07_07(PARAMS); break; // J_S.D [BLINK]
861      case 0x00: return arcompact_handle0f_00_07_00(PARAMS);  // NOP_S
862      case 0x01: return arcompact_handle0f_00_07_01(PARAMS);  // UNIMP_S
863      case 0x02: return arcompact_handle0f_00_07_02(PARAMS);  // 0x02 <illegal>
864      case 0x03: return arcompact_handle0f_00_07_03(PARAMS);  // 0x03 <illegal>
865      case 0x04: return arcompact_handle0f_00_07_04(PARAMS);  // JEQ_S [BLINK]
866      case 0x05: return arcompact_handle0f_00_07_05(PARAMS);  // JNE_S [BLINK]
867      case 0x06: return arcompact_handle0f_00_07_06(PARAMS);  // J_S [BLINK]
868      case 0x07: return arcompact_handle0f_00_07_07(PARAMS);  // J_S.D [BLINK]
850869
851870   }
852871
r242507r242508
859878
860879   switch (subinstr)
861880   {
862      case 0x00: return arcompact_handle17_00(PARAMS); break; // ASL_S
863      case 0x01: return arcompact_handle17_01(PARAMS); break; // LSR_S
864      case 0x02: return arcompact_handle17_02(PARAMS); break; // ASR_S
865      case 0x03: return arcompact_handle17_03(PARAMS); break; // SUB_S
866      case 0x04: return arcompact_handle17_04(PARAMS); break; // BSET_S
867      case 0x05: return arcompact_handle17_05(PARAMS); break; // BCLR_S
868      case 0x06: return arcompact_handle17_06(PARAMS); break; // BMSK_S
869      case 0x07: return arcompact_handle17_07(PARAMS); break; // BTST_S
881      case 0x00: return arcompact_handle17_00(PARAMS);  // ASL_S
882      case 0x01: return arcompact_handle17_01(PARAMS);  // LSR_S
883      case 0x02: return arcompact_handle17_02(PARAMS);  // ASR_S
884      case 0x03: return arcompact_handle17_03(PARAMS);  // SUB_S
885      case 0x04: return arcompact_handle17_04(PARAMS);  // BSET_S
886      case 0x05: return arcompact_handle17_05(PARAMS);  // BCLR_S
887      case 0x06: return arcompact_handle17_06(PARAMS);  // BMSK_S
888      case 0x07: return arcompact_handle17_07(PARAMS);  // BTST_S
870889   }
871890
872891   return 0;
r242507r242508
878897
879898   switch (subinstr)
880899   {
881      case 0x00: return arcompact_handle18_00(PARAMS); break; // LD_S (SP)
882      case 0x01: return arcompact_handle18_01(PARAMS); break; // LDB_S (SP)
883      case 0x02: return arcompact_handle18_02(PARAMS); break; // ST_S (SP)
884      case 0x03: return arcompact_handle18_03(PARAMS); break; // STB_S (SP)
885      case 0x04: return arcompact_handle18_04(PARAMS); break; // ADD_S (SP)
886      case 0x05: return arcompact_handle18_05(PARAMS); break; // subtable 18_05
887      case 0x06: return arcompact_handle18_06(PARAMS); break; // subtable 18_06
888      case 0x07: return arcompact_handle18_07(PARAMS); break; // subtable 18_07
900      case 0x00: return arcompact_handle18_00(PARAMS);  // LD_S (SP)
901      case 0x01: return arcompact_handle18_01(PARAMS);  // LDB_S (SP)
902      case 0x02: return arcompact_handle18_02(PARAMS);  // ST_S (SP)
903      case 0x03: return arcompact_handle18_03(PARAMS);  // STB_S (SP)
904      case 0x04: return arcompact_handle18_04(PARAMS);  // ADD_S (SP)
905      case 0x05: return arcompact_handle18_05(PARAMS);  // subtable 18_05
906      case 0x06: return arcompact_handle18_06(PARAMS);  // subtable 18_06
907      case 0x07: return arcompact_handle18_07(PARAMS);  // subtable 18_07
889908   }
890909
891910   return 0;
r242507r242508
897916
898917   switch (subinstr2)
899918   {
900      case 0x00: return arcompact_handle18_05_00(PARAMS); break; // ADD_S (SP)
901      case 0x01: return arcompact_handle18_05_01(PARAMS); break; // SUB_S (SP)
902      case 0x02: return arcompact_handle18_05_02(PARAMS); break; // <illegal 0x18_05_02>
903      case 0x03: return arcompact_handle18_05_03(PARAMS); break; // <illegal 0x18_05_03>
904      case 0x04: return arcompact_handle18_05_04(PARAMS); break; // <illegal 0x18_05_04>
905      case 0x05: return arcompact_handle18_05_05(PARAMS); break; // <illegal 0x18_05_05>
906      case 0x06: return arcompact_handle18_05_06(PARAMS); break; // <illegal 0x18_05_06>
907      case 0x07: return arcompact_handle18_05_07(PARAMS); break; // <illegal 0x18_05_07>
919      case 0x00: return arcompact_handle18_05_00(PARAMS);  // ADD_S (SP)
920      case 0x01: return arcompact_handle18_05_01(PARAMS);  // SUB_S (SP)
921      case 0x02: return arcompact_handle18_05_02(PARAMS);  // <illegal 0x18_05_02>
922      case 0x03: return arcompact_handle18_05_03(PARAMS);  // <illegal 0x18_05_03>
923      case 0x04: return arcompact_handle18_05_04(PARAMS);  // <illegal 0x18_05_04>
924      case 0x05: return arcompact_handle18_05_05(PARAMS);  // <illegal 0x18_05_05>
925      case 0x06: return arcompact_handle18_05_06(PARAMS);  // <illegal 0x18_05_06>
926      case 0x07: return arcompact_handle18_05_07(PARAMS);  // <illegal 0x18_05_07>
908927   }
909928
910929   return 0;
r242507r242508
916935
917936   switch (subinstr2)
918937   {
919      case 0x00: return arcompact_handle18_06_00(PARAMS); break; // <illegal 0x18_06_00>
920      case 0x01: return arcompact_handle18_06_01(PARAMS); break; // POP_S b
921      case 0x02: return arcompact_handle18_06_02(PARAMS); break; // <illegal 0x18_06_02>
922      case 0x03: return arcompact_handle18_06_03(PARAMS); break; // <illegal 0x18_06_03>
923      case 0x04: return arcompact_handle18_06_04(PARAMS); break; // <illegal 0x18_06_04>
924      case 0x05: return arcompact_handle18_06_05(PARAMS); break; // <illegal 0x18_06_05>
925      case 0x06: return arcompact_handle18_06_06(PARAMS); break; // <illegal 0x18_06_06>
926      case 0x07: return arcompact_handle18_06_07(PARAMS); break; // <illegal 0x18_06_07>
927      case 0x08: return arcompact_handle18_06_08(PARAMS); break; // <illegal 0x18_06_08>
928      case 0x09: return arcompact_handle18_06_09(PARAMS); break; // <illegal 0x18_06_09>
929      case 0x0a: return arcompact_handle18_06_0a(PARAMS); break; // <illegal 0x18_06_0a>
930      case 0x0b: return arcompact_handle18_06_0b(PARAMS); break; // <illegal 0x18_06_0b>
931      case 0x0c: return arcompact_handle18_06_0c(PARAMS); break; // <illegal 0x18_06_0c>
932      case 0x0d: return arcompact_handle18_06_0d(PARAMS); break; // <illegal 0x18_06_0d>
933      case 0x0e: return arcompact_handle18_06_0e(PARAMS); break; // <illegal 0x18_06_0e>
934      case 0x0f: return arcompact_handle18_06_0f(PARAMS); break; // <illegal 0x18_06_0f>
935      case 0x10: return arcompact_handle18_06_10(PARAMS); break; // <illegal 0x18_06_10>
936      case 0x11: return arcompact_handle18_06_11(PARAMS); break; // POP_S blink
937      case 0x12: return arcompact_handle18_06_12(PARAMS); break; // <illegal 0x18_06_12>
938      case 0x13: return arcompact_handle18_06_13(PARAMS); break; // <illegal 0x18_06_13>
939      case 0x14: return arcompact_handle18_06_14(PARAMS); break; // <illegal 0x18_06_14>
940      case 0x15: return arcompact_handle18_06_15(PARAMS); break; // <illegal 0x18_06_15>
941      case 0x16: return arcompact_handle18_06_16(PARAMS); break; // <illegal 0x18_06_16>
942      case 0x17: return arcompact_handle18_06_17(PARAMS); break; // <illegal 0x18_06_17>
943      case 0x18: return arcompact_handle18_06_18(PARAMS); break; // <illegal 0x18_06_18>
944      case 0x19: return arcompact_handle18_06_19(PARAMS); break; // <illegal 0x18_06_19>
945      case 0x1a: return arcompact_handle18_06_1a(PARAMS); break; // <illegal 0x18_06_1a>
946      case 0x1b: return arcompact_handle18_06_1b(PARAMS); break; // <illegal 0x18_06_1b>
947      case 0x1c: return arcompact_handle18_06_1c(PARAMS); break; // <illegal 0x18_06_1c>
948      case 0x1d: return arcompact_handle18_06_1d(PARAMS); break; // <illegal 0x18_06_1d>
949      case 0x1e: return arcompact_handle18_06_1e(PARAMS); break; // <illegal 0x18_06_1e>
950      case 0x1f: return arcompact_handle18_06_1f(PARAMS); break; // <illegal 0x18_06_1f>
938      case 0x00: return arcompact_handle18_06_00(PARAMS);  // <illegal 0x18_06_00>
939      case 0x01: return arcompact_handle18_06_01(PARAMS);  // POP_S b
940      case 0x02: return arcompact_handle18_06_02(PARAMS);  // <illegal 0x18_06_02>
941      case 0x03: return arcompact_handle18_06_03(PARAMS);  // <illegal 0x18_06_03>
942      case 0x04: return arcompact_handle18_06_04(PARAMS);  // <illegal 0x18_06_04>
943      case 0x05: return arcompact_handle18_06_05(PARAMS);  // <illegal 0x18_06_05>
944      case 0x06: return arcompact_handle18_06_06(PARAMS);  // <illegal 0x18_06_06>
945      case 0x07: return arcompact_handle18_06_07(PARAMS);  // <illegal 0x18_06_07>
946      case 0x08: return arcompact_handle18_06_08(PARAMS);  // <illegal 0x18_06_08>
947      case 0x09: return arcompact_handle18_06_09(PARAMS);  // <illegal 0x18_06_09>
948      case 0x0a: return arcompact_handle18_06_0a(PARAMS);  // <illegal 0x18_06_0a>
949      case 0x0b: return arcompact_handle18_06_0b(PARAMS);  // <illegal 0x18_06_0b>
950      case 0x0c: return arcompact_handle18_06_0c(PARAMS);  // <illegal 0x18_06_0c>
951      case 0x0d: return arcompact_handle18_06_0d(PARAMS);  // <illegal 0x18_06_0d>
952      case 0x0e: return arcompact_handle18_06_0e(PARAMS);  // <illegal 0x18_06_0e>
953      case 0x0f: return arcompact_handle18_06_0f(PARAMS);  // <illegal 0x18_06_0f>
954      case 0x10: return arcompact_handle18_06_10(PARAMS);  // <illegal 0x18_06_10>
955      case 0x11: return arcompact_handle18_06_11(PARAMS);  // POP_S blink
956      case 0x12: return arcompact_handle18_06_12(PARAMS);  // <illegal 0x18_06_12>
957      case 0x13: return arcompact_handle18_06_13(PARAMS);  // <illegal 0x18_06_13>
958      case 0x14: return arcompact_handle18_06_14(PARAMS);  // <illegal 0x18_06_14>
959      case 0x15: return arcompact_handle18_06_15(PARAMS);  // <illegal 0x18_06_15>
960      case 0x16: return arcompact_handle18_06_16(PARAMS);  // <illegal 0x18_06_16>
961      case 0x17: return arcompact_handle18_06_17(PARAMS);  // <illegal 0x18_06_17>
962      case 0x18: return arcompact_handle18_06_18(PARAMS);  // <illegal 0x18_06_18>
963      case 0x19: return arcompact_handle18_06_19(PARAMS);  // <illegal 0x18_06_19>
964      case 0x1a: return arcompact_handle18_06_1a(PARAMS);  // <illegal 0x18_06_1a>
965      case 0x1b: return arcompact_handle18_06_1b(PARAMS);  // <illegal 0x18_06_1b>
966      case 0x1c: return arcompact_handle18_06_1c(PARAMS);  // <illegal 0x18_06_1c>
967      case 0x1d: return arcompact_handle18_06_1d(PARAMS);  // <illegal 0x18_06_1d>
968      case 0x1e: return arcompact_handle18_06_1e(PARAMS);  // <illegal 0x18_06_1e>
969      case 0x1f: return arcompact_handle18_06_1f(PARAMS);  // <illegal 0x18_06_1f>
951970   }
952971
953972   return 0;
r242507r242508
959978
960979   switch (subinstr2)
961980   {
962      case 0x00: return arcompact_handle18_07_00(PARAMS); break; // <illegal 0x18_07_00>
963      case 0x01: return arcompact_handle18_07_01(PARAMS); break; // PUSH_S b
964      case 0x02: return arcompact_handle18_07_02(PARAMS); break; // <illegal 0x18_07_02>
965      case 0x03: return arcompact_handle18_07_03(PARAMS); break; // <illegal 0x18_07_03>
966      case 0x04: return arcompact_handle18_07_04(PARAMS); break; // <illegal 0x18_07_04>
967      case 0x05: return arcompact_handle18_07_05(PARAMS); break; // <illegal 0x18_07_05>
968      case 0x06: return arcompact_handle18_07_06(PARAMS); break; // <illegal 0x18_07_06>
969      case 0x07: return arcompact_handle18_07_07(PARAMS); break; // <illegal 0x18_07_07>
970      case 0x08: return arcompact_handle18_07_08(PARAMS); break; // <illegal 0x18_07_08>
971      case 0x09: return arcompact_handle18_07_09(PARAMS); break; // <illegal 0x18_07_09>
972      case 0x0a: return arcompact_handle18_07_0a(PARAMS); break; // <illegal 0x18_07_0a>
973      case 0x0b: return arcompact_handle18_07_0b(PARAMS); break; // <illegal 0x18_07_0b>
974      case 0x0c: return arcompact_handle18_07_0c(PARAMS); break; // <illegal 0x18_07_0c>
975      case 0x0d: return arcompact_handle18_07_0d(PARAMS); break; // <illegal 0x18_07_0d>
976      case 0x0e: return arcompact_handle18_07_0e(PARAMS); break; // <illegal 0x18_07_0e>
977      case 0x0f: return arcompact_handle18_07_0f(PARAMS); break; // <illegal 0x18_07_0f>
978      case 0x10: return arcompact_handle18_07_10(PARAMS); break; // <illegal 0x18_07_10>
979      case 0x11: return arcompact_handle18_07_11(PARAMS); break; // PUSH_S blink
980      case 0x12: return arcompact_handle18_07_12(PARAMS); break; // <illegal 0x18_07_12>
981      case 0x13: return arcompact_handle18_07_13(PARAMS); break; // <illegal 0x18_07_13>
982      case 0x14: return arcompact_handle18_07_14(PARAMS); break; // <illegal 0x18_07_14>
983      case 0x15: return arcompact_handle18_07_15(PARAMS); break; // <illegal 0x18_07_15>
984      case 0x16: return arcompact_handle18_07_16(PARAMS); break; // <illegal 0x18_07_16>
985      case 0x17: return arcompact_handle18_07_17(PARAMS); break; // <illegal 0x18_07_17>
986      case 0x18: return arcompact_handle18_07_18(PARAMS); break; // <illegal 0x18_07_18>
987      case 0x19: return arcompact_handle18_07_19(PARAMS); break; // <illegal 0x18_07_19>
988      case 0x1a: return arcompact_handle18_07_1a(PARAMS); break; // <illegal 0x18_07_1a>
989      case 0x1b: return arcompact_handle18_07_1b(PARAMS); break; // <illegal 0x18_07_1b>
990      case 0x1c: return arcompact_handle18_07_1c(PARAMS); break; // <illegal 0x18_07_1c>
991      case 0x1d: return arcompact_handle18_07_1d(PARAMS); break; // <illegal 0x18_07_1d>
992      case 0x1e: return arcompact_handle18_07_1e(PARAMS); break; // <illegal 0x18_07_1e>
993      case 0x1f: return arcompact_handle18_07_1f(PARAMS); break; // <illegal 0x18_07_1f>
981      case 0x00: return arcompact_handle18_07_00(PARAMS);  // <illegal 0x18_07_00>
982      case 0x01: return arcompact_handle18_07_01(PARAMS);  // PUSH_S b
983      case 0x02: return arcompact_handle18_07_02(PARAMS);  // <illegal 0x18_07_02>
984      case 0x03: return arcompact_handle18_07_03(PARAMS);  // <illegal 0x18_07_03>
985      case 0x04: return arcompact_handle18_07_04(PARAMS);  // <illegal 0x18_07_04>
986      case 0x05: return arcompact_handle18_07_05(PARAMS);  // <illegal 0x18_07_05>
987      case 0x06: return arcompact_handle18_07_06(PARAMS);  // <illegal 0x18_07_06>
988      case 0x07: return arcompact_handle18_07_07(PARAMS);  // <illegal 0x18_07_07>
989      case 0x08: return arcompact_handle18_07_08(PARAMS);  // <illegal 0x18_07_08>
990      case 0x09: return arcompact_handle18_07_09(PARAMS);  // <illegal 0x18_07_09>
991      case 0x0a: return arcompact_handle18_07_0a(PARAMS);  // <illegal 0x18_07_0a>
992      case 0x0b: return arcompact_handle18_07_0b(PARAMS);  // <illegal 0x18_07_0b>
993      case 0x0c: return arcompact_handle18_07_0c(PARAMS);  // <illegal 0x18_07_0c>
994      case 0x0d: return arcompact_handle18_07_0d(PARAMS);  // <illegal 0x18_07_0d>
995      case 0x0e: return arcompact_handle18_07_0e(PARAMS);  // <illegal 0x18_07_0e>
996      case 0x0f: return arcompact_handle18_07_0f(PARAMS);  // <illegal 0x18_07_0f>
997      case 0x10: return arcompact_handle18_07_10(PARAMS);  // <illegal 0x18_07_10>
998      case 0x11: return arcompact_handle18_07_11(PARAMS);  // PUSH_S blink
999      case 0x12: return arcompact_handle18_07_12(PARAMS);  // <illegal 0x18_07_12>
1000      case 0x13: return arcompact_handle18_07_13(PARAMS);  // <illegal 0x18_07_13>
1001      case 0x14: return arcompact_handle18_07_14(PARAMS);  // <illegal 0x18_07_14>
1002      case 0x15: return arcompact_handle18_07_15(PARAMS);  // <illegal 0x18_07_15>
1003      case 0x16: return arcompact_handle18_07_16(PARAMS);  // <illegal 0x18_07_16>
1004      case 0x17: return arcompact_handle18_07_17(PARAMS);  // <illegal 0x18_07_17>
1005      case 0x18: return arcompact_handle18_07_18(PARAMS);  // <illegal 0x18_07_18>
1006      case 0x19: return arcompact_handle18_07_19(PARAMS);  // <illegal 0x18_07_19>
1007      case 0x1a: return arcompact_handle18_07_1a(PARAMS);  // <illegal 0x18_07_1a>
1008      case 0x1b: return arcompact_handle18_07_1b(PARAMS);  // <illegal 0x18_07_1b>
1009      case 0x1c: return arcompact_handle18_07_1c(PARAMS);  // <illegal 0x18_07_1c>
1010      case 0x1d: return arcompact_handle18_07_1d(PARAMS);  // <illegal 0x18_07_1d>
1011      case 0x1e: return arcompact_handle18_07_1e(PARAMS);  // <illegal 0x18_07_1e>
1012      case 0x1f: return arcompact_handle18_07_1f(PARAMS);  // <illegal 0x18_07_1f>
9941013   }
9951014
9961015   return 0;
r242507r242508
10021021
10031022   switch (subinstr)
10041023   {
1005      case 0x00: return arcompact_handle19_00(PARAMS); break; // LD_S (GP)
1006      case 0x01: return arcompact_handle19_01(PARAMS); break; // LDB_S (GP)
1007      case 0x02: return arcompact_handle19_02(PARAMS); break; // LDW_S (GP)
1008      case 0x03: return arcompact_handle19_03(PARAMS); break; // ADD_S (GP)
1024      case 0x00: return arcompact_handle19_00(PARAMS);  // LD_S (GP)
1025      case 0x01: return arcompact_handle19_01(PARAMS);  // LDB_S (GP)
1026      case 0x02: return arcompact_handle19_02(PARAMS);  // LDW_S (GP)
1027      case 0x03: return arcompact_handle19_03(PARAMS);  // ADD_S (GP)
10091028   }
10101029
10111030   return 0;
r242507r242508
10171036
10181037   switch (subinstr)
10191038   {
1020      case 0x00: return arcompact_handle1c_00(PARAMS); break; // ADD_S
1021      case 0x01: return arcompact_handle1c_01(PARAMS); break; // CMP_S
1039      case 0x00: return arcompact_handle1c_00(PARAMS);  // ADD_S
1040      case 0x01: return arcompact_handle1c_01(PARAMS);  // CMP_S
10221041   }
10231042
10241043   return 0;
r242507r242508
10301049
10311050   switch (subinstr)
10321051   {
1033      case 0x00: return arcompact_handle1d_00(PARAMS); break; // BREQ_S
1034      case 0x01: return arcompact_handle1d_01(PARAMS); break; // BRNE_S
1052      case 0x00: return arcompact_handle1d_00(PARAMS);  // BREQ_S
1053      case 0x01: return arcompact_handle1d_01(PARAMS);  // BRNE_S
10351054   }
10361055
10371056   return 0;
r242507r242508
10431062
10441063   switch (subinstr)
10451064   {
1046      case 0x00: return arcompact_handle1e_00(PARAMS); break; // B_S
1047      case 0x01: return arcompact_handle1e_01(PARAMS); break; // BEQ_S
1048      case 0x02: return arcompact_handle1e_02(PARAMS); break; // BNE_S
1049      case 0x03: return arcompact_handle1e_03(PARAMS); break; // Bcc_S
1065      case 0x00: return arcompact_handle1e_00(PARAMS);  // B_S
1066      case 0x01: return arcompact_handle1e_01(PARAMS);  // BEQ_S
1067      case 0x02: return arcompact_handle1e_02(PARAMS);  // BNE_S
1068      case 0x03: return arcompact_handle1e_03(PARAMS);  // Bcc_S
10501069   }
10511070
10521071   return 0;
r242507r242508
10581077
10591078   switch (subinstr2)
10601079   {
1061      case 0x00: return arcompact_handle1e_03_00(PARAMS); break; // BGT_S
1062      case 0x01: return arcompact_handle1e_03_01(PARAMS); break; // BGE_S
1063      case 0x02: return arcompact_handle1e_03_02(PARAMS); break; // BLT_S
1064      case 0x03: return arcompact_handle1e_03_03(PARAMS); break; // BLE_S
1065      case 0x04: return arcompact_handle1e_03_04(PARAMS); break; // BHI_S
1066      case 0x05: return arcompact_handle1e_03_05(PARAMS); break; // BHS_S
1067      case 0x06: return arcompact_handle1e_03_06(PARAMS); break; // BLO_S
1068      case 0x07: return arcompact_handle1e_03_07(PARAMS); break; // BLS_S
1080      case 0x00: return arcompact_handle1e_03_00(PARAMS);  // BGT_S
1081      case 0x01: return arcompact_handle1e_03_01(PARAMS);  // BGE_S
1082      case 0x02: return arcompact_handle1e_03_02(PARAMS);  // BLT_S
1083      case 0x03: return arcompact_handle1e_03_03(PARAMS);  // BLE_S
1084      case 0x04: return arcompact_handle1e_03_04(PARAMS);  // BHI_S
1085      case 0x05: return arcompact_handle1e_03_05(PARAMS);  // BHS_S
1086      case 0x06: return arcompact_handle1e_03_06(PARAMS);  // BLO_S
1087      case 0x07: return arcompact_handle1e_03_07(PARAMS);  // BLS_S
10691088   }
10701089
10711090   return 0;
r242507r242508
11381157
11391158   // Branch on Compare / Bit Test - Register-Register
11401159
1141   int c = (op & 0x00000fc0) >> 6;
1160   COMMON32_GET_creg
11421161   COMMON32_GET_breg;
11431162   //int n = (op & 0x00000020) >> 5;
11441163
11451164
1146   if ((breg != LIMM_REG) && (c != LIMM_REG))
1165   if ((breg != LIMM_REG) && (creg != LIMM_REG))
11471166   {
11481167
11491168   }
r242507r242508
12111230   int got_limm = 0;
12121231
12131232   COMMON32_GET_breg;
1214   int C = (op & 0x00000fc0) >> 6;
1215   
1233   COMMON32_GET_creg;
1234
12161235   if (breg == LIMM_REG)
12171236   {
12181237      //GET_LIMM_32;
r242507r242508
12201239      got_limm = 1;
12211240   }
12221241
1223   if (C == LIMM_REG)
1242   if (creg == LIMM_REG)
12241243   {
12251244      if (!got_limm)
12261245      {
r242507r242508
12391258}
12401259
12411260
1261
1262
1263
12421264ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_helper(OPS_32, const char* optext, int ignore_dst, int b_reserved)
12431265{
12441266   int size = 4;
12451267   //UINT32 limm = 0;
12461268   int got_limm = 0;
12471269
1248   int p = (op & 0x00c00000) >> 22;
1270   COMMON32_GET_p;
12491271   COMMON32_GET_breg;
12501272   
12511273   if (!b_reserved)
r242507r242508
12671289
12681290   if (p == 0)
12691291   {
1270      int C = (op & 0x00000fc0) >> 6;
1292      COMMON32_GET_creg
12711293
1272      if (C == LIMM_REG)
1294      if (creg == LIMM_REG)
12731295      {
12741296         if (!got_limm)
12751297         {
r242507r242508
12931315
12941316      if (M == 0)
12951317      {
1296         int C = (op & 0x00000fc0) >> 6;
1318         COMMON32_GET_creg
12971319
1298         if (C == LIMM_REG)
1320         if (creg == LIMM_REG)
12991321         {
13001322            if (!got_limm)
13011323            {
r242507r242508
14711493} // *
14721494
14731495
1474// arcompact_handle04_helper format
1475ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_20(OPS_32)
1496
1497ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_20_p00(OPS_16)
14761498{
14771499   int size = 4;
14781500   UINT32 limm = 0;
14791501   int got_limm = 0;
14801502
1481   int p = (op & 0x00c00000) >> 22;
1503   COMMON32_GET_creg
14821504
1483   if (p == 0)
1505   if (creg == LIMM_REG)
14841506   {
1485      int C = (op & 0x00000fc0) >> 6;
1486
1487      if (C == LIMM_REG)
1507      if (!got_limm)
14881508      {
1489         if (!got_limm)
1490         {
1491            GET_LIMM_32;
1492            size = 8;
1493         }
1509         GET_LIMM_32;
1510         size = 8;
1511      }
14941512
1495         return limm;
1496      }
1497      else
1498      {
1499         arcompact_log("unimplemented J %08x", op);
1500      }
1513      return limm;
15011514   }
1502   else if (p == 1)
1515   else
15031516   {
15041517      arcompact_log("unimplemented J %08x", op);
15051518   }
1506   else if (p == 2)
1507   {
1508      arcompact_log("unimplemented J %08x", op);
1509   }
1510   else if (p == 3)
1511   {
1512      int M = (op & 0x00000020) >> 5;
15131519
1514      if (M == 0)
1515      {
1516         int C = (op & 0x00000fc0) >> 6;
1520   return m_pc + (size>>0);
1521}
15171522
1518         if (C == LIMM_REG)
1519         {
1520            if (!got_limm)
1521            {
1522               //GET_LIMM_32;
1523               size = 8;
1524            }
1523ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_20_p01(OPS_16)
1524{
1525   int size = 4;
1526   arcompact_log("unimplemented J %08x", op);
1527   return m_pc + (size>>0);
1528}
15251529
1526            arcompact_log("unimplemented J %08x", op);
1527         }
1528         else
1529         {
1530            arcompact_log("unimplemented J %08x", op);
1531         }
1530ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_20_p10(OPS_16)
1531{
1532   int size = 4;
1533   arcompact_log("unimplemented J %08x", op);
1534   return m_pc + (size>>0);
1535}
15321536
1533      }
1534      else if (M == 1)
1537
1538ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_20_p11_m0(OPS_16)
1539{
1540   int size = 4;
1541//   UINT32 limm = 0;
1542   int got_limm = 0;
1543
1544   COMMON32_GET_creg
1545
1546   if (creg == LIMM_REG)
1547   {
1548      if (!got_limm)
15351549      {
1536         arcompact_log("unimplemented J %08x", op);
1550         //GET_LIMM_32;
1551         size = 8;
15371552      }
15381553
1554      arcompact_log("unimplemented J %08x", op);
15391555   }
1556   else
1557   {
1558      arcompact_log("unimplemented J %08x", op);
1559   }
1560   return m_pc + (size>>0);
1561}
15401562
1563ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_20_p11_m1(OPS_16)
1564{
1565   int size = 4;
1566   arcompact_log("unimplemented J %08x", op);
1567   return m_pc + (size>>0);
1568}
15411569
1542   return m_pc + (size>>0);}
15431570
15441571
1545
15461572ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_21(OPS_32)
15471573{
15481574   return arcompact_handle04_helper(PARAMS, opcodes_04[0x21], /*"J.D"*/ 1,1);
r242507r242508
15651591{
15661592   int size = 4;
15671593
1568   int p = (op & 0x00c00000) >> 22;
1569
1594   COMMON32_GET_p;
1595     
15701596   if (p == 0x00)
15711597   {
15721598   }
r242507r242508
15921618//   UINT32 limm = 0;
15931619   int got_limm = 0;
15941620
1595   int p = (op & 0x00c00000) >> 22;
1621   COMMON32_GET_p;
15961622   //COMMON32_GET_breg;
15971623
15981624   if (p == 0)
15991625   {
16001626
1601      int C = (op & 0x00000fc0) >> 6;
1627      COMMON32_GET_creg
16021628
1603      if (C == LIMM_REG)
1629      if (creg == LIMM_REG)
16041630      {
16051631         if (!got_limm)
16061632         {
r242507r242508
16331659//   UINT32 limm = 0;
16341660   int got_limm = 0;
16351661
1636   int p = (op & 0x00c00000) >> 22;
1662   COMMON32_GET_p;
16371663   COMMON32_GET_breg;
16381664
16391665   if (breg == LIMM_REG)
r242507r242508
16501676   if (p == 0)
16511677   {
16521678
1653      int C = (op & 0x00000fc0) >> 6;
1679      COMMON32_GET_creg
16541680
1655      if (C == LIMM_REG)
1681      if (creg == LIMM_REG)
16561682      {
16571683         if (!got_limm)
16581684         {
r242507r242508
16891715{
16901716   int size = 4;
16911717
1692   int p = (op & 0x00c00000) >> 22;
1718   COMMON32_GET_p;
16931719   //COMMON32_GET_breg;
16941720   
16951721   if (p == 0)
16961722   {
1697      int C = (op & 0x00000fc0) >> 6;
1723      COMMON32_GET_creg
16981724
1699      if (C == LIMM_REG)
1725      if (creg == LIMM_REG)
17001726      {
17011727         //UINT32 limm;
17021728         //GET_LIMM_32;
r242507r242508
17521778
17531779
17541780   COMMON32_GET_breg;
1755   int C = (op & 0x00000fc0) >> 6;
1781   COMMON32_GET_creg
17561782
17571783
17581784
r242507r242508
17671793   {
17681794   }
17691795
1770   if (C == LIMM_REG)
1796   if (creg == LIMM_REG)
17711797   {
17721798      if (!got_limm)
17731799      {
r242507r242508
18241850{
18251851   int size = 4;
18261852
1827   int p = (op & 0x00c00000) >> 22;
1853   COMMON32_GET_p;
18281854   //COMMON32_GET_breg;
18291855   
18301856   if (p == 0)
18311857   {
1832      int C = (op & 0x00000fc0) >> 6;
1858      COMMON32_GET_creg
18331859
1834      if (C == LIMM_REG)
1860      if (creg == LIMM_REG)
18351861      {
18361862         //UINT32 limm;
18371863         //GET_LIMM_32;
trunk/src/emu/cpu/arcompact/arcompactdasm_ops.c
r242507r242508
3939   int B_temp = (op & 0x00007000) >> 12; op &= ~0x00007000; \
4040   int breg = b_temp | (B_temp << 3); \
4141
42#define COMMON32_GET_creg \
43   int creg = (op & 0x00000fc0) >> 6; op &= ~0x00000fc0; \
44
45#define COMMON32_GET_u6 \
46   int u = (op & 0x00000fc0) >> 6; op &= ~0x00000fc0; \
47
48#define COMMON32_GET_areg \
49   int areg = (op & 0x0000003f) >> 0; op &= ~0x0000003f; \
50
51#define COMMON32_GET_areg_reserved \
52   int ares = (op & 0x0000003f) >> 0; op &= ~0x0000003f; \
53
54#define COMMON32_GET_F \
55   int F = (op & 0x00008000) >> 15; op &= ~0x00008000; \
56
57#define COMMON32_GET_p \
58   int p = (op & 0x00c00000) >> 22; op &= ~0x00c00000; \
59
60
4261#define COMMON32_GET_s12 \
4362      int S_temp = (op & 0x0000003f) >> 0; op &= ~0x0000003f; \
4463      int s_temp = (op & 0x00000fc0) >> 6; op &= ~0x00000fc0; \
r242507r242508
182201   GET_01_01_01_BRANCH_ADDR
183202
184203
185   int c = (op & 0x00000fc0) >> 6;
204   COMMON32_GET_creg
186205   COMMON32_GET_breg;
187206   int n = (op & 0x00000020) >> 5; op &= ~0x00000020;
188207
189208   op &= ~0x07007fe0;
190209
191   if ((breg != LIMM_REG) && (c != LIMM_REG))
210   if ((breg != LIMM_REG) && (creg != LIMM_REG))
192211   {
193      print("%s%s %s, %s %08x (%08x)", optext, delaybit[n], regnames[breg], regnames[c], PC_ALIGNED32 + (address * 2), op & ~0xf8fe800f);
212      print("%s%s %s, %s %08x (%08x)", optext, delaybit[n], regnames[breg], regnames[creg], PC_ALIGNED32 + (address * 2), op & ~0xf8fe800f);
194213   }
195214   else
196215   {
r242507r242508
198217      GET_LIMM_32;
199218      size = 8;
200219
201      if ((breg == LIMM_REG) && (c != LIMM_REG))
220      if ((breg == LIMM_REG) && (creg != LIMM_REG))
202221      {
203         print("%s%s (%08x) %s %08x (%08x)", optext, delaybit[n], limm, regnames[c], PC_ALIGNED32 + (address * 2), op & ~0xf8fe800f);
222         print("%s%s (%08x) %s %08x (%08x)", optext, delaybit[n], limm, regnames[creg], PC_ALIGNED32 + (address * 2), op & ~0xf8fe800f);
204223      }
205      else if ((c == LIMM_REG) && (breg != LIMM_REG))
224      else if ((creg == LIMM_REG) && (breg != LIMM_REG))
206225      {
207226         print("%s%s %s, (%08x) %08x (%08x)", optext, delaybit[n], regnames[breg], limm, PC_ALIGNED32 + (address * 2), op & ~0xf8fe800f);
208227      }
r242507r242508
239258   // 0000 1bbb ssss sss1 SBBB uuuu uuN1 iiii
240259   GET_01_01_01_BRANCH_ADDR
241260
242   int u = (op & 0x00000fc0) >> 6;
261   COMMON32_GET_u6
243262   COMMON32_GET_breg;
244263   int n = (op & 0x00000020) >> 5; op &= ~0x00000020;
245264
r242507r242508
270289   // 0001 0bbb ssss ssss SBBB DaaZ ZXAA AAAA
271290   int size = 4;
272291
273   int A = (op & 0x0000003f) >> 0;  //op &= ~0x0000003f;
292   COMMON32_GET_areg
274293   int X = (op & 0x00000040) >> 6;  //op &= ~0x00000040;
275294   int Z = (op & 0x00000180) >> 7;  //op &= ~0x00000180;
276295   int a = (op & 0x00000600) >> 9;  //op &= ~0x00000600;
r242507r242508
294313   output  += sprintf( output, "%s", addressmode[a]);
295314   output  += sprintf( output, "%s", cachebit[D]);
296315   output  += sprintf( output, " ");
297   output  += sprintf( output, "%s <- ", regnames[A]);
316   output  += sprintf( output, "%s <- ", regnames[areg]);
298317   output  += sprintf( output, "[");
299318   if (breg == LIMM_REG) output  += sprintf( output, "(%08x), ", limm);
300319   else output  += sprintf( output, "%s, ", regnames[breg]);
r242507r242508
324343   int Z = (op & 0x00000006) >> 1; op &= ~0x00000006;
325344   int a = (op & 0x00000018) >> 3; op &= ~0x00000018;
326345   int D = (op & 0x00000020) >> 5; op &= ~0x00000020;
327   int C = (op & 0x00000fc0) >> 6; op &= ~0x00000fc0;
328   
346   COMMON32_GET_creg
347
329348   if (breg == LIMM_REG)
330349   {
331350      GET_LIMM_32;
r242507r242508
346365   output  += sprintf( output, "%03x", sdat);
347366   output  += sprintf( output, "] <- ");
348367
349   if (C == LIMM_REG)
368   if (creg == LIMM_REG)
350369   {
351370      if (!got_limm)
352371      {
r242507r242508
358377   }
359378   else
360379   {
361      output += sprintf(output, "%s", regnames[C]);
380      output += sprintf(output, "%s", regnames[creg]);
362381   }
363382
364383   if (R) output  += sprintf( output, "(reserved bit set)");
r242507r242508
367386   return size;
368387}
369388
370
371int arcompact_handle04_helper_dasm(DASM_OPS_32, const char* optext, int ignore_dst, int b_reserved)
389int arcompact_handle04_p00_helper_dasm(DASM_OPS_32, const char* optext, int ignore_dst, int b_reserved)
372390{
373391   //           PP
374392   // 0010 0bbb 00ii iiii FBBB CCCC CCAA AAAA
r242507r242508
376394   UINT32 limm = 0;
377395   int got_limm = 0;
378396
379   int p = (op & 0x00c00000) >> 22; op &= ~0x00c00000;
380397   COMMON32_GET_breg;
381   int F = (op & 0x00008000) >> 15; op &= ~0x00008000;
398   COMMON32_GET_F;
399   COMMON32_GET_creg
400   COMMON32_GET_areg
382401
383   output  += sprintf( output, "%s", optext);
384   output  += sprintf( output, "%s", flagbit[F]);
385//   output  += sprintf( output, " p(%d)", p);
386   
387   
402   output += sprintf(output, "%s", optext);
403   output += sprintf(output, "%s", flagbit[F]);
404   //   output  += sprintf( output, " p(%d)", p);
405
406
388407   if (!b_reserved)
389408   {
390409      if (breg == LIMM_REG)
r242507r242508
392411         GET_LIMM_32;
393412         size = 8;
394413         got_limm = 1;
395         output += sprintf( output, "(%08x) ", limm );
414         output += sprintf(output, " 0x%08x ", limm);
396415
397416      }
398417      else
r242507r242508
405424      if (breg) output += sprintf(output, "reserved(%s), ", regnames[breg]);
406425   }
407426
408
409   if (p == 0)
427   if (creg == LIMM_REG)
410428   {
411      // 0010 0bbb 00ii iiii FBBB CCCC CCAA AAAA
429      if (!got_limm)
430      {
431         GET_LIMM_32;
432         size = 8;
433      }
412434
413      int C = (op & 0x00000fc0) >> 6; op &= ~0x00000fc0;
414      int A = (op & 0x0000003f) >> 0; op &= ~0x0000003f;
415
416      if (C == LIMM_REG)
435      output += sprintf(output, " 0x%08x ", limm);
436      if (ignore_dst == 0)
417437      {
418         if (!got_limm)
419         {
420            GET_LIMM_32;
421            size = 8;
422         }
423
424         output  += sprintf( output, "(%08x) ", limm );
425         if (ignore_dst == 0)
426         {
427            if (A != LIMM_REG) output += sprintf(output, "DST(%s)", regnames[A]);
428            else output += sprintf(output, "<no dst>");
429         }
430         else
431         {
432            if (ignore_dst == 1) { if (A) output += sprintf(output, "unused(%s)", regnames[A]); }
433            else
434            {
435               if (A != LIMM_REG) output += sprintf(output, "invalid(%s)", regnames[A]);
436               else  output += sprintf(output, "<mulres>");
437            } // mul operations expect A to be set to LIMM (no output)
438         }
438         if (areg != LIMM_REG) output += sprintf(output, "DST(%s)", regnames[areg]);
439         else output += sprintf(output, "<no dst>");
439440      }
440441      else
441442      {
442         output  += sprintf( output, "C(%s) ", regnames[C]);
443         if (ignore_dst == 0)
444         {
445            if (A != LIMM_REG)  output += sprintf(output, "DST(%s)", regnames[A]);
446            else output += sprintf(output, "<no dst>");
447         }
443         if (ignore_dst == 1) { if (areg) output += sprintf(output, "unused(%s)", regnames[areg]); }
448444         else
449445         {
450            if (ignore_dst == 1) { if (A) output += sprintf(output, "unused(%s)", regnames[A]); }
451            else
452            {
453               if (A != LIMM_REG) output += sprintf(output, "invalid(%s)", regnames[A]);
454               else  output += sprintf(output, "<mulres>");
455            } // mul operations expect A to be set to LIMM (no output)
456         }
457
446            if (areg != LIMM_REG) output += sprintf(output, "invalid(%s)", regnames[areg]);
447            else  output += sprintf(output, "<mulres>");
448         } // mul operations expect A to be set to LIMM (no output)
458449      }
459450   }
460   else if (p == 1)
451   else
461452   {
462      // 0010 0bbb 00ii iiii FBBB UUUU UUAA AAAA
463      int U = (op & 0x00000fc0) >> 6; op &= ~0x00000fc0;
464      int A = (op & 0x0000003f) >> 0; op &= ~0x0000003f;
465
466      output  += sprintf( output, "U(%02x) ", U );
453      output += sprintf(output, "C(%s) ", regnames[creg]);
467454      if (ignore_dst == 0)
468455      {
469         if (A != LIMM_REG)  output += sprintf(output, "DST(%s)", regnames[A]);
456         if (areg != LIMM_REG)  output += sprintf(output, "DST(%s)", regnames[areg]);
470457         else output += sprintf(output, "<no dst>");
471458      }
472459      else
473460      {
474         if (ignore_dst == 1) { if (A) output += sprintf(output, "unused(%s)", regnames[A]); }
461         if (ignore_dst == 1) { if (areg) output += sprintf(output, "unused(%s)", regnames[areg]); }
475462         else
476463         {
477            if (A != LIMM_REG) output += sprintf(output, "invalid(%s)", regnames[A]);
464            if (areg != LIMM_REG) output += sprintf(output, "invalid(%s)", regnames[areg]);
478465            else  output += sprintf(output, "<mulres>");
479466         } // mul operations expect A to be set to LIMM (no output)
480467      }
468
481469   }
482   else if (p == 2)
470   return size;
471}
472
473int arcompact_handle04_p01_helper_dasm(DASM_OPS_32, const char* optext, int ignore_dst, int b_reserved)
474{
475   int size = 4;
476   UINT32 limm = 0;
477   //int got_limm = 0;
478
479   COMMON32_GET_breg;
480   COMMON32_GET_F
481   COMMON32_GET_u6
482   COMMON32_GET_areg
483
484   output += sprintf(output, "%s", optext);
485   output += sprintf(output, "%s", flagbit[F]);
486   //   output  += sprintf( output, " p(%d)", p);
487
488   if (!b_reserved)
483489   {
484      COMMON32_GET_s12;
490      if (breg == LIMM_REG)
491      {
492         GET_LIMM_32;
493         size = 8;
494         //got_limm = 1;
495         output += sprintf(output, " 0x%08x ", limm);
485496
486      output  += sprintf( output, "S(%02x)", S);
497      }
498      else
499      {
500         output += sprintf(output, " %s, ", regnames[breg]);
501      }
502   }
503   else
504   {
505      if (breg) output += sprintf(output, "reserved(%s), ", regnames[breg]);
506   }
487507
508   output += sprintf(output, "U(%02x) ", u);
509   if (ignore_dst == 0)
510   {
511      if (areg != LIMM_REG)  output += sprintf(output, "DST(%s)", regnames[areg]);
512      else output += sprintf(output, "<no dst>");
488513   }
489   else if (p == 3)
514   else
490515   {
491      int M = (op & 0x00000020) >> 5; op &= ~0x00000020;
492      COMMON32_GET_CONDITION   
516      if (ignore_dst == 1) { if (areg) output += sprintf(output, "unused(%s)", regnames[areg]); }
517      else
518      {
519         if (areg != LIMM_REG) output += sprintf(output, "invalid(%s)", regnames[areg]);
520         else  output += sprintf(output, "<mulres>");
521      } // mul operations expect A to be set to LIMM (no output)
522   }
523   return size;
524}
493525
494      output  += sprintf( output, " M(%d)", M);
495      output  += sprintf( output, " Cond<%s> ", conditions[condition]);
496526
497      if (M == 0)
527int arcompact_handle04_p10_helper_dasm(DASM_OPS_32, const char* optext, int b_reserved)
528{
529   int size = 4;
530   UINT32 limm = 0;
531   //int got_limm = 0;
532
533   COMMON32_GET_breg;
534   COMMON32_GET_F
535   COMMON32_GET_s12;
536
537   output += sprintf(output, "%s", optext);
538   output += sprintf(output, "%s", flagbit[F]);
539   //   output  += sprintf( output, " p(%d)", p);
540
541
542   if (!b_reserved)
543   {
544      if (breg == LIMM_REG)
498545      {
499         int C = (op & 0x00000fc0) >> 6; op &= ~0x00000fc0;
500         
501         if (C == LIMM_REG)
502         {
503            if (!got_limm)
504            {
505               GET_LIMM_32;
506               size = 8;
507            }
508            output += sprintf(output, "(%08x)", limm);
509         }
510         else
511         {
512            output += sprintf(output, "C(%s)", regnames[C]);
513         }
546         GET_LIMM_32;
547         size = 8;
548         //got_limm = 1;
549         output += sprintf(output, " 0x%08x ", limm);
514550
515551      }
516      else if (M == 1)
552      else
517553      {
518         int U = (op & 0x00000fc0) >> 6; op &= ~0x00000fc0;
519         output  += sprintf( output, "U(%02x)", U);
554         output += sprintf(output, " %s, ", regnames[breg]);
555      }
556   }
557   else
558   {
559      if (breg) output += sprintf(output, "reserved(%s), ", regnames[breg]);
560   }
520561
562   output += sprintf(output, "S(%02x)", S);
563   return size;
564}
565
566int arcompact_handle04_p11_m0_helper_dasm(DASM_OPS_32, const char* optext, int b_reserved)
567{
568   int size = 4;
569   UINT32 limm = 0;
570   int got_limm = 0;
571
572   COMMON32_GET_breg;
573   COMMON32_GET_F
574   COMMON32_GET_CONDITION;
575   COMMON32_GET_creg
576
577   output += sprintf(output, "%s", optext);
578   output += sprintf(output, "%s", flagbit[F]);
579   //   output  += sprintf( output, " p(%d)", p);
580
581   if (!b_reserved)
582   {
583      if (breg == LIMM_REG)
584      {
585         GET_LIMM_32;
586         size = 8;
587         got_limm = 1;
588         output += sprintf(output, " 0x%08x ", limm);
589
521590      }
591      else
592      {
593         output += sprintf(output, " %s, ", regnames[breg]);
594      }
595   }
596   else
597   {
598      if (breg) output += sprintf(output, "reserved(%s), ", regnames[breg]);
599   }
522600
601
602   output += sprintf(output, " Cond<%s> ", conditions[condition]);
603   
604
605   if (creg == LIMM_REG)
606   {
607      if (!got_limm)
608      {
609         GET_LIMM_32;
610         size = 8;
611      }
612      output += sprintf(output, " 0x%08x ", limm);
523613   }
614   else
615   {
616      output += sprintf(output, "C(%s)", regnames[creg]);
617   }
524618
525619   return size;
526620}
527621
622int arcompact_handle04_p11_m1_helper_dasm(DASM_OPS_32, const char* optext, int b_reserved)
623{
624   int size = 4;
625   UINT32 limm = 0;
626   //int got_limm = 0;
627
628   COMMON32_GET_breg;
629   COMMON32_GET_F
630   COMMON32_GET_CONDITION;
631   COMMON32_GET_u6
632
633   output += sprintf(output, "%s", optext);
634   output += sprintf(output, "%s", flagbit[F]);
635   //   output  += sprintf( output, " p(%d)", p);
636
637   if (!b_reserved)
638   {
639      if (breg == LIMM_REG)
640      {
641         GET_LIMM_32;
642         size = 8;
643         //got_limm = 1;
644         output += sprintf(output, " 0x%08x ", limm);
645
646      }
647      else
648      {
649         output += sprintf(output, " %s, ", regnames[breg]);
650      }
651   }
652   else
653   {
654      if (breg) output += sprintf(output, "reserved(%s), ", regnames[breg]);
655   }
656
657
658   output += sprintf(output, " Cond<%s> ", conditions[condition]);
659
660
661   output += sprintf(output, "U(%02x)", u);
662
663   return size;
664}
665
666int arcompact_handle04_p11_helper_dasm(DASM_OPS_32, const char* optext, int b_reserved)
667{
668   int M = (op & 0x00000020) >> 5; op &= ~0x00000020;
669
670   switch (M)
671   {
672      case 0x00: return arcompact_handle04_p11_m0_helper_dasm(DASM_PARAMS, optext, b_reserved);
673      case 0x01: return arcompact_handle04_p11_m1_helper_dasm(DASM_PARAMS, optext, b_reserved);
674   }
675   return 0;
676}
677
678
679int arcompact_handle04_helper_dasm(DASM_OPS_32, const char* optext, int ignore_dst, int b_reserved)
680{
681   COMMON32_GET_p;
682
683   switch (p)
684   {
685      case 0x00: return arcompact_handle04_p00_helper_dasm(DASM_PARAMS, optext, ignore_dst, b_reserved);
686      case 0x01: return arcompact_handle04_p01_helper_dasm(DASM_PARAMS, optext, ignore_dst, b_reserved);
687      case 0x02: return arcompact_handle04_p10_helper_dasm(DASM_PARAMS, optext, b_reserved);
688      case 0x03: return arcompact_handle04_p11_helper_dasm(DASM_PARAMS, optext, b_reserved);
689   }
690
691   return 0;
692}
693
528694int arcompact_handle04_00_dasm(DASM_OPS_32) 
529695{
530696   return arcompact_handle04_helper_dasm(DASM_PARAMS, "ADD", 0,0);
r242507r242508
706872int arcompact_handle04_28_dasm(DASM_OPS_32) // LPcc (loop setup)
707873{
708874   COMMON32_GET_breg; // breg is reserved
709   int p = (op & 0x00c00000) >> 22; op &= ~0x00c00000;
875   COMMON32_GET_p;
710876
711877   if (p == 0x00)
712878   {
r242507r242508
725891   }
726892   else if (p == 0x03) // Loop conditional
727893   { // 0010 0RRR 1110 1000 0RRR uuuu uu1Q QQQQ
728      int u = (op & 0x00000fc0)>>6;
894      COMMON32_GET_u6
729895      COMMON32_GET_CONDITION
730896      output += sprintf(output, "LP<%s> (start %08x, end %08x)", conditions[condition], pc + 4, pc + u*2);
731897
r242507r242508
764930   UINT32 limm = 0;
765931   int got_limm = 0;
766932
767   int p = (op & 0x00c00000) >> 22; op &= ~0x00c00000;
933   COMMON32_GET_p;
768934   COMMON32_GET_breg;
769   int F = (op & 0x00008000) >> 15; op &= ~0x00008000; // must be 0
935   COMMON32_GET_F
770936
771937   output  += sprintf( output, "LR");
772938   if (F) output  += sprintf( output, ".<F set, illegal>");
r242507r242508
788954   if (p == 0)
789955   {
790956
791      int C = (op & 0x00000fc0) >> 6; op &= ~0x00000fc0;
792      int res = (op & 0x0000003f) >> 0; op &= ~0x0000003f;
957      COMMON32_GET_creg
958      COMMON32_GET_areg_reserved
793959
794      if (C == LIMM_REG)
960      if (creg == LIMM_REG)
795961      {
796962         if (!got_limm)
797963         {
r242507r242508
804970      }
805971      else
806972      {
807         output  += sprintf( output, "C(%s) ", regnames[C]);
973         output  += sprintf( output, "C(%s) ", regnames[creg]);
808974      }
809975
810      if (res) output  += sprintf( output, "reserved(%02x) ", res );
976      if (ares) output  += sprintf( output, "reserved(%02x) ", ares );
811977   }
812978   else if (p == 1)
813979   {
814      int U = (op & 0x00000fc0) >> 6; op &= ~0x00000fc0;
815      int res = (op & 0x0000003f) >> 0; op &= ~0x0000003f;
980      COMMON32_GET_u6
981      COMMON32_GET_areg_reserved
816982
817      int auxreg = U;
983      int auxreg = u;
818984      PRINT_AUX_REGNAME
819985     
820      if (res) output  += sprintf( output, "reserved(%02x) ", res );
986      if (ares) output  += sprintf( output, "reserved(%02x) ", ares );
821987   }
822988   else if (p == 2)
823989   {
r242507r242508
8441010   UINT32 limm = 0;
8451011   int got_limm = 0;
8461012
847   int p = (op & 0x00c00000) >> 22; op &= ~0x00c00000;
1013   COMMON32_GET_p;
8481014   COMMON32_GET_breg;
849   int F = (op & 0x00008000) >> 15; op &= ~0x00008000;
1015   COMMON32_GET_F
8501016
8511017   output  += sprintf( output, "SR");
8521018   if (F) output  += sprintf( output, ".<F set, illegal>");
r242507r242508
8721038   if (p == 0)
8731039   {
8741040
875      int C = (op & 0x00000fc0) >> 6; op &= ~0x00000fc0;
876      int res = (op & 0x0000003f) >> 0; op &= ~0x0000003f;
1041      COMMON32_GET_creg
1042      COMMON32_GET_areg_reserved
8771043
878      if (C == LIMM_REG)
1044      if (creg == LIMM_REG)
8791045      {
8801046         if (!got_limm)
8811047         {
r242507r242508
8881054      }
8891055      else
8901056      {
891         output  += sprintf( output, "[%s]", regnames[C]);
1057         output  += sprintf( output, "[%s]", regnames[creg]);
8921058
8931059
8941060      }
8951061
896      if (res) output  += sprintf( output, " (reserved %02x) ", res );
1062      if (ares) output  += sprintf( output, " (reserved %02x) ", ares );
8971063
8981064
8991065   }
9001066   else if (p == 1)
9011067   {
902      int U = (op & 0x00000fc0) >> 6; op &= ~0x00000fc0;
903      int res = (op & 0x0000003f) >> 0; op &= ~0x0000003f;
1068      COMMON32_GET_u6
1069      COMMON32_GET_areg_reserved
9041070
905      int auxreg = U;
1071      int auxreg = u;
9061072      PRINT_AUX_REGNAME
9071073
908      if (res) output  += sprintf( output, " (reserved %02x) ", res );
1074      if (ares) output  += sprintf( output, " (reserved %02x) ", ares );
9091075
9101076
9111077   }
r242507r242508
9391105   // 0010 0bbb pp10 1111 FBBB CCCC CCII IIII
9401106   int size = 4;
9411107
942   int p = (op & 0x00c00000) >> 22; op &= ~0x00c00000;
1108   COMMON32_GET_p;
9431109   COMMON32_GET_breg;
944   int F = (op & 0x00008000) >> 15; op &= ~0x00008000;
1110   COMMON32_GET_F
9451111
9461112   output  += sprintf( output, "%s", optext);
9471113   output  += sprintf( output, "%s", flagbit[F]);
r242507r242508
9591125
9601126   if (p == 0)
9611127   {
962      int C = (op & 0x00000fc0) >> 6; op &= ~0x00000fc0;
1128      COMMON32_GET_creg
9631129
964      if (C == LIMM_REG)
1130      if (creg == LIMM_REG)
9651131      {
9661132         UINT32 limm;
9671133         GET_LIMM_32;
r242507r242508
9711137      }
9721138      else
9731139      {
974         output  += sprintf( output, "C(%s) ", regnames[C]);
1140         output  += sprintf( output, "C(%s) ", regnames[creg]);
9751141      }
9761142   }
9771143   else if (p == 1)
9781144   {
979      int U = (op & 0x00000fc0) >> 6; op &= ~0x00000fc0;
1145      COMMON32_GET_u6
9801146
981      output  += sprintf( output, "U(0x%02x) ", U);
1147      output  += sprintf( output, "U(0x%02x) ", u);
9821148   }
9831149   else if (p == 2)
9841150   {
r242507r242508
10351201   int mode = (op & 0x00c00000) >> 22; op &= ~0x00c00000;
10361202   COMMON32_GET_breg;
10371203   int D = (op & 0x00008000) >> 15; op &= ~0x00008000;
1038   int C = (op & 0x00000fc0) >> 6; op &= ~0x00000fc0;
1039   int A = (op & 0x0000003f) >> 0; op &= ~0x0000003f;
1204   COMMON32_GET_creg
1205   COMMON32_GET_areg
10401206
10411207   output += sprintf(output, "%s", addressmode[mode]);
10421208   output += sprintf(output, "%s", cachebit[D]);
10431209
1044   output  += sprintf( output, " %s. ", regnames[A]);
1210   output  += sprintf( output, " %s. ", regnames[areg]);
10451211
10461212   if (breg == LIMM_REG)
10471213   {
r242507r242508
10561222      output += sprintf(output, "[%s, ", regnames[breg]);
10571223   }
10581224
1059   if (C == LIMM_REG)
1225   if (creg == LIMM_REG)
10601226   {
10611227      if (!got_limm)
10621228      {
r242507r242508
10681234   }
10691235   else
10701236   {
1071      output  += sprintf( output, "%s]", regnames[C]);
1237      output  += sprintf( output, "%s]", regnames[creg]);
10721238   }   
10731239
10741240
r242507r242508
11241290
11251291   int size = 4;
11261292
1127   int p = (op & 0x00c00000) >> 22; op &= ~0x00c00000;
1293   COMMON32_GET_p;
11281294   COMMON32_GET_breg;
1129   int F = (op & 0x00008000) >> 15;op &= ~0x00008000;
1295   COMMON32_GET_F
11301296
11311297   output  += sprintf( output, "%s", optext);
11321298   output  += sprintf( output, "%s", flagbit[F]);
r242507r242508
11371303
11381304   if (p == 0)
11391305   {
1140      int C = (op & 0x00000fc0) >> 6; op &= ~0x00000fc0;
1306      COMMON32_GET_creg
11411307
1142      if (C == LIMM_REG)
1308      if (creg == LIMM_REG)
11431309      {
11441310         UINT32 limm;
11451311         GET_LIMM_32;
r242507r242508
11491315      }
11501316      else
11511317      {
1152         output  += sprintf( output, "C(%s) ", regnames[C]);
1318         output  += sprintf( output, "C(%s) ", regnames[creg]);
11531319      }
11541320   }
11551321   else if (p == 1)
11561322   {
1157      int U = (op & 0x00000fc0) >> 6; op &= ~0x00000fc0;
1158
1159      output  += sprintf( output, "U(0x%02x) ", U);
1323      COMMON32_GET_u6
1324      output  += sprintf( output, "U(0x%02x) ", u);
11601325   }
11611326   else if (p == 2)
11621327   {
trunk/src/emu/cpu/cpu.mak
r242507r242508
100100
101101ifneq ($(filter ARCOMPACT,$(CPUS)),)
102102OBJDIRS += $(CPUOBJ)/arcompact
103CPUOBJS += $(CPUOBJ)/arcompact/arcompact.o
104DASMOBJS += $(CPUOBJ)/arcompact/arcompactdasm.o $(CPUOBJ)/arcompact/arcompactdasm_dispatch.o $(CPUOBJ)/arcompact/arcompactdasm_ops.o $(CPUOBJ)/arcompact/arcompact_execute.o $(CPUOBJ)/arcompact/arcompact_common.o
103CPUOBJS += $(CPUOBJ)/arcompact/arcompact.o $(CPUOBJ)/arcompact/arcompact_execute.o
104DASMOBJS += $(CPUOBJ)/arcompact/arcompactdasm.o $(CPUOBJ)/arcompact/arcompactdasm_dispatch.o $(CPUOBJ)/arcompact/arcompactdasm_ops.o $(CPUOBJ)/arcompact/arcompact_common.o
105105endif
106106
107107$(CPUOBJ)/arcompact/arcompact.o:  $(CPUSRC)/arcompact/arcompact.c \


Previous 199869 Revisions Next


© 1997-2024 The MAME Team