2 :option:::insn-bit-size:8
3 :option:::insn-specifying-widths:true
5 :model:::mn10300:mn10300:
7 :model:::am33_2:am33_2:
9 // What do we do with an illegal instruction?
13 program_interrupt(SD, CPU, cia, SIM_SIGILL);
16 // 1000 DnDn imm8....; mov imm8,Dn (imm8 is sign extended)
17 4.0x8,2.DM1,2.DN0=DM1+8.IMM8:S0i:::mov
24 int32_t immed = EXTEND8 (IMM8);
25 State.regs[REG_D0+DN0] = immed;
29 // 1000 DmDn; mov Dm,Dn (Dm != Dn, see above when Dm == Dn)
30 4.0x8,2.DM1,2.DN0!DM1:S0:::mov
38 State.regs[REG_D0+DN0] = State.regs[REG_D0+DM1];
42 // 1111 0001 1110 DmAn; mov Dm,An
43 8.0xf1+1110,2.DM1,2.AN0:D0:::mov
51 State.regs[REG_A0 + AN0] = State.regs[REG_D0 + DM1];
55 // 1111 0001 1101 AmDn; mov Am,Dn
56 8.0xf1+1101,2.AM1,2.DN0:D0a:::mov
64 State.regs[REG_D0 + DN0] = State.regs[REG_A0 + AM1];
68 // 1001 AnAn imm8....; mov imm8,An (imm8 is zero-extended)
69 4.0x9,2.AM1,2.AN0=AM1+8.IMM8:S0ai:::mov
77 State.regs[REG_A0+AN0] = IMM8;
81 // 1001 AmAn; mov Am,An (Am != An, save above when Am == An)
82 4.0x9,2.AM1,2.AN0!AM1:S0a:::mov
90 State.regs[REG_A0+AN0] = State.regs[REG_A0+AM1];
94 // 0011 11An; mov SP,An
95 4.0x3,11,2.AN0:S0b:::mov
103 State.regs[REG_A0 + AN0] = State.regs[REG_SP];
107 // 1111 0010 1111 Am00; mov Am,SP
108 8.0xf2+4.0xf,2.AM1,00:D0b:::mov
116 State.regs[REG_SP] = State.regs[REG_A0 + AM1];
120 // 1111 0010 1110 01Dn; mov PSW,Dn
121 8.0xf2+4.0xe,01,2.DN0:D0c:::mov
129 State.regs[REG_D0 + DN0] = PSW;
133 // 1111 0010 1111 Dm11; mov Dm,PSW
134 8.0xf2+4.0xf,2.DM1,11:D0d:::mov
142 PSW = State.regs[REG_D0 + DM1];
146 // 1111 0010 1110 00Dn; mov MDR,Dn
147 8.0xf2+4.0xe,00,2.DN0:D0e:::mov
155 State.regs[REG_D0 + DN0] = State.regs[REG_MDR];
159 // 1111 0010 1111 Dm10; mov Dm,MDR
160 8.0xf2+4.0xf,2.DM1,10:D0f:::mov
168 State.regs[REG_MDR] = State.regs[REG_D0 + DM1];
172 // 0111 DnAm; mov (Am),Dn
173 4.0x7,2.DN1,2.AM0:S0c:::mov
181 State.regs[REG_D0 + DN1] = load_word (State.regs[REG_A0 + AM0]);
185 // 1111 1000 0000 DnAm d8......; mov (d8,Am),Dn (d8 is sign-extended)
186 8.0xf8+4.0x0,2.DN1,2.AM0+8.D8:D1:::mov
194 State.regs[REG_D0 + DN1]
195 = load_word ((State.regs[REG_A0 + AM0] + EXTEND8 (D8)));
199 // 1111 1010 0000 DnAm d16.....; mov (d16,Am),Dn (d16 is sign-extended.)
200 8.0xfa+4.0x0,2.DN1,2.AM0+8.D16A+8.D16B:D2:::mov
206 /* OP_FA000000 (); */
208 State.regs[REG_D0 + DN1]
209 = load_word ((State.regs[REG_A0 + AM0] + EXTEND16 (FETCH16(D16A, D16B))));
213 // 1111 1100 0000 DnAm d32.....; mov (d32,Am),Dn
214 8.0xfc+4.0x0,2.DN1,2.AM0+8.IMM32A+8.IMM32B+8.IMM32C+8.IMM32D:D4:::mov
220 /* OP_FC000000 (); */
222 State.regs[REG_D0 + DN1]
223 = load_word ((State.regs[REG_A0 + AM0]
224 + FETCH32(IMM32A, IMM32B, IMM32C, IMM32D)));
228 // 0101 10Dn d8......; mov (d8,SP),Dn (d8 is zero-extended)
229 4.0x5,10,2.DN0+8.D8:S1:::mov
237 State.regs[REG_D0 + DN0] = load_word (State.regs[REG_SP] + D8);
241 // 1111 1010 1011 01Dn d16.....; mov (d16,SP),Dn (d16 is zero-extended.)
242 8.0xfa+4.0xb,01,2.DN0+8.IMM16A+8.IMM16B:D2a:::mov
248 /* OP_FAB40000 (); */
250 State.regs[REG_D0 + DN0]
251 = load_word (State.regs[REG_SP] + FETCH16(IMM16A, IMM16B));
255 // 1111 1010 1011 01Dn d32.....; mov (d32,SP),Dn
256 8.0xfc+4.0xb,01,2.DN0+8.IMM32A+8.IMM32B+8.IMM32C+8.IMM32D:D4a:::mov
262 /* OP_FCB40000 (); */
264 State.regs[REG_D0 + DN0]
265 = load_word (State.regs[REG_SP] + FETCH32(IMM32A, IMM32B, IMM32C, IMM32D));
269 // 1111 0011 00Dn DiAm; mov (Di,Am),Dn
270 8.0xf3+00,2.DN2,2.DI,2.AM0:D0g:::mov
278 State.regs[REG_D0 + DN2]
279 = load_word ((State.regs[REG_A0 + AM0] + State.regs[REG_D0 + DI]));
283 // 0011 00Dn abs16...; mov (abs16),Dn (abs16 is zero-extended)
284 4.0x3,00,2.DN0+8.IMM16A+8.IMM16B:S2:::mov
292 State.regs[REG_D0 + DN0] = load_word (FETCH16(IMM16A, IMM16B));
295 // 1111 1100 1010 01Dn abs32...; mov (abs32),Dn
296 8.0xfc+4.0xa,01,2.DN0+8.IMM32A+8.IMM32B+8.IMM32C+8.IMM32D:D4b:::mov
302 /* OP_FCA40000 (); */
304 State.regs[REG_D0 + DN0] = load_word (FETCH32(IMM32A, IMM32B, IMM32C, IMM32D));
308 // 1111 0000 0000 AnAm; mov (Am),An
309 8.0xf0+4.0x0,2.AN1,2.AM0:D0h:::mov
317 State.regs[REG_A0 + AN1] = load_word (State.regs[REG_A0 + AM0]);
321 // 1111 1000 0010 AnAm d8......; mov (d8,Am),An (d8 is sign-extended)
322 8.0xf8+4.0x2,2.AN1,2.AM0+8.D8:D1a:::mov
330 State.regs[REG_A0 + AN1]
331 = load_word ((State.regs[REG_A0 + AM0] + EXTEND8 (D8)));
335 // 1111 1010 0010 AnAm d16.....; mov (d16,Am),An (d16 is sign-extended.)
336 8.0xfa+4.0x2,2.AN1,2.AM0+8.D16A+8.D16B:D2b:::mov
342 /* OP_FA200000 (); */
344 State.regs[REG_A0 + AN1]
345 = load_word ((State.regs[REG_A0 + AM0]
346 + EXTEND16 (FETCH16(D16A, D16B))));
350 // 1111 1100 0010 AnAm d32.....; mov (d32,Am),An
351 8.0xfc+4.0x2,2.AN1,2.AM0+8.IMM32A+8.IMM32B+8.IMM32C+8.IMM32D:D4c:::mov
357 /* OP_FC200000 (); */
359 State.regs[REG_A0 + AN1]
360 = load_word ((State.regs[REG_A0 + AM0]
361 + FETCH32(IMM32A, IMM32B, IMM32C, IMM32D)));
365 // 0101 11An d8......; mov (d8,SP),An (d8 is zero-extended)
366 4.0x5,11,2.AN0+8.D8:S1a:::mov
374 State.regs[REG_A0 + AN0]
375 = load_word (State.regs[REG_SP] + D8);
379 // 1111 1010 1011 00An d16.....; mov (d16,SP),An (d16 is zero-extended.)
380 8.0xfa+4.0xb,00,2.AN0+8.IMM16A+8.IMM16B:D2c:::mov
386 /* OP_FAB00000 (); */
388 State.regs[REG_A0 + AN0]
389 = load_word (State.regs[REG_SP] + FETCH16(IMM16A, IMM16B));
393 // 1111 1100 1011 00An d32.....; mov (d32,SP),An
394 8.0xfc+4.0xb,00,2.AN0+8.IMM32A+8.IMM32B+8.IMM32C+8.IMM32D:D4d:::mov
400 /* OP_FCB00000 (); */
402 State.regs[REG_A0 + AN0]
403 = load_word (State.regs[REG_SP]
404 + FETCH32(IMM32A, IMM32B, IMM32C, IMM32D));
408 // 1111 0011 10An DiAm; mov (Di,Am),An
409 8.0xf3+10,2.AN2,2.DI,2.AM0:D0i:::mov
417 State.regs[REG_A0 + AN2]
418 = load_word ((State.regs[REG_A0 + AM0]
419 + State.regs[REG_D0 + DI]));
423 // 1111 1010 1010 00An abs16...; mov (abs16),An (abs16 is zero-extended)
424 8.0xfa+4.0xa,00,2.AN0+8.IMM16A+8.IMM16B:D2d:::mov
430 /* OP_FAA00000 (); */
432 State.regs[REG_A0 + AN0] = load_word (FETCH16(IMM16A, IMM16B));
436 // 1111 1100 1010 00An abs32...; mov (abs32),An
437 8.0xfc+4.0xa,00,2.AN0+8.IMM32A+8.IMM32B+8.IMM32C+8.IMM32D:D4e:::mov
443 /* OP_FCA00000 (); */
445 State.regs[REG_A0 + AN0]
446 = load_word (FETCH32(IMM32A, IMM32B, IMM32C, IMM32D));
450 // 1111 1000 1111 00Am d8......; mov (d8,Am),SP (d8 is sign-extended)
451 8.0xf8+4.0xf,00,2.AM0+8.D8:D1b:::mov
460 = load_word ((State.regs[REG_A0 + AM0] + EXTEND8 (D8)));
464 // 0110 DmAn; mov Dm,(An)
465 4.0x6,2.DM1,2.AN0:S0d:::mov
473 store_word (State.regs[REG_A0 + AN0], State.regs[REG_D0 + DM1]);
477 // 1111 1000 0001 DmAn d8......; mov Dm,(d8,An) (d8 is sign-extended)
478 8.0xf8+4.0x1,2.DM1,2.AN0+8.D8:D1c:::mov
486 store_word ((State.regs[REG_A0 + AN0] + EXTEND8 (D8)),
487 State.regs[REG_D0 + DM1]);
491 // 1111 1010 0001 DmAn d16.....; mov Dm,(d16,An) (d16 is sign-extended.)
492 8.0xfa+4.0x1,2.DM1,2.AN0+8.D16A+8.D16B:D2e:::mov
498 /* OP_FA100000 (); */
500 store_word ((State.regs[REG_A0 + AN0] + EXTEND16 (FETCH16(D16A, D16B))),
501 State.regs[REG_D0 + DM1]);
505 // 1111 1100 0001 DmAn d32.....; mov Dm,(d32,An)
506 8.0xfc+4.0x1,2.DM1,2.AN0+8.IMM32A+8.IMM32B+8.IMM32C+8.IMM32D:D4f:::mov
512 /* OP_FC100000 (); */
514 store_word ((State.regs[REG_A0 + AN0]
515 + FETCH32(IMM32A, IMM32B, IMM32C, IMM32D)),
516 State.regs[REG_D0 + DM1]);
520 // 0100 Dm10 d8......; mov Dm,(d8,SP) (d8 is zero-extended)
521 4.0x4,2.DM1,10+8.D8:S1b:::mov
529 store_word (State.regs[REG_SP] + D8, State.regs[REG_D0 + DM1]);
533 // 1111 1010 1001 Dm01 d16.....; mov Dm,(d16,SP) (d16 is zero-extended.)
534 8.0xfa+4.0x9,2.DM1,01+8.IMM16A+8.IMM16B:D2f:::mov
540 /* OP_FA910000 (); */
542 store_word (State.regs[REG_SP] + FETCH16(IMM16A, IMM16B),
543 State.regs[REG_D0 + DM1]);
547 // 1111 1100 1001 Dm01 d32.....; mov Dm,(d32,SP)
548 8.0xfc+4.0x9,2.DM1,01+8.IMM32A+8.IMM32B+8.IMM32C+8.IMM32D:D4g:::mov
554 /* OP_FC910000 (); */
556 store_word (State.regs[REG_SP] + FETCH32(IMM32A, IMM32B, IMM32C, IMM32D),
557 State.regs[REG_D0 + DM1]);
561 // 1111 0011 01Dm DiAn; mov Dm,(Di,An)
562 8.0xf3+01,2.DM2,2.DI,2.AN0:D0j:::mov
570 store_word ((State.regs[REG_A0 + AN0] + State.regs[REG_D0 + DI]),
571 State.regs[REG_D0 + DM2]);
575 // 0000 Dm01 abs16..., mov Dm,(abs16) (abs16 is zero-extended).
576 4.0x0,2.DM1,01+8.IMM16A+8.IMM16B:S2a:::mov
584 store_word (FETCH16(IMM16A, IMM16B), State.regs[REG_D0 + DM1]);
588 // 1111 1100 1000 Dm01 abs32...; mov Dm,(abs32)
589 8.0xfc+4.0x8,2.DM1,01+8.IMM32A+8.IMM32B+8.IMM32C+8.IMM32D:D4h:::mov
595 /* OP_FC810000 (); */
597 store_word (FETCH32(IMM32A, IMM32B, IMM32C, IMM32D),
598 State.regs[REG_D0 + DM1]);
602 // 1111 0000 0001 AmAn; mov Am,(An)
603 8.0xf0+4.0x1,2.AM1,2.AN0:D0k:::mov
611 store_word (State.regs[REG_A0 + AN0], State.regs[REG_A0 + AM1]);
615 // 1111 1000 0011 AmAn d8......; mov Am,(d8,An) (d8 is sign-extended)
616 8.0xf8+4.0x3,2.AM1,2.AN0+8.D8:D1d:::mov
624 store_word ((State.regs[REG_A0 + AN0] + EXTEND8 (D8)),
625 State.regs[REG_A0 + AM1]);
629 // 1111 1010 0011 AmAn d16.....; mov Am,(d16,An) (d16 is sign-extended.)
630 8.0xfa+4.0x3,2.AM1,2.AN0+8.D16A+8.D16B:D2g:::mov
636 /* OP_FA300000 (); */
638 store_word ((State.regs[REG_A0 + AN0] + EXTEND16 (FETCH16(D16A, D16B))),
639 State.regs[REG_A0 + AM1]);
643 // 1111 1100 0011 AmAn d32.....; mov Am,(d32,An)
644 8.0xfc+4.0x3,2.AM1,2.AN0+8.IMM32A+8.IMM32B+8.IMM32C+8.IMM32D:D4i:::mov
650 /* OP_FC300000 (); */
652 store_word ((State.regs[REG_A0 + AN0]
653 + FETCH32(IMM32A, IMM32B, IMM32C, IMM32D)),
654 State.regs[REG_A0 + AM1]);
658 // 0100 Am11 d8......; mov Am,(d8,SP) (d8 is zero-extended)
659 4.0x4,2.AM1,11+8.D8:S1c:::mov
669 store_word (State.regs[REG_SP] + (D8), State.regs[REG_A0 + (AM1)]);
673 // 1111 1010 1001 Am00 d16.....; mov Am,(d16,SP) (d16 is zero-extended.)
674 8.0xfa+4.0x9,2.AM1,00+8.IMM16A+8.IMM16B:D2h:::mov
682 /* OP_FA900000 (); */
684 store_word (State.regs[REG_SP] + FETCH16(IMM16A, IMM16B),
685 State.regs[REG_A0 + AM1]);
689 // 1111 1100 1001 Am00 d32.....; mov Am,(d32,SP)
690 8.0xfc+4.0x9,2.AM1,00+8.IMM32A+8.IMM32B+8.IMM32C+8.IMM32D:D4j:::mov
698 /* OP_FC900000 (); */
700 store_word (State.regs[REG_SP] + FETCH32(IMM32A, IMM32B, IMM32C, IMM32D),
701 State.regs[REG_A0 + AM1]);
705 // 1111 0011 11Am DiAn; mov Am,(Di,An)
706 8.0xf3+11,2.AM2,2.DI,2.AN0:D0l:::mov
716 store_word ((State.regs[REG_A0 + AN0] + State.regs[REG_D0 + DI]),
717 State.regs[REG_A0 + AM2]);
721 // 1111 1010 1000 Am00 abs16...; mov Am,(abs16) (abs16 is zero-extended)
722 8.0xfa+4.0x8,2.AM1,00+8.IMM16A+8.IMM16B:D2i:::mov
730 /* OP_FA800000 (); */
732 store_word (FETCH16(IMM16A, IMM16B),
733 State.regs[REG_A0 + AM1]);
737 // 1111 1100 1000 Am00 abs32...; mov Am,(abs32)
738 8.0xfc+4.0x8,2.AM1,00+8.IMM32A+8.IMM32B+8.IMM32C+8.IMM32D:D4k:::mov
746 /* OP_FC800000 (); */
748 store_word (FETCH32(IMM32A, IMM32B, IMM32C, IMM32D),
749 State.regs[REG_A0 + AM1]);
753 // 1111 1000 1111 01An d8......; mov SP,(d8,An) (d8 is sign-extended)
754 8.0xf8+4.0xf,01,2.AN0+8.D8:D1e:::mov
764 store_word (State.regs[REG_A0 + AN0] + EXTEND8 (D8),
769 // 0010 11Dn imm16...; mov imm16,Dn (imm16 is sign-extended)
770 4.0x2,11,2.DN0+8.IMM16A+8.IMM16B:S2b:::mov
782 value = EXTEND16 (FETCH16(IMM16A, IMM16B));
783 State.regs[REG_D0 + DN0] = value;
787 // 1111 1100 1100 11Dn imm32...; mov imm32,Dn
788 8.0xfc+4.0xc,11,2.DN0+8.IMM32A+8.IMM32B+8.IMM32C+8.IMM32D:D4l:::mov
796 /* OP_FCCC0000 (); */
800 value = FETCH32(IMM32A, IMM32B, IMM32C, IMM32D);
801 State.regs[REG_D0 + DN0] = value;
805 // 0010 01An imm16...; mov imm16,An (imm16 is zero-extended)
806 4.0x2,01,2.AN0+8.IMM16A+8.IMM16B:S2c:::mov
818 value = FETCH16(IMM16A, IMM16B);
819 State.regs[REG_A0 + AN0] = value;
823 // 1111 1100 1101 11An imm32...; mov imm32,An
824 8.0xfc+4.0xd,11,2.AN0+8.IMM32A+8.IMM32B+8.IMM32C+8.IMM32D:D4m:::mov
832 /* OP_FCDC0000 (); */
834 State.regs[REG_A0 + AN0] = FETCH32(IMM32A, IMM32B, IMM32C, IMM32D);
838 // 1111 0000 0100 DnAm; movbu (Am),Dn
839 8.0xf0+4.0x4,2.DN1,2.AM0:D0:::movbu
849 State.regs[REG_D0 + DN1]
850 = load_byte (State.regs[REG_A0 + AM0]);
854 // 1111 1000 0100 DnAm d8......; movbu (d8,Am),Dn (d8 is sign-extended)
855 8.0xf8+4.0x4,2.DN1,2.AM0+8.D8:D1f:::movbu
865 State.regs[REG_D0 + DN1]
866 = load_byte ((State.regs[REG_A0 + AM0] + EXTEND8 (D8)));
870 // 1111 1010 0100 DnAm d16.....; movbu (d16,Am),Dn (d16 is sign-extended.)
871 8.0xfa+4.0x4,2.DN1,2.AM0+8.D16A+8.D16B:D2:::movbu
879 /* OP_FA400000 (); */
881 State.regs[REG_D0 + DN1]
882 = load_byte ((State.regs[REG_A0 + AM0]
883 + EXTEND16 (FETCH16(D16A, D16B))));
887 // 1111 1100 0100 DnAm d32.....; movbu (d32,Am),Dn
888 8.0xfc+4.0x4,2.DN1,2.AM0+8.IMM32A+8.IMM32B+8.IMM32C+8.IMM32D:D4:::movbu
896 /* OP_FC400000 (); */
898 State.regs[REG_D0 + DN1]
899 = load_byte ((State.regs[REG_A0 + AM0]
900 + FETCH32(IMM32A, IMM32B, IMM32C, IMM32D)));
904 // 1111 1000 1011 10Dn d8......; movbu (d8,SP),Dn (d8 is zero-extended)
905 8.0xf8+4.0xb,10,2.DN0+8.D8:D1a:::movbu
915 State.regs[REG_D0 + DN0]
916 = load_byte ((State.regs[REG_SP] + (D8)));
920 // 1111 1010 1011 10Dn d16.....; movbu (d16,SP),Dn (d16 is zero-extended.)
921 8.0xfa+4.0xb,10,2.DN0+8.IMM16A+8.IMM16B:D2a:::movbu
929 /* OP_FAB80000 (); */
931 State.regs[REG_D0 + DN0]
932 = load_byte ((State.regs[REG_SP]
933 + FETCH16(IMM16A, IMM16B)));
937 // 1111 1100 1011 10Dn d32.....; movbu (d32,SP),Dn
938 8.0xfc+4.0xb,10,2.DN0+8.IMM32A+8.IMM32B+8.IMM32C+8.IMM32D:D4a:::movbu
946 /* OP_FCB80000 (); */
948 State.regs[REG_D0 + DN0]
949 = load_byte (State.regs[REG_SP]
950 + FETCH32(IMM32A, IMM32B, IMM32C, IMM32D));
954 // 1111 0100 00Dn DiAm; movbu (Di,Am),Dn
955 8.0xf4+00,2.DN2,2.DI,2.AM0:D0a:::movbu
965 State.regs[REG_D0 + DN2]
966 = load_byte ((State.regs[REG_A0 + AM0]
967 + State.regs[REG_D0 + DI]));
971 // 0011 01Dn abs16...; movbu (abs16),Dn (abs16 is zero-extended)
972 4.0x3,01,2.DN0+8.IMM16A+8.IMM16B:S2:::movbu
982 State.regs[REG_D0 + DN0] = load_byte (FETCH16(IMM16A, IMM16B));
986 // 1111 1100 1010 10Dn abs32...; movbu (abs32),Dn
987 8.0xfc+4.0xa,10,2.DN0+8.IMM32A+8.IMM32B+8.IMM32C+8.IMM32D:D4b:::movbu
995 /* OP_FCA80000 (); */
997 State.regs[REG_D0 + DN0]
998 = load_byte (FETCH32(IMM32A, IMM32B, IMM32C, IMM32D));
1002 // 1111 0000 0101 DmAn; movbu Dm,(An)
1003 8.0xf0+4.0x5,2.DM1,2.AN0:D0b:::movbu
1013 store_byte (State.regs[REG_A0 + AN0], State.regs[REG_D0 + DM1]);
1017 // 1111 1000 0101 DmAn d8......; movbu Dm,(d8,An) (d8 is sign-extended)
1018 8.0xf8+4.0x5,2.DM1,2.AN0+8.D8:D1b:::movbu
1028 store_byte ((State.regs[REG_A0 + AN0] + EXTEND8 (D8)),
1029 State.regs[REG_D0 + DM1]);
1033 // 1111 1010 0101 DmAn d16.....; movbu Dm,(d16,An) (d16 is sign-extended.)
1034 8.0xfa+4.0x5,2.DM1,2.AN0+8.D16A+8.D16B:D2b:::movbu
1042 /* OP_FA500000 (); */
1044 store_byte ((State.regs[REG_A0 + AN0] + EXTEND16 (FETCH16(D16A, D16B))),
1045 State.regs[REG_D0 + DM1]);
1049 // 1111 1100 0101 DmAn d32.....; movbu Dm,(d32,An)
1050 8.0xfc+4.0x5,2.DM1,2.AN0+8.IMM32A+8.IMM32B+8.IMM32C+8.IMM32D:D4c:::movbu
1058 /* OP_FC500000 (); */
1060 store_byte ((State.regs[REG_A0 + AN0]
1061 + FETCH32(IMM32A, IMM32B, IMM32C, IMM32D)),
1062 State.regs[REG_D0 + DM1]);
1066 // 1111 1000 1001 Dm10 d8......; movbu Dm,(d8,SP) (d8 is zero-extended)
1067 8.0xf8+4.0x9,2.DM1,10+8.D8:D1c:::movbu
1077 store_byte (State.regs[REG_SP] + (D8), State.regs[REG_D0 + DM1]);
1081 // 1111 1010 1001 Dm10 d16.....; movbu Dm,(d16,SP) (d16 is zero-extended.)
1082 8.0xfa+4.0x9,2.DM1,10+8.IMM16A+8.IMM16B:D2c:::movbu
1090 /* OP_FA920000 (); */
1092 store_byte (State.regs[REG_SP] + FETCH16(IMM16A, IMM16B),
1093 State.regs[REG_D0 + DM1]);
1097 // 1111 1100 1001 Dm10 d32.....; movbu Dm,(d32,SP)
1098 8.0xfc+4.0x9,2.DM1,10+8.IMM32A+8.IMM32B+8.IMM32C+8.IMM32D:D4d:::movbu
1106 /* OP_FC920000 (); */
1108 store_byte (State.regs[REG_SP] + FETCH32(IMM32A, IMM32B, IMM32C, IMM32D),
1109 State.regs[REG_D0 + DM1]);
1113 // 1111 0100 01Dm DiAn; movbu Dm,(Di,An)
1114 8.0xf4+01,2.DM2,2.DI,2.AN0:D0c:::movbu
1124 store_byte ((State.regs[REG_A0 + AN0] + State.regs[REG_D0 + DI]),
1125 State.regs[REG_D0 + DM2]);
1129 // 0000 Dm10 abs16...; movbu Dm,(abs16) (abs16 is zero-extended)
1130 4.0x0,2.DM1,10+8.IMM16A+8.IMM16B:S2a:::movbu
1140 store_byte (FETCH16(IMM16A, IMM16B),
1141 State.regs[REG_D0 + DM1]);
1145 // 1111 1100 1000 Dm10 abs32...; movbu Dm,(abs32)
1146 8.0xfc+4.0x8,2.DM1,10+8.IMM32A+8.IMM32B+8.IMM32C+8.IMM32D:D4e:::movbu
1154 /* OP_FC820000 (); */
1156 store_byte (FETCH32(IMM32A, IMM32B, IMM32C, IMM32D),
1157 State.regs[REG_D0 + DM1]);
1161 // 1111 0000 0110 DnAm; movhu (Am),Dn
1162 8.0xf0+4.0x6,2.DN1,2.AM0:D0:::movhu
1172 State.regs[REG_D0 + DN1]
1173 = load_half (State.regs[REG_A0 + AM0]);
1177 // 1111 1000 0110 DnAm d8......; movhu (d8,Am),Dn (d8 is sign-extended)
1178 8.0xf8+4.0x6,2.DN1,2.AM0+8.D8:D1d:::movhu
1188 State.regs[REG_D0 + DN1]
1189 = load_half ((State.regs[REG_A0 + AM0] + EXTEND8 (D8)));
1193 // 1111 1010 0110 DnAm d16.....; movhu (d16,Am),Dn (d16 is sign-extended.)
1194 8.0xfa+4.0x6,2.DN1,2.AM0+8.D16A+8.D16B:D2:::movhu
1202 /* OP_FA600000 (); */
1204 State.regs[REG_D0 + DN1]
1205 = load_half ((State.regs[REG_A0 + AM0]
1206 + EXTEND16 (FETCH16(D16A, D16B))));
1210 // 1111 1100 0110 DnAm d32.....; movhu (d32,Am),Dn
1211 8.0xfc+4.0x6,2.DN1,2.AM0+8.IMM32A+8.IMM32B+8.IMM32C+8.IMM32D:D4:::movhu
1219 /* OP_FC600000 (); */
1221 State.regs[REG_D0 + DN1]
1222 = load_half ((State.regs[REG_A0 + AM0]
1223 + FETCH32(IMM32A, IMM32B, IMM32C, IMM32D)));
1227 // 1111 1000 1011 11Dn d8.....; movhu (d8,SP),Dn (d8 is zero-extended)
1228 8.0xf8+4.0xb,11,2.DN0+8.D8:D1a:::movhu
1238 State.regs[REG_D0 + DN0]
1239 = load_half ((State.regs[REG_SP] + (D8)));
1243 // 1111 1010 1011 11Dn d16.....; movhu (d16,SP),Dn (d16 is zero-extended.)
1244 8.0xfa+4.0xb,11,2.DN0+8.IMM16A+8.IMM16B:D2a:::movhu
1252 /* OP_FABC0000 (); */
1254 State.regs[REG_D0 + DN0]
1255 = load_half ((State.regs[REG_SP] + FETCH16(IMM16A, IMM16B)));
1259 // 1111 1100 1011 11Dn d32.....; movhu (d32,SP),Dn
1260 8.0xfc+4.0xb,11,2.DN0+8.IMM32A+8.IMM32B+8.IMM32C+8.IMM32D:D4a:::movhu
1268 /* OP_FCBC0000 (); */
1270 State.regs[REG_D0 + DN0]
1271 = load_half (State.regs[REG_SP] + FETCH32(IMM32A, IMM32B, IMM32C, IMM32D));
1275 // 1111 0100 10Dn DiAm; movhu (Di,Am),Dn
1276 8.0xf4+10,2.DN2,2.DI,2.AM0:D0a:::movhu
1286 State.regs[REG_D0 + DN2]
1287 = load_half ((State.regs[REG_A0 + AM0] + State.regs[REG_D0 + DI]));
1291 // 0011 10Dn abs16...; movhu (abs16),Dn (abs16 is zero-extended)
1292 4.0x3,10,2.DN0+8.IMM16A+8.IMM16B:S2:::movhu
1302 State.regs[REG_D0 + DN0] = load_half (FETCH16(IMM16A, IMM16B));
1306 // 1111 1100 1010 11Dn abs32...; movhu (abs32),Dn
1307 8.0xfc+4.0xa,11,2.DN0+8.IMM32A+8.IMM32B+8.IMM32C+8.IMM32D:D4b:::movhu
1315 /* OP_FCAC0000 (); */
1317 State.regs[REG_D0 + DN0]
1318 = load_half (FETCH32(IMM32A, IMM32B, IMM32C, IMM32D));
1322 // 1111 0000 0111 DmAn; movhu Dm,(An)
1323 8.0xf0+4.0x7,2.DM1,2.AN0:D0b:::movhu
1333 store_half (State.regs[REG_A0 + AN0],
1334 State.regs[REG_D0 + DM1]);
1338 // 1111 1000 0111 DmAn d8......; movhu Dm,(d8,An) (d8 is sign-extended)
1339 8.0xf8+4.0x7,2.DM1,2.AN0+8.D8:D1b:::movhu
1349 store_half ((State.regs[REG_A0 + AN0] + EXTEND8 (D8)),
1350 State.regs[REG_D0 + DM1]);
1354 // 1111 1010 0111 DnAm d16.....; movhu Dm,(d16,An) (d16 is sign-extended.)
1355 8.0xfa+4.0x7,2.DM1,2.AN0+8.D16A+8.D16B:D2b:::movhu
1363 /* OP_FA700000 (); */
1365 store_half ((State.regs[REG_A0 + AN0] + EXTEND16 (FETCH16(D16A, D16B))),
1366 State.regs[REG_D0 + DM1]);
1370 // 1111 1100 0111 DmAn d32.....; movhu Dm,(d32,An)
1371 8.0xfc+4.0x7,2.DM1,2.AN0+8.IMM32A+8.IMM32B+8.IMM32C+8.IMM32D:D4c:::movhu
1379 /* OP_FC700000 (); */
1381 store_half ((State.regs[REG_A0 + AN0]
1382 + FETCH32(IMM32A, IMM32B, IMM32C, IMM32D)),
1383 State.regs[REG_D0 + DM1]);
1387 // 1111 1000 1001 Dm11 d8....; movhu Dm,(d8,SP) (d8 is zero-extended)
1388 8.0xf8+4.0x9,2.DM1,11+8.D8:D1c:::movhu
1398 store_half (State.regs[REG_SP] + (D8),
1399 State.regs[REG_D0 + DM1]);
1403 // 1111 1010 1001 Dm11 d16.....; movhu Dm,(d16,SP) (d16 is zero-extended.)
1404 8.0xfa+4.0x9,2.DM1,11+8.IMM16A+8.IMM16B:D2c:::movhu
1412 /* OP_FA930000 (); */
1414 store_half (State.regs[REG_SP] + FETCH16(IMM16A, IMM16B),
1415 State.regs[REG_D0 + DM1]);
1419 // 1111 1100 1001 Dm11 d32.....; movhu Dm,(d32,SP)
1420 8.0xfc+4.0x9,2.DM1,11+8.IMM32A+8.IMM32B+8.IMM32C+8.IMM32D:D4d:::movhu
1428 /* OP_FC930000 (); */
1430 store_half (State.regs[REG_SP] + FETCH32(IMM32A, IMM32B, IMM32C, IMM32D),
1431 State.regs[REG_D0 + DM1]);
1435 // 1111 0100 11Dm DiAn; movhu Dm,(Di,An)
1436 8.0xf4+11,2.DM2,2.DI,2.AN0:D0c:::movhu
1446 store_half ((State.regs[REG_A0 + AN0] + State.regs[REG_D0 + DI]),
1447 State.regs[REG_D0 + DM2]);
1451 // 0000 Dm11 abs16...; movhu Dm,(abs16) (abs16 is zero-extended)
1452 4.0x0,2.DM1,11+8.IMM16A+8.IMM16B:S2a:::movhu
1462 store_half (FETCH16(IMM16A, IMM16B), State.regs[REG_D0 + DM1]);
1466 // 1111 1100 1000 Dm11 abs32...; movhu Dm,(abs32)
1467 8.0xfc+4.0x8,2.DM1,11+8.IMM32A+8.IMM32B+8.IMM32C+8.IMM32D:D4e:::movhu
1475 /* OP_FC830000 (); */
1477 store_half (FETCH32(IMM32A, IMM32B, IMM32C, IMM32D),
1478 State.regs[REG_D0 + DM1]);
1482 // 1111 0010 1101 00Dn; ext Dn
1483 8.0xf2+4.0xd,00,2.DN0:D0:::ext
1493 if (State.regs[REG_D0 + DN0] & 0x80000000)
1494 State.regs[REG_MDR] = -1;
1496 State.regs[REG_MDR] = 0;
1500 // 0001 00Dn; extb Dn
1501 4.0x1,00,2.DN0:S0:::extb
1511 State.regs[REG_D0 + DN0] = EXTEND8 (State.regs[REG_D0 + DN0]);
1515 // 0001 01Dn; extbu Dn
1516 4.0x1,01,2.DN0:S0:::extbu
1526 State.regs[REG_D0 + DN0] &= 0xff;
1530 // 0001 10Dn; exth Dn
1531 4.0x1,10,2.DN0:S0:::exth
1541 State.regs[REG_D0 + DN0] = EXTEND16 (State.regs[REG_D0 + DN0]);
1545 // 0001 11Dn; exthu Dn
1546 4.0x1,11,2.DN0:S0:::exthu
1556 State.regs[REG_D0 + DN0] &= 0xffff;
1560 // 0000 Dn00; clr Dn
1561 4.0x0,2.DN1,00:S0:::clr
1571 State.regs[REG_D0 + DN1] = 0;
1574 PSW &= ~(PSW_V | PSW_C | PSW_N);
1578 // 1110 DmDn; add Dm,Dn
1579 4.0xe,2.DM1,2.DN0:S0:::add
1589 genericAdd(State.regs[REG_D0 + DM1], REG_D0 + DN0);
1592 // 1111 0001 0110 DmAn; add Dm,An
1593 8.0xf1+4.0x6,2.DM1,2.AN0:D0:::add
1603 genericAdd(State.regs[REG_D0 + DM1], REG_A0 + AN0);
1607 // 1111 0001 0101 AmDn; add Am,Dn
1608 8.0xf1+4.0x5,2.AM1,2.DN0:D0a:::add
1618 genericAdd(State.regs[REG_A0 + AM1], REG_D0 + DN0);
1622 // 1111 0001 0111 AmAn; add Am,An
1623 8.0xf1+4.0x7,2.AM1,2.AN0:D0b:::add
1633 genericAdd(State.regs[REG_A0 + AM1], REG_A0 + AN0);
1637 // 0010 10Dn imm8....; add imm8,Dn (imm8 is sign-extended)
1638 4.0x2,10,2.DN0+8.IMM8:S1:::add
1648 genericAdd(EXTEND8(IMM8), REG_D0 + DN0);
1652 // 1111 1010 1100 00Dn imm16...; add imm16,Dn
1653 8.0xfa+4.0xc,00,2.DN0+8.IMM16A+8.IMM16B:D2:::add
1661 /* OP_FAC00000 (); */
1663 genericAdd(EXTEND16(FETCH16(IMM16A, IMM16B)), REG_D0 + DN0);
1667 // 1111 1100 1100 00Dn imm32...; add imm32,Dn
1668 8.0xfc+4.0xc,00,2.DN0+8.IMM32A+8.IMM32B+8.IMM32C+8.IMM32D:D4:::add
1676 /* OP_FCC00000 (); */
1678 genericAdd(FETCH32(IMM32A, IMM32B, IMM32C, IMM32D), REG_D0 + DN0);
1682 // 0010 00An imm8....; add imm8,An (imm8 is sign-extended)
1683 4.0x2,00,2.AN0+8.IMM8:S1a:::add
1693 genericAdd(EXTEND8(IMM8), REG_A0 + AN0);
1697 // 1111 1010 1101 00An imm16...; add imm16,An (imm16 is sign-extended.)
1698 8.0xfa+4.0xd,00,2.AN0+8.IMM16A+8.IMM16B:D2a:::add
1706 /* OP_FAD00000 (); */
1708 genericAdd(EXTEND16(FETCH16(IMM16A, IMM16B)), REG_A0 + AN0);
1712 // 1111 1100 1101 00An imm32...; add imm32,An
1713 8.0xfc+4.0xd,00,2.AN0+8.IMM32A+8.IMM32B+8.IMM32C+8.IMM32D:D4a:::add
1721 /* OP_FCD00000 (); */
1723 genericAdd(FETCH32(IMM32A, IMM32B, IMM32C, IMM32D), REG_A0 + AN0);
1727 // 1111 1000 1111 1110 imm8....; add imm8,SP (imm8 is sign-extended.)
1728 8.0xf8+8.0xfe+8.IMM8:D1:::add
1739 /* Note: no PSW changes. */
1741 imm = EXTEND8 (IMM8);
1742 State.regs[REG_SP] += imm;
1746 // 1111 1010 1111 1110 imm16...; add imm16,SP (imm16 is sign-extended.)
1747 8.0xfa+8.0xfe+8.IMM16A+8.IMM16B:D2b:::add
1755 /* OP_FAFE0000 (); */
1758 /* Note: no PSW changes. */
1760 imm = EXTEND16 (FETCH16(IMM16A, IMM16B));
1761 State.regs[REG_SP] += imm;
1765 // 1111 1100 1111 1110 imm32...; add imm32,SP
1766 8.0xfc+8.0xfe+8.IMM32A+8.IMM32B+8.IMM32C+8.IMM32D:D4b:::add
1774 /* OP_FCFE0000 (); */
1777 /* Note: no PSW changes. */
1779 imm = FETCH32(IMM32A, IMM32B, IMM32C, IMM32D);
1780 State.regs[REG_SP] += imm;
1784 // 1111 0001 0100 DmDn; addc Dm,Dn
1785 8.0xf1+4.0x4,2.DM1,2.DN0:D0:::addc
1795 uint32_t reg1, reg2, sum;
1798 reg1 = State.regs[REG_D0 + DM1];
1799 reg2 = State.regs[REG_D0 + DN0];
1800 sum = reg1 + reg2 + ((PSW & PSW_C) != 0);
1801 State.regs[REG_D0 + DN0] = sum;
1803 z = ((PSW & PSW_Z) != 0) && (sum == 0);
1804 n = (sum & 0x80000000);
1805 c = (sum < reg1) || (sum < reg2);
1806 v = ((reg2 & 0x80000000) == (reg1 & 0x80000000)
1807 && (reg2 & 0x80000000) != (sum & 0x80000000));
1809 PSW &= ~(PSW_Z | PSW_N | PSW_C | PSW_V);
1810 PSW |= ((z ? PSW_Z : 0) | ( n ? PSW_N : 0)
1811 | (c ? PSW_C : 0) | (v ? PSW_V : 0));
1815 // 1111 0001 0000 DmDn; sub Dm,Dn
1816 8.0xf1+4.0x0,2.DM1,2.DN0:D0:::sub
1826 genericSub(State.regs[REG_D0 + DM1], REG_D0 + DN0);
1829 // 1111 0001 0010 DmAn; sub DmAn
1830 8.0xf1+4.0x2,2.DM1,2.AN0:D0a:::sub
1840 genericSub(State.regs[REG_D0 + DM1], REG_A0 + AN0);
1844 // 1111 0001 0001 AmDn; sub AmDn
1845 8.0xf1+4.0x1,2.AM1,2.DN0:D0b:::sub
1855 genericSub(State.regs[REG_A0 + AM1], REG_D0 + DN0);
1859 // 1111 0001 0011 AmAn; sub Am,An
1860 8.0xf1+4.0x3,2.AM1,2.AN0:D0c:::sub
1870 genericSub(State.regs[REG_A0 + AM1], REG_A0 + AN0);
1874 // 1111 1100 1100 01Dn imm32...; sub imm32,Dn
1875 8.0xfc+4.0xc,01,2.DN0+8.IMM32A+8.IMM32B+8.IMM32C+8.IMM32D:D4:::sub
1883 /* OP_FCC40000 (); */
1885 genericSub(FETCH32(IMM32A, IMM32B, IMM32C, IMM32D), REG_D0 + DN0);
1889 // 1111 1100 1101 01An imm32...; sub imm32,An
1890 8.0xfc+4.0xd,01,2.AN0+8.IMM32A+8.IMM32B+8.IMM32C+8.IMM32D:D4a:::sub
1898 /* OP_FCD40000 (); */
1900 genericSub(FETCH32(IMM32A, IMM32B, IMM32C, IMM32D), REG_A0 + AN0);
1904 // 1111 0001 1000 DmDn; subc Dm,Dn
1905 8.0xf1+4.0x8,2.DM1,2.DN0:D0:::subc
1915 uint32_t reg1, reg2, difference;
1918 reg1 = State.regs[REG_D0 + DM1];
1919 reg2 = State.regs[REG_D0 + DN0];
1920 difference = reg2 - reg1 - ((PSW & PSW_C) != 0);
1921 State.regs[REG_D0 + DN0] = difference;
1923 z = ((PSW & PSW_Z) != 0) && (difference == 0);
1924 n = (difference & 0x80000000);
1926 v = ((reg2 & 0x80000000) != (reg1 & 0x80000000)
1927 && (reg2 & 0x80000000) != (difference & 0x80000000));
1929 PSW &= ~(PSW_Z | PSW_N | PSW_C | PSW_V);
1930 PSW |= ((z ? PSW_Z : 0) | ( n ? PSW_N : 0)
1931 | (c ? PSW_C : 0) | (v ? PSW_V : 0));
1935 // 1111 0010 0100 DmDn; mul Dm,Dn
1936 8.0xf2+4.0x4,2.DM1,2.DN0:D0:::mul
1949 temp = ((int64_t)(int32_t)State.regs[REG_D0 + DN0]
1950 * (int64_t)(int32_t)State.regs[REG_D0 + DM1]);
1951 State.regs[REG_D0 + DN0] = temp & 0xffffffff;
1952 State.regs[REG_MDR] = (temp & 0xffffffff00000000LL) >> 32;;
1953 z = (State.regs[REG_D0 + DN0] == 0);
1954 n = (State.regs[REG_D0 + DN0] & 0x80000000) != 0;
1955 PSW &= ~(PSW_Z | PSW_N | PSW_C | PSW_V);
1956 PSW |= ((z ? PSW_Z : 0) | (n ? PSW_N : 0));
1960 // 1111 0010 0101 DmDn; mulu Dm,Dn
1961 8.0xf2+4.0x5,2.DM1,2.DN0:D0:::mulu
1974 temp = ((uint64_t)State.regs[REG_D0 + DN0]
1975 * (uint64_t)State.regs[REG_D0 + DM1]);
1976 State.regs[REG_D0 + DN0] = temp & 0xffffffff;
1977 State.regs[REG_MDR] = (temp & 0xffffffff00000000LL) >> 32;
1978 z = (State.regs[REG_D0 + DN0] == 0);
1979 n = (State.regs[REG_D0 + DN0] & 0x80000000) != 0;
1980 PSW &= ~(PSW_Z | PSW_N | PSW_C | PSW_V);
1981 PSW |= ((z ? PSW_Z : 0) | (n ? PSW_N : 0));
1985 // 1111 0010 0110 DmDn; div Dm,Dn
1986 8.0xf2+4.0x6,2.DM1,2.DN0:D0:::div
2000 denom = (int32_t)State.regs[REG_D0 + DM1];
2002 temp = State.regs[REG_MDR];
2004 temp |= State.regs[REG_D0 + DN0];
2005 if ( !(v = (0 == denom)) )
2007 State.regs[REG_MDR] = temp % (int32_t)State.regs[REG_D0 + DM1];
2008 temp /= (int32_t)State.regs[REG_D0 + DM1];
2009 State.regs[REG_D0 + DN0] = temp & 0xffffffff;
2013 State.regs[REG_MDR] = temp;
2014 State.regs[REG_D0 + DN0] = 0xff;
2016 z = (State.regs[REG_D0 + DN0] == 0);
2017 n = (State.regs[REG_D0 + DN0] & 0x80000000) != 0;
2018 PSW &= ~(PSW_Z | PSW_N | PSW_C | PSW_V);
2019 PSW |= ((z ? PSW_Z : 0) | (n ? PSW_N : 0) | (v ? PSW_V : 0));
2023 // 1111 0010 0111 DmDn; divu Dm,Dn
2024 8.0xf2+4.0x7,2.DM1,2.DN0:D0:::divu
2038 denom = (uint32_t)State.regs[REG_D0 + DM1];
2039 temp = State.regs[REG_MDR];
2041 temp |= State.regs[REG_D0 + DN0];
2042 if ( !(v = (0 == denom)) )
2044 State.regs[REG_MDR] = temp % State.regs[REG_D0 + DM1];
2045 temp /= State.regs[REG_D0 + DM1];
2046 State.regs[REG_D0 + DN0] = temp & 0xffffffff;
2050 State.regs[REG_MDR] = temp;
2051 State.regs[REG_D0 + DN0] = 0xff;
2053 z = (State.regs[REG_D0 + DN0] == 0);
2054 n = (State.regs[REG_D0 + DN0] & 0x80000000) != 0;
2055 PSW &= ~(PSW_Z | PSW_N | PSW_C | PSW_V);
2056 PSW |= ((z ? PSW_Z : 0) | (n ? PSW_N : 0) | (v ? PSW_V : 0));
2060 // 0100 Dn00; inc Dn
2061 4.0x4,2.DN1,00:S0:::inc
2074 genericAdd(imm, REG_D0 + DN1);
2079 4.0x4,2.AN1,01:S0a:::inc
2089 State.regs[REG_A0 + AN1] += 1;
2093 // 0101 00An; inc4 An
2094 4.0x5,00,2.AN0:S0:::inc4
2104 State.regs[REG_A0 + AN0] += 4;
2108 // 1010 DnDn imm8....; cmp imm8,Dn (imm8 is sign-extended.)
2109 4.0xa,2.DM1,2.DN0=DM1+IMM8:S0i:::cmp
2119 genericCmp(EXTEND8 (IMM8), State.regs[REG_D0 + DN0]);
2123 // 1010 DmDn; cmp Dm,Dn (Dm != Dn, see above when Dm == Dn)
2124 4.0xa,2.DM1,2.DN0!DM1:S0:::cmp
2134 genericCmp(State.regs[REG_D0 + DM1], State.regs[REG_D0 + DN0]);
2138 // 1111 0001 1010 DmAn; cmp Dm,An
2139 8.0xf1+4.0xa,2.DM1,2.AN0:D0:::cmp
2149 genericCmp(State.regs[REG_D0 + DM1], State.regs[REG_A0 + AN0]);
2153 // 1111 0001 1001 AmDn; cmp Am,Dn
2154 8.0xf1+4.0x9,2.AM1,2.DN0:D0a:::cmp
2164 genericCmp(State.regs[REG_A0 + AM1], State.regs[REG_D0 + DN0]);
2168 // 1011 AnAn imm8....; cmp imm8,An (imm8 is zero-extended.)
2169 4.0xb,2.AM1,2.AN0=AM1+IMM8:S0ai:::cmp
2180 State.regs[REG_A0 + AN0]);
2184 // 1011 AmAn; cmp Am,An (Dm != Dn, see above when Dm == Dn)
2185 4.0xb,2.AM1,2.AN0!AM1:S0a:::cmp
2195 genericCmp(State.regs[REG_A0 + AM1], State.regs[REG_A0 + AN0]);
2199 // 1111 1010 1100 10Dn imm16...; cmp imm16,Dn (imm16 is sign-extended.)
2200 8.0xfa+4.0xc,10,2.DN0+8.IMM16A+8.IMM16B:D2:::cmp
2208 /* OP_FAC80000 (); */
2210 genericCmp(EXTEND16(FETCH16(IMM16A, IMM16B)),
2211 State.regs[REG_D0 + DN0]);
2215 // 1111 1100 1100 10Dn imm32...; cmp imm32,Dn
2216 8.0xfc+4.0xc,10,2.DN0+8.IMM32A+8.IMM32B+8.IMM32C+8.IMM32D:D4:::cmp
2224 /* OP_FCC80000 (); */
2226 genericCmp(FETCH32(IMM32A, IMM32B, IMM32C, IMM32D),
2227 State.regs[REG_D0 + DN0]);
2231 // 1111 1010 1101 10An imm16...; cmp imm16,An (imm16 is zero-extended.)
2232 8.0xfa+4.0xd,10,2.AN0+8.IMM16A+8.IMM16B:D2a:::cmp
2240 /* OP_FAD80000 (); */
2242 genericCmp(FETCH16(IMM16A, IMM16B),
2243 State.regs[REG_A0 + AN0]);
2247 // 1111 1100 1101 10An imm32...; cmp imm32,An
2248 8.0xfc+4.0xd,10,2.AN0+8.IMM32A+8.IMM32B+8.IMM32C+8.IMM32D:D4a:::cmp
2256 /* OP_FCD80000 (); */
2258 genericCmp(FETCH32(IMM32A, IMM32B, IMM32C, IMM32D),
2259 State.regs[REG_A0 + AN0]);
2263 // 1111 0010 0000 DmDn; and Dm,Dn
2264 8.0xf2+4.0x0,2.DM1,2.DN0:D0:::and
2276 State.regs[REG_D0 + DN0] &= State.regs[REG_D0 + DM1];
2277 z = (State.regs[REG_D0 + DN0] == 0);
2278 n = (State.regs[REG_D0 + DN0] & 0x80000000) != 0;
2279 PSW &= ~(PSW_Z | PSW_N | PSW_C | PSW_V);
2280 PSW |= ((z ? PSW_Z : 0) | (n ? PSW_N : 0));
2284 // 1111 1000 1110 00Dn imm8....; and imm8,Dn (imm8 is zero-extended.)
2285 8.0xf8+4.0xe,00,2.DN0+8.IMM8:D1:::and
2297 State.regs[REG_D0 + DN0] &= IMM8;
2298 z = (State.regs[REG_D0 + DN0] == 0);
2299 n = (State.regs[REG_D0 + DN0] & 0x80000000) != 0;
2300 PSW &= ~(PSW_Z | PSW_N | PSW_C | PSW_V);
2301 PSW |= ((z ? PSW_Z : 0) | (n ? PSW_N : 0));
2305 // 1111 1010 1110 00Dn imm16...; and imm16,Dn (imm16 is zero-extended.)
2306 8.0xfa+4.0xe,00,2.DN0+8.IMM16A+8.IMM16B:D2:::and
2314 /* OP_FAE00000 (); */
2318 State.regs[REG_D0 + DN0] &= FETCH16(IMM16A, IMM16B);
2319 z = (State.regs[REG_D0 + DN0] == 0);
2320 n = (State.regs[REG_D0 + DN0] & 0x80000000) != 0;
2321 PSW &= ~(PSW_Z | PSW_N | PSW_C | PSW_V);
2322 PSW |= ((z ? PSW_Z : 0) | (n ? PSW_N : 0));
2326 // 1111 1100 1110 00Dn imm32...; and imm32,Dn
2327 8.0xfc+4.0xe,00,2.DN0+8.IMM32A+8.IMM32B+8.IMM32C+8.IMM32D:D4:::and
2335 /* OP_FCE00000 (); */
2339 State.regs[REG_D0 + DN0]
2340 &= FETCH32(IMM32A, IMM32B, IMM32C, IMM32D);
2341 z = (State.regs[REG_D0 + DN0] == 0);
2342 n = (State.regs[REG_D0 + DN0] & 0x80000000) != 0;
2343 PSW &= ~(PSW_Z | PSW_N | PSW_C | PSW_V);
2344 PSW |= ((z ? PSW_Z : 0) | (n ? PSW_N : 0));
2348 // 1111 1010 1111 1100 imm16...; and imm16,PSW (imm16 is zero-extended.)
2349 8.0xfa+8.0xfc+8.IMM16A+8.IMM16B:D2a:::and
2357 /* OP_FAFC0000 (); */
2359 PSW &= FETCH16(IMM16A, IMM16B);
2364 // 1111 0010 0001 DmDn; or DmDn
2365 8.0xf2+4.0x1,2.DM1,2.DN0:D0:::or
2375 genericOr(State.regs[REG_D0 + DM1], REG_D0 + DN0);
2379 // 1111 1000 1110 01Dn imm8....; or imm8,Dn (imm8 is zero-extended.)n
2380 8.0xf8+4.0xe,01,2.DN0+8.IMM8:D1:::or
2390 genericOr(IMM8, REG_D0 + DN0);
2394 // 1111 1010 1110 01Dn imm16...; or imm16,DN (imm16 is zero-extended.)
2395 8.0xfa+4.0xe,01,2.DN0+8.IMM16A+8.IMM16B:D2:::or
2403 /* OP_FAE40000 (); */
2405 genericOr(FETCH16(IMM16A, IMM16B), REG_D0 + DN0);
2409 // 1111 1100 1110 01Dn imm32...; or imm32,Dn
2410 8.0xfc+4.0xe,01,2.DN0+8.IMM32A+8.IMM32B+8.IMM32C+8.IMM32D:D4:::or
2418 /* OP_FCE40000 (); */
2420 genericOr(FETCH32(IMM32A, IMM32B, IMM32C, IMM32D), REG_D0 + DN0);
2424 // 1111 1010 1111 1101 imm16...; or imm16,PSW (imm16 is zero-extended.)
2425 8.0xfa+8.0xfd+8.IMM16A+8.IMM16B:D2a:::or
2433 /* OP_FAFD0000 (); */
2435 PSW |= FETCH16(IMM16A, IMM16B);
2439 // 1111 0010 0010 DmDn; xor Dm,Dn
2440 8.0xf2+4.0x2,2.DM1,2.DN0:D0:::xor
2450 genericXor(State.regs[REG_D0 + DM1], REG_D0 + DN0);
2454 // 1111 1010 1110 10Dn imm16...; xor imm16,Dn (imm16 is zero-extended.)
2455 8.0xfa+4.0xe,10,2.DN0+8.IMM16A+8.IMM16B:D2:::xor
2463 /* OP_FAE80000 (); */
2465 genericXor(FETCH16(IMM16A, IMM16B), REG_D0 + DN0);
2469 // 1111 1100 1110 10Dn imm32...; xor imm32,Dn
2470 8.0xfc+4.0xe,10,2.DN0+8.IMM32A+8.IMM32B+8.IMM32C+8.IMM32D:D4:::xor
2478 /* OP_FCE80000 (); */
2480 genericXor(FETCH32(IMM32A, IMM32B, IMM32C, IMM32D), REG_D0 + DN0);
2484 // 1111 0010 0011 00Dn; not Dn
2485 8.0xf2+4.0x3,00,2.DN0:D0:::not
2497 State.regs[REG_D0 + DN0] = ~State.regs[REG_D0 + DN0];
2498 z = (State.regs[REG_D0 + DN0] == 0);
2499 n = (State.regs[REG_D0 + DN0] & 0x80000000) != 0;
2500 PSW &= ~(PSW_Z | PSW_N | PSW_C | PSW_V);
2501 PSW |= ((z ? PSW_Z : 0) | (n ? PSW_N : 0));
2505 // 1111 1000 1110 11Dn imm8....; btst imm8,Dn (imm8 is zero-extended.)
2506 8.0xf8+4.0xe,11,2.DN0+8.IMM8:D1:::btst
2516 genericBtst(IMM8, State.regs[REG_D0 + DN0]);
2520 // 1111 1010 1110 11Dn imm16.....; btst imm16,Dn (imm16 is zero-extended.)
2521 8.0xfa+4.0xe,11,2.DN0+8.IMM16A+8.IMM16B:D2:::btst
2529 /* OP_FAEC0000 (); */
2531 genericBtst(FETCH16(IMM16A, IMM16B), State.regs[REG_D0 + DN0]);
2535 // 1111 1100 1110 11Dn imm32...; btst imm32,Dn
2536 8.0xfc+4.0xe,11,2.DN0+8.IMM32A+8.IMM32B+8.IMM32C+8.IMM32D:D4:::btst
2544 /* OP_FCEC0000 (); */
2546 genericBtst(FETCH32(IMM32A, IMM32B, IMM32C, IMM32D),
2547 State.regs[REG_D0 + DN0]);
2551 // 1111 1110 0000 0010 abs32... imm8....; btst imm8,(abs32) (imm8 is zero-extended., processing unit: byte)
2552 8.0xfe+8.0x02+8.IMM32A+8.IMM32B+8.IMM32C+8.IMM32D+8.IMM8:D5:::btst
2560 /* OP_FE020000 (); */
2563 load_byte(FETCH32(IMM32A, IMM32B, IMM32C, IMM32D)));
2567 // 1111 1010 1111 10An d8...... imm8....;
2568 // btst imm8,(d8,An) (d8 is sign-extended,imm8 is zero-extended., processing unit: byte)
2569 8.0xfa+4.0xf,10,2.AN0+8.D8+8.IMM8:D2a:::btst
2577 /* OP_FAF80000 (); */
2580 load_byte(State.regs[REG_A0 + AN0] + EXTEND8(D8)));
2584 // 1111 0000 1000 DmAn; bset Dm,(An) (Processing unit byte)
2585 8.0xf0+4.8,2.DM1,2.AN0:D0:::bset
2598 temp = load_byte (State.regs[REG_A0 + AN0]);
2599 z = (temp & State.regs[REG_D0 + DM1]) == 0;
2600 temp |= State.regs[REG_D0 + DM1];
2601 store_byte (State.regs[REG_A0 + AN0], temp);
2602 PSW &= ~(PSW_Z | PSW_N | PSW_C | PSW_V);
2603 PSW |= (z ? PSW_Z : 0);
2607 // 1111 1110 0000 0000 abs32... imm8....;
2608 // bset imm8,(abs32) (imm8 is zero-extended., processing unit: byte)
2609 8.0xfe+8.0x00+8.IMM32A+8.IMM32B+8.IMM32C+8.IMM32D+8.IMM8:D5:::bset
2617 /* OP_FE000000 (); */
2622 temp = load_byte (FETCH32(IMM32A, IMM32B, IMM32C, IMM32D));
2623 z = (temp & IMM8) == 0;
2625 store_byte (FETCH32(IMM32A, IMM32B, IMM32C, IMM32D), temp);
2626 PSW &= ~(PSW_Z | PSW_N | PSW_C | PSW_V);
2627 PSW |= (z ? PSW_Z : 0);
2631 // 1111 1010 1111 00AnAn d8...... imm8....;
2632 // bset imm8,(d8,An) (d8 is sign-extended, imm8 is zero-extended., processing unit: byte)
2633 8.0xfa+4.0xf,00,2.AN0+8.D8+8.IMM8:D2:::bset
2641 /* OP_FAF00000 (); */
2646 temp = load_byte ((State.regs[REG_A0 + AN0] + EXTEND8 (D8)));
2647 z = (temp & (IMM8)) == 0;
2649 store_byte ((State.regs[REG_A0 + AN0] + EXTEND8 (D8)), temp);
2650 PSW &= ~(PSW_Z | PSW_N | PSW_C | PSW_V);
2651 PSW |= (z ? PSW_Z : 0);
2655 // 1111 0000 1001 DmAn; bclr Dm,(An) (Processing unit byte)
2656 8.0xf0+4.0x9,2.DM1,2.AN0:D0:::bclr
2669 temp = load_byte (State.regs[REG_A0 + AN0]);
2670 z = (temp & State.regs[REG_D0 + DM1]) == 0;
2671 temp = temp & ~State.regs[REG_D0 + DM1];
2672 store_byte (State.regs[REG_A0 + AN0], temp);
2673 PSW &= ~(PSW_Z | PSW_N | PSW_C | PSW_V);
2674 PSW |= (z ? PSW_Z : 0);
2678 // 1111 1110 0000 0001 abs32... imm8....;
2679 // bclr imm8,(abs32) (imm8 is zero-extended., processing unit: byte)
2680 8.0xfe+8.0x01+8.IMM32A+8.IMM32B+8.IMM32C+8.IMM32D+8.IMM8:D5:::bclr
2688 /* OP_FE010000 (); */
2693 temp = load_byte (FETCH32(IMM32A, IMM32B, IMM32C, IMM32D));
2694 z = (temp & IMM8) == 0;
2695 temp = temp & ~(IMM8);
2696 store_byte (FETCH32(IMM32A, IMM32B, IMM32C, IMM32D), temp);
2697 PSW &= ~(PSW_Z | PSW_N | PSW_C | PSW_V);
2698 PSW |= (z ? PSW_Z : 0);
2702 // 1111 1010 1111 01An d8...... imm8....;
2703 // bclr imm8,(d8,An) (d8 is sign-extended, imm8 is zero-extended., processing unit: byte)
2704 8.0xfa+4.0xf,01,2.AN0+8.D8+8.IMM8:D2:::bclr
2712 /* OP_FAF40000 (); */
2717 temp = load_byte ((State.regs[REG_A0 + AN0] + EXTEND8 (D8)));
2718 z = (temp & (IMM8)) == 0;
2719 temp = temp & ~(IMM8);
2720 store_byte ((State.regs[REG_A0 + AN0] + EXTEND8 (D8)), temp);
2721 PSW &= ~(PSW_Z | PSW_N | PSW_C | PSW_V);
2722 PSW |= (z ? PSW_Z : 0);
2726 // 1111 0010 1011 DmDn; asr Dm,Dn
2727 8.0xf2+4.0xb,2.DM1,2.DN0:D0:::asr
2740 temp = State.regs[REG_D0 + DN0];
2742 temp >>= State.regs[REG_D0 + DM1];
2743 State.regs[REG_D0 + DN0] = temp;
2744 z = (State.regs[REG_D0 + DN0] == 0);
2745 n = (State.regs[REG_D0 + DN0] & 0x80000000) != 0;
2746 PSW &= ~(PSW_Z | PSW_N | PSW_C);
2747 PSW |= ((z ? PSW_Z : 0) | (n ? PSW_N : 0) | (c ? PSW_C : 0));
2751 // 1111 1000 1100 10Dn imm8...; asr imm8,Dn (imm8 is zero-extended.)
2752 8.0xf8+4.0xc,10,2.DN0+8.IMM8:D1:::asr
2765 temp = State.regs[REG_D0 + DN0];
2768 State.regs[REG_D0 + DN0] = temp;
2769 z = (State.regs[REG_D0 + DN0] == 0);
2770 n = (State.regs[REG_D0 + DN0] & 0x80000000) != 0;
2771 PSW &= ~(PSW_Z | PSW_N | PSW_C);
2772 PSW |= ((z ? PSW_Z : 0) | (n ? PSW_N : 0) | (c ? PSW_C : 0));
2776 // 1111 0010 1010 DmDn; lsr Dm,Dn
2777 8.0xf2+4.0xa,2.DM1,2.DN0:D0:::lsr
2789 c = State.regs[REG_D0 + DN0] & 1;
2790 State.regs[REG_D0 + DN0]
2791 >>= State.regs[REG_D0 + DM1];
2792 z = (State.regs[REG_D0 + DN0] == 0);
2793 n = (State.regs[REG_D0 + DN0] & 0x80000000) != 0;
2794 PSW &= ~(PSW_Z | PSW_N | PSW_C);
2795 PSW |= ((z ? PSW_Z : 0) | (n ? PSW_N : 0) | (c ? PSW_C : 0));
2799 // 1111 1000 1100 01Dn imm8...; lsr imm8,Dn (imm8 is zero-extended.)
2800 8.0xf8+4.0xc,01,2.DN0+8.IMM8:D1:::lsr
2812 c = State.regs[REG_D0 + DN0] & 1;
2813 State.regs[REG_D0 + DN0] >>= IMM8;
2814 z = (State.regs[REG_D0 + DN0] == 0);
2815 n = (State.regs[REG_D0 + DN0] & 0x80000000) != 0;
2816 PSW &= ~(PSW_Z | PSW_N | PSW_C);
2817 PSW |= ((z ? PSW_Z : 0) | (n ? PSW_N : 0) | (c ? PSW_C : 0));
2821 // 1111 0010 1001 DmDn; asl Dm,Dn
2822 8.0xf2+4.0x9,2.DM1,2.DN0:D0:::asl
2834 State.regs[REG_D0 + DN0]
2835 <<= State.regs[REG_D0 + DM1];
2836 z = (State.regs[REG_D0 + DN0] == 0);
2837 n = (State.regs[REG_D0 + DN0] & 0x80000000) != 0;
2838 PSW &= ~(PSW_Z | PSW_N);
2839 PSW |= ((z ? PSW_Z : 0) | (n ? PSW_N : 0));
2843 // 1111 1000 1100 00Dn imm8...; asl imm8,Dn (imm8 is zero-extended.)
2844 8.0xf8+4.0xc,00,2.DN0+8.IMM8:D1:::asl
2856 State.regs[REG_D0 + DN0] <<= IMM8;
2857 z = (State.regs[REG_D0 + DN0] == 0);
2858 n = (State.regs[REG_D0 + DN0] & 0x80000000) != 0;
2859 PSW &= ~(PSW_Z | PSW_N);
2860 PSW |= ((z ? PSW_Z : 0) | (n ? PSW_N : 0));
2864 // 0101 01Dn; als2 Dn
2865 4.0x5,01,2.DN0:S0:::asl2
2877 State.regs[REG_D0 + DN0] <<= 2;
2878 z = (State.regs[REG_D0 + DN0] == 0);
2879 n = (State.regs[REG_D0 + DN0] & 0x80000000) != 0;
2880 PSW &= ~(PSW_Z | PSW_N);
2881 PSW |= ((z ? PSW_Z : 0) | (n ? PSW_N : 0));
2885 // 1111 0010 1000 01Dn; ror Dn
2886 8.0xf2+4.0x8,01,2.DN0:D0:::ror
2899 value = State.regs[REG_D0 + DN0];
2903 value |= ((PSW & PSW_C) != 0) ? 0x80000000 : 0;
2904 State.regs[REG_D0 + DN0] = value;
2906 n = (value & 0x80000000) != 0;
2907 PSW &= ~(PSW_Z | PSW_N | PSW_C | PSW_V);
2908 PSW |= ((z ? PSW_Z : 0) | (n ? PSW_N : 0) | (c ? PSW_C : 0));
2912 // 1111 0010 1000 00Dn; rol Dn
2913 8.0xf2+4.0x8,00,2.DN0:D0:::rol
2926 value = State.regs[REG_D0 + DN0];
2927 c = (value & 0x80000000) ? 1 : 0;
2930 value |= ((PSW & PSW_C) != 0);
2931 State.regs[REG_D0 + DN0] = value;
2933 n = (value & 0x80000000) != 0;
2934 PSW &= ~(PSW_Z | PSW_N | PSW_C | PSW_V);
2935 PSW |= ((z ? PSW_Z : 0) | (n ? PSW_N : 0) | (c ? PSW_C : 0));
2939 // 1100 1000 d8......; beq (d8,PC) (d8 is sign-extended)
2940 8.0xc8+8.D8:S1:::beq
2952 State.regs[REG_PC] += EXTEND8 (D8);
2958 // 1100 1001 d8......; bne (d8,PC) (d8 is sign-extended)
2959 8.0xc9+8.D8:S1:::bne
2971 State.regs[REG_PC] += EXTEND8 (D8);
2977 // 1100 0001 d8......; bgt (d8,PC) (d8 is sign-extended)
2978 8.0xc1+8.D8:S1:::bgt
2989 || (((PSW & PSW_N) != 0) ^ ((PSW & PSW_V) != 0))))
2991 State.regs[REG_PC] += EXTEND8 (D8);
2997 // 1100 0010 d8......; bge (d8,PC) (d8 is sign-extended)
2998 8.0xc2+8.D8:S1:::bge
3008 if (!(((PSW & PSW_N) != 0) ^ ((PSW & PSW_V) != 0)))
3010 State.regs[REG_PC] += EXTEND8 (D8);
3016 // 1100 0011 d8......; ble (d8,PC) (d8 is sign-extended)
3017 8.0xc3+8.D8:S1:::ble
3028 || (((PSW & PSW_N) != 0) ^ ((PSW & PSW_V) != 0)))
3030 State.regs[REG_PC] += EXTEND8 (D8);
3036 // 1100 0000 d8......; blt (d8,PC) (d8 is sign-extended)
3037 8.0xc0+8.D8:S1:::blt
3047 if (((PSW & PSW_N) != 0) ^ ((PSW & PSW_V) != 0))
3049 State.regs[REG_PC] += EXTEND8 (D8);
3055 // 1100 0101 d8......; bhi (d8,PC) (d8 is sign-extended)
3056 8.0xc5+8.D8:S1:::bhi
3066 if (!(((PSW & PSW_C) != 0) || (PSW & PSW_Z) != 0))
3068 State.regs[REG_PC] += EXTEND8 (D8);
3074 // 1100 0110 d8......; bcc (d8,PC) (d8 is sign-extended)
3075 8.0xc6+8.D8:S1:::bcc
3087 State.regs[REG_PC] += EXTEND8 (D8);
3093 // 1100 0101 d8......; bls (d8,PC) (d8 is sign-extended)
3094 8.0xc7+8.D8:S1:::bls
3104 if (((PSW & PSW_C) != 0) || (PSW & PSW_Z) != 0)
3106 State.regs[REG_PC] += EXTEND8 (D8);
3112 // 1100 0100 d8......; bcs (d8,PC) (d8 is sign-extended)
3113 8.0xc4+8.D8:S1:::bcs
3125 State.regs[REG_PC] += EXTEND8 (D8);
3131 // 1111 1000 1110 1000 d8......; bvc (d8,PC) (d8 is sign-extended)
3132 8.0xf8+8.0xe8+8.D8:D1:::bvc
3144 State.regs[REG_PC] += EXTEND8 (D8);
3150 // 1111 1000 1110 1001 d8......; bvs (d8,PC) (d8 is sign-extended)
3151 8.0xf8+8.0xe9+8.D8:D1:::bvs
3163 State.regs[REG_PC] += EXTEND8 (D8);
3169 // 1111 1000 1110 1010 d8......; bnc (d8,PC) (d8 is sign-extended)
3170 8.0xf8+8.0xea+8.D8:D1:::bnc
3182 State.regs[REG_PC] += EXTEND8 (D8);
3188 // 1111 1000 1110 1010 d8......; bns (d8,PC) (d8 is sign-extended)
3189 8.0xf8+8.0xeb+8.D8:D1:::bns
3201 State.regs[REG_PC] += EXTEND8 (D8);
3207 // 1100 1010 d8......; bra (d8,PC) (d8 is sign-extended)
3208 8.0xca+8.D8:S1:::bra
3218 State.regs[REG_PC] += EXTEND8 (D8);
3236 State.regs[REG_PC] = State.regs[REG_LAR] - 4;
3255 State.regs[REG_PC] = State.regs[REG_LAR] - 4;
3273 || (((PSW & PSW_N) != 0) ^ ((PSW & PSW_V) != 0))))
3275 State.regs[REG_PC] = State.regs[REG_LAR] - 4;
3292 if (!(((PSW & PSW_N) != 0) ^ ((PSW & PSW_V) != 0)))
3294 State.regs[REG_PC] = State.regs[REG_LAR] - 4;
3312 || (((PSW & PSW_N) != 0) ^ ((PSW & PSW_V) != 0)))
3314 State.regs[REG_PC] = State.regs[REG_LAR] - 4;
3331 if (((PSW & PSW_N) != 0) ^ ((PSW & PSW_V) != 0))
3333 State.regs[REG_PC] = State.regs[REG_LAR] - 4;
3350 if (!(((PSW & PSW_C) != 0) || (PSW & PSW_Z) != 0))
3352 State.regs[REG_PC] = State.regs[REG_LAR] - 4;
3371 State.regs[REG_PC] = State.regs[REG_LAR] - 4;
3388 if (((PSW & PSW_C) != 0) || (PSW & PSW_Z) != 0)
3390 State.regs[REG_PC] = State.regs[REG_LAR] - 4;
3409 State.regs[REG_PC] = State.regs[REG_LAR] - 4;
3426 State.regs[REG_PC] = State.regs[REG_LAR] - 4;
3442 State.regs[REG_LIR] = load_word (State.regs[REG_PC] + 1);
3443 State.regs[REG_LAR] = State.regs[REG_PC] + 5;
3447 // 1111 0000 1111 01An; jmp (An)
3448 8.0xf0+4.0xf,01,2.AN0:D0:::jmp
3457 PC = State.regs[REG_A0 + AN0];
3462 // 1100 1100 d16.....; jmp (d16,PC) (d16 is sign-extended.)
3463 8.0xcc+8.D16A+8.D16B:S2:::jmp
3472 PC = cia + EXTEND16(FETCH16(D16A, D16B));
3477 // 1101 1100 d32........; jmp (d32, PC)
3478 8.0xdc+8.D32A+8.D32B+8.D32C+8.D32D:S4:::jmp
3486 /* OP_DC000000 (); */
3487 PC = cia + FETCH32(D32A, D32B, D32C, D32D);
3492 // 1111 0000 1111 00An; calls (An)
3493 8.0xf0+4.0xf,00,2.AN0:D0:::calls
3502 uint32_t next_pc, sp;
3505 sp = State.regs[REG_SP];
3506 next_pc = State.regs[REG_PC] + 2;
3507 store_word(sp, next_pc);
3508 State.regs[REG_MDR] = next_pc;
3509 State.regs[REG_PC] = State.regs[REG_A0 + AN0];
3514 // 1111 1010 1111 1111 d16.....; calls (d16,PC) (d16 is sign-extended.)
3515 8.0xfa+8.0xff+8.D16A+8.D16B:D2:::calls
3523 /* OP_FAFF0000 (); */
3524 uint32_t next_pc, sp;
3527 sp = State.regs[REG_SP];
3528 next_pc = State.regs[REG_PC] + 4;
3529 store_word(sp, next_pc);
3530 State.regs[REG_MDR] = next_pc;
3531 State.regs[REG_PC] += EXTEND16 (FETCH16(D16A, D16B));
3536 // 1111 1100 1111 1111 d32.....; calls (d32,PC)
3537 8.0xfc+8.0xff+8.D32A+8.D32B+8.D32C+8.D32D:D4:::calls
3545 /* OP_FCFF0000 (); */
3546 uint32_t next_pc, sp;
3549 sp = State.regs[REG_SP];
3550 next_pc = State.regs[REG_PC] + 6;
3551 store_word(sp, next_pc);
3552 State.regs[REG_MDR] = next_pc;
3553 State.regs[REG_PC] += FETCH32(D32A, D32B, D32C, D32D);
3558 // 1111 0000 1111 1100; rets
3559 8.0xf0+8.0xfc:D0:::rets
3570 sp = State.regs[REG_SP];
3571 State.regs[REG_PC] = load_word(sp);
3576 // 1111 0000 1111 1101; rti
3577 8.0xf0+8.0xfd:D0:::rti
3588 sp = State.regs[REG_SP];
3589 PSW = load_half(sp);
3590 State.regs[REG_PC] = load_word(sp+4);
3591 State.regs[REG_SP] +=8;
3596 // 1111 0000 1111 1110; trap
3597 8.0xf0+8.0xfe:D0:::trap
3606 uint32_t sp, next_pc;
3609 sp = State.regs[REG_SP];
3610 next_pc = State.regs[REG_PC] + 2;
3611 store_word(sp, next_pc);
3616 // 1111 0000 1111 1111; rtm
3617 8.0xf0+8.0xff:D0:::rtm
3627 sim_engine_abort (SD, CPU, cia, "F0FF");
3645 // 1111 0101 0000 DmDn; udf20 Dm,Dn
3646 8.0xf5+4.0x0,2.DM1,2.DN0:D0:::putx
3652 State.regs[REG_MDRQ] = State.regs[REG_D0 + DN0];
3656 // 1111 0110 1111 DmDn; udf15 Dm,Dn
3657 8.0xf6+4.0xf,2.DM1,2.DN0:D0:::getx
3669 z = (State.regs[REG_MDRQ] == 0);
3670 n = ((State.regs[REG_MDRQ] & 0x80000000) != 0);
3671 State.regs[REG_D0 + DN0] = State.regs[REG_MDRQ];
3673 PSW &= ~(PSW_Z | PSW_N | PSW_C | PSW_V);
3674 PSW |= (z ? PSW_Z : 0) | (n ? PSW_N : 0);
3678 // 1111 0110 0000 DmDn; udf00 Dm,Dn
3679 8.0xf6+4.0x0,2.DM1,2.DN0:D0:::mulq
3692 temp = ((int64_t)(int32_t)State.regs[REG_D0 + DN0]
3693 * (int64_t)(int32_t)State.regs[REG_D0 + DM1]);
3694 State.regs[REG_D0 + DN0] = temp & 0xffffffff;
3695 State.regs[REG_MDRQ] = (temp & 0xffffffff00000000LL) >> 32;;
3696 z = (State.regs[REG_D0 + DN0] == 0);
3697 n = (State.regs[REG_D0 + DN0] & 0x80000000) != 0;
3698 PSW &= ~(PSW_Z | PSW_N | PSW_C | PSW_V);
3699 PSW |= ((z ? PSW_Z : 0) | (n ? PSW_N : 0));
3703 // 1111 1001 0000 00Dn imm8....; udf00 imm8,Dn (imm8 is sign-extended.)
3704 8.0xf9+4.0x,00,2.DN0+8.IMM8:D1:::mulq
3717 temp = ((int64_t)(int32_t)State.regs[REG_D0 + DN0]
3718 * (int64_t)(int32_t)EXTEND8 (IMM8));
3719 State.regs[REG_D0 + DN0] = temp & 0xffffffff;
3720 State.regs[REG_MDRQ] = (temp & 0xffffffff00000000LL) >> 32;;
3721 z = (State.regs[REG_D0 + DN0] == 0);
3722 n = (State.regs[REG_D0 + DN0] & 0x80000000) != 0;
3723 PSW &= ~(PSW_Z | PSW_N | PSW_C | PSW_V);
3724 PSW |= ((z ? PSW_Z : 0) | (n ? PSW_N : 0));
3728 // 1111 1011 0000 00Dn imm16...; udf00 imm16,Dn (imm16 is sign-extended.)
3729 8.0xfb+4.0x0,00,2.DN0+8.IMM16A+8.IMM16B:D2:::mulq
3737 /* OP_FB000000 (); */
3742 temp = ((int64_t)(int32_t)State.regs[REG_D0 + DN0]
3743 * (int64_t)(int32_t)EXTEND16 (FETCH16(IMM16A, IMM16B)));
3744 State.regs[REG_D0 + DN0] = temp & 0xffffffff;
3745 State.regs[REG_MDRQ] = (temp & 0xffffffff00000000LL) >> 32;;
3746 z = (State.regs[REG_D0 + DN0] == 0);
3747 n = (State.regs[REG_D0 + DN0] & 0x80000000) != 0;
3748 PSW &= ~(PSW_Z | PSW_N | PSW_C | PSW_V);
3749 PSW |= ((z ? PSW_Z : 0) | (n ? PSW_N : 0));
3753 // 1111 1101 0000 00Dn imm32...; udf00 imm32,Dn
3754 8.0xfd+4.0x0,00,2.DN0+8.IMM32A+8.IMM32B+8.IMM32C+8.IMM32D:D4:::mulq
3762 /* OP_FD000000 (); */
3767 temp = ((int64_t)(int32_t)State.regs[REG_D0 + DN0]
3768 * (int64_t)(int32_t)(FETCH32(IMM32A, IMM32B, IMM32C, IMM32D)));
3769 State.regs[REG_D0 + DN0] = temp & 0xffffffff;
3770 State.regs[REG_MDRQ] = (temp & 0xffffffff00000000LL) >> 32;;
3771 z = (State.regs[REG_D0 + DN0] == 0);
3772 n = (State.regs[REG_D0 + DN0] & 0x80000000) != 0;
3773 PSW &= ~(PSW_Z | PSW_N | PSW_C | PSW_V);
3774 PSW |= ((z ? PSW_Z : 0) | (n ? PSW_N : 0));
3778 // 1111 0110 0001 DmDn; udf01 Dm,Dn
3779 8.0xf6+4.0x1,2.DM1,2.DN0:D0:::mulqu
3792 temp = ((uint64_t) State.regs[REG_D0 + DN0]
3793 * (uint64_t) State.regs[REG_D0 + DM1]);
3794 State.regs[REG_D0 + DN0] = temp & 0xffffffff;
3795 State.regs[REG_MDRQ] = (temp & 0xffffffff00000000LL) >> 32;;
3796 z = (State.regs[REG_D0 + DN0] == 0);
3797 n = (State.regs[REG_D0 + DN0] & 0x80000000) != 0;
3798 PSW &= ~(PSW_Z | PSW_N | PSW_C | PSW_V);
3799 PSW |= ((z ? PSW_Z : 0) | (n ? PSW_N : 0));
3803 // 1111 1001 0001 01Dn imm8....; udfu01 imm8,Dn (imm8 is zero-extended.)
3804 8.0xf9+4.0x1,01,2.DN0+8.IMM8:D1:::mulqu
3817 temp = ((uint64_t)State.regs[REG_D0 + DN0]
3818 * (uint64_t)EXTEND8 (IMM8));
3819 State.regs[REG_D0 + DN0] = temp & 0xffffffff;
3820 State.regs[REG_MDRQ] = (temp & 0xffffffff00000000LL) >> 32;;
3821 z = (State.regs[REG_D0 + DN0] == 0);
3822 n = (State.regs[REG_D0 + DN0] & 0x80000000) != 0;
3823 PSW &= ~(PSW_Z | PSW_N | PSW_C | PSW_V);
3824 PSW |= ((z ? PSW_Z : 0) | (n ? PSW_N : 0));
3828 // 1111 1011 0001 01Dn imm16...; udfu01 imm16,Dn (imm16 is zero-extended.)
3829 8.0xfb+4.0x1,01,2.DN0+8.IMM16A+8.IMM16B:D2:::mulqu
3837 /* OP_FB140000 (); */
3842 temp = ((uint64_t)State.regs[REG_D0 + DN0]
3843 * (uint64_t) EXTEND16 (FETCH16(IMM16A, IMM16B)));
3844 State.regs[REG_D0 + DN0] = temp & 0xffffffff;
3845 State.regs[REG_MDRQ] = (temp & 0xffffffff00000000LL) >> 32;;
3846 z = (State.regs[REG_D0 + DN0] == 0);
3847 n = (State.regs[REG_D0 + DN0] & 0x80000000) != 0;
3848 PSW &= ~(PSW_Z | PSW_N | PSW_C | PSW_V);
3849 PSW |= ((z ? PSW_Z : 0) | (n ? PSW_N : 0));
3853 // 1111 1101 0001 01Dn imm32...; udfu01 imm32,Dn
3854 8.0xfd+4.0x1,01,2.DN0+8.IMM32A+8.IMM32B+8.IMM32C+8.IMM32D:D4:::mulqu
3862 /* OP_FD140000 (); */
3867 temp = ((uint64_t)State.regs[REG_D0 + DN0]
3868 * (uint64_t)(FETCH32(IMM32A, IMM32B, IMM32C, IMM32D)));
3869 State.regs[REG_D0 + DN0] = temp & 0xffffffff;
3870 State.regs[REG_MDRQ] = (temp & 0xffffffff00000000LL) >> 32;;
3871 z = (State.regs[REG_D0 + DN0] == 0);
3872 n = (State.regs[REG_D0 + DN0] & 0x80000000) != 0;
3873 PSW &= ~(PSW_Z | PSW_N | PSW_C | PSW_V);
3874 PSW |= ((z ? PSW_Z : 0) | (n ? PSW_N : 0));
3878 // 1111 0110 0100 DmDn; udf04 Dm,Dn
3879 8.0xf6+4.0x4,2.DM1,2.DN0:D0:::sat16
3891 temp = State.regs[REG_D0 + DM1];
3892 temp = (temp > 0x7fff ? 0x7fff : temp);
3893 temp = (temp < -0x8000 ? -0x8000 : temp);
3894 State.regs[REG_D0 + DN0] = temp;
3898 // 1111 0110 0101 DmDn; udf05 Dm,Dn
3899 8.0xf6+4.0x5,2.DM1,2.DN0:D0:::sat24
3911 temp = State.regs[REG_D0 + DM1];
3912 temp = (temp > 0x7fffff ? 0x7fffff : temp);
3913 temp = (temp < -0x800000 ? -0x800000 : temp);
3914 State.regs[REG_D0 + DN0] = temp;
3918 // 1111 0110 0111 DmDn; udf07 Dm,Dn
3919 8.0xf6+4.0x7,2.DM1,2.DN0:D0:::bsch
3931 temp = State.regs[REG_D0 + DM1];
3932 temp <<= (State.regs[REG_D0 + DN0] & 0x1f);
3933 c = (temp != 0 ? 1 : 0);
3935 PSW |= (c ? PSW_C : 0);
3939 // 1111 0000 1100 0000; syscall
3940 8.0xf0+8.0xc0:D0:::syscall
3965 program_interrupt(SD, CPU, cia, SIM_SIGTRAP);
3968 // 1100 1110 regs....; movm (SP),regs
3969 8.0xce+8.REGS:S1:::movm
3978 uint32_t sp = State.regs[REG_SP];
3987 State.regs[REG_LAR] = load_word (sp);
3989 State.regs[REG_LIR] = load_word (sp);
3991 State.regs[REG_MDR] = load_word (sp);
3993 State.regs[REG_A0 + 1] = load_word (sp);
3995 State.regs[REG_A0] = load_word (sp);
3997 State.regs[REG_D0 + 1] = load_word (sp);
3999 State.regs[REG_D0] = load_word (sp);
4005 State.regs[REG_A0 + 3] = load_word (sp);
4011 State.regs[REG_A0 + 2] = load_word (sp);
4017 State.regs[REG_D0 + 3] = load_word (sp);
4023 State.regs[REG_D0 + 2] = load_word (sp);
4027 if (STATE_ARCHITECTURE (SD)->mach == bfd_mach_am33
4028 || STATE_ARCHITECTURE (SD)->mach == bfd_mach_am33_2
4033 /* Need to restore MDRQ, MCRH, MCRL, and MCVF */
4035 State.regs[REG_E0 + 1] = load_word (sp);
4037 State.regs[REG_E0 + 0] = load_word (sp);
4043 State.regs[REG_E0 + 7] = load_word (sp);
4045 State.regs[REG_E0 + 6] = load_word (sp);
4047 State.regs[REG_E0 + 5] = load_word (sp);
4049 State.regs[REG_E0 + 4] = load_word (sp);
4055 State.regs[REG_E0 + 3] = load_word (sp);
4057 State.regs[REG_E0 + 2] = load_word (sp);
4062 /* And make sure to update the stack pointer. */
4063 State.regs[REG_SP] = sp;
4067 // 1100 1111 regs....; movm regs,(SP)
4068 8.0xcf+8.REGS:S1a:::movm
4077 uint32_t sp = State.regs[REG_SP];
4083 if (STATE_ARCHITECTURE (SD)->mach == bfd_mach_am33
4084 || STATE_ARCHITECTURE (SD)->mach == bfd_mach_am33_2
4090 store_word (sp, State.regs[REG_E0 + 2]);
4092 store_word (sp, State.regs[REG_E0 + 3]);
4098 store_word (sp, State.regs[REG_E0 + 4]);
4100 store_word (sp, State.regs[REG_E0 + 5]);
4102 store_word (sp, State.regs[REG_E0 + 6]);
4104 store_word (sp, State.regs[REG_E0 + 7]);
4110 store_word (sp, State.regs[REG_E0 + 0]);
4112 store_word (sp, State.regs[REG_E0 + 1]);
4114 /* Need to save MDRQ, MCRH, MCRL, and MCVF */
4121 store_word (sp, State.regs[REG_D0 + 2]);
4127 store_word (sp, State.regs[REG_D0 + 3]);
4133 store_word (sp, State.regs[REG_A0 + 2]);
4139 store_word (sp, State.regs[REG_A0 + 3]);
4145 store_word (sp, State.regs[REG_D0]);
4147 store_word (sp, State.regs[REG_D0 + 1]);
4149 store_word (sp, State.regs[REG_A0]);
4151 store_word (sp, State.regs[REG_A0 + 1]);
4153 store_word (sp, State.regs[REG_MDR]);
4155 store_word (sp, State.regs[REG_LIR]);
4157 store_word (sp, State.regs[REG_LAR]);
4161 /* And make sure to update the stack pointer. */
4162 State.regs[REG_SP] = sp;
4165 // 1100 1101 d16..... regs.... imm8....;
4166 // call (d16,PC),regs,imm8 (d16 is sign-extended., imm8 is zero-extended.)
4167 8.0xcd+8.D16A+8.D16B+8.REGS+8.IMM8:S4:::call
4175 /* OP_CD000000 (); */
4176 uint32_t next_pc, sp;
4180 sp = State.regs[REG_SP];
4182 store_word(sp, next_pc);
4186 if (STATE_ARCHITECTURE (SD)->mach == bfd_mach_am33
4187 || STATE_ARCHITECTURE (SD)->mach == bfd_mach_am33_2
4193 store_word (sp, State.regs[REG_E0 + 2]);
4195 store_word (sp, State.regs[REG_E0 + 3]);
4201 store_word (sp, State.regs[REG_E0 + 4]);
4203 store_word (sp, State.regs[REG_E0 + 5]);
4205 store_word (sp, State.regs[REG_E0 + 6]);
4207 store_word (sp, State.regs[REG_E0 + 7]);
4213 store_word (sp, State.regs[REG_E0 + 0]);
4215 store_word (sp, State.regs[REG_E0 + 1]);
4217 /* Need to save MDRQ, MCRH, MCRL, and MCVF */
4224 store_word (sp, State.regs[REG_D0 + 2]);
4230 store_word (sp, State.regs[REG_D0 + 3]);
4236 store_word (sp, State.regs[REG_A0 + 2]);
4242 store_word (sp, State.regs[REG_A0 + 3]);
4248 store_word (sp, State.regs[REG_D0]);
4250 store_word (sp, State.regs[REG_D0 + 1]);
4252 store_word (sp, State.regs[REG_A0]);
4254 store_word (sp, State.regs[REG_A0 + 1]);
4256 store_word (sp, State.regs[REG_MDR]);
4258 store_word (sp, State.regs[REG_LIR]);
4260 store_word (sp, State.regs[REG_LAR]);
4264 /* Update the stack pointer, note that the register saves to do not
4265 modify SP. The SP adjustment is derived totally from the imm8
4267 State.regs[REG_SP] -= IMM8;
4268 State.regs[REG_MDR] = next_pc;
4269 State.regs[REG_PC] += EXTEND16 (FETCH16(D16A, D16B));
4274 // 1101 1101 d32..... regs.... imm8....;
4275 // call (d32,PC),regs,imm8 (imm8 is zero-extended.)
4276 8.0xdd+8.D32A+8.D32B+8.D32C+8.D32D+8.REGS+8.IMM8:S6:::call
4284 /* OP_DD000000 (); */
4285 uint32_t next_pc, sp;
4289 sp = State.regs[REG_SP];
4290 next_pc = State.regs[REG_PC] + 7;
4291 /* could assert that nia == next_pc here */
4292 store_word(sp, next_pc);
4296 if (STATE_ARCHITECTURE (SD)->mach == bfd_mach_am33
4297 || STATE_ARCHITECTURE (SD)->mach == bfd_mach_am33_2
4303 store_word (sp, State.regs[REG_E0 + 2]);
4305 store_word (sp, State.regs[REG_E0 + 3]);
4311 store_word (sp, State.regs[REG_E0 + 4]);
4313 store_word (sp, State.regs[REG_E0 + 5]);
4315 store_word (sp, State.regs[REG_E0 + 6]);
4317 store_word (sp, State.regs[REG_E0 + 7]);
4323 store_word (sp, State.regs[REG_E0 + 0]);
4325 store_word (sp, State.regs[REG_E0 + 1]);
4327 /* Need to save MDRQ, MCRH, MCRL, and MCVF */
4334 store_word (sp, State.regs[REG_D0 + 2]);
4340 store_word (sp, State.regs[REG_D0 + 3]);
4346 store_word (sp, State.regs[REG_A0 + 2]);
4352 store_word (sp, State.regs[REG_A0 + 3]);
4358 store_word (sp, State.regs[REG_D0]);
4360 store_word (sp, State.regs[REG_D0 + 1]);
4362 store_word (sp, State.regs[REG_A0]);
4364 store_word (sp, State.regs[REG_A0 + 1]);
4366 store_word (sp, State.regs[REG_MDR]);
4368 store_word (sp, State.regs[REG_LIR]);
4370 store_word (sp, State.regs[REG_LAR]);
4374 /* Update the stack pointer, note that the register saves to do not
4375 modify SP. The SP adjustment is derived totally from the imm8
4377 State.regs[REG_SP] -= IMM8;
4378 State.regs[REG_MDR] = next_pc;
4379 State.regs[REG_PC] += FETCH32(D32A, D32B, D32C, D32D);
4384 // 1101 1111 regs.... imm8....; ret regs,imm8 (imm8 is zero-extended.)
4385 8.0xdf+8.REGS+8.IMM8:S2:::ret
4394 uint32_t sp, offset;
4398 State.regs[REG_SP] += IMM8;
4399 sp = State.regs[REG_SP];
4404 if (STATE_ARCHITECTURE (SD)->mach == bfd_mach_am33
4405 || STATE_ARCHITECTURE (SD)->mach == bfd_mach_am33_2
4411 State.regs[REG_E0 + 2] = load_word (sp + offset);
4413 State.regs[REG_E0 + 3] = load_word (sp + offset);
4419 State.regs[REG_E0 + 4] = load_word (sp + offset);
4421 State.regs[REG_E0 + 5] = load_word (sp + offset);
4423 State.regs[REG_E0 + 6] = load_word (sp + offset);
4425 State.regs[REG_E0 + 7] = load_word (sp + offset);
4431 /* Need to restore MDRQ, MCRH, MCRL, and MCVF */
4433 State.regs[REG_E0 + 0] = load_word (sp + offset);
4435 State.regs[REG_E0 + 1] = load_word (sp + offset);
4443 State.regs[REG_D0 + 2] = load_word (sp + offset);
4449 State.regs[REG_D0 + 3] = load_word (sp + offset);
4455 State.regs[REG_A0 + 2] = load_word (sp + offset);
4461 State.regs[REG_A0 + 3] = load_word (sp + offset);
4467 State.regs[REG_D0] = load_word (sp + offset);
4469 State.regs[REG_D0 + 1] = load_word (sp + offset);
4471 State.regs[REG_A0] = load_word (sp + offset);
4473 State.regs[REG_A0 + 1] = load_word (sp + offset);
4475 State.regs[REG_MDR] = load_word (sp + offset);
4477 State.regs[REG_LIR] = load_word (sp + offset);
4479 State.regs[REG_LAR] = load_word (sp + offset);
4483 /* Restore the PC value. */
4484 State.regs[REG_PC] = load_word(sp);
4489 // 1101 1110 regs.... imm8....; retf regs,imm8 (imm8 is zero-extended.)
4490 8.0xde+8.REGS+8.IMM8:S2:::retf
4499 uint32_t sp, offset;
4503 State.regs[REG_SP] += IMM8;
4504 sp = State.regs[REG_SP];
4505 State.regs[REG_PC] = State.regs[REG_MDR];
4510 if (STATE_ARCHITECTURE (SD)->mach == bfd_mach_am33
4511 || STATE_ARCHITECTURE (SD)->mach == bfd_mach_am33_2
4517 State.regs[REG_E0 + 2] = load_word (sp + offset);
4519 State.regs[REG_E0 + 3] = load_word (sp + offset);
4525 State.regs[REG_E0 + 4] = load_word (sp + offset);
4527 State.regs[REG_E0 + 5] = load_word (sp + offset);
4529 State.regs[REG_E0 + 6] = load_word (sp + offset);
4531 State.regs[REG_E0 + 7] = load_word (sp + offset);
4537 /* Need to restore MDRQ, MCRH, MCRL, and MCVF */
4539 State.regs[REG_E0 + 0] = load_word (sp + offset);
4541 State.regs[REG_E0 + 1] = load_word (sp + offset);
4549 State.regs[REG_D0 + 2] = load_word (sp + offset);
4555 State.regs[REG_D0 + 3] = load_word (sp + offset);
4561 State.regs[REG_A0 + 2] = load_word (sp + offset);
4567 State.regs[REG_A0 + 3] = load_word (sp + offset);
4573 State.regs[REG_D0] = load_word (sp + offset);
4575 State.regs[REG_D0 + 1] = load_word (sp + offset);
4577 State.regs[REG_A0] = load_word (sp + offset);
4579 State.regs[REG_A0 + 1] = load_word (sp + offset);
4581 State.regs[REG_MDR] = load_word (sp + offset);
4583 State.regs[REG_LIR] = load_word (sp + offset);
4585 State.regs[REG_LAR] = load_word (sp + offset);
4592 :include::am33:am33.igen
4593 :include::am33-2:am33-2.igen