MC68060.java
     1: //========================================================================================
     2: //  MC68060.java
     3: //    en:MC68060 core
     4: //    ja:MC68060コア
     5: //  Copyright (C) 2003-2024 Makoto Kamada
     6: //
     7: //  This file is part of the XEiJ (X68000 Emulator in Java).
     8: //  You can use, modify and redistribute the XEiJ if the conditions are met.
     9: //  Read the XEiJ License for more details.
    10: //  https://stdkmd.net/xeij/
    11: //========================================================================================
    12: 
    13: package xeij;
    14: 
    15: import java.lang.*;  //Boolean,Character,Class,Comparable,Double,Exception,Float,IllegalArgumentException,Integer,Long,Math,Number,Object,Runnable,SecurityException,String,StringBuilder,System
    16: import java.util.*;  //ArrayList,Arrays,Calendar,GregorianCalendar,HashMap,Map,Map.Entry,Timer,TimerTask,TreeMap
    17: 
    18: public class MC68060 {
    19: 
    20:   public static void mpuCore () {
    21: 
    22:     //例外ループ
    23:     //  別のメソッドで検出された例外を命令ループの外側でcatchすることで命令ループを高速化する
    24:   errorLoop:
    25:     while (XEiJ.mpuClockTime < XEiJ.mpuClockLimit) {
    26:       try {
    27:         //命令ループ
    28:         while (XEiJ.mpuClockTime < XEiJ.mpuClockLimit) {
    29:           int t;
    30:           //命令を実行する
    31:           M68kException.m6eIncremented = 0L;  //アドレスレジスタの増分
    32:           XEiJ.mpuTraceFlag = XEiJ.regSRT1;  //命令実行前のsrT1
    33:           XEiJ.mpuCycleCount = 0;  //第1オペコードからROMのアクセスウエイトを有効にする。命令のサイクル数はすべてXEiJ.mpuCycleCount+=~で加えること
    34:           XEiJ.regPC0 = t = XEiJ.regPC;  //命令の先頭アドレス
    35:           XEiJ.regPC = t + 2;
    36:           //XEiJ.regOC = mmuReadWordZeroOpword (t, XEiJ.regSRS);  //第1オペコード。必ずゼロ拡張すること。pcに奇数が入っていることはないのでアドレスエラーのチェックを省略する
    37:           if (XEiJ.regSRS != 0) {  //スーパーバイザモード
    38:             M68kException.m6eFSLW = M68kException.M6E_FSLW_IOMA_OPWORD | M68kException.M6E_FSLW_RW_READ | M68kException.M6E_FSLW_SIZE_WORD | M68kException.M6E_FSLW_TM_SUPER_CODE;
    39:             t = mmuTranslateReadSuperCode (t);
    40:             XEiJ.regOC = (InstructionBreakPoint.IBP_ON ? InstructionBreakPoint.ibpOp1SuperMap : DataBreakPoint.DBP_ON ? DataBreakPoint.dbpSuperMap : XEiJ.busSuperMap)[t >>> XEiJ.BUS_PAGE_BITS].mmdRwz (t);
    41:           } else {  //ユーザモード
    42:             M68kException.m6eFSLW = M68kException.M6E_FSLW_IOMA_OPWORD | M68kException.M6E_FSLW_RW_READ | M68kException.M6E_FSLW_SIZE_WORD | M68kException.M6E_FSLW_TM_USER_CODE;
    43:             t = mmuTranslateReadUserCode (t);
    44:             XEiJ.regOC = (InstructionBreakPoint.IBP_ON ? InstructionBreakPoint.ibpOp1UserMap : DataBreakPoint.DBP_ON ? DataBreakPoint.dbpUserMap : XEiJ.busUserMap)[t >>> XEiJ.BUS_PAGE_BITS].mmdRwz (t);
    45:           }
    46: 
    47:           //命令の処理
    48:           //  第1オペコードの上位10ビットで分岐する
    49:         irpSwitch:
    50:           switch (XEiJ.regOC >>> 6) {  //第1オペコードの上位10ビット。XEiJ.regOCはゼロ拡張されているので0b1111_111_111&を省略
    51: 
    52:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
    53:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
    54:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
    55:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
    56:             //ORI.B #<data>,<ea>                              |-|012346|-|-UUUU|-**00|D M+-WXZ  |0000_000_000_mmm_rrr-{data}
    57:             //OR.B #<data>,<ea>                               |A|012346|-|-UUUU|-**00|  M+-WXZ  |0000_000_000_mmm_rrr-{data}  [ORI.B #<data>,<ea>]
    58:             //ORI.B #<data>,CCR                               |-|012346|-|*****|*****|          |0000_000_000_111_100-{data}
    59:           case 0b0000_000_000:
    60:             irpOriByte ();
    61:             break irpSwitch;
    62: 
    63:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
    64:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
    65:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
    66:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
    67:             //ORI.W #<data>,<ea>                              |-|012346|-|-UUUU|-**00|D M+-WXZ  |0000_000_001_mmm_rrr-{data}
    68:             //OR.W #<data>,<ea>                               |A|012346|-|-UUUU|-**00|  M+-WXZ  |0000_000_001_mmm_rrr-{data}  [ORI.W #<data>,<ea>]
    69:             //ORI.W #<data>,SR                                |-|012346|P|*****|*****|          |0000_000_001_111_100-{data}
    70:           case 0b0000_000_001:
    71:             irpOriWord ();
    72:             break irpSwitch;
    73: 
    74:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
    75:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
    76:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
    77:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
    78:             //ORI.L #<data>,<ea>                              |-|012346|-|-UUUU|-**00|D M+-WXZ  |0000_000_010_mmm_rrr-{data}
    79:             //OR.L #<data>,<ea>                               |A|012346|-|-UUUU|-**00|  M+-WXZ  |0000_000_010_mmm_rrr-{data}  [ORI.L #<data>,<ea>]
    80:           case 0b0000_000_010:
    81:             irpOriLong ();
    82:             break irpSwitch;
    83: 
    84:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
    85:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
    86:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
    87:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
    88:             //BITREV.L Dr                                     |-|------|-|-----|-----|D         |0000_000_011_000_rrr (ISA_C)
    89:             //CMP2.B <ea>,Rn                                  |-|--234S|-|-UUUU|-U*U*|  M  WXZP |0000_000_011_mmm_rrr-rnnn000000000000
    90:             //CHK2.B <ea>,Rn                                  |-|--234S|-|-UUUU|-U*U*|  M  WXZP |0000_000_011_mmm_rrr-rnnn100000000000
    91:           case 0b0000_000_011:
    92:             irpCmp2Chk2Byte ();
    93:             break irpSwitch;
    94: 
    95:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
    96:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
    97:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
    98:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
    99:             //BTST.L Dq,Dr                                    |-|012346|-|--U--|--*--|D         |0000_qqq_100_000_rrr
   100:             //MOVEP.W (d16,Ar),Dq                             |-|01234S|-|-----|-----|          |0000_qqq_100_001_rrr-{data}
   101:             //BTST.B Dq,<ea>                                  |-|012346|-|--U--|--*--|  M+-WXZPI|0000_qqq_100_mmm_rrr
   102:           case 0b0000_000_100:
   103:           case 0b0000_001_100:
   104:           case 0b0000_010_100:
   105:           case 0b0000_011_100:
   106:           case 0b0000_100_100:
   107:           case 0b0000_101_100:
   108:           case 0b0000_110_100:
   109:           case 0b0000_111_100:
   110:             irpBtstReg ();
   111:             break irpSwitch;
   112: 
   113:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
   114:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
   115:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
   116:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
   117:             //BCHG.L Dq,Dr                                    |-|012346|-|--U--|--*--|D         |0000_qqq_101_000_rrr
   118:             //MOVEP.L (d16,Ar),Dq                             |-|01234S|-|-----|-----|          |0000_qqq_101_001_rrr-{data}
   119:             //BCHG.B Dq,<ea>                                  |-|012346|-|--U--|--*--|  M+-WXZ  |0000_qqq_101_mmm_rrr
   120:           case 0b0000_000_101:
   121:           case 0b0000_001_101:
   122:           case 0b0000_010_101:
   123:           case 0b0000_011_101:
   124:           case 0b0000_100_101:
   125:           case 0b0000_101_101:
   126:           case 0b0000_110_101:
   127:           case 0b0000_111_101:
   128:             irpBchgReg ();
   129:             break irpSwitch;
   130: 
   131:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
   132:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
   133:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
   134:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
   135:             //BCLR.L Dq,Dr                                    |-|012346|-|--U--|--*--|D         |0000_qqq_110_000_rrr
   136:             //MOVEP.W Dq,(d16,Ar)                             |-|01234S|-|-----|-----|          |0000_qqq_110_001_rrr-{data}
   137:             //BCLR.B Dq,<ea>                                  |-|012346|-|--U--|--*--|  M+-WXZ  |0000_qqq_110_mmm_rrr
   138:           case 0b0000_000_110:
   139:           case 0b0000_001_110:
   140:           case 0b0000_010_110:
   141:           case 0b0000_011_110:
   142:           case 0b0000_100_110:
   143:           case 0b0000_101_110:
   144:           case 0b0000_110_110:
   145:           case 0b0000_111_110:
   146:             irpBclrReg ();
   147:             break irpSwitch;
   148: 
   149:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
   150:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
   151:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
   152:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
   153:             //BSET.L Dq,Dr                                    |-|012346|-|--U--|--*--|D         |0000_qqq_111_000_rrr
   154:             //MOVEP.L Dq,(d16,Ar)                             |-|01234S|-|-----|-----|          |0000_qqq_111_001_rrr-{data}
   155:             //BSET.B Dq,<ea>                                  |-|012346|-|--U--|--*--|  M+-WXZ  |0000_qqq_111_mmm_rrr
   156:           case 0b0000_000_111:
   157:           case 0b0000_001_111:
   158:           case 0b0000_010_111:
   159:           case 0b0000_011_111:
   160:           case 0b0000_100_111:
   161:           case 0b0000_101_111:
   162:           case 0b0000_110_111:
   163:           case 0b0000_111_111:
   164:             irpBsetReg ();
   165:             break irpSwitch;
   166: 
   167:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
   168:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
   169:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
   170:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
   171:             //ANDI.B #<data>,<ea>                             |-|012346|-|-UUUU|-**00|D M+-WXZ  |0000_001_000_mmm_rrr-{data}
   172:             //AND.B #<data>,<ea>                              |A|012346|-|-UUUU|-**00|  M+-WXZ  |0000_001_000_mmm_rrr-{data}  [ANDI.B #<data>,<ea>]
   173:             //ANDI.B #<data>,CCR                              |-|012346|-|*****|*****|          |0000_001_000_111_100-{data}
   174:           case 0b0000_001_000:
   175:             irpAndiByte ();
   176:             break irpSwitch;
   177: 
   178:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
   179:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
   180:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
   181:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
   182:             //ANDI.W #<data>,<ea>                             |-|012346|-|-UUUU|-**00|D M+-WXZ  |0000_001_001_mmm_rrr-{data}
   183:             //AND.W #<data>,<ea>                              |A|012346|-|-UUUU|-**00|  M+-WXZ  |0000_001_001_mmm_rrr-{data}  [ANDI.W #<data>,<ea>]
   184:             //ANDI.W #<data>,SR                               |-|012346|P|*****|*****|          |0000_001_001_111_100-{data}
   185:           case 0b0000_001_001:
   186:             irpAndiWord ();
   187:             break irpSwitch;
   188: 
   189:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
   190:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
   191:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
   192:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
   193:             //ANDI.L #<data>,<ea>                             |-|012346|-|-UUUU|-**00|D M+-WXZ  |0000_001_010_mmm_rrr-{data}
   194:             //AND.L #<data>,<ea>                              |A|012346|-|-UUUU|-**00|  M+-WXZ  |0000_001_010_mmm_rrr-{data}  [ANDI.L #<data>,<ea>]
   195:           case 0b0000_001_010:
   196:             irpAndiLong ();
   197:             break irpSwitch;
   198: 
   199:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
   200:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
   201:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
   202:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
   203:             //BYTEREV.L Dr                                    |-|------|-|-----|-----|D         |0000_001_011_000_rrr (ISA_C)
   204:             //CMP2.W <ea>,Rn                                  |-|--234S|-|-UUUU|-U*U*|  M  WXZP |0000_001_011_mmm_rrr-rnnn000000000000
   205:             //CHK2.W <ea>,Rn                                  |-|--234S|-|-UUUU|-U*U*|  M  WXZP |0000_001_011_mmm_rrr-rnnn100000000000
   206:           case 0b0000_001_011:
   207:             irpCmp2Chk2Word ();
   208:             break irpSwitch;
   209: 
   210:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
   211:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
   212:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
   213:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
   214:             //SUBI.B #<data>,<ea>                             |-|012346|-|UUUUU|*****|D M+-WXZ  |0000_010_000_mmm_rrr-{data}
   215:             //SUB.B #<data>,<ea>                              |A|012346|-|UUUUU|*****|  M+-WXZ  |0000_010_000_mmm_rrr-{data}  [SUBI.B #<data>,<ea>]
   216:           case 0b0000_010_000:
   217:             irpSubiByte ();
   218:             break irpSwitch;
   219: 
   220:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
   221:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
   222:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
   223:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
   224:             //SUBI.W #<data>,<ea>                             |-|012346|-|UUUUU|*****|D M+-WXZ  |0000_010_001_mmm_rrr-{data}
   225:             //SUB.W #<data>,<ea>                              |A|012346|-|UUUUU|*****|  M+-WXZ  |0000_010_001_mmm_rrr-{data}  [SUBI.W #<data>,<ea>]
   226:           case 0b0000_010_001:
   227:             irpSubiWord ();
   228:             break irpSwitch;
   229: 
   230:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
   231:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
   232:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
   233:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
   234:             //SUBI.L #<data>,<ea>                             |-|012346|-|UUUUU|*****|D M+-WXZ  |0000_010_010_mmm_rrr-{data}
   235:             //SUB.L #<data>,<ea>                              |A|012346|-|UUUUU|*****|  M+-WXZ  |0000_010_010_mmm_rrr-{data}  [SUBI.L #<data>,<ea>]
   236:           case 0b0000_010_010:
   237:             irpSubiLong ();
   238:             break irpSwitch;
   239: 
   240:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
   241:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
   242:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
   243:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
   244:             //FF1.L Dr                                        |-|------|-|-UUUU|-**00|D         |0000_010_011_000_rrr (ISA_C)
   245:             //CMP2.L <ea>,Rn                                  |-|--234S|-|-UUUU|-U*U*|  M  WXZP |0000_010_011_mmm_rrr-rnnn000000000000
   246:             //CHK2.L <ea>,Rn                                  |-|--234S|-|-UUUU|-U*U*|  M  WXZP |0000_010_011_mmm_rrr-rnnn100000000000
   247:           case 0b0000_010_011:
   248:             irpCmp2Chk2Long ();
   249:             break irpSwitch;
   250: 
   251:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
   252:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
   253:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
   254:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
   255:             //ADDI.B #<data>,<ea>                             |-|012346|-|UUUUU|*****|D M+-WXZ  |0000_011_000_mmm_rrr-{data}
   256:           case 0b0000_011_000:
   257:             irpAddiByte ();
   258:             break irpSwitch;
   259: 
   260:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
   261:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
   262:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
   263:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
   264:             //ADDI.W #<data>,<ea>                             |-|012346|-|UUUUU|*****|D M+-WXZ  |0000_011_001_mmm_rrr-{data}
   265:           case 0b0000_011_001:
   266:             irpAddiWord ();
   267:             break irpSwitch;
   268: 
   269:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
   270:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
   271:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
   272:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
   273:             //ADDI.L #<data>,<ea>                             |-|012346|-|UUUUU|*****|D M+-WXZ  |0000_011_010_mmm_rrr-{data}
   274:           case 0b0000_011_010:
   275:             irpAddiLong ();
   276:             break irpSwitch;
   277: 
   278:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
   279:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
   280:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
   281:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
   282:             //BTST.L #<data>,Dr                               |-|012346|-|--U--|--*--|D         |0000_100_000_000_rrr-{data}
   283:             //BTST.B #<data>,<ea>                             |-|012346|-|--U--|--*--|  M+-WXZP |0000_100_000_mmm_rrr-{data}
   284:           case 0b0000_100_000:
   285:             irpBtstImm ();
   286:             break irpSwitch;
   287: 
   288:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
   289:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
   290:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
   291:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
   292:             //BCHG.L #<data>,Dr                               |-|012346|-|--U--|--*--|D         |0000_100_001_000_rrr-{data}
   293:             //BCHG.B #<data>,<ea>                             |-|012346|-|--U--|--*--|  M+-WXZ  |0000_100_001_mmm_rrr-{data}
   294:           case 0b0000_100_001:
   295:             irpBchgImm ();
   296:             break irpSwitch;
   297: 
   298:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
   299:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
   300:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
   301:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
   302:             //BCLR.L #<data>,Dr                               |-|012346|-|--U--|--*--|D         |0000_100_010_000_rrr-{data}
   303:             //BCLR.B #<data>,<ea>                             |-|012346|-|--U--|--*--|  M+-WXZ  |0000_100_010_mmm_rrr-{data}
   304:           case 0b0000_100_010:
   305:             irpBclrImm ();
   306:             break irpSwitch;
   307: 
   308:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
   309:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
   310:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
   311:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
   312:             //BSET.L #<data>,Dr                               |-|012346|-|--U--|--*--|D         |0000_100_011_000_rrr-{data}
   313:             //BSET.B #<data>,<ea>                             |-|012346|-|--U--|--*--|  M+-WXZ  |0000_100_011_mmm_rrr-{data}
   314:           case 0b0000_100_011:
   315:             irpBsetImm ();
   316:             break irpSwitch;
   317: 
   318:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
   319:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
   320:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
   321:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
   322:             //EORI.B #<data>,<ea>                             |-|012346|-|-UUUU|-**00|D M+-WXZ  |0000_101_000_mmm_rrr-{data}
   323:             //EOR.B #<data>,<ea>                              |A|012346|-|-UUUU|-**00|D M+-WXZ  |0000_101_000_mmm_rrr-{data}  [EORI.B #<data>,<ea>]
   324:             //EORI.B #<data>,CCR                              |-|012346|-|*****|*****|          |0000_101_000_111_100-{data}
   325:           case 0b0000_101_000:
   326:             irpEoriByte ();
   327:             break irpSwitch;
   328: 
   329:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
   330:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
   331:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
   332:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
   333:             //EORI.W #<data>,<ea>                             |-|012346|-|-UUUU|-**00|D M+-WXZ  |0000_101_001_mmm_rrr-{data}
   334:             //EOR.W #<data>,<ea>                              |A|012346|-|-UUUU|-**00|D M+-WXZ  |0000_101_001_mmm_rrr-{data}  [EORI.W #<data>,<ea>]
   335:             //EORI.W #<data>,SR                               |-|012346|P|*****|*****|          |0000_101_001_111_100-{data}
   336:           case 0b0000_101_001:
   337:             irpEoriWord ();
   338:             break irpSwitch;
   339: 
   340:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
   341:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
   342:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
   343:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
   344:             //EORI.L #<data>,<ea>                             |-|012346|-|-UUUU|-**00|D M+-WXZ  |0000_101_010_mmm_rrr-{data}
   345:             //EOR.L #<data>,<ea>                              |A|012346|-|-UUUU|-**00|D M+-WXZ  |0000_101_010_mmm_rrr-{data}  [EORI.L #<data>,<ea>]
   346:           case 0b0000_101_010:
   347:             irpEoriLong ();
   348:             break irpSwitch;
   349: 
   350:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
   351:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
   352:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
   353:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
   354:             //CAS.B Dc,Du,<ea>                                |-|--2346|-|-UUUU|-****|  M+-WXZ  |0000_101_011_mmm_rrr-0000000uuu000ccc
   355:           case 0b0000_101_011:
   356:             irpCasByte ();
   357:             break irpSwitch;
   358: 
   359:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
   360:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
   361:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
   362:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
   363:             //CMPI.B #<data>,<ea>                             |-|--2346|-|-UUUU|-****|D M+-WXZP |0000_110_000_mmm_rrr-{data}
   364:             //CMP.B #<data>,<ea>                              |A|--2346|-|-UUUU|-****|  M+-WXZP |0000_110_000_mmm_rrr-{data}  [CMPI.B #<data>,<ea>]
   365:           case 0b0000_110_000:
   366:             irpCmpiByte ();
   367:             break irpSwitch;
   368: 
   369:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
   370:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
   371:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
   372:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
   373:             //CMPI.W #<data>,<ea>                             |-|--2346|-|-UUUU|-****|D M+-WXZP |0000_110_001_mmm_rrr-{data}
   374:             //CMP.W #<data>,<ea>                              |A|--2346|-|-UUUU|-****|  M+-WXZP |0000_110_001_mmm_rrr-{data}  [CMPI.W #<data>,<ea>]
   375:           case 0b0000_110_001:
   376:             irpCmpiWord ();
   377:             break irpSwitch;
   378: 
   379:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
   380:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
   381:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
   382:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
   383:             //CMPI.L #<data>,<ea>                             |-|--2346|-|-UUUU|-****|D M+-WXZP |0000_110_010_mmm_rrr-{data}
   384:             //CMP.L #<data>,<ea>                              |A|--2346|-|-UUUU|-****|  M+-WXZP |0000_110_010_mmm_rrr-{data}  [CMPI.L #<data>,<ea>]
   385:           case 0b0000_110_010:
   386:             irpCmpiLong ();
   387:             break irpSwitch;
   388: 
   389:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
   390:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
   391:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
   392:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
   393:             //CAS.W Dc,Du,<ea>                                |-|--2346|-|-UUUU|-****|  M+-WXZ  |0000_110_011_mmm_rrr-0000000uuu000ccc        (68060 software emulate misaligned <ea>)
   394:             //CAS2.W Dc1:Dc2,Du1:Du2,(Rn1):(Rn2)              |-|--234S|-|-UUUU|-****|          |0000_110_011_111_100-rnnn000uuu000ccc(1)-rnnn_000_uuu_000_ccc(2)
   395:           case 0b0000_110_011:
   396:             irpCasWord ();
   397:             break irpSwitch;
   398: 
   399:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
   400:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
   401:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
   402:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
   403:             //MOVES.B <ea>,Rn                                 |-|-12346|P|-----|-----|  M+-WXZ  |0000_111_000_mmm_rrr-rnnn000000000000
   404:             //MOVES.B Rn,<ea>                                 |-|-12346|P|-----|-----|  M+-WXZ  |0000_111_000_mmm_rrr-rnnn100000000000
   405:           case 0b0000_111_000:
   406:             irpMovesByte ();
   407:             break irpSwitch;
   408: 
   409:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
   410:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
   411:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
   412:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
   413:             //MOVES.W <ea>,Rn                                 |-|-12346|P|-----|-----|  M+-WXZ  |0000_111_001_mmm_rrr-rnnn000000000000
   414:             //MOVES.W Rn,<ea>                                 |-|-12346|P|-----|-----|  M+-WXZ  |0000_111_001_mmm_rrr-rnnn100000000000
   415:           case 0b0000_111_001:
   416:             irpMovesWord ();
   417:             break irpSwitch;
   418: 
   419:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
   420:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
   421:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
   422:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
   423:             //MOVES.L <ea>,Rn                                 |-|-12346|P|-----|-----|  M+-WXZ  |0000_111_010_mmm_rrr-rnnn000000000000
   424:             //MOVES.L Rn,<ea>                                 |-|-12346|P|-----|-----|  M+-WXZ  |0000_111_010_mmm_rrr-rnnn100000000000
   425:           case 0b0000_111_010:
   426:             irpMovesLong ();
   427:             break irpSwitch;
   428: 
   429:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
   430:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
   431:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
   432:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
   433:             //CAS.L Dc,Du,<ea>                                |-|--2346|-|-UUUU|-****|  M+-WXZ  |0000_111_011_mmm_rrr-0000000uuu000ccc        (68060 software emulate misaligned <ea>)
   434:             //CAS2.L Dc1:Dc2,Du1:Du2,(Rn1):(Rn2)              |-|--234S|-|-UUUU|-****|          |0000_111_011_111_100-rnnn000uuu000ccc(1)-rnnn_000_uuu_000_ccc(2)
   435:           case 0b0000_111_011:
   436:             irpCasLong ();
   437:             break irpSwitch;
   438: 
   439:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
   440:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
   441:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
   442:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
   443:             //MOVE.B <ea>,Dq                                  |-|012346|-|-UUUU|-**00|D M+-WXZPI|0001_qqq_000_mmm_rrr
   444:           case 0b0001_000_000:
   445:           case 0b0001_001_000:
   446:           case 0b0001_010_000:
   447:           case 0b0001_011_000:
   448:           case 0b0001_100_000:
   449:           case 0b0001_101_000:
   450:           case 0b0001_110_000:
   451:           case 0b0001_111_000:
   452:             irpMoveToDRByte ();
   453:             break irpSwitch;
   454: 
   455:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
   456:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
   457:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
   458:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
   459:             //MOVE.B <ea>,(Aq)                                |-|012346|-|-UUUU|-**00|D M+-WXZPI|0001_qqq_010_mmm_rrr
   460:           case 0b0001_000_010:
   461:           case 0b0001_001_010:
   462:           case 0b0001_010_010:
   463:           case 0b0001_011_010:
   464:           case 0b0001_100_010:
   465:           case 0b0001_101_010:
   466:           case 0b0001_110_010:
   467:           case 0b0001_111_010:
   468:             irpMoveToMMByte ();
   469:             break irpSwitch;
   470: 
   471:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
   472:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
   473:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
   474:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
   475:             //MOVE.B <ea>,(Aq)+                               |-|012346|-|-UUUU|-**00|D M+-WXZPI|0001_qqq_011_mmm_rrr
   476:           case 0b0001_000_011:
   477:           case 0b0001_001_011:
   478:           case 0b0001_010_011:
   479:           case 0b0001_011_011:
   480:           case 0b0001_100_011:
   481:           case 0b0001_101_011:
   482:           case 0b0001_110_011:
   483:           case 0b0001_111_011:
   484:             irpMoveToMPByte ();
   485:             break irpSwitch;
   486: 
   487:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
   488:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
   489:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
   490:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
   491:             //MOVE.B <ea>,-(Aq)                               |-|012346|-|-UUUU|-**00|D M+-WXZPI|0001_qqq_100_mmm_rrr
   492:           case 0b0001_000_100:
   493:           case 0b0001_001_100:
   494:           case 0b0001_010_100:
   495:           case 0b0001_011_100:
   496:           case 0b0001_100_100:
   497:           case 0b0001_101_100:
   498:           case 0b0001_110_100:
   499:           case 0b0001_111_100:
   500:             irpMoveToMNByte ();
   501:             break irpSwitch;
   502: 
   503:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
   504:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
   505:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
   506:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
   507:             //MOVE.B <ea>,(d16,Aq)                            |-|012346|-|-UUUU|-**00|D M+-WXZPI|0001_qqq_101_mmm_rrr
   508:           case 0b0001_000_101:
   509:           case 0b0001_001_101:
   510:           case 0b0001_010_101:
   511:           case 0b0001_011_101:
   512:           case 0b0001_100_101:
   513:           case 0b0001_101_101:
   514:           case 0b0001_110_101:
   515:           case 0b0001_111_101:
   516:             irpMoveToMWByte ();
   517:             break irpSwitch;
   518: 
   519:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
   520:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
   521:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
   522:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
   523:             //MOVE.B <ea>,(d8,Aq,Rn.wl)                       |-|012346|-|-UUUU|-**00|D M+-WXZPI|0001_qqq_110_mmm_rrr
   524:           case 0b0001_000_110:
   525:           case 0b0001_001_110:
   526:           case 0b0001_010_110:
   527:           case 0b0001_011_110:
   528:           case 0b0001_100_110:
   529:           case 0b0001_101_110:
   530:           case 0b0001_110_110:
   531:           case 0b0001_111_110:
   532:             irpMoveToMXByte ();
   533:             break irpSwitch;
   534: 
   535:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
   536:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
   537:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
   538:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
   539:             //MOVE.B <ea>,(xxx).W                             |-|012346|-|-UUUU|-**00|D M+-WXZPI|0001_000_111_mmm_rrr
   540:           case 0b0001_000_111:
   541:             irpMoveToZWByte ();
   542:             break irpSwitch;
   543: 
   544:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
   545:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
   546:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
   547:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
   548:             //MOVE.B <ea>,(xxx).L                             |-|012346|-|-UUUU|-**00|D M+-WXZPI|0001_001_111_mmm_rrr
   549:           case 0b0001_001_111:
   550:             irpMoveToZLByte ();
   551:             break irpSwitch;
   552: 
   553:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
   554:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
   555:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
   556:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
   557:             //MOVE.L <ea>,Dq                                  |-|012346|-|-UUUU|-**00|DAM+-WXZPI|0010_qqq_000_mmm_rrr
   558:           case 0b0010_000_000:
   559:           case 0b0010_001_000:
   560:           case 0b0010_010_000:
   561:           case 0b0010_011_000:
   562:           case 0b0010_100_000:
   563:           case 0b0010_101_000:
   564:           case 0b0010_110_000:
   565:           case 0b0010_111_000:
   566:             irpMoveToDRLong ();
   567:             break irpSwitch;
   568: 
   569:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
   570:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
   571:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
   572:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
   573:             //MOVEA.L <ea>,Aq                                 |-|012346|-|-----|-----|DAM+-WXZPI|0010_qqq_001_mmm_rrr
   574:             //MOVE.L <ea>,Aq                                  |A|012346|-|-----|-----|DAM+-WXZPI|0010_qqq_001_mmm_rrr [MOVEA.L <ea>,Aq]
   575:           case 0b0010_000_001:
   576:           case 0b0010_001_001:
   577:           case 0b0010_010_001:
   578:           case 0b0010_011_001:
   579:           case 0b0010_100_001:
   580:           case 0b0010_101_001:
   581:           case 0b0010_110_001:
   582:           case 0b0010_111_001:
   583:             irpMoveaLong ();
   584:             break irpSwitch;
   585: 
   586:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
   587:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
   588:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
   589:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
   590:             //MOVE.L <ea>,(Aq)                                |-|012346|-|-UUUU|-**00|DAM+-WXZPI|0010_qqq_010_mmm_rrr
   591:           case 0b0010_000_010:
   592:           case 0b0010_001_010:
   593:           case 0b0010_010_010:
   594:           case 0b0010_011_010:
   595:           case 0b0010_100_010:
   596:           case 0b0010_101_010:
   597:           case 0b0010_110_010:
   598:           case 0b0010_111_010:
   599:             irpMoveToMMLong ();
   600:             break irpSwitch;
   601: 
   602:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
   603:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
   604:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
   605:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
   606:             //MOVE.L <ea>,(Aq)+                               |-|012346|-|-UUUU|-**00|DAM+-WXZPI|0010_qqq_011_mmm_rrr
   607:           case 0b0010_000_011:
   608:           case 0b0010_001_011:
   609:           case 0b0010_010_011:
   610:           case 0b0010_011_011:
   611:           case 0b0010_100_011:
   612:           case 0b0010_101_011:
   613:           case 0b0010_110_011:
   614:           case 0b0010_111_011:
   615:             irpMoveToMPLong ();
   616:             break irpSwitch;
   617: 
   618:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
   619:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
   620:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
   621:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
   622:             //MOVE.L <ea>,-(Aq)                               |-|012346|-|-UUUU|-**00|DAM+-WXZPI|0010_qqq_100_mmm_rrr
   623:           case 0b0010_000_100:
   624:           case 0b0010_001_100:
   625:           case 0b0010_010_100:
   626:           case 0b0010_011_100:
   627:           case 0b0010_100_100:
   628:           case 0b0010_101_100:
   629:           case 0b0010_110_100:
   630:           case 0b0010_111_100:
   631:             irpMoveToMNLong ();
   632:             break irpSwitch;
   633: 
   634:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
   635:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
   636:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
   637:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
   638:             //MOVE.L <ea>,(d16,Aq)                            |-|012346|-|-UUUU|-**00|DAM+-WXZPI|0010_qqq_101_mmm_rrr
   639:           case 0b0010_000_101:
   640:           case 0b0010_001_101:
   641:           case 0b0010_010_101:
   642:           case 0b0010_011_101:
   643:           case 0b0010_100_101:
   644:           case 0b0010_101_101:
   645:           case 0b0010_110_101:
   646:           case 0b0010_111_101:
   647:             irpMoveToMWLong ();
   648:             break irpSwitch;
   649: 
   650:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
   651:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
   652:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
   653:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
   654:             //MOVE.L <ea>,(d8,Aq,Rn.wl)                       |-|012346|-|-UUUU|-**00|DAM+-WXZPI|0010_qqq_110_mmm_rrr
   655:           case 0b0010_000_110:
   656:           case 0b0010_001_110:
   657:           case 0b0010_010_110:
   658:           case 0b0010_011_110:
   659:           case 0b0010_100_110:
   660:           case 0b0010_101_110:
   661:           case 0b0010_110_110:
   662:           case 0b0010_111_110:
   663:             irpMoveToMXLong ();
   664:             break irpSwitch;
   665: 
   666:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
   667:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
   668:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
   669:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
   670:             //MOVE.L <ea>,(xxx).W                             |-|012346|-|-UUUU|-**00|DAM+-WXZPI|0010_000_111_mmm_rrr
   671:           case 0b0010_000_111:
   672:             irpMoveToZWLong ();
   673:             break irpSwitch;
   674: 
   675:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
   676:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
   677:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
   678:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
   679:             //MOVE.L <ea>,(xxx).L                             |-|012346|-|-UUUU|-**00|DAM+-WXZPI|0010_001_111_mmm_rrr
   680:           case 0b0010_001_111:
   681:             irpMoveToZLLong ();
   682:             break irpSwitch;
   683: 
   684:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
   685:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
   686:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
   687:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
   688:             //MOVE.W <ea>,Dq                                  |-|012346|-|-UUUU|-**00|DAM+-WXZPI|0011_qqq_000_mmm_rrr
   689:           case 0b0011_000_000:
   690:           case 0b0011_001_000:
   691:           case 0b0011_010_000:
   692:           case 0b0011_011_000:
   693:           case 0b0011_100_000:
   694:           case 0b0011_101_000:
   695:           case 0b0011_110_000:
   696:           case 0b0011_111_000:
   697:             irpMoveToDRWord ();
   698:             break irpSwitch;
   699: 
   700:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
   701:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
   702:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
   703:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
   704:             //MOVEA.W <ea>,Aq                                 |-|012346|-|-----|-----|DAM+-WXZPI|0011_qqq_001_mmm_rrr
   705:             //MOVE.W <ea>,Aq                                  |A|012346|-|-----|-----|DAM+-WXZPI|0011_qqq_001_mmm_rrr [MOVEA.W <ea>,Aq]
   706:           case 0b0011_000_001:
   707:           case 0b0011_001_001:
   708:           case 0b0011_010_001:
   709:           case 0b0011_011_001:
   710:           case 0b0011_100_001:
   711:           case 0b0011_101_001:
   712:           case 0b0011_110_001:
   713:           case 0b0011_111_001:
   714:             irpMoveaWord ();
   715:             break irpSwitch;
   716: 
   717:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
   718:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
   719:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
   720:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
   721:             //MOVE.W <ea>,(Aq)                                |-|012346|-|-UUUU|-**00|DAM+-WXZPI|0011_qqq_010_mmm_rrr
   722:           case 0b0011_000_010:
   723:           case 0b0011_001_010:
   724:           case 0b0011_010_010:
   725:           case 0b0011_011_010:
   726:           case 0b0011_100_010:
   727:           case 0b0011_101_010:
   728:           case 0b0011_110_010:
   729:           case 0b0011_111_010:
   730:             irpMoveToMMWord ();
   731:             break irpSwitch;
   732: 
   733:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
   734:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
   735:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
   736:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
   737:             //MOVE.W <ea>,(Aq)+                               |-|012346|-|-UUUU|-**00|DAM+-WXZPI|0011_qqq_011_mmm_rrr
   738:           case 0b0011_000_011:
   739:           case 0b0011_001_011:
   740:           case 0b0011_010_011:
   741:           case 0b0011_011_011:
   742:           case 0b0011_100_011:
   743:           case 0b0011_101_011:
   744:           case 0b0011_110_011:
   745:           case 0b0011_111_011:
   746:             irpMoveToMPWord ();
   747:             break irpSwitch;
   748: 
   749:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
   750:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
   751:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
   752:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
   753:             //MOVE.W <ea>,-(Aq)                               |-|012346|-|-UUUU|-**00|DAM+-WXZPI|0011_qqq_100_mmm_rrr
   754:           case 0b0011_000_100:
   755:           case 0b0011_001_100:
   756:           case 0b0011_010_100:
   757:           case 0b0011_011_100:
   758:           case 0b0011_100_100:
   759:           case 0b0011_101_100:
   760:           case 0b0011_110_100:
   761:           case 0b0011_111_100:
   762:             irpMoveToMNWord ();
   763:             break irpSwitch;
   764: 
   765:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
   766:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
   767:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
   768:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
   769:             //MOVE.W <ea>,(d16,Aq)                            |-|012346|-|-UUUU|-**00|DAM+-WXZPI|0011_qqq_101_mmm_rrr
   770:           case 0b0011_000_101:
   771:           case 0b0011_001_101:
   772:           case 0b0011_010_101:
   773:           case 0b0011_011_101:
   774:           case 0b0011_100_101:
   775:           case 0b0011_101_101:
   776:           case 0b0011_110_101:
   777:           case 0b0011_111_101:
   778:             irpMoveToMWWord ();
   779:             break irpSwitch;
   780: 
   781:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
   782:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
   783:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
   784:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
   785:             //MOVE.W <ea>,(d8,Aq,Rn.wl)                       |-|012346|-|-UUUU|-**00|DAM+-WXZPI|0011_qqq_110_mmm_rrr
   786:           case 0b0011_000_110:
   787:           case 0b0011_001_110:
   788:           case 0b0011_010_110:
   789:           case 0b0011_011_110:
   790:           case 0b0011_100_110:
   791:           case 0b0011_101_110:
   792:           case 0b0011_110_110:
   793:           case 0b0011_111_110:
   794:             irpMoveToMXWord ();
   795:             break irpSwitch;
   796: 
   797:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
   798:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
   799:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
   800:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
   801:             //MOVE.W <ea>,(xxx).W                             |-|012346|-|-UUUU|-**00|DAM+-WXZPI|0011_000_111_mmm_rrr
   802:           case 0b0011_000_111:
   803:             irpMoveToZWWord ();
   804:             break irpSwitch;
   805: 
   806:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
   807:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
   808:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
   809:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
   810:             //MOVE.W <ea>,(xxx).L                             |-|012346|-|-UUUU|-**00|DAM+-WXZPI|0011_001_111_mmm_rrr
   811:           case 0b0011_001_111:
   812:             irpMoveToZLWord ();
   813:             break irpSwitch;
   814: 
   815:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
   816:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
   817:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
   818:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
   819:             //NEGX.B <ea>                                     |-|012346|-|*UUUU|*****|D M+-WXZ  |0100_000_000_mmm_rrr
   820:           case 0b0100_000_000:
   821:             irpNegxByte ();
   822:             break irpSwitch;
   823: 
   824:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
   825:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
   826:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
   827:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
   828:             //NEGX.W <ea>                                     |-|012346|-|*UUUU|*****|D M+-WXZ  |0100_000_001_mmm_rrr
   829:           case 0b0100_000_001:
   830:             irpNegxWord ();
   831:             break irpSwitch;
   832: 
   833:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
   834:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
   835:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
   836:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
   837:             //NEGX.L <ea>                                     |-|012346|-|*UUUU|*****|D M+-WXZ  |0100_000_010_mmm_rrr
   838:           case 0b0100_000_010:
   839:             irpNegxLong ();
   840:             break irpSwitch;
   841: 
   842:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
   843:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
   844:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
   845:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
   846:             //MOVE.W SR,<ea>                                  |-|-12346|P|*****|-----|D M+-WXZ  |0100_000_011_mmm_rrr
   847:           case 0b0100_000_011:
   848:             irpMoveFromSR ();
   849:             break irpSwitch;
   850: 
   851:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
   852:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
   853:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
   854:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
   855:             //CHK.L <ea>,Dq                                   |-|--2346|-|-UUUU|-*UUU|D M+-WXZPI|0100_qqq_100_mmm_rrr
   856:           case 0b0100_000_100:
   857:           case 0b0100_001_100:
   858:           case 0b0100_010_100:
   859:           case 0b0100_011_100:
   860:           case 0b0100_100_100:
   861:           case 0b0100_101_100:
   862:           case 0b0100_110_100:
   863:           case 0b0100_111_100:
   864:             irpChkLong ();
   865:             break irpSwitch;
   866: 
   867:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
   868:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
   869:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
   870:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
   871:             //CHK.W <ea>,Dq                                   |-|012346|-|-UUUU|-*UUU|D M+-WXZPI|0100_qqq_110_mmm_rrr
   872:           case 0b0100_000_110:
   873:           case 0b0100_001_110:
   874:           case 0b0100_010_110:
   875:           case 0b0100_011_110:
   876:           case 0b0100_100_110:
   877:           case 0b0100_101_110:
   878:           case 0b0100_110_110:
   879:           case 0b0100_111_110:
   880:             irpChkWord ();
   881:             break irpSwitch;
   882: 
   883:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
   884:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
   885:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
   886:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
   887:             //LEA.L <ea>,Aq                                   |-|012346|-|-----|-----|  M  WXZP |0100_qqq_111_mmm_rrr
   888:             //EXTB.L Dr                                       |-|--2346|-|-UUUU|-**00|D         |0100_100_111_000_rrr
   889:           case 0b0100_000_111:
   890:           case 0b0100_001_111:
   891:           case 0b0100_010_111:
   892:           case 0b0100_011_111:
   893:           case 0b0100_100_111:
   894:           case 0b0100_101_111:
   895:           case 0b0100_110_111:
   896:           case 0b0100_111_111:
   897:             irpLea ();
   898:             break irpSwitch;
   899: 
   900:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
   901:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
   902:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
   903:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
   904:             //CLR.B <ea>                                      |-|012346|-|-UUUU|-0100|D M+-WXZ  |0100_001_000_mmm_rrr (68000 and 68008 read before clear)
   905:           case 0b0100_001_000:
   906:             irpClrByte ();
   907:             break irpSwitch;
   908: 
   909:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
   910:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
   911:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
   912:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
   913:             //CLR.W <ea>                                      |-|012346|-|-UUUU|-0100|D M+-WXZ  |0100_001_001_mmm_rrr (68000 and 68008 read before clear)
   914:           case 0b0100_001_001:
   915:             irpClrWord ();
   916:             break irpSwitch;
   917: 
   918:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
   919:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
   920:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
   921:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
   922:             //CLR.L <ea>                                      |-|012346|-|-UUUU|-0100|D M+-WXZ  |0100_001_010_mmm_rrr (68000 and 68008 read before clear)
   923:           case 0b0100_001_010:
   924:             irpClrLong ();
   925:             break irpSwitch;
   926: 
   927:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
   928:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
   929:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
   930:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
   931:             //MOVE.W CCR,<ea>                                 |-|-12346|-|*****|-----|D M+-WXZ  |0100_001_011_mmm_rrr
   932:           case 0b0100_001_011:
   933:             irpMoveFromCCR ();
   934:             break irpSwitch;
   935: 
   936:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
   937:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
   938:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
   939:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
   940:             //NEG.B <ea>                                      |-|012346|-|UUUUU|*****|D M+-WXZ  |0100_010_000_mmm_rrr
   941:           case 0b0100_010_000:
   942:             irpNegByte ();
   943:             break irpSwitch;
   944: 
   945:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
   946:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
   947:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
   948:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
   949:             //NEG.W <ea>                                      |-|012346|-|UUUUU|*****|D M+-WXZ  |0100_010_001_mmm_rrr
   950:           case 0b0100_010_001:
   951:             irpNegWord ();
   952:             break irpSwitch;
   953: 
   954:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
   955:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
   956:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
   957:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
   958:             //NEG.L <ea>                                      |-|012346|-|UUUUU|*****|D M+-WXZ  |0100_010_010_mmm_rrr
   959:           case 0b0100_010_010:
   960:             irpNegLong ();
   961:             break irpSwitch;
   962: 
   963:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
   964:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
   965:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
   966:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
   967:             //MOVE.W <ea>,CCR                                 |-|012346|-|UUUUU|*****|D M+-WXZPI|0100_010_011_mmm_rrr
   968:           case 0b0100_010_011:
   969:             irpMoveToCCR ();
   970:             break irpSwitch;
   971: 
   972:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
   973:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
   974:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
   975:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
   976:             //NOT.B <ea>                                      |-|012346|-|-UUUU|-**00|D M+-WXZ  |0100_011_000_mmm_rrr
   977:           case 0b0100_011_000:
   978:             irpNotByte ();
   979:             break irpSwitch;
   980: 
   981:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
   982:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
   983:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
   984:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
   985:             //NOT.W <ea>                                      |-|012346|-|-UUUU|-**00|D M+-WXZ  |0100_011_001_mmm_rrr
   986:           case 0b0100_011_001:
   987:             irpNotWord ();
   988:             break irpSwitch;
   989: 
   990:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
   991:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
   992:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
   993:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
   994:             //NOT.L <ea>                                      |-|012346|-|-UUUU|-**00|D M+-WXZ  |0100_011_010_mmm_rrr
   995:           case 0b0100_011_010:
   996:             irpNotLong ();
   997:             break irpSwitch;
   998: 
   999:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  1000:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  1001:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  1002:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  1003:             //MOVE.W <ea>,SR                                  |-|012346|P|UUUUU|*****|D M+-WXZPI|0100_011_011_mmm_rrr
  1004:           case 0b0100_011_011:
  1005:             irpMoveToSR ();
  1006:             break irpSwitch;
  1007: 
  1008:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  1009:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  1010:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  1011:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  1012:             //NBCD.B <ea>                                     |-|012346|-|UUUUU|*U*U*|D M+-WXZ  |0100_100_000_mmm_rrr
  1013:             //LINK.L Ar,#<data>                               |-|--2346|-|-----|-----|          |0100_100_000_001_rrr-{data}
  1014:           case 0b0100_100_000:
  1015:             irpNbcd ();
  1016:             break irpSwitch;
  1017: 
  1018:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  1019:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  1020:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  1021:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  1022:             //SWAP.W Dr                                       |-|012346|-|-UUUU|-**00|D         |0100_100_001_000_rrr
  1023:             //BKPT #<data>                                    |-|-12346|-|-----|-----|          |0100_100_001_001_ddd
  1024:             //PEA.L <ea>                                      |-|012346|-|-----|-----|  M  WXZP |0100_100_001_mmm_rrr
  1025:           case 0b0100_100_001:
  1026:             irpPea ();
  1027:             break irpSwitch;
  1028: 
  1029:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  1030:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  1031:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  1032:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  1033:             //EXT.W Dr                                        |-|012346|-|-UUUU|-**00|D         |0100_100_010_000_rrr
  1034:             //MOVEM.W <list>,<ea>                             |-|012346|-|-----|-----|  M -WXZ  |0100_100_010_mmm_rrr-llllllllllllllll
  1035:           case 0b0100_100_010:
  1036:             irpMovemToMemWord ();
  1037:             break irpSwitch;
  1038: 
  1039:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  1040:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  1041:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  1042:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  1043:             //EXT.L Dr                                        |-|012346|-|-UUUU|-**00|D         |0100_100_011_000_rrr
  1044:             //MOVEM.L <list>,<ea>                             |-|012346|-|-----|-----|  M -WXZ  |0100_100_011_mmm_rrr-llllllllllllllll
  1045:           case 0b0100_100_011:
  1046:             irpMovemToMemLong ();
  1047:             break irpSwitch;
  1048: 
  1049:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  1050:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  1051:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  1052:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  1053:             //TST.B <ea>                                      |-|012346|-|-UUUU|-**00|D M+-WXZ  |0100_101_000_mmm_rrr
  1054:             //TST.B <ea>                                      |-|--2346|-|-UUUU|-**00|        PI|0100_101_000_mmm_rrr
  1055:           case 0b0100_101_000:
  1056:             irpTstByte ();
  1057:             break irpSwitch;
  1058: 
  1059:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  1060:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  1061:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  1062:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  1063:             //TST.W <ea>                                      |-|012346|-|-UUUU|-**00|D M+-WXZ  |0100_101_001_mmm_rrr
  1064:             //TST.W <ea>                                      |-|--2346|-|-UUUU|-**00| A      PI|0100_101_001_mmm_rrr
  1065:           case 0b0100_101_001:
  1066:             irpTstWord ();
  1067:             break irpSwitch;
  1068: 
  1069:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  1070:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  1071:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  1072:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  1073:             //TST.L <ea>                                      |-|012346|-|-UUUU|-**00|D M+-WXZ  |0100_101_010_mmm_rrr
  1074:             //TST.L <ea>                                      |-|--2346|-|-UUUU|-**00| A      PI|0100_101_010_mmm_rrr
  1075:           case 0b0100_101_010:
  1076:             irpTstLong ();
  1077:             break irpSwitch;
  1078: 
  1079:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  1080:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  1081:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  1082:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  1083:             //TAS.B <ea>                                      |-|012346|-|-UUUU|-**00|D M+-WXZ  |0100_101_011_mmm_rrr
  1084:             //ILLEGAL                                         |-|012346|-|-----|-----|          |0100_101_011_111_100
  1085:           case 0b0100_101_011:
  1086:             irpTas ();
  1087:             break irpSwitch;
  1088: 
  1089:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  1090:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  1091:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  1092:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  1093:             //MULU.L <ea>,Dl                                  |-|--2346|-|-UUUU|-***0|D M+-WXZPI|0100_110_000_mmm_rrr-0lll000000000hhh        (h is not used)
  1094:             //MULU.L <ea>,Dh:Dl                               |-|--234S|-|-UUUU|-***0|D M+-WXZPI|0100_110_000_mmm_rrr-0lll010000000hhh        (if h=l then result is not defined)
  1095:             //MULS.L <ea>,Dl                                  |-|--2346|-|-UUUU|-***0|D M+-WXZPI|0100_110_000_mmm_rrr-0lll100000000hhh        (h is not used)
  1096:             //MULS.L <ea>,Dh:Dl                               |-|--234S|-|-UUUU|-***0|D M+-WXZPI|0100_110_000_mmm_rrr-0lll110000000hhh        (if h=l then result is not defined)
  1097:           case 0b0100_110_000:
  1098:             irpMuluMulsLong ();
  1099:             break irpSwitch;
  1100: 
  1101:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  1102:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  1103:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  1104:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  1105:             //DIVU.L <ea>,Dq                                  |-|--2346|-|-UUUU|-***0|D M+-WXZPI|0100_110_001_mmm_rrr-0qqq000000000qqq
  1106:             //DIVUL.L <ea>,Dr:Dq                              |-|--2346|-|-UUUU|-***0|D M+-WXZPI|0100_110_001_mmm_rrr-0qqq000000000rrr        (q is not equal to r)
  1107:             //DIVU.L <ea>,Dr:Dq                               |-|--234S|-|-UUUU|-***0|D M+-WXZPI|0100_110_001_mmm_rrr-0qqq010000000rrr        (q is not equal to r)
  1108:             //DIVS.L <ea>,Dq                                  |-|--2346|-|-UUUU|-***0|D M+-WXZPI|0100_110_001_mmm_rrr-0qqq100000000qqq
  1109:             //DIVSL.L <ea>,Dr:Dq                              |-|--2346|-|-UUUU|-***0|D M+-WXZPI|0100_110_001_mmm_rrr-0qqq100000000rrr        (q is not equal to r)
  1110:             //DIVS.L <ea>,Dr:Dq                               |-|--234S|-|-UUUU|-***0|D M+-WXZPI|0100_110_001_mmm_rrr-0qqq110000000rrr        (q is not equal to r)
  1111:           case 0b0100_110_001:
  1112:             irpDivuDivsLong ();
  1113:             break irpSwitch;
  1114: 
  1115:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  1116:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  1117:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  1118:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  1119:             //SATS.L Dr                                       |-|------|-|-UUUU|-**00|D         |0100_110_010_000_rrr (ISA_B)
  1120:             //MOVEM.W <ea>,<list>                             |-|012346|-|-----|-----|  M+ WXZP |0100_110_010_mmm_rrr-llllllllllllllll
  1121:           case 0b0100_110_010:
  1122:             irpMovemToRegWord ();
  1123:             break irpSwitch;
  1124: 
  1125:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  1126:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  1127:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  1128:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  1129:             //MOVEM.L <ea>,<list>                             |-|012346|-|-----|-----|  M+ WXZP |0100_110_011_mmm_rrr-llllllllllllllll
  1130:           case 0b0100_110_011:
  1131:             irpMovemToRegLong ();
  1132:             break irpSwitch;
  1133: 
  1134:           case 0b0100_111_001:
  1135:             switch (XEiJ.regOC & 0b111_111) {
  1136: 
  1137:               //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  1138:               //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  1139:               //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  1140:               //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  1141:               //TRAP #<vector>                                  |-|012346|-|-----|-----|          |0100_111_001_00v_vvv
  1142:             case 0b000_000:
  1143:             case 0b000_001:
  1144:             case 0b000_010:
  1145:             case 0b000_011:
  1146:             case 0b000_100:
  1147:             case 0b000_101:
  1148:             case 0b000_110:
  1149:             case 0b000_111:
  1150:             case 0b001_000:
  1151:             case 0b001_001:
  1152:             case 0b001_010:
  1153:             case 0b001_011:
  1154:             case 0b001_100:
  1155:             case 0b001_101:
  1156:             case 0b001_110:
  1157:               irpTrap ();
  1158:               break irpSwitch;
  1159:             case 0b001_111:
  1160:               irpTrap15 ();
  1161:               break irpSwitch;
  1162: 
  1163:               //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  1164:               //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  1165:               //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  1166:               //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  1167:               //LINK.W Ar,#<data>                               |-|012346|-|-----|-----|          |0100_111_001_010_rrr-{data}
  1168:             case 0b010_000:
  1169:             case 0b010_001:
  1170:             case 0b010_010:
  1171:             case 0b010_011:
  1172:             case 0b010_100:
  1173:             case 0b010_101:
  1174:             case 0b010_110:
  1175:             case 0b010_111:
  1176:               irpLinkWord ();
  1177:               break irpSwitch;
  1178: 
  1179:               //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  1180:               //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  1181:               //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  1182:               //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  1183:               //UNLK Ar                                         |-|012346|-|-----|-----|          |0100_111_001_011_rrr
  1184:             case 0b011_000:
  1185:             case 0b011_001:
  1186:             case 0b011_010:
  1187:             case 0b011_011:
  1188:             case 0b011_100:
  1189:             case 0b011_101:
  1190:             case 0b011_110:
  1191:             case 0b011_111:
  1192:               irpUnlk ();
  1193:               break irpSwitch;
  1194: 
  1195:               //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  1196:               //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  1197:               //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  1198:               //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  1199:               //MOVE.L Ar,USP                                   |-|012346|P|-----|-----|          |0100_111_001_100_rrr
  1200:             case 0b100_000:
  1201:             case 0b100_001:
  1202:             case 0b100_010:
  1203:             case 0b100_011:
  1204:             case 0b100_100:
  1205:             case 0b100_101:
  1206:             case 0b100_110:
  1207:             case 0b100_111:
  1208:               irpMoveToUsp ();
  1209:               break irpSwitch;
  1210: 
  1211:               //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  1212:               //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  1213:               //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  1214:               //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  1215:               //MOVE.L USP,Ar                                   |-|012346|P|-----|-----|          |0100_111_001_101_rrr
  1216:             case 0b101_000:
  1217:             case 0b101_001:
  1218:             case 0b101_010:
  1219:             case 0b101_011:
  1220:             case 0b101_100:
  1221:             case 0b101_101:
  1222:             case 0b101_110:
  1223:             case 0b101_111:
  1224:               irpMoveFromUsp ();
  1225:               break irpSwitch;
  1226: 
  1227:               //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  1228:               //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  1229:               //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  1230:               //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  1231:               //RESET                                           |-|012346|P|-----|-----|          |0100_111_001_110_000
  1232:             case 0b110_000:
  1233:               irpReset ();
  1234:               break irpSwitch;
  1235: 
  1236:               //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  1237:               //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  1238:               //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  1239:               //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  1240:               //NOP                                             |-|012346|-|-----|-----|          |0100_111_001_110_001
  1241:             case 0b110_001:
  1242:               irpNop ();
  1243:               break irpSwitch;
  1244: 
  1245:               //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  1246:               //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  1247:               //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  1248:               //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  1249:               //STOP #<data>                                    |-|012346|P|UUUUU|*****|          |0100_111_001_110_010-{data}
  1250:             case 0b110_010:
  1251:               irpStop ();
  1252:               break irpSwitch;
  1253: 
  1254:               //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  1255:               //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  1256:               //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  1257:               //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  1258:               //RTE                                             |-|012346|P|UUUUU|*****|          |0100_111_001_110_011
  1259:             case 0b110_011:
  1260:               irpRte ();
  1261:               break irpSwitch;
  1262: 
  1263:               //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  1264:               //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  1265:               //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  1266:               //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  1267:               //RTD #<data>                                     |-|-12346|-|-----|-----|          |0100_111_001_110_100-{data}
  1268:             case 0b110_100:
  1269:               irpRtd ();
  1270:               break irpSwitch;
  1271: 
  1272:               //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  1273:               //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  1274:               //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  1275:               //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  1276:               //RTS                                             |-|012346|-|-----|-----|          |0100_111_001_110_101
  1277:             case 0b110_101:
  1278:               irpRts ();
  1279:               break irpSwitch;
  1280: 
  1281:               //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  1282:               //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  1283:               //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  1284:               //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  1285:               //TRAPV                                           |-|012346|-|---*-|-----|          |0100_111_001_110_110
  1286:             case 0b110_110:
  1287:               irpTrapv ();
  1288:               break irpSwitch;
  1289: 
  1290:               //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  1291:               //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  1292:               //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  1293:               //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  1294:               //RTR                                             |-|012346|-|UUUUU|*****|          |0100_111_001_110_111
  1295:             case 0b110_111:
  1296:               irpRtr ();
  1297:               break irpSwitch;
  1298: 
  1299:               //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  1300:               //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  1301:               //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  1302:               //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  1303:               //MOVEC.L Rc,Rn                                   |-|-12346|P|-----|-----|          |0100_111_001_111_010-rnnncccccccccccc
  1304:             case 0b111_010:
  1305:               irpMovecFromControl ();
  1306:               break irpSwitch;
  1307: 
  1308:               //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  1309:               //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  1310:               //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  1311:               //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  1312:               //MOVEC.L Rn,Rc                                   |-|-12346|P|-----|-----|          |0100_111_001_111_011-rnnncccccccccccc
  1313:             case 0b111_011:
  1314:               irpMovecToControl ();
  1315:               break irpSwitch;
  1316: 
  1317:             default:
  1318:               irpIllegal ();
  1319: 
  1320:             }  //switch XEiJ.regOC & 0b111_111
  1321:             break irpSwitch;
  1322: 
  1323:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  1324:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  1325:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  1326:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  1327:             //JSR <ea>                                        |-|012346|-|-----|-----|  M  WXZP |0100_111_010_mmm_rrr
  1328:             //JBSR.L <label>                                  |A|012346|-|-----|-----|          |0100_111_010_111_001-{address}       [JSR <label>]
  1329:           case 0b0100_111_010:
  1330:             irpJsr ();
  1331:             break irpSwitch;
  1332: 
  1333:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  1334:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  1335:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  1336:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  1337:             //JMP <ea>                                        |-|012346|-|-----|-----|  M  WXZP |0100_111_011_mmm_rrr
  1338:             //JBRA.L <label>                                  |A|012346|-|-----|-----|          |0100_111_011_111_001-{address}       [JMP <label>]
  1339:           case 0b0100_111_011:
  1340:             irpJmp ();
  1341:             break irpSwitch;
  1342: 
  1343:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  1344:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  1345:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  1346:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  1347:             //ADDQ.B #<data>,<ea>                             |-|012346|-|UUUUU|*****|D M+-WXZ  |0101_qqq_000_mmm_rrr
  1348:             //INC.B <ea>                                      |A|012346|-|UUUUU|*****|D M+-WXZ  |0101_001_000_mmm_rrr [ADDQ.B #1,<ea>]
  1349:           case 0b0101_000_000:
  1350:           case 0b0101_001_000:
  1351:           case 0b0101_010_000:
  1352:           case 0b0101_011_000:
  1353:           case 0b0101_100_000:
  1354:           case 0b0101_101_000:
  1355:           case 0b0101_110_000:
  1356:           case 0b0101_111_000:
  1357:             irpAddqByte ();
  1358:             break irpSwitch;
  1359: 
  1360:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  1361:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  1362:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  1363:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  1364:             //ADDQ.W #<data>,<ea>                             |-|012346|-|UUUUU|*****|D M+-WXZ  |0101_qqq_001_mmm_rrr
  1365:             //ADDQ.W #<data>,Ar                               |-|012346|-|-----|-----| A        |0101_qqq_001_001_rrr
  1366:             //INC.W <ea>                                      |A|012346|-|UUUUU|*****|D M+-WXZ  |0101_001_001_mmm_rrr [ADDQ.W #1,<ea>]
  1367:             //INC.W Ar                                        |A|012346|-|-----|-----| A        |0101_001_001_001_rrr [ADDQ.W #1,Ar]
  1368:           case 0b0101_000_001:
  1369:           case 0b0101_001_001:
  1370:           case 0b0101_010_001:
  1371:           case 0b0101_011_001:
  1372:           case 0b0101_100_001:
  1373:           case 0b0101_101_001:
  1374:           case 0b0101_110_001:
  1375:           case 0b0101_111_001:
  1376:             irpAddqWord ();
  1377:             break irpSwitch;
  1378: 
  1379:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  1380:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  1381:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  1382:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  1383:             //ADDQ.L #<data>,<ea>                             |-|012346|-|UUUUU|*****|D M+-WXZ  |0101_qqq_010_mmm_rrr
  1384:             //ADDQ.L #<data>,Ar                               |-|012346|-|-----|-----| A        |0101_qqq_010_001_rrr
  1385:             //INC.L <ea>                                      |A|012346|-|UUUUU|*****|D M+-WXZ  |0101_001_010_mmm_rrr [ADDQ.L #1,<ea>]
  1386:             //INC.L Ar                                        |A|012346|-|-----|-----| A        |0101_001_010_001_rrr [ADDQ.L #1,Ar]
  1387:           case 0b0101_000_010:
  1388:           case 0b0101_001_010:
  1389:           case 0b0101_010_010:
  1390:           case 0b0101_011_010:
  1391:           case 0b0101_100_010:
  1392:           case 0b0101_101_010:
  1393:           case 0b0101_110_010:
  1394:           case 0b0101_111_010:
  1395:             irpAddqLong ();
  1396:             break irpSwitch;
  1397: 
  1398:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  1399:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  1400:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  1401:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  1402:             //ST.B <ea>                                       |-|012346|-|-----|-----|D M+-WXZ  |0101_000_011_mmm_rrr
  1403:             //SNF.B <ea>                                      |A|012346|-|-----|-----|D M+-WXZ  |0101_000_011_mmm_rrr [ST.B <ea>]
  1404:             //DBT.W Dr,<label>                                |-|012346|-|-----|-----|          |0101_000_011_001_rrr-{offset}
  1405:             //DBNF.W Dr,<label>                               |A|012346|-|-----|-----|          |0101_000_011_001_rrr-{offset}        [DBT.W Dr,<label>]
  1406:             //TRAPT.W #<data>                                 |-|--2346|-|-----|-----|          |0101_000_011_111_010-{data}
  1407:             //TPNF.W #<data>                                  |A|--2346|-|-----|-----|          |0101_000_011_111_010-{data}  [TRAPT.W #<data>]
  1408:             //TPT.W #<data>                                   |A|--2346|-|-----|-----|          |0101_000_011_111_010-{data}  [TRAPT.W #<data>]
  1409:             //TRAPNF.W #<data>                                |A|--2346|-|-----|-----|          |0101_000_011_111_010-{data}  [TRAPT.W #<data>]
  1410:             //TRAPT.L #<data>                                 |-|--2346|-|-----|-----|          |0101_000_011_111_011-{data}
  1411:             //TPNF.L #<data>                                  |A|--2346|-|-----|-----|          |0101_000_011_111_011-{data}  [TRAPT.L #<data>]
  1412:             //TPT.L #<data>                                   |A|--2346|-|-----|-----|          |0101_000_011_111_011-{data}  [TRAPT.L #<data>]
  1413:             //TRAPNF.L #<data>                                |A|--2346|-|-----|-----|          |0101_000_011_111_011-{data}  [TRAPT.L #<data>]
  1414:             //TRAPT                                           |-|--2346|-|-----|-----|          |0101_000_011_111_100
  1415:             //TPNF                                            |A|--2346|-|-----|-----|          |0101_000_011_111_100 [TRAPT]
  1416:             //TPT                                             |A|--2346|-|-----|-----|          |0101_000_011_111_100 [TRAPT]
  1417:             //TRAPNF                                          |A|--2346|-|-----|-----|          |0101_000_011_111_100 [TRAPT]
  1418:           case 0b0101_000_011:
  1419:             irpSt ();
  1420:             break irpSwitch;
  1421: 
  1422:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  1423:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  1424:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  1425:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  1426:             //SUBQ.B #<data>,<ea>                             |-|012346|-|UUUUU|*****|D M+-WXZ  |0101_qqq_100_mmm_rrr
  1427:             //DEC.B <ea>                                      |A|012346|-|UUUUU|*****|D M+-WXZ  |0101_001_100_mmm_rrr [SUBQ.B #1,<ea>]
  1428:           case 0b0101_000_100:
  1429:           case 0b0101_001_100:
  1430:           case 0b0101_010_100:
  1431:           case 0b0101_011_100:
  1432:           case 0b0101_100_100:
  1433:           case 0b0101_101_100:
  1434:           case 0b0101_110_100:
  1435:           case 0b0101_111_100:
  1436:             irpSubqByte ();
  1437:             break irpSwitch;
  1438: 
  1439:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  1440:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  1441:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  1442:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  1443:             //SUBQ.W #<data>,<ea>                             |-|012346|-|UUUUU|*****|D M+-WXZ  |0101_qqq_101_mmm_rrr
  1444:             //SUBQ.W #<data>,Ar                               |-|012346|-|-----|-----| A        |0101_qqq_101_001_rrr
  1445:             //DEC.W <ea>                                      |A|012346|-|UUUUU|*****|D M+-WXZ  |0101_001_101_mmm_rrr [SUBQ.W #1,<ea>]
  1446:             //DEC.W Ar                                        |A|012346|-|-----|-----| A        |0101_001_101_001_rrr [SUBQ.W #1,Ar]
  1447:           case 0b0101_000_101:
  1448:           case 0b0101_001_101:
  1449:           case 0b0101_010_101:
  1450:           case 0b0101_011_101:
  1451:           case 0b0101_100_101:
  1452:           case 0b0101_101_101:
  1453:           case 0b0101_110_101:
  1454:           case 0b0101_111_101:
  1455:             irpSubqWord ();
  1456:             break irpSwitch;
  1457: 
  1458:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  1459:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  1460:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  1461:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  1462:             //SUBQ.L #<data>,<ea>                             |-|012346|-|UUUUU|*****|D M+-WXZ  |0101_qqq_110_mmm_rrr
  1463:             //SUBQ.L #<data>,Ar                               |-|012346|-|-----|-----| A        |0101_qqq_110_001_rrr
  1464:             //DEC.L <ea>                                      |A|012346|-|UUUUU|*****|D M+-WXZ  |0101_001_110_mmm_rrr [SUBQ.L #1,<ea>]
  1465:             //DEC.L Ar                                        |A|012346|-|-----|-----| A        |0101_001_110_001_rrr [SUBQ.L #1,Ar]
  1466:           case 0b0101_000_110:
  1467:           case 0b0101_001_110:
  1468:           case 0b0101_010_110:
  1469:           case 0b0101_011_110:
  1470:           case 0b0101_100_110:
  1471:           case 0b0101_101_110:
  1472:           case 0b0101_110_110:
  1473:           case 0b0101_111_110:
  1474:             irpSubqLong ();
  1475:             break irpSwitch;
  1476: 
  1477:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  1478:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  1479:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  1480:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  1481:             //SF.B <ea>                                       |-|012346|-|-----|-----|D M+-WXZ  |0101_000_111_mmm_rrr
  1482:             //SNT.B <ea>                                      |A|012346|-|-----|-----|D M+-WXZ  |0101_000_111_mmm_rrr [SF.B <ea>]
  1483:             //DBF.W Dr,<label>                                |-|012346|-|-----|-----|          |0101_000_111_001_rrr-{offset}
  1484:             //DBNT.W Dr,<label>                               |A|012346|-|-----|-----|          |0101_000_111_001_rrr-{offset}        [DBF.W Dr,<label>]
  1485:             //DBRA.W Dr,<label>                               |A|012346|-|-----|-----|          |0101_000_111_001_rrr-{offset}        [DBF.W Dr,<label>]
  1486:             //TRAPF.W #<data>                                 |-|--2346|-|-----|-----|          |0101_000_111_111_010-{data}
  1487:             //TPF.W #<data>                                   |A|--2346|-|-----|-----|          |0101_000_111_111_010-{data}  [TRAPF.W #<data>]
  1488:             //TPNT.W #<data>                                  |A|--2346|-|-----|-----|          |0101_000_111_111_010-{data}  [TRAPF.W #<data>]
  1489:             //TRAPNT.W #<data>                                |A|--2346|-|-----|-----|          |0101_000_111_111_010-{data}  [TRAPF.W #<data>]
  1490:             //TRAPF.L #<data>                                 |-|--2346|-|-----|-----|          |0101_000_111_111_011-{data}
  1491:             //TPF.L #<data>                                   |A|--2346|-|-----|-----|          |0101_000_111_111_011-{data}  [TRAPF.L #<data>]
  1492:             //TPNT.L #<data>                                  |A|--2346|-|-----|-----|          |0101_000_111_111_011-{data}  [TRAPF.L #<data>]
  1493:             //TRAPNT.L #<data>                                |A|--2346|-|-----|-----|          |0101_000_111_111_011-{data}  [TRAPF.L #<data>]
  1494:             //TRAPF                                           |-|--2346|-|-----|-----|          |0101_000_111_111_100
  1495:             //TPF                                             |A|--2346|-|-----|-----|          |0101_000_111_111_100 [TRAPF]
  1496:             //TPNT                                            |A|--2346|-|-----|-----|          |0101_000_111_111_100 [TRAPF]
  1497:             //TRAPNT                                          |A|--2346|-|-----|-----|          |0101_000_111_111_100 [TRAPF]
  1498:           case 0b0101_000_111:
  1499:             irpSf ();
  1500:             break irpSwitch;
  1501: 
  1502:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  1503:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  1504:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  1505:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  1506:             //SHI.B <ea>                                      |-|012346|-|--*-*|-----|D M+-WXZ  |0101_001_011_mmm_rrr
  1507:             //SNLS.B <ea>                                     |A|012346|-|--*-*|-----|D M+-WXZ  |0101_001_011_mmm_rrr [SHI.B <ea>]
  1508:             //DBHI.W Dr,<label>                               |-|012346|-|--*-*|-----|          |0101_001_011_001_rrr-{offset}
  1509:             //DBNLS.W Dr,<label>                              |A|012346|-|--*-*|-----|          |0101_001_011_001_rrr-{offset}        [DBHI.W Dr,<label>]
  1510:             //TRAPHI.W #<data>                                |-|--2346|-|--*-*|-----|          |0101_001_011_111_010-{data}
  1511:             //TPHI.W #<data>                                  |A|--2346|-|--*-*|-----|          |0101_001_011_111_010-{data}  [TRAPHI.W #<data>]
  1512:             //TPNLS.W #<data>                                 |A|--2346|-|--*-*|-----|          |0101_001_011_111_010-{data}  [TRAPHI.W #<data>]
  1513:             //TRAPNLS.W #<data>                               |A|--2346|-|--*-*|-----|          |0101_001_011_111_010-{data}  [TRAPHI.W #<data>]
  1514:             //TRAPHI.L #<data>                                |-|--2346|-|--*-*|-----|          |0101_001_011_111_011-{data}
  1515:             //TPHI.L #<data>                                  |A|--2346|-|--*-*|-----|          |0101_001_011_111_011-{data}  [TRAPHI.L #<data>]
  1516:             //TPNLS.L #<data>                                 |A|--2346|-|--*-*|-----|          |0101_001_011_111_011-{data}  [TRAPHI.L #<data>]
  1517:             //TRAPNLS.L #<data>                               |A|--2346|-|--*-*|-----|          |0101_001_011_111_011-{data}  [TRAPHI.L #<data>]
  1518:             //TRAPHI                                          |-|--2346|-|--*-*|-----|          |0101_001_011_111_100
  1519:             //TPHI                                            |A|--2346|-|--*-*|-----|          |0101_001_011_111_100 [TRAPHI]
  1520:             //TPNLS                                           |A|--2346|-|--*-*|-----|          |0101_001_011_111_100 [TRAPHI]
  1521:             //TRAPNLS                                         |A|--2346|-|--*-*|-----|          |0101_001_011_111_100 [TRAPHI]
  1522:           case 0b0101_001_011:
  1523:             irpShi ();
  1524:             break irpSwitch;
  1525: 
  1526:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  1527:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  1528:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  1529:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  1530:             //SLS.B <ea>                                      |-|012346|-|--*-*|-----|D M+-WXZ  |0101_001_111_mmm_rrr
  1531:             //SNHI.B <ea>                                     |A|012346|-|--*-*|-----|D M+-WXZ  |0101_001_111_mmm_rrr [SLS.B <ea>]
  1532:             //DBLS.W Dr,<label>                               |-|012346|-|--*-*|-----|          |0101_001_111_001_rrr-{offset}
  1533:             //DBNHI.W Dr,<label>                              |A|012346|-|--*-*|-----|          |0101_001_111_001_rrr-{offset}        [DBLS.W Dr,<label>]
  1534:             //TRAPLS.W #<data>                                |-|--2346|-|--*-*|-----|          |0101_001_111_111_010-{data}
  1535:             //TPLS.W #<data>                                  |A|--2346|-|--*-*|-----|          |0101_001_111_111_010-{data}
  1536:             //TPNHI.W #<data>                                 |A|--2346|-|--*-*|-----|          |0101_001_111_111_010-{data}  [TRAPLS.W #<data>]
  1537:             //TRAPNHI.W #<data>                               |A|--2346|-|--*-*|-----|          |0101_001_111_111_010-{data}  [TRAPLS.W #<data>]
  1538:             //TRAPLS.L #<data>                                |-|--2346|-|--*-*|-----|          |0101_001_111_111_011-{data}
  1539:             //TPLS.L #<data>                                  |A|--2346|-|--*-*|-----|          |0101_001_111_111_011-{data}
  1540:             //TPNHI.L #<data>                                 |A|--2346|-|--*-*|-----|          |0101_001_111_111_011-{data}  [TRAPLS.L #<data>]
  1541:             //TRAPNHI.L #<data>                               |A|--2346|-|--*-*|-----|          |0101_001_111_111_011-{data}  [TRAPLS.L #<data>]
  1542:             //TRAPLS                                          |-|--2346|-|--*-*|-----|          |0101_001_111_111_100
  1543:             //TPLS                                            |A|--2346|-|--*-*|-----|          |0101_001_111_111_100 [TRAPLS]
  1544:             //TPNHI                                           |A|--2346|-|--*-*|-----|          |0101_001_111_111_100 [TRAPLS]
  1545:             //TRAPNHI                                         |A|--2346|-|--*-*|-----|          |0101_001_111_111_100 [TRAPLS]
  1546:           case 0b0101_001_111:
  1547:             irpSls ();
  1548:             break irpSwitch;
  1549: 
  1550:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  1551:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  1552:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  1553:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  1554:             //SCC.B <ea>                                      |-|012346|-|----*|-----|D M+-WXZ  |0101_010_011_mmm_rrr
  1555:             //SHS.B <ea>                                      |A|012346|-|----*|-----|D M+-WXZ  |0101_010_011_mmm_rrr [SCC.B <ea>]
  1556:             //SNCS.B <ea>                                     |A|012346|-|----*|-----|D M+-WXZ  |0101_010_011_mmm_rrr [SCC.B <ea>]
  1557:             //SNLO.B <ea>                                     |A|012346|-|----*|-----|D M+-WXZ  |0101_010_011_mmm_rrr [SCC.B <ea>]
  1558:             //DBCC.W Dr,<label>                               |-|012346|-|----*|-----|          |0101_010_011_001_rrr-{offset}
  1559:             //DBHS.W Dr,<label>                               |A|012346|-|----*|-----|          |0101_010_011_001_rrr-{offset}        [DBCC.W Dr,<label>]
  1560:             //DBNCS.W Dr,<label>                              |A|012346|-|----*|-----|          |0101_010_011_001_rrr-{offset}        [DBCC.W Dr,<label>]
  1561:             //DBNLO.W Dr,<label>                              |A|012346|-|----*|-----|          |0101_010_011_001_rrr-{offset}        [DBCC.W Dr,<label>]
  1562:             //TRAPCC.W #<data>                                |-|--2346|-|----*|-----|          |0101_010_011_111_010-{data}
  1563:             //TPCC.W #<data>                                  |A|--2346|-|----*|-----|          |0101_010_011_111_010-{data}  [TRAPCC.W #<data>]
  1564:             //TPHS.W #<data>                                  |A|--2346|-|----*|-----|          |0101_010_011_111_010-{data}  [TRAPCC.W #<data>]
  1565:             //TPNCS.W #<data>                                 |A|--2346|-|----*|-----|          |0101_010_011_111_010-{data}  [TRAPCC.W #<data>]
  1566:             //TPNLO.W #<data>                                 |A|--2346|-|----*|-----|          |0101_010_011_111_010-{data}  [TRAPCC.W #<data>]
  1567:             //TRAPHS.W #<data>                                |A|--2346|-|----*|-----|          |0101_010_011_111_010-{data}  [TRAPCC.W #<data>]
  1568:             //TRAPNCS.W #<data>                               |A|--2346|-|----*|-----|          |0101_010_011_111_010-{data}  [TRAPCC.W #<data>]
  1569:             //TRAPNLO.W #<data>                               |A|--2346|-|----*|-----|          |0101_010_011_111_010-{data}  [TRAPCC.W #<data>]
  1570:             //TRAPCC.L #<data>                                |-|--2346|-|----*|-----|          |0101_010_011_111_011-{data}
  1571:             //TPCC.L #<data>                                  |A|--2346|-|----*|-----|          |0101_010_011_111_011-{data}  [TRAPCC.L #<data>]
  1572:             //TPHS.L #<data>                                  |A|--2346|-|----*|-----|          |0101_010_011_111_011-{data}  [TRAPCC.L #<data>]
  1573:             //TPNCS.L #<data>                                 |A|--2346|-|----*|-----|          |0101_010_011_111_011-{data}  [TRAPCC.L #<data>]
  1574:             //TPNLO.L #<data>                                 |A|--2346|-|----*|-----|          |0101_010_011_111_011-{data}  [TRAPCC.L #<data>]
  1575:             //TRAPHS.L #<data>                                |A|--2346|-|----*|-----|          |0101_010_011_111_011-{data}  [TRAPCC.L #<data>]
  1576:             //TRAPNCS.L #<data>                               |A|--2346|-|----*|-----|          |0101_010_011_111_011-{data}  [TRAPCC.L #<data>]
  1577:             //TRAPNLO.L #<data>                               |A|--2346|-|----*|-----|          |0101_010_011_111_011-{data}  [TRAPCC.L #<data>]
  1578:             //TRAPCC                                          |-|--2346|-|----*|-----|          |0101_010_011_111_100
  1579:             //TPCC                                            |A|--2346|-|----*|-----|          |0101_010_011_111_100 [TRAPCC]
  1580:             //TPHS                                            |A|--2346|-|----*|-----|          |0101_010_011_111_100 [TRAPCC]
  1581:             //TPNCS                                           |A|--2346|-|----*|-----|          |0101_010_011_111_100 [TRAPCC]
  1582:             //TPNLO                                           |A|--2346|-|----*|-----|          |0101_010_011_111_100 [TRAPCC]
  1583:             //TRAPHS                                          |A|--2346|-|----*|-----|          |0101_010_011_111_100 [TRAPCC]
  1584:             //TRAPNCS                                         |A|--2346|-|----*|-----|          |0101_010_011_111_100 [TRAPCC]
  1585:             //TRAPNLO                                         |A|--2346|-|----*|-----|          |0101_010_011_111_100 [TRAPCC]
  1586:           case 0b0101_010_011:
  1587:             irpShs ();
  1588:             break irpSwitch;
  1589: 
  1590:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  1591:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  1592:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  1593:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  1594:             //SCS.B <ea>                                      |-|012346|-|----*|-----|D M+-WXZ  |0101_010_111_mmm_rrr
  1595:             //SLO.B <ea>                                      |A|012346|-|----*|-----|D M+-WXZ  |0101_010_111_mmm_rrr [SCS.B <ea>]
  1596:             //SNCC.B <ea>                                     |A|012346|-|----*|-----|D M+-WXZ  |0101_010_111_mmm_rrr [SCS.B <ea>]
  1597:             //SNHS.B <ea>                                     |A|012346|-|----*|-----|D M+-WXZ  |0101_010_111_mmm_rrr [SCS.B <ea>]
  1598:             //DBCS.W Dr,<label>                               |-|012346|-|----*|-----|          |0101_010_111_001_rrr-{offset}
  1599:             //DBLO.W Dr,<label>                               |A|012346|-|----*|-----|          |0101_010_111_001_rrr-{offset}        [DBCS.W Dr,<label>]
  1600:             //DBNCC.W Dr,<label>                              |A|012346|-|----*|-----|          |0101_010_111_001_rrr-{offset}        [DBCS.W Dr,<label>]
  1601:             //DBNHS.W Dr,<label>                              |A|012346|-|----*|-----|          |0101_010_111_001_rrr-{offset}        [DBCS.W Dr,<label>]
  1602:             //TRAPCS.W #<data>                                |-|--2346|-|----*|-----|          |0101_010_111_111_010-{data}
  1603:             //TPCS.W #<data>                                  |A|--2346|-|----*|-----|          |0101_010_111_111_010-{data}  [TRAPCS.W #<data>]
  1604:             //TPLO.W #<data>                                  |A|--2346|-|----*|-----|          |0101_010_111_111_010-{data}  [TRAPCS.W #<data>]
  1605:             //TPNCC.W #<data>                                 |A|--2346|-|----*|-----|          |0101_010_111_111_010-{data}  [TRAPCS.W #<data>]
  1606:             //TPNHS.W #<data>                                 |A|--2346|-|----*|-----|          |0101_010_111_111_010-{data}  [TRAPCS.W #<data>]
  1607:             //TRAPLO.W #<data>                                |A|--2346|-|----*|-----|          |0101_010_111_111_010-{data}  [TRAPCS.W #<data>]
  1608:             //TRAPNCC.W #<data>                               |A|--2346|-|----*|-----|          |0101_010_111_111_010-{data}  [TRAPCS.W #<data>]
  1609:             //TRAPNHS.W #<data>                               |A|--2346|-|----*|-----|          |0101_010_111_111_010-{data}  [TRAPCS.W #<data>]
  1610:             //TRAPCS.L #<data>                                |-|--2346|-|----*|-----|          |0101_010_111_111_011-{data}
  1611:             //TPCS.L #<data>                                  |A|--2346|-|----*|-----|          |0101_010_111_111_011-{data}  [TRAPCS.L #<data>]
  1612:             //TPLO.L #<data>                                  |A|--2346|-|----*|-----|          |0101_010_111_111_011-{data}  [TRAPCS.L #<data>]
  1613:             //TPNCC.L #<data>                                 |A|--2346|-|----*|-----|          |0101_010_111_111_011-{data}  [TRAPCS.L #<data>]
  1614:             //TPNHS.L #<data>                                 |A|--2346|-|----*|-----|          |0101_010_111_111_011-{data}  [TRAPCS.L #<data>]
  1615:             //TRAPLO.L #<data>                                |A|--2346|-|----*|-----|          |0101_010_111_111_011-{data}  [TRAPCS.L #<data>]
  1616:             //TRAPNCC.L #<data>                               |A|--2346|-|----*|-----|          |0101_010_111_111_011-{data}  [TRAPCS.L #<data>]
  1617:             //TRAPNHS.L #<data>                               |A|--2346|-|----*|-----|          |0101_010_111_111_011-{data}  [TRAPCS.L #<data>]
  1618:             //TRAPCS                                          |-|--2346|-|----*|-----|          |0101_010_111_111_100
  1619:             //TPCS                                            |A|--2346|-|----*|-----|          |0101_010_111_111_100 [TRAPCS]
  1620:             //TPLO                                            |A|--2346|-|----*|-----|          |0101_010_111_111_100 [TRAPCS]
  1621:             //TPNCC                                           |A|--2346|-|----*|-----|          |0101_010_111_111_100 [TRAPCS]
  1622:             //TPNHS                                           |A|--2346|-|----*|-----|          |0101_010_111_111_100 [TRAPCS]
  1623:             //TRAPLO                                          |A|--2346|-|----*|-----|          |0101_010_111_111_100 [TRAPCS]
  1624:             //TRAPNCC                                         |A|--2346|-|----*|-----|          |0101_010_111_111_100 [TRAPCS]
  1625:             //TRAPNHS                                         |A|--2346|-|----*|-----|          |0101_010_111_111_100 [TRAPCS]
  1626:           case 0b0101_010_111:
  1627:             irpSlo ();
  1628:             break irpSwitch;
  1629: 
  1630:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  1631:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  1632:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  1633:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  1634:             //SNE.B <ea>                                      |-|012346|-|--*--|-----|D M+-WXZ  |0101_011_011_mmm_rrr
  1635:             //SNEQ.B <ea>                                     |A|012346|-|--*--|-----|D M+-WXZ  |0101_011_011_mmm_rrr [SNE.B <ea>]
  1636:             //SNZ.B <ea>                                      |A|012346|-|--*--|-----|D M+-WXZ  |0101_011_011_mmm_rrr [SNE.B <ea>]
  1637:             //SNZE.B <ea>                                     |A|012346|-|--*--|-----|D M+-WXZ  |0101_011_011_mmm_rrr [SNE.B <ea>]
  1638:             //DBNE.W Dr,<label>                               |-|012346|-|--*--|-----|          |0101_011_011_001_rrr-{offset}
  1639:             //DBNEQ.W Dr,<label>                              |A|012346|-|--*--|-----|          |0101_011_011_001_rrr-{offset}        [DBNE.W Dr,<label>]
  1640:             //DBNZ.W Dr,<label>                               |A|012346|-|--*--|-----|          |0101_011_011_001_rrr-{offset}        [DBNE.W Dr,<label>]
  1641:             //DBNZE.W Dr,<label>                              |A|012346|-|--*--|-----|          |0101_011_011_001_rrr-{offset}        [DBNE.W Dr,<label>]
  1642:             //TRAPNE.W #<data>                                |-|--2346|-|--*--|-----|          |0101_011_011_111_010-{data}
  1643:             //TPNE.W #<data>                                  |A|--2346|-|--*--|-----|          |0101_011_011_111_010-{data}  [TRAPNE.W #<data>]
  1644:             //TPNEQ.W #<data>                                 |A|--2346|-|--*--|-----|          |0101_011_011_111_010-{data}  [TRAPNE.W #<data>]
  1645:             //TPNZ.W #<data>                                  |A|--2346|-|--*--|-----|          |0101_011_011_111_010-{data}  [TRAPNE.W #<data>]
  1646:             //TPNZE.W #<data>                                 |A|--2346|-|--*--|-----|          |0101_011_011_111_010-{data}  [TRAPNE.W #<data>]
  1647:             //TRAPNEQ.W #<data>                               |A|--2346|-|--*--|-----|          |0101_011_011_111_010-{data}  [TRAPNE.W #<data>]
  1648:             //TRAPNZ.W #<data>                                |A|--2346|-|--*--|-----|          |0101_011_011_111_010-{data}  [TRAPNE.W #<data>]
  1649:             //TRAPNZE.W #<data>                               |A|--2346|-|--*--|-----|          |0101_011_011_111_010-{data}  [TRAPNE.W #<data>]
  1650:             //TRAPNE.L #<data>                                |-|--2346|-|--*--|-----|          |0101_011_011_111_011-{data}
  1651:             //TPNE.L #<data>                                  |A|--2346|-|--*--|-----|          |0101_011_011_111_011-{data}  [TRAPNE.L #<data>]
  1652:             //TPNEQ.L #<data>                                 |A|--2346|-|--*--|-----|          |0101_011_011_111_011-{data}  [TRAPNE.L #<data>]
  1653:             //TPNZ.L #<data>                                  |A|--2346|-|--*--|-----|          |0101_011_011_111_011-{data}  [TRAPNE.L #<data>]
  1654:             //TPNZE.L #<data>                                 |A|--2346|-|--*--|-----|          |0101_011_011_111_011-{data}  [TRAPNE.L #<data>]
  1655:             //TRAPNEQ.L #<data>                               |A|--2346|-|--*--|-----|          |0101_011_011_111_011-{data}  [TRAPNE.L #<data>]
  1656:             //TRAPNZ.L #<data>                                |A|--2346|-|--*--|-----|          |0101_011_011_111_011-{data}  [TRAPNE.L #<data>]
  1657:             //TRAPNZE.L #<data>                               |A|--2346|-|--*--|-----|          |0101_011_011_111_011-{data}  [TRAPNE.L #<data>]
  1658:             //TRAPNE                                          |-|--2346|-|--*--|-----|          |0101_011_011_111_100
  1659:             //TPNE                                            |A|--2346|-|--*--|-----|          |0101_011_011_111_100 [TRAPNE]
  1660:             //TPNEQ                                           |A|--2346|-|--*--|-----|          |0101_011_011_111_100 [TRAPNE]
  1661:             //TPNZ                                            |A|--2346|-|--*--|-----|          |0101_011_011_111_100 [TRAPNE]
  1662:             //TPNZE                                           |A|--2346|-|--*--|-----|          |0101_011_011_111_100 [TRAPNE]
  1663:             //TRAPNEQ                                         |A|--2346|-|--*--|-----|          |0101_011_011_111_100 [TRAPNE]
  1664:             //TRAPNZ                                          |A|--2346|-|--*--|-----|          |0101_011_011_111_100 [TRAPNE]
  1665:             //TRAPNZE                                         |A|--2346|-|--*--|-----|          |0101_011_011_111_100 [TRAPNE]
  1666:           case 0b0101_011_011:
  1667:             irpSne ();
  1668:             break irpSwitch;
  1669: 
  1670:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  1671:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  1672:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  1673:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  1674:             //SEQ.B <ea>                                      |-|012346|-|--*--|-----|D M+-WXZ  |0101_011_111_mmm_rrr
  1675:             //SNNE.B <ea>                                     |A|012346|-|--*--|-----|D M+-WXZ  |0101_011_111_mmm_rrr [SEQ.B <ea>]
  1676:             //SNNZ.B <ea>                                     |A|012346|-|--*--|-----|D M+-WXZ  |0101_011_111_mmm_rrr [SEQ.B <ea>]
  1677:             //SZE.B <ea>                                      |A|012346|-|--*--|-----|D M+-WXZ  |0101_011_111_mmm_rrr [SEQ.B <ea>]
  1678:             //DBEQ.W Dr,<label>                               |-|012346|-|--*--|-----|          |0101_011_111_001_rrr-{offset}
  1679:             //DBNNE.W Dr,<label>                              |A|012346|-|--*--|-----|          |0101_011_111_001_rrr-{offset}        [DBEQ.W Dr,<label>]
  1680:             //DBNNZ.W Dr,<label>                              |A|012346|-|--*--|-----|          |0101_011_111_001_rrr-{offset}        [DBEQ.W Dr,<label>]
  1681:             //DBZE.W Dr,<label>                               |A|012346|-|--*--|-----|          |0101_011_111_001_rrr-{offset}        [DBEQ.W Dr,<label>]
  1682:             //TRAPEQ.W #<data>                                |-|--2346|-|--*--|-----|          |0101_011_111_111_010-{data}
  1683:             //TPEQ.W #<data>                                  |A|--2346|-|--*--|-----|          |0101_011_111_111_010-{data}  [TRAPEQ.W #<data>]
  1684:             //TPNNE.W #<data>                                 |A|--2346|-|--*--|-----|          |0101_011_111_111_010-{data}  [TRAPEQ.W #<data>]
  1685:             //TPNNZ.W #<data>                                 |A|--2346|-|--*--|-----|          |0101_011_111_111_010-{data}  [TRAPEQ.W #<data>]
  1686:             //TPZE.W #<data>                                  |A|--2346|-|--*--|-----|          |0101_011_111_111_010-{data}  [TRAPEQ.W #<data>]
  1687:             //TRAPNNE.W #<data>                               |A|--2346|-|--*--|-----|          |0101_011_111_111_010-{data}  [TRAPEQ.W #<data>]
  1688:             //TRAPNNZ.W #<data>                               |A|--2346|-|--*--|-----|          |0101_011_111_111_010-{data}  [TRAPEQ.W #<data>]
  1689:             //TRAPZE.W #<data>                                |A|--2346|-|--*--|-----|          |0101_011_111_111_010-{data}  [TRAPEQ.W #<data>]
  1690:             //TRAPEQ.L #<data>                                |-|--2346|-|--*--|-----|          |0101_011_111_111_011-{data}
  1691:             //TPEQ.L #<data>                                  |A|--2346|-|--*--|-----|          |0101_011_111_111_011-{data}  [TRAPEQ.L #<data>]
  1692:             //TPNNE.L #<data>                                 |A|--2346|-|--*--|-----|          |0101_011_111_111_011-{data}  [TRAPEQ.L #<data>]
  1693:             //TPNNZ.L #<data>                                 |A|--2346|-|--*--|-----|          |0101_011_111_111_011-{data}  [TRAPEQ.L #<data>]
  1694:             //TPZE.L #<data>                                  |A|--2346|-|--*--|-----|          |0101_011_111_111_011-{data}  [TRAPEQ.L #<data>]
  1695:             //TRAPNNE.L #<data>                               |A|--2346|-|--*--|-----|          |0101_011_111_111_011-{data}  [TRAPEQ.L #<data>]
  1696:             //TRAPNNZ.L #<data>                               |A|--2346|-|--*--|-----|          |0101_011_111_111_011-{data}  [TRAPEQ.L #<data>]
  1697:             //TRAPZE.L #<data>                                |A|--2346|-|--*--|-----|          |0101_011_111_111_011-{data}  [TRAPEQ.L #<data>]
  1698:             //TRAPEQ                                          |-|--2346|-|--*--|-----|          |0101_011_111_111_100
  1699:             //TPEQ                                            |A|--2346|-|--*--|-----|          |0101_011_111_111_100 [TRAPEQ]
  1700:             //TPNNE                                           |A|--2346|-|--*--|-----|          |0101_011_111_111_100 [TRAPEQ]
  1701:             //TPNNZ                                           |A|--2346|-|--*--|-----|          |0101_011_111_111_100 [TRAPEQ]
  1702:             //TPZE                                            |A|--2346|-|--*--|-----|          |0101_011_111_111_100 [TRAPEQ]
  1703:             //TRAPNNE                                         |A|--2346|-|--*--|-----|          |0101_011_111_111_100 [TRAPEQ]
  1704:             //TRAPNNZ                                         |A|--2346|-|--*--|-----|          |0101_011_111_111_100 [TRAPEQ]
  1705:             //TRAPZE                                          |A|--2346|-|--*--|-----|          |0101_011_111_111_100 [TRAPEQ]
  1706:           case 0b0101_011_111:
  1707:             irpSeq ();
  1708:             break irpSwitch;
  1709: 
  1710:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  1711:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  1712:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  1713:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  1714:             //SVC.B <ea>                                      |-|012346|-|---*-|-----|D M+-WXZ  |0101_100_011_mmm_rrr
  1715:             //SNVS.B <ea>                                     |A|012346|-|---*-|-----|D M+-WXZ  |0101_100_011_mmm_rrr [SVC.B <ea>]
  1716:             //DBVC.W Dr,<label>                               |-|012346|-|---*-|-----|          |0101_100_011_001_rrr-{offset}
  1717:             //DBNVS.W Dr,<label>                              |A|012346|-|---*-|-----|          |0101_100_011_001_rrr-{offset}        [DBVC.W Dr,<label>]
  1718:             //TRAPVC.W #<data>                                |-|--2346|-|---*-|-----|          |0101_100_011_111_010-{data}
  1719:             //TPNVS.W #<data>                                 |A|--2346|-|---*-|-----|          |0101_100_011_111_010-{data}  [TRAPVC.W #<data>]
  1720:             //TPVC.W #<data>                                  |A|--2346|-|---*-|-----|          |0101_100_011_111_010-{data}  [TRAPVC.W #<data>]
  1721:             //TRAPNVS.W #<data>                               |A|--2346|-|---*-|-----|          |0101_100_011_111_010-{data}  [TRAPVC.W #<data>]
  1722:             //TRAPVC.L #<data>                                |-|--2346|-|---*-|-----|          |0101_100_011_111_011-{data}
  1723:             //TPNVS.L #<data>                                 |A|--2346|-|---*-|-----|          |0101_100_011_111_011-{data}  [TRAPVC.L #<data>]
  1724:             //TPVC.L #<data>                                  |A|--2346|-|---*-|-----|          |0101_100_011_111_011-{data}  [TRAPVC.L #<data>]
  1725:             //TRAPNVS.L #<data>                               |A|--2346|-|---*-|-----|          |0101_100_011_111_011-{data}  [TRAPVC.L #<data>]
  1726:             //TRAPVC                                          |-|--2346|-|---*-|-----|          |0101_100_011_111_100
  1727:             //TPNVS                                           |A|--2346|-|---*-|-----|          |0101_100_011_111_100 [TRAPVC]
  1728:             //TPVC                                            |A|--2346|-|---*-|-----|          |0101_100_011_111_100 [TRAPVC]
  1729:             //TRAPNVS                                         |A|--2346|-|---*-|-----|          |0101_100_011_111_100 [TRAPVC]
  1730:           case 0b0101_100_011:
  1731:             irpSvc ();
  1732:             break irpSwitch;
  1733: 
  1734:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  1735:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  1736:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  1737:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  1738:             //SVS.B <ea>                                      |-|012346|-|---*-|-----|D M+-WXZ  |0101_100_111_mmm_rrr
  1739:             //SNVC.B <ea>                                     |A|012346|-|---*-|-----|D M+-WXZ  |0101_100_111_mmm_rrr [SVS.B <ea>]
  1740:             //DBVS.W Dr,<label>                               |-|012346|-|---*-|-----|          |0101_100_111_001_rrr-{offset}
  1741:             //DBNVC.W Dr,<label>                              |A|012346|-|---*-|-----|          |0101_100_111_001_rrr-{offset}        [DBVS.W Dr,<label>]
  1742:             //TRAPVS.W #<data>                                |-|--2346|-|---*-|-----|          |0101_100_111_111_010-{data}
  1743:             //TPNVC.W #<data>                                 |A|--2346|-|---*-|-----|          |0101_100_111_111_010-{data}  [TRAPVS.W #<data>]
  1744:             //TPVS.W #<data>                                  |A|--2346|-|---*-|-----|          |0101_100_111_111_010-{data}  [TRAPVS.W #<data>]
  1745:             //TRAPNVC.W #<data>                               |A|--2346|-|---*-|-----|          |0101_100_111_111_010-{data}  [TRAPVS.W #<data>]
  1746:             //TRAPVS.L #<data>                                |-|--2346|-|---*-|-----|          |0101_100_111_111_011-{data}
  1747:             //TPNVC.L #<data>                                 |A|--2346|-|---*-|-----|          |0101_100_111_111_011-{data}  [TRAPVS.L #<data>]
  1748:             //TPVS.L #<data>                                  |A|--2346|-|---*-|-----|          |0101_100_111_111_011-{data}  [TRAPVS.L #<data>]
  1749:             //TRAPNVC.L #<data>                               |A|--2346|-|---*-|-----|          |0101_100_111_111_011-{data}  [TRAPVS.L #<data>]
  1750:             //TRAPVS                                          |-|--2346|-|---*-|-----|          |0101_100_111_111_100
  1751:             //TPNVC                                           |A|--2346|-|---*-|-----|          |0101_100_111_111_100 [TRAPVS]
  1752:             //TPVS                                            |A|--2346|-|---*-|-----|          |0101_100_111_111_100 [TRAPVS]
  1753:             //TRAPNVC                                         |A|--2346|-|---*-|-----|          |0101_100_111_111_100 [TRAPVS]
  1754:           case 0b0101_100_111:
  1755:             irpSvs ();
  1756:             break irpSwitch;
  1757: 
  1758:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  1759:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  1760:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  1761:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  1762:             //SPL.B <ea>                                      |-|012346|-|-*---|-----|D M+-WXZ  |0101_101_011_mmm_rrr
  1763:             //SNMI.B <ea>                                     |A|012346|-|-*---|-----|D M+-WXZ  |0101_101_011_mmm_rrr [SPL.B <ea>]
  1764:             //DBPL.W Dr,<label>                               |-|012346|-|-*---|-----|          |0101_101_011_001_rrr-{offset}
  1765:             //DBNMI.W Dr,<label>                              |A|012346|-|-*---|-----|          |0101_101_011_001_rrr-{offset}        [DBPL.W Dr,<label>]
  1766:             //TRAPPL.W #<data>                                |-|--2346|-|-*---|-----|          |0101_101_011_111_010-{data}
  1767:             //TPNMI.W #<data>                                 |A|--2346|-|-*---|-----|          |0101_101_011_111_010-{data}  [TRAPPL.W #<data>]
  1768:             //TPPL.W #<data>                                  |A|--2346|-|-*---|-----|          |0101_101_011_111_010-{data}  [TRAPPL.W #<data>]
  1769:             //TRAPNMI.W #<data>                               |A|--2346|-|-*---|-----|          |0101_101_011_111_010-{data}  [TRAPPL.W #<data>]
  1770:             //TRAPPL.L #<data>                                |-|--2346|-|-*---|-----|          |0101_101_011_111_011-{data}
  1771:             //TPNMI.L #<data>                                 |A|--2346|-|-*---|-----|          |0101_101_011_111_011-{data}  [TRAPPL.L #<data>]
  1772:             //TPPL.L #<data>                                  |A|--2346|-|-*---|-----|          |0101_101_011_111_011-{data}  [TRAPPL.L #<data>]
  1773:             //TRAPNMI.L #<data>                               |A|--2346|-|-*---|-----|          |0101_101_011_111_011-{data}  [TRAPPL.L #<data>]
  1774:             //TRAPPL                                          |-|--2346|-|-*---|-----|          |0101_101_011_111_100
  1775:             //TPNMI                                           |A|--2346|-|-*---|-----|          |0101_101_011_111_100 [TRAPPL]
  1776:             //TPPL                                            |A|--2346|-|-*---|-----|          |0101_101_011_111_100 [TRAPPL]
  1777:             //TRAPNMI                                         |A|--2346|-|-*---|-----|          |0101_101_011_111_100 [TRAPPL]
  1778:           case 0b0101_101_011:
  1779:             irpSpl ();
  1780:             break irpSwitch;
  1781: 
  1782:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  1783:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  1784:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  1785:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  1786:             //SMI.B <ea>                                      |-|012346|-|-*---|-----|D M+-WXZ  |0101_101_111_mmm_rrr
  1787:             //SNPL.B <ea>                                     |A|012346|-|-*---|-----|D M+-WXZ  |0101_101_111_mmm_rrr [SMI.B <ea>]
  1788:             //DBMI.W Dr,<label>                               |-|012346|-|-*---|-----|          |0101_101_111_001_rrr-{offset}
  1789:             //DBNPL.W Dr,<label>                              |A|012346|-|-*---|-----|          |0101_101_111_001_rrr-{offset}        [DBMI.W Dr,<label>]
  1790:             //TRAPMI.W #<data>                                |-|--2346|-|-*---|-----|          |0101_101_111_111_010-{data}
  1791:             //TPMI.W #<data>                                  |A|--2346|-|-*---|-----|          |0101_101_111_111_010-{data}  [TRAPMI.W #<data>]
  1792:             //TPNPL.W #<data>                                 |A|--2346|-|-*---|-----|          |0101_101_111_111_010-{data}  [TRAPMI.W #<data>]
  1793:             //TRAPNPL.W #<data>                               |A|--2346|-|-*---|-----|          |0101_101_111_111_010-{data}  [TRAPMI.W #<data>]
  1794:             //TRAPMI.L #<data>                                |-|--2346|-|-*---|-----|          |0101_101_111_111_011-{data}
  1795:             //TPMI.L #<data>                                  |A|--2346|-|-*---|-----|          |0101_101_111_111_011-{data}  [TRAPMI.L #<data>]
  1796:             //TPNPL.L #<data>                                 |A|--2346|-|-*---|-----|          |0101_101_111_111_011-{data}  [TRAPMI.L #<data>]
  1797:             //TRAPNPL.L #<data>                               |A|--2346|-|-*---|-----|          |0101_101_111_111_011-{data}  [TRAPMI.L #<data>]
  1798:             //TRAPMI                                          |-|--2346|-|-*---|-----|          |0101_101_111_111_100
  1799:             //TPMI                                            |A|--2346|-|-*---|-----|          |0101_101_111_111_100 [TRAPMI]
  1800:             //TPNPL                                           |A|--2346|-|-*---|-----|          |0101_101_111_111_100 [TRAPMI]
  1801:             //TRAPNPL                                         |A|--2346|-|-*---|-----|          |0101_101_111_111_100 [TRAPMI]
  1802:           case 0b0101_101_111:
  1803:             irpSmi ();
  1804:             break irpSwitch;
  1805: 
  1806:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  1807:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  1808:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  1809:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  1810:             //SGE.B <ea>                                      |-|012346|-|-*-*-|-----|D M+-WXZ  |0101_110_011_mmm_rrr
  1811:             //SNLT.B <ea>                                     |A|012346|-|-*-*-|-----|D M+-WXZ  |0101_110_011_mmm_rrr [SGE.B <ea>]
  1812:             //DBGE.W Dr,<label>                               |-|012346|-|-*-*-|-----|          |0101_110_011_001_rrr-{offset}
  1813:             //DBNLT.W Dr,<label>                              |A|012346|-|-*-*-|-----|          |0101_110_011_001_rrr-{offset}        [DBGE.W Dr,<label>]
  1814:             //TRAPGE.W #<data>                                |-|--2346|-|-*-*-|-----|          |0101_110_011_111_010-{data}
  1815:             //TPGE.W #<data>                                  |A|--2346|-|-*-*-|-----|          |0101_110_011_111_010-{data}  [TRAPGE.W #<data>]
  1816:             //TPNLT.W #<data>                                 |A|--2346|-|-*-*-|-----|          |0101_110_011_111_010-{data}  [TRAPGE.W #<data>]
  1817:             //TRAPNLT.W #<data>                               |A|--2346|-|-*-*-|-----|          |0101_110_011_111_010-{data}  [TRAPGE.W #<data>]
  1818:             //TRAPGE.L #<data>                                |-|--2346|-|-*-*-|-----|          |0101_110_011_111_011-{data}
  1819:             //TPGE.L #<data>                                  |A|--2346|-|-*-*-|-----|          |0101_110_011_111_011-{data}  [TRAPGE.L #<data>]
  1820:             //TPNLT.L #<data>                                 |A|--2346|-|-*-*-|-----|          |0101_110_011_111_011-{data}  [TRAPGE.L #<data>]
  1821:             //TRAPNLT.L #<data>                               |A|--2346|-|-*-*-|-----|          |0101_110_011_111_011-{data}  [TRAPGE.L #<data>]
  1822:             //TRAPGE                                          |-|--2346|-|-*-*-|-----|          |0101_110_011_111_100
  1823:             //TPGE                                            |A|--2346|-|-*-*-|-----|          |0101_110_011_111_100 [TRAPGE]
  1824:             //TPNLT                                           |A|--2346|-|-*-*-|-----|          |0101_110_011_111_100 [TRAPGE]
  1825:             //TRAPNLT                                         |A|--2346|-|-*-*-|-----|          |0101_110_011_111_100 [TRAPGE]
  1826:           case 0b0101_110_011:
  1827:             irpSge ();
  1828:             break irpSwitch;
  1829: 
  1830:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  1831:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  1832:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  1833:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  1834:             //SLT.B <ea>                                      |-|012346|-|-*-*-|-----|D M+-WXZ  |0101_110_111_mmm_rrr
  1835:             //SNGE.B <ea>                                     |A|012346|-|-*-*-|-----|D M+-WXZ  |0101_110_111_mmm_rrr [SLT.B <ea>]
  1836:             //DBLT.W Dr,<label>                               |-|012346|-|-*-*-|-----|          |0101_110_111_001_rrr-{offset}
  1837:             //DBNGE.W Dr,<label>                              |A|012346|-|-*-*-|-----|          |0101_110_111_001_rrr-{offset}        [DBLT.W Dr,<label>]
  1838:             //TRAPLT.W #<data>                                |-|--2346|-|-*-*-|-----|          |0101_110_111_111_010-{data}
  1839:             //TPLT.W #<data>                                  |A|--2346|-|-*-*-|-----|          |0101_110_111_111_010-{data}  [TRAPLT.W #<data>]
  1840:             //TPNGE.W #<data>                                 |A|--2346|-|-*-*-|-----|          |0101_110_111_111_010-{data}  [TRAPLT.W #<data>]
  1841:             //TRAPNGE.W #<data>                               |A|--2346|-|-*-*-|-----|          |0101_110_111_111_010-{data}  [TRAPLT.W #<data>]
  1842:             //TRAPLT.L #<data>                                |-|--2346|-|-*-*-|-----|          |0101_110_111_111_011-{data}
  1843:             //TPLT.L #<data>                                  |A|--2346|-|-*-*-|-----|          |0101_110_111_111_011-{data}  [TRAPLT.L #<data>]
  1844:             //TPNGE.L #<data>                                 |A|--2346|-|-*-*-|-----|          |0101_110_111_111_011-{data}  [TRAPLT.L #<data>]
  1845:             //TRAPNGE.L #<data>                               |A|--2346|-|-*-*-|-----|          |0101_110_111_111_011-{data}  [TRAPLT.L #<data>]
  1846:             //TRAPLT                                          |-|--2346|-|-*-*-|-----|          |0101_110_111_111_100
  1847:             //TPLT                                            |A|--2346|-|-*-*-|-----|          |0101_110_111_111_100 [TRAPLT]
  1848:             //TPNGE                                           |A|--2346|-|-*-*-|-----|          |0101_110_111_111_100 [TRAPLT]
  1849:             //TRAPNGE                                         |A|--2346|-|-*-*-|-----|          |0101_110_111_111_100 [TRAPLT]
  1850:           case 0b0101_110_111:
  1851:             irpSlt ();
  1852:             break irpSwitch;
  1853: 
  1854:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  1855:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  1856:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  1857:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  1858:             //SGT.B <ea>                                      |-|012346|-|-***-|-----|D M+-WXZ  |0101_111_011_mmm_rrr
  1859:             //SNLE.B <ea>                                     |A|012346|-|-***-|-----|D M+-WXZ  |0101_111_011_mmm_rrr [SGT.B <ea>]
  1860:             //DBGT.W Dr,<label>                               |-|012346|-|-***-|-----|          |0101_111_011_001_rrr-{offset}
  1861:             //DBNLE.W Dr,<label>                              |A|012346|-|-***-|-----|          |0101_111_011_001_rrr-{offset}        [DBGT.W Dr,<label>]
  1862:             //TRAPGT.W #<data>                                |-|--2346|-|-***-|-----|          |0101_111_011_111_010-{data}
  1863:             //TPGT.W #<data>                                  |A|--2346|-|-***-|-----|          |0101_111_011_111_010-{data}  [TRAPGT.W #<data>]
  1864:             //TPNLE.W #<data>                                 |A|--2346|-|-***-|-----|          |0101_111_011_111_010-{data}  [TRAPGT.W #<data>]
  1865:             //TRAPNLE.W #<data>                               |A|--2346|-|-***-|-----|          |0101_111_011_111_010-{data}  [TRAPGT.W #<data>]
  1866:             //TRAPGT.L #<data>                                |-|--2346|-|-***-|-----|          |0101_111_011_111_011-{data}
  1867:             //TPGT.L #<data>                                  |A|--2346|-|-***-|-----|          |0101_111_011_111_011-{data}  [TRAPGT.L #<data>]
  1868:             //TPNLE.L #<data>                                 |A|--2346|-|-***-|-----|          |0101_111_011_111_011-{data}  [TRAPGT.L #<data>]
  1869:             //TRAPNLE.L #<data>                               |A|--2346|-|-***-|-----|          |0101_111_011_111_011-{data}  [TRAPGT.L #<data>]
  1870:             //TRAPGT                                          |-|--2346|-|-***-|-----|          |0101_111_011_111_100
  1871:             //TPGT                                            |A|--2346|-|-***-|-----|          |0101_111_011_111_100 [TRAPGT]
  1872:             //TPNLE                                           |A|--2346|-|-***-|-----|          |0101_111_011_111_100 [TRAPGT]
  1873:             //TRAPNLE                                         |A|--2346|-|-***-|-----|          |0101_111_011_111_100 [TRAPGT]
  1874:           case 0b0101_111_011:
  1875:             irpSgt ();
  1876:             break irpSwitch;
  1877: 
  1878:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  1879:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  1880:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  1881:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  1882:             //SLE.B <ea>                                      |-|012346|-|-***-|-----|D M+-WXZ  |0101_111_111_mmm_rrr
  1883:             //SNGT.B <ea>                                     |A|012346|-|-***-|-----|D M+-WXZ  |0101_111_111_mmm_rrr [SLE.B <ea>]
  1884:             //DBLE.W Dr,<label>                               |-|012346|-|-***-|-----|          |0101_111_111_001_rrr-{offset}
  1885:             //DBNGT.W Dr,<label>                              |A|012346|-|-***-|-----|          |0101_111_111_001_rrr-{offset}        [DBLE.W Dr,<label>]
  1886:             //TRAPLE.W #<data>                                |-|--2346|-|-***-|-----|          |0101_111_111_111_010-{data}
  1887:             //TPLE.W #<data>                                  |A|--2346|-|-***-|-----|          |0101_111_111_111_010-{data}  [TRAPLE.W #<data>]
  1888:             //TPNGT.W #<data>                                 |A|--2346|-|-***-|-----|          |0101_111_111_111_010-{data}  [TRAPLE.W #<data>]
  1889:             //TRAPNGT.W #<data>                               |A|--2346|-|-***-|-----|          |0101_111_111_111_010-{data}  [TRAPLE.W #<data>]
  1890:             //TRAPLE.L #<data>                                |-|--2346|-|-***-|-----|          |0101_111_111_111_011-{data}
  1891:             //TPLE.L #<data>                                  |A|--2346|-|-***-|-----|          |0101_111_111_111_011-{data}  [TRAPLE.L #<data>]
  1892:             //TPNGT.L #<data>                                 |A|--2346|-|-***-|-----|          |0101_111_111_111_011-{data}  [TRAPLE.L #<data>]
  1893:             //TRAPNGT.L #<data>                               |A|--2346|-|-***-|-----|          |0101_111_111_111_011-{data}  [TRAPLE.L #<data>]
  1894:             //TRAPLE                                          |-|--2346|-|-***-|-----|          |0101_111_111_111_100
  1895:             //TPLE                                            |A|--2346|-|-***-|-----|          |0101_111_111_111_100 [TRAPLE]
  1896:             //TPNGT                                           |A|--2346|-|-***-|-----|          |0101_111_111_111_100 [TRAPLE]
  1897:             //TRAPNGT                                         |A|--2346|-|-***-|-----|          |0101_111_111_111_100 [TRAPLE]
  1898:           case 0b0101_111_111:
  1899:             irpSle ();
  1900:             break irpSwitch;
  1901: 
  1902:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  1903:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  1904:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  1905:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  1906:             //BRA.W <label>                                   |-|012346|-|-----|-----|          |0110_000_000_000_000-{offset}
  1907:             //JBRA.W <label>                                  |A|012346|-|-----|-----|          |0110_000_000_000_000-{offset}        [BRA.W <label>]
  1908:             //BRA.S <label>                                   |-|012346|-|-----|-----|          |0110_000_000_sss_sss (s is not equal to 0)
  1909:             //JBRA.S <label>                                  |A|012346|-|-----|-----|          |0110_000_000_sss_sss (s is not equal to 0)   [BRA.S <label>]
  1910:           case 0b0110_000_000:
  1911:             irpBrasw ();
  1912:             break irpSwitch;
  1913: 
  1914:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  1915:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  1916:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  1917:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  1918:             //BRA.S <label>                                   |-|012346|-|-----|-----|          |0110_000_001_sss_sss
  1919:             //JBRA.S <label>                                  |A|012346|-|-----|-----|          |0110_000_001_sss_sss [BRA.S <label>]
  1920:           case 0b0110_000_001:
  1921:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  1922:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  1923:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  1924:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  1925:             //BRA.S <label>                                   |-|012346|-|-----|-----|          |0110_000_010_sss_sss
  1926:             //JBRA.S <label>                                  |A|012346|-|-----|-----|          |0110_000_010_sss_sss [BRA.S <label>]
  1927:           case 0b0110_000_010:
  1928:             irpBras ();
  1929:             break irpSwitch;
  1930: 
  1931:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  1932:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  1933:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  1934:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  1935:             //BRA.S <label>                                   |-|--2346|-|-----|-----|          |0110_000_011_sss_sss (s is not equal to 63)
  1936:             //JBRA.S <label>                                  |A|--2346|-|-----|-----|          |0110_000_011_sss_sss (s is not equal to 63)  [BRA.S <label>]
  1937:             //BRA.L <label>                                   |-|--2346|-|-----|-----|          |0110_000_011_111_111-{offset}
  1938:           case 0b0110_000_011:
  1939:             irpBrasl ();
  1940:             break irpSwitch;
  1941: 
  1942:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  1943:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  1944:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  1945:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  1946:             //BSR.W <label>                                   |-|012346|-|-----|-----|          |0110_000_100_000_000-{offset}
  1947:             //JBSR.W <label>                                  |A|012346|-|-----|-----|          |0110_000_100_000_000-{offset}        [BSR.W <label>]
  1948:             //BSR.S <label>                                   |-|012346|-|-----|-----|          |0110_000_100_sss_sss (s is not equal to 0)
  1949:             //JBSR.S <label>                                  |A|012346|-|-----|-----|          |0110_000_100_sss_sss (s is not equal to 0)   [BSR.S <label>]
  1950:           case 0b0110_000_100:
  1951:             irpBsrsw ();
  1952:             break irpSwitch;
  1953: 
  1954:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  1955:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  1956:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  1957:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  1958:             //BSR.S <label>                                   |-|012346|-|-----|-----|          |0110_000_101_sss_sss
  1959:             //JBSR.S <label>                                  |A|012346|-|-----|-----|          |0110_000_101_sss_sss [BSR.S <label>]
  1960:           case 0b0110_000_101:
  1961:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  1962:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  1963:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  1964:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  1965:             //BSR.S <label>                                   |-|012346|-|-----|-----|          |0110_000_110_sss_sss
  1966:             //JBSR.S <label>                                  |A|012346|-|-----|-----|          |0110_000_110_sss_sss [BSR.S <label>]
  1967:           case 0b0110_000_110:
  1968:             irpBsrs ();
  1969:             break irpSwitch;
  1970: 
  1971:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  1972:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  1973:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  1974:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  1975:             //BSR.S <label>                                   |-|--2346|-|-----|-----|          |0110_000_111_sss_sss (s is not equal to 63)
  1976:             //JBSR.S <label>                                  |A|--2346|-|-----|-----|          |0110_000_111_sss_sss (s is not equal to 63)  [BSR.S <label>]
  1977:             //BSR.L <label>                                   |-|--2346|-|-----|-----|          |0110_000_111_111_111-{offset}
  1978:           case 0b0110_000_111:
  1979:             irpBsrsl ();
  1980:             break irpSwitch;
  1981: 
  1982:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  1983:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  1984:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  1985:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  1986:             //BHI.W <label>                                   |-|012346|-|--*-*|-----|          |0110_001_000_000_000-{offset}
  1987:             //BNLS.W <label>                                  |A|012346|-|--*-*|-----|          |0110_001_000_000_000-{offset}        [BHI.W <label>]
  1988:             //JBHI.W <label>                                  |A|012346|-|--*-*|-----|          |0110_001_000_000_000-{offset}        [BHI.W <label>]
  1989:             //JBNLS.W <label>                                 |A|012346|-|--*-*|-----|          |0110_001_000_000_000-{offset}        [BHI.W <label>]
  1990:             //BHI.S <label>                                   |-|012346|-|--*-*|-----|          |0110_001_000_sss_sss (s is not equal to 0)
  1991:             //BNLS.S <label>                                  |A|012346|-|--*-*|-----|          |0110_001_000_sss_sss (s is not equal to 0)   [BHI.S <label>]
  1992:             //JBHI.S <label>                                  |A|012346|-|--*-*|-----|          |0110_001_000_sss_sss (s is not equal to 0)   [BHI.S <label>]
  1993:             //JBNLS.S <label>                                 |A|012346|-|--*-*|-----|          |0110_001_000_sss_sss (s is not equal to 0)   [BHI.S <label>]
  1994:             //JBLS.L <label>                                  |A|012346|-|--*-*|-----|          |0110_001_000_000_110-0100111011111001-{address}      [BHI.S (*)+8;JMP <label>]
  1995:             //JBNHI.L <label>                                 |A|012346|-|--*-*|-----|          |0110_001_000_000_110-0100111011111001-{address}      [BHI.S (*)+8;JMP <label>]
  1996:           case 0b0110_001_000:
  1997:             irpBhisw ();
  1998:             break irpSwitch;
  1999: 
  2000:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  2001:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  2002:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  2003:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  2004:             //BHI.S <label>                                   |-|012346|-|--*-*|-----|          |0110_001_001_sss_sss
  2005:             //BNLS.S <label>                                  |A|012346|-|--*-*|-----|          |0110_001_001_sss_sss [BHI.S <label>]
  2006:             //JBHI.S <label>                                  |A|012346|-|--*-*|-----|          |0110_001_001_sss_sss [BHI.S <label>]
  2007:             //JBNLS.S <label>                                 |A|012346|-|--*-*|-----|          |0110_001_001_sss_sss [BHI.S <label>]
  2008:           case 0b0110_001_001:
  2009:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  2010:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  2011:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  2012:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  2013:             //BHI.S <label>                                   |-|012346|-|--*-*|-----|          |0110_001_010_sss_sss
  2014:             //BNLS.S <label>                                  |A|012346|-|--*-*|-----|          |0110_001_010_sss_sss [BHI.S <label>]
  2015:             //JBHI.S <label>                                  |A|012346|-|--*-*|-----|          |0110_001_010_sss_sss [BHI.S <label>]
  2016:             //JBNLS.S <label>                                 |A|012346|-|--*-*|-----|          |0110_001_010_sss_sss [BHI.S <label>]
  2017:           case 0b0110_001_010:
  2018:             irpBhis ();
  2019:             break irpSwitch;
  2020: 
  2021:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  2022:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  2023:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  2024:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  2025:             //BHI.S <label>                                   |-|--2346|-|--*-*|-----|          |0110_001_011_sss_sss (s is not equal to 63)
  2026:             //BNLS.S <label>                                  |A|--2346|-|--*-*|-----|          |0110_001_011_sss_sss (s is not equal to 63)  [BHI.S <label>]
  2027:             //JBHI.S <label>                                  |A|--2346|-|--*-*|-----|          |0110_001_011_sss_sss (s is not equal to 63)  [BHI.S <label>]
  2028:             //JBNLS.S <label>                                 |A|--2346|-|--*-*|-----|          |0110_001_011_sss_sss (s is not equal to 63)  [BHI.S <label>]
  2029:             //BHI.L <label>                                   |-|--2346|-|--*-*|-----|          |0110_001_011_111_111-{offset}
  2030:             //BNLS.L <label>                                  |A|--2346|-|--*-*|-----|          |0110_001_011_111_111-{offset}        [BHI.L <label>]
  2031:           case 0b0110_001_011:
  2032:             irpBhisl ();
  2033:             break irpSwitch;
  2034: 
  2035:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  2036:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  2037:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  2038:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  2039:             //BLS.W <label>                                   |-|012346|-|--*-*|-----|          |0110_001_100_000_000-{offset}
  2040:             //BNHI.W <label>                                  |A|012346|-|--*-*|-----|          |0110_001_100_000_000-{offset}        [BLS.W <label>]
  2041:             //JBLS.W <label>                                  |A|012346|-|--*-*|-----|          |0110_001_100_000_000-{offset}        [BLS.W <label>]
  2042:             //JBNHI.W <label>                                 |A|012346|-|--*-*|-----|          |0110_001_100_000_000-{offset}        [BLS.W <label>]
  2043:             //BLS.S <label>                                   |-|012346|-|--*-*|-----|          |0110_001_100_sss_sss (s is not equal to 0)
  2044:             //BNHI.S <label>                                  |A|012346|-|--*-*|-----|          |0110_001_100_sss_sss (s is not equal to 0)   [BLS.S <label>]
  2045:             //JBLS.S <label>                                  |A|012346|-|--*-*|-----|          |0110_001_100_sss_sss (s is not equal to 0)   [BLS.S <label>]
  2046:             //JBNHI.S <label>                                 |A|012346|-|--*-*|-----|          |0110_001_100_sss_sss (s is not equal to 0)   [BLS.S <label>]
  2047:             //JBHI.L <label>                                  |A|012346|-|--*-*|-----|          |0110_001_100_000_110-0100111011111001-{address}      [BLS.S (*)+8;JMP <label>]
  2048:             //JBNLS.L <label>                                 |A|012346|-|--*-*|-----|          |0110_001_100_000_110-0100111011111001-{address}      [BLS.S (*)+8;JMP <label>]
  2049:           case 0b0110_001_100:
  2050:             irpBlssw ();
  2051:             break irpSwitch;
  2052: 
  2053:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  2054:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  2055:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  2056:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  2057:             //BLS.S <label>                                   |-|012346|-|--*-*|-----|          |0110_001_101_sss_sss
  2058:             //BNHI.S <label>                                  |A|012346|-|--*-*|-----|          |0110_001_101_sss_sss [BLS.S <label>]
  2059:             //JBLS.S <label>                                  |A|012346|-|--*-*|-----|          |0110_001_101_sss_sss [BLS.S <label>]
  2060:             //JBNHI.S <label>                                 |A|012346|-|--*-*|-----|          |0110_001_101_sss_sss [BLS.S <label>]
  2061:           case 0b0110_001_101:
  2062:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  2063:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  2064:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  2065:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  2066:             //BLS.S <label>                                   |-|012346|-|--*-*|-----|          |0110_001_110_sss_sss
  2067:             //BNHI.S <label>                                  |A|012346|-|--*-*|-----|          |0110_001_110_sss_sss [BLS.S <label>]
  2068:             //JBLS.S <label>                                  |A|012346|-|--*-*|-----|          |0110_001_110_sss_sss [BLS.S <label>]
  2069:             //JBNHI.S <label>                                 |A|012346|-|--*-*|-----|          |0110_001_110_sss_sss [BLS.S <label>]
  2070:           case 0b0110_001_110:
  2071:             irpBlss ();
  2072:             break irpSwitch;
  2073: 
  2074:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  2075:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  2076:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  2077:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  2078:             //BLS.S <label>                                   |-|--2346|-|--*-*|-----|          |0110_001_111_sss_sss (s is not equal to 63)
  2079:             //BNHI.S <label>                                  |A|--2346|-|--*-*|-----|          |0110_001_111_sss_sss (s is not equal to 63)  [BLS.S <label>]
  2080:             //JBLS.S <label>                                  |A|--2346|-|--*-*|-----|          |0110_001_111_sss_sss (s is not equal to 63)  [BLS.S <label>]
  2081:             //JBNHI.S <label>                                 |A|--2346|-|--*-*|-----|          |0110_001_111_sss_sss (s is not equal to 63)  [BLS.S <label>]
  2082:             //BLS.L <label>                                   |-|--2346|-|--*-*|-----|          |0110_001_111_111_111-{offset}
  2083:             //BNHI.L <label>                                  |A|--2346|-|--*-*|-----|          |0110_001_111_111_111-{offset}        [BLS.L <label>]
  2084:           case 0b0110_001_111:
  2085:             irpBlssl ();
  2086:             break irpSwitch;
  2087: 
  2088:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  2089:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  2090:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  2091:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  2092:             //BCC.W <label>                                   |-|012346|-|----*|-----|          |0110_010_000_000_000-{offset}
  2093:             //BHS.W <label>                                   |A|012346|-|----*|-----|          |0110_010_000_000_000-{offset}        [BCC.W <label>]
  2094:             //BNCS.W <label>                                  |A|012346|-|----*|-----|          |0110_010_000_000_000-{offset}        [BCC.W <label>]
  2095:             //BNLO.W <label>                                  |A|012346|-|----*|-----|          |0110_010_000_000_000-{offset}        [BCC.W <label>]
  2096:             //JBCC.W <label>                                  |A|012346|-|----*|-----|          |0110_010_000_000_000-{offset}        [BCC.W <label>]
  2097:             //JBHS.W <label>                                  |A|012346|-|----*|-----|          |0110_010_000_000_000-{offset}        [BCC.W <label>]
  2098:             //JBNCS.W <label>                                 |A|012346|-|----*|-----|          |0110_010_000_000_000-{offset}        [BCC.W <label>]
  2099:             //JBNLO.W <label>                                 |A|012346|-|----*|-----|          |0110_010_000_000_000-{offset}        [BCC.W <label>]
  2100:             //BCC.S <label>                                   |-|012346|-|----*|-----|          |0110_010_000_sss_sss (s is not equal to 0)
  2101:             //BHS.S <label>                                   |A|012346|-|----*|-----|          |0110_010_000_sss_sss (s is not equal to 0)   [BCC.S <label>]
  2102:             //BNCS.S <label>                                  |A|012346|-|----*|-----|          |0110_010_000_sss_sss (s is not equal to 0)   [BCC.S <label>]
  2103:             //BNLO.S <label>                                  |A|012346|-|----*|-----|          |0110_010_000_sss_sss (s is not equal to 0)   [BCC.S <label>]
  2104:             //JBCC.S <label>                                  |A|012346|-|----*|-----|          |0110_010_000_sss_sss (s is not equal to 0)   [BCC.S <label>]
  2105:             //JBHS.S <label>                                  |A|012346|-|----*|-----|          |0110_010_000_sss_sss (s is not equal to 0)   [BCC.S <label>]
  2106:             //JBNCS.S <label>                                 |A|012346|-|----*|-----|          |0110_010_000_sss_sss (s is not equal to 0)   [BCC.S <label>]
  2107:             //JBNLO.S <label>                                 |A|012346|-|----*|-----|          |0110_010_000_sss_sss (s is not equal to 0)   [BCC.S <label>]
  2108:             //JBCS.L <label>                                  |A|012346|-|----*|-----|          |0110_010_000_000_110-0100111011111001-{address}      [BCC.S (*)+8;JMP <label>]
  2109:             //JBLO.L <label>                                  |A|012346|-|----*|-----|          |0110_010_000_000_110-0100111011111001-{address}      [BCC.S (*)+8;JMP <label>]
  2110:             //JBNCC.L <label>                                 |A|012346|-|----*|-----|          |0110_010_000_000_110-0100111011111001-{address}      [BCC.S (*)+8;JMP <label>]
  2111:             //JBNHS.L <label>                                 |A|012346|-|----*|-----|          |0110_010_000_000_110-0100111011111001-{address}      [BCC.S (*)+8;JMP <label>]
  2112:           case 0b0110_010_000:
  2113:             irpBhssw ();
  2114:             break irpSwitch;
  2115: 
  2116:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  2117:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  2118:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  2119:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  2120:             //BCC.S <label>                                   |-|012346|-|----*|-----|          |0110_010_001_sss_sss
  2121:             //BHS.S <label>                                   |A|012346|-|----*|-----|          |0110_010_001_sss_sss [BCC.S <label>]
  2122:             //BNCS.S <label>                                  |A|012346|-|----*|-----|          |0110_010_001_sss_sss [BCC.S <label>]
  2123:             //BNLO.S <label>                                  |A|012346|-|----*|-----|          |0110_010_001_sss_sss [BCC.S <label>]
  2124:             //JBCC.S <label>                                  |A|012346|-|----*|-----|          |0110_010_001_sss_sss [BCC.S <label>]
  2125:             //JBHS.S <label>                                  |A|012346|-|----*|-----|          |0110_010_001_sss_sss [BCC.S <label>]
  2126:             //JBNCS.S <label>                                 |A|012346|-|----*|-----|          |0110_010_001_sss_sss [BCC.S <label>]
  2127:             //JBNLO.S <label>                                 |A|012346|-|----*|-----|          |0110_010_001_sss_sss [BCC.S <label>]
  2128:           case 0b0110_010_001:
  2129:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  2130:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  2131:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  2132:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  2133:             //BCC.S <label>                                   |-|012346|-|----*|-----|          |0110_010_010_sss_sss
  2134:             //BHS.S <label>                                   |A|012346|-|----*|-----|          |0110_010_010_sss_sss [BCC.S <label>]
  2135:             //BNCS.S <label>                                  |A|012346|-|----*|-----|          |0110_010_010_sss_sss [BCC.S <label>]
  2136:             //BNLO.S <label>                                  |A|012346|-|----*|-----|          |0110_010_010_sss_sss [BCC.S <label>]
  2137:             //JBCC.S <label>                                  |A|012346|-|----*|-----|          |0110_010_010_sss_sss [BCC.S <label>]
  2138:             //JBHS.S <label>                                  |A|012346|-|----*|-----|          |0110_010_010_sss_sss [BCC.S <label>]
  2139:             //JBNCS.S <label>                                 |A|012346|-|----*|-----|          |0110_010_010_sss_sss [BCC.S <label>]
  2140:             //JBNLO.S <label>                                 |A|012346|-|----*|-----|          |0110_010_010_sss_sss [BCC.S <label>]
  2141:           case 0b0110_010_010:
  2142:             irpBhss ();
  2143:             break irpSwitch;
  2144: 
  2145:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  2146:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  2147:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  2148:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  2149:             //BCC.S <label>                                   |-|--2346|-|----*|-----|          |0110_010_011_sss_sss (s is not equal to 63)
  2150:             //BHS.S <label>                                   |A|--2346|-|----*|-----|          |0110_010_011_sss_sss (s is not equal to 63)  [BCC.S <label>]
  2151:             //BNCS.S <label>                                  |A|--2346|-|----*|-----|          |0110_010_011_sss_sss (s is not equal to 63)  [BCC.S <label>]
  2152:             //BNLO.S <label>                                  |A|--2346|-|----*|-----|          |0110_010_011_sss_sss (s is not equal to 63)  [BCC.S <label>]
  2153:             //JBCC.S <label>                                  |A|--2346|-|----*|-----|          |0110_010_011_sss_sss (s is not equal to 63)  [BCC.S <label>]
  2154:             //JBHS.S <label>                                  |A|--2346|-|----*|-----|          |0110_010_011_sss_sss (s is not equal to 63)  [BCC.S <label>]
  2155:             //JBNCS.S <label>                                 |A|--2346|-|----*|-----|          |0110_010_011_sss_sss (s is not equal to 63)  [BCC.S <label>]
  2156:             //JBNLO.S <label>                                 |A|--2346|-|----*|-----|          |0110_010_011_sss_sss (s is not equal to 63)  [BCC.S <label>]
  2157:             //BCC.L <label>                                   |-|--2346|-|----*|-----|          |0110_010_011_111_111-{offset}
  2158:             //BHS.L <label>                                   |A|--2346|-|----*|-----|          |0110_010_011_111_111-{offset}        [BCC.L <label>]
  2159:             //BNCS.L <label>                                  |A|--2346|-|----*|-----|          |0110_010_011_111_111-{offset}        [BCC.L <label>]
  2160:             //BNLO.L <label>                                  |A|--2346|-|----*|-----|          |0110_010_011_111_111-{offset}        [BCC.L <label>]
  2161:           case 0b0110_010_011:
  2162:             irpBhssl ();
  2163:             break irpSwitch;
  2164: 
  2165:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  2166:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  2167:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  2168:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  2169:             //BCS.W <label>                                   |-|012346|-|----*|-----|          |0110_010_100_000_000-{offset}
  2170:             //BLO.W <label>                                   |A|012346|-|----*|-----|          |0110_010_100_000_000-{offset}        [BCS.W <label>]
  2171:             //BNCC.W <label>                                  |A|012346|-|----*|-----|          |0110_010_100_000_000-{offset}        [BCS.W <label>]
  2172:             //BNHS.W <label>                                  |A|012346|-|----*|-----|          |0110_010_100_000_000-{offset}        [BCS.W <label>]
  2173:             //JBCS.W <label>                                  |A|012346|-|----*|-----|          |0110_010_100_000_000-{offset}        [BCS.W <label>]
  2174:             //JBLO.W <label>                                  |A|012346|-|----*|-----|          |0110_010_100_000_000-{offset}        [BCS.W <label>]
  2175:             //JBNCC.W <label>                                 |A|012346|-|----*|-----|          |0110_010_100_000_000-{offset}        [BCS.W <label>]
  2176:             //JBNHS.W <label>                                 |A|012346|-|----*|-----|          |0110_010_100_000_000-{offset}        [BCS.W <label>]
  2177:             //BCS.S <label>                                   |-|012346|-|----*|-----|          |0110_010_100_sss_sss (s is not equal to 0)
  2178:             //BLO.S <label>                                   |A|012346|-|----*|-----|          |0110_010_100_sss_sss (s is not equal to 0)   [BCS.S <label>]
  2179:             //BNCC.S <label>                                  |A|012346|-|----*|-----|          |0110_010_100_sss_sss (s is not equal to 0)   [BCS.S <label>]
  2180:             //BNHS.S <label>                                  |A|012346|-|----*|-----|          |0110_010_100_sss_sss (s is not equal to 0)   [BCS.S <label>]
  2181:             //JBCS.S <label>                                  |A|012346|-|----*|-----|          |0110_010_100_sss_sss (s is not equal to 0)   [BCS.S <label>]
  2182:             //JBLO.S <label>                                  |A|012346|-|----*|-----|          |0110_010_100_sss_sss (s is not equal to 0)   [BCS.S <label>]
  2183:             //JBNCC.S <label>                                 |A|012346|-|----*|-----|          |0110_010_100_sss_sss (s is not equal to 0)   [BCS.S <label>]
  2184:             //JBNHS.S <label>                                 |A|012346|-|----*|-----|          |0110_010_100_sss_sss (s is not equal to 0)   [BCS.S <label>]
  2185:             //JBCC.L <label>                                  |A|012346|-|----*|-----|          |0110_010_100_000_110-0100111011111001-{address}      [BCS.S (*)+8;JMP <label>]
  2186:             //JBHS.L <label>                                  |A|012346|-|----*|-----|          |0110_010_100_000_110-0100111011111001-{address}      [BCS.S (*)+8;JMP <label>]
  2187:             //JBNCS.L <label>                                 |A|012346|-|----*|-----|          |0110_010_100_000_110-0100111011111001-{address}      [BCS.S (*)+8;JMP <label>]
  2188:             //JBNLO.L <label>                                 |A|012346|-|----*|-----|          |0110_010_100_000_110-0100111011111001-{address}      [BCS.S (*)+8;JMP <label>]
  2189:           case 0b0110_010_100:
  2190:             irpBlosw ();
  2191:             break irpSwitch;
  2192: 
  2193:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  2194:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  2195:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  2196:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  2197:             //BCS.S <label>                                   |-|012346|-|----*|-----|          |0110_010_101_sss_sss
  2198:             //BLO.S <label>                                   |A|012346|-|----*|-----|          |0110_010_101_sss_sss [BCS.S <label>]
  2199:             //BNCC.S <label>                                  |A|012346|-|----*|-----|          |0110_010_101_sss_sss [BCS.S <label>]
  2200:             //BNHS.S <label>                                  |A|012346|-|----*|-----|          |0110_010_101_sss_sss [BCS.S <label>]
  2201:             //JBCS.S <label>                                  |A|012346|-|----*|-----|          |0110_010_101_sss_sss [BCS.S <label>]
  2202:             //JBLO.S <label>                                  |A|012346|-|----*|-----|          |0110_010_101_sss_sss [BCS.S <label>]
  2203:             //JBNCC.S <label>                                 |A|012346|-|----*|-----|          |0110_010_101_sss_sss [BCS.S <label>]
  2204:             //JBNHS.S <label>                                 |A|012346|-|----*|-----|          |0110_010_101_sss_sss [BCS.S <label>]
  2205:           case 0b0110_010_101:
  2206:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  2207:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  2208:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  2209:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  2210:             //BCS.S <label>                                   |-|012346|-|----*|-----|          |0110_010_110_sss_sss
  2211:             //BLO.S <label>                                   |A|012346|-|----*|-----|          |0110_010_110_sss_sss [BCS.S <label>]
  2212:             //BNCC.S <label>                                  |A|012346|-|----*|-----|          |0110_010_110_sss_sss [BCS.S <label>]
  2213:             //BNHS.S <label>                                  |A|012346|-|----*|-----|          |0110_010_110_sss_sss [BCS.S <label>]
  2214:             //JBCS.S <label>                                  |A|012346|-|----*|-----|          |0110_010_110_sss_sss [BCS.S <label>]
  2215:             //JBLO.S <label>                                  |A|012346|-|----*|-----|          |0110_010_110_sss_sss [BCS.S <label>]
  2216:             //JBNCC.S <label>                                 |A|012346|-|----*|-----|          |0110_010_110_sss_sss [BCS.S <label>]
  2217:             //JBNHS.S <label>                                 |A|012346|-|----*|-----|          |0110_010_110_sss_sss [BCS.S <label>]
  2218:           case 0b0110_010_110:
  2219:             irpBlos ();
  2220:             break irpSwitch;
  2221: 
  2222:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  2223:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  2224:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  2225:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  2226:             //BCS.S <label>                                   |-|--2346|-|----*|-----|          |0110_010_111_sss_sss (s is not equal to 63)
  2227:             //BLO.S <label>                                   |A|--2346|-|----*|-----|          |0110_010_111_sss_sss (s is not equal to 63)  [BCS.S <label>]
  2228:             //BNCC.S <label>                                  |A|--2346|-|----*|-----|          |0110_010_111_sss_sss (s is not equal to 63)  [BCS.S <label>]
  2229:             //BNHS.S <label>                                  |A|--2346|-|----*|-----|          |0110_010_111_sss_sss (s is not equal to 63)  [BCS.S <label>]
  2230:             //JBCS.S <label>                                  |A|--2346|-|----*|-----|          |0110_010_111_sss_sss (s is not equal to 63)  [BCS.S <label>]
  2231:             //JBLO.S <label>                                  |A|--2346|-|----*|-----|          |0110_010_111_sss_sss (s is not equal to 63)  [BCS.S <label>]
  2232:             //JBNCC.S <label>                                 |A|--2346|-|----*|-----|          |0110_010_111_sss_sss (s is not equal to 63)  [BCS.S <label>]
  2233:             //JBNHS.S <label>                                 |A|--2346|-|----*|-----|          |0110_010_111_sss_sss (s is not equal to 63)  [BCS.S <label>]
  2234:             //BCS.L <label>                                   |-|--2346|-|----*|-----|          |0110_010_111_111_111-{offset}
  2235:             //BLO.L <label>                                   |A|--2346|-|----*|-----|          |0110_010_111_111_111-{offset}        [BCS.L <label>]
  2236:             //BNCC.L <label>                                  |A|--2346|-|----*|-----|          |0110_010_111_111_111-{offset}        [BCS.L <label>]
  2237:             //BNHS.L <label>                                  |A|--2346|-|----*|-----|          |0110_010_111_111_111-{offset}        [BCS.L <label>]
  2238:           case 0b0110_010_111:
  2239:             irpBlosl ();
  2240:             break irpSwitch;
  2241: 
  2242:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  2243:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  2244:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  2245:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  2246:             //BNE.W <label>                                   |-|012346|-|--*--|-----|          |0110_011_000_000_000-{offset}
  2247:             //BNEQ.W <label>                                  |A|012346|-|--*--|-----|          |0110_011_000_000_000-{offset}        [BNE.W <label>]
  2248:             //BNZ.W <label>                                   |A|012346|-|--*--|-----|          |0110_011_000_000_000-{offset}        [BNE.W <label>]
  2249:             //BNZE.W <label>                                  |A|012346|-|--*--|-----|          |0110_011_000_000_000-{offset}        [BNE.W <label>]
  2250:             //JBNE.W <label>                                  |A|012346|-|--*--|-----|          |0110_011_000_000_000-{offset}        [BNE.W <label>]
  2251:             //JBNEQ.W <label>                                 |A|012346|-|--*--|-----|          |0110_011_000_000_000-{offset}        [BNE.W <label>]
  2252:             //JBNZ.W <label>                                  |A|012346|-|--*--|-----|          |0110_011_000_000_000-{offset}        [BNE.W <label>]
  2253:             //JBNZE.W <label>                                 |A|012346|-|--*--|-----|          |0110_011_000_000_000-{offset}        [BNE.W <label>]
  2254:             //BNE.S <label>                                   |-|012346|-|--*--|-----|          |0110_011_000_sss_sss (s is not equal to 0)
  2255:             //BNEQ.S <label>                                  |A|012346|-|--*--|-----|          |0110_011_000_sss_sss (s is not equal to 0)   [BNE.S <label>]
  2256:             //BNZ.S <label>                                   |A|012346|-|--*--|-----|          |0110_011_000_sss_sss (s is not equal to 0)   [BNE.S <label>]
  2257:             //BNZE.S <label>                                  |A|012346|-|--*--|-----|          |0110_011_000_sss_sss (s is not equal to 0)   [BNE.S <label>]
  2258:             //JBNE.S <label>                                  |A|012346|-|--*--|-----|          |0110_011_000_sss_sss (s is not equal to 0)   [BNE.S <label>]
  2259:             //JBNEQ.S <label>                                 |A|012346|-|--*--|-----|          |0110_011_000_sss_sss (s is not equal to 0)   [BNE.S <label>]
  2260:             //JBNZ.S <label>                                  |A|012346|-|--*--|-----|          |0110_011_000_sss_sss (s is not equal to 0)   [BNE.S <label>]
  2261:             //JBNZE.S <label>                                 |A|012346|-|--*--|-----|          |0110_011_000_sss_sss (s is not equal to 0)   [BNE.S <label>]
  2262:             //JBEQ.L <label>                                  |A|012346|-|--*--|-----|          |0110_011_000_000_110-0100111011111001-{address}      [BNE.S (*)+8;JMP <label>]
  2263:             //JBNEQ.L <label>                                 |A|012346|-|--*--|-----|          |0110_011_000_000_110-0100111011111001-{address}      [BNE.S (*)+8;JMP <label>]
  2264:             //JBNNE.L <label>                                 |A|012346|-|--*--|-----|          |0110_011_000_000_110-0100111011111001-{address}      [BNE.S (*)+8;JMP <label>]
  2265:             //JBNNZ.L <label>                                 |A|012346|-|--*--|-----|          |0110_011_000_000_110-0100111011111001-{address}      [BNE.S (*)+8;JMP <label>]
  2266:             //JBNZ.L <label>                                  |A|012346|-|--*--|-----|          |0110_011_000_000_110-0100111011111001-{address}      [BNE.S (*)+8;JMP <label>]
  2267:             //JBNZE.L <label>                                 |A|012346|-|--*--|-----|          |0110_011_000_000_110-0100111011111001-{address}      [BNE.S (*)+8;JMP <label>]
  2268:             //JBZE.L <label>                                  |A|012346|-|--*--|-----|          |0110_011_000_000_110-0100111011111001-{address}      [BNE.S (*)+8;JMP <label>]
  2269:           case 0b0110_011_000:
  2270:             irpBnesw ();
  2271:             break irpSwitch;
  2272: 
  2273:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  2274:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  2275:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  2276:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  2277:             //BNE.S <label>                                   |-|012346|-|--*--|-----|          |0110_011_001_sss_sss
  2278:             //BNEQ.S <label>                                  |A|012346|-|--*--|-----|          |0110_011_001_sss_sss [BNE.S <label>]
  2279:             //BNZ.S <label>                                   |A|012346|-|--*--|-----|          |0110_011_001_sss_sss [BNE.S <label>]
  2280:             //BNZE.S <label>                                  |A|012346|-|--*--|-----|          |0110_011_001_sss_sss [BNE.S <label>]
  2281:             //JBNE.S <label>                                  |A|012346|-|--*--|-----|          |0110_011_001_sss_sss [BNE.S <label>]
  2282:             //JBNEQ.S <label>                                 |A|012346|-|--*--|-----|          |0110_011_001_sss_sss [BNE.S <label>]
  2283:             //JBNZ.S <label>                                  |A|012346|-|--*--|-----|          |0110_011_001_sss_sss [BNE.S <label>]
  2284:             //JBNZE.S <label>                                 |A|012346|-|--*--|-----|          |0110_011_001_sss_sss [BNE.S <label>]
  2285:           case 0b0110_011_001:
  2286:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  2287:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  2288:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  2289:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  2290:             //BNE.S <label>                                   |-|012346|-|--*--|-----|          |0110_011_010_sss_sss
  2291:             //BNEQ.S <label>                                  |A|012346|-|--*--|-----|          |0110_011_010_sss_sss [BNE.S <label>]
  2292:             //BNZ.S <label>                                   |A|012346|-|--*--|-----|          |0110_011_010_sss_sss [BNE.S <label>]
  2293:             //BNZE.S <label>                                  |A|012346|-|--*--|-----|          |0110_011_010_sss_sss [BNE.S <label>]
  2294:             //JBNE.S <label>                                  |A|012346|-|--*--|-----|          |0110_011_010_sss_sss [BNE.S <label>]
  2295:             //JBNEQ.S <label>                                 |A|012346|-|--*--|-----|          |0110_011_010_sss_sss [BNE.S <label>]
  2296:             //JBNZ.S <label>                                  |A|012346|-|--*--|-----|          |0110_011_010_sss_sss [BNE.S <label>]
  2297:             //JBNZE.S <label>                                 |A|012346|-|--*--|-----|          |0110_011_010_sss_sss [BNE.S <label>]
  2298:           case 0b0110_011_010:
  2299:             irpBnes ();
  2300:             break irpSwitch;
  2301: 
  2302:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  2303:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  2304:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  2305:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  2306:             //BNE.S <label>                                   |-|--2346|-|--*--|-----|          |0110_011_011_sss_sss (s is not equal to 63)
  2307:             //BNEQ.S <label>                                  |A|--2346|-|--*--|-----|          |0110_011_011_sss_sss (s is not equal to 63)  [BNE.S <label>]
  2308:             //BNZ.S <label>                                   |A|--2346|-|--*--|-----|          |0110_011_011_sss_sss (s is not equal to 63)  [BNE.S <label>]
  2309:             //BNZE.S <label>                                  |A|--2346|-|--*--|-----|          |0110_011_011_sss_sss (s is not equal to 63)  [BNE.S <label>]
  2310:             //JBNE.S <label>                                  |A|--2346|-|--*--|-----|          |0110_011_011_sss_sss (s is not equal to 63)  [BNE.S <label>]
  2311:             //JBNEQ.S <label>                                 |A|--2346|-|--*--|-----|          |0110_011_011_sss_sss (s is not equal to 63)  [BNE.S <label>]
  2312:             //JBNZ.S <label>                                  |A|--2346|-|--*--|-----|          |0110_011_011_sss_sss (s is not equal to 63)  [BNE.S <label>]
  2313:             //JBNZE.S <label>                                 |A|--2346|-|--*--|-----|          |0110_011_011_sss_sss (s is not equal to 63)  [BNE.S <label>]
  2314:             //BNE.L <label>                                   |-|--2346|-|--*--|-----|          |0110_011_011_111_111-{offset}
  2315:             //BNEQ.L <label>                                  |A|--2346|-|--*--|-----|          |0110_011_011_111_111-{offset}        [BNE.L <label>]
  2316:             //BNZ.L <label>                                   |A|--2346|-|--*--|-----|          |0110_011_011_111_111-{offset}        [BNE.L <label>]
  2317:             //BNZE.L <label>                                  |A|--2346|-|--*--|-----|          |0110_011_011_111_111-{offset}        [BNE.L <label>]
  2318:           case 0b0110_011_011:
  2319:             irpBnesl ();
  2320:             break irpSwitch;
  2321: 
  2322:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  2323:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  2324:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  2325:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  2326:             //BEQ.W <label>                                   |-|012346|-|--*--|-----|          |0110_011_100_000_000-{offset}
  2327:             //BNNE.W <label>                                  |A|012346|-|--*--|-----|          |0110_011_100_000_000-{offset}        [BEQ.W <label>]
  2328:             //BNNZ.W <label>                                  |A|012346|-|--*--|-----|          |0110_011_100_000_000-{offset}        [BEQ.W <label>]
  2329:             //BZE.W <label>                                   |A|012346|-|--*--|-----|          |0110_011_100_000_000-{offset}        [BEQ.W <label>]
  2330:             //JBEQ.W <label>                                  |A|012346|-|--*--|-----|          |0110_011_100_000_000-{offset}        [BEQ.W <label>]
  2331:             //JBNNE.W <label>                                 |A|012346|-|--*--|-----|          |0110_011_100_000_000-{offset}        [BEQ.W <label>]
  2332:             //JBNNZ.W <label>                                 |A|012346|-|--*--|-----|          |0110_011_100_000_000-{offset}        [BEQ.W <label>]
  2333:             //JBZE.W <label>                                  |A|012346|-|--*--|-----|          |0110_011_100_000_000-{offset}        [BEQ.W <label>]
  2334:             //BEQ.S <label>                                   |-|012346|-|--*--|-----|          |0110_011_100_sss_sss (s is not equal to 0)
  2335:             //BNNE.S <label>                                  |A|012346|-|--*--|-----|          |0110_011_100_sss_sss (s is not equal to 0)   [BEQ.S <label>]
  2336:             //BNNZ.S <label>                                  |A|012346|-|--*--|-----|          |0110_011_100_sss_sss (s is not equal to 0)   [BEQ.S <label>]
  2337:             //BZE.S <label>                                   |A|012346|-|--*--|-----|          |0110_011_100_sss_sss (s is not equal to 0)   [BEQ.S <label>]
  2338:             //JBEQ.S <label>                                  |A|012346|-|--*--|-----|          |0110_011_100_sss_sss (s is not equal to 0)   [BEQ.S <label>]
  2339:             //JBNNE.S <label>                                 |A|012346|-|--*--|-----|          |0110_011_100_sss_sss (s is not equal to 0)   [BEQ.S <label>]
  2340:             //JBNNZ.S <label>                                 |A|012346|-|--*--|-----|          |0110_011_100_sss_sss (s is not equal to 0)   [BEQ.S <label>]
  2341:             //JBZE.S <label>                                  |A|012346|-|--*--|-----|          |0110_011_100_sss_sss (s is not equal to 0)   [BEQ.S <label>]
  2342:             //JBNE.L <label>                                  |A|012346|-|--*--|-----|          |0110_011_100_000_110-0100111011111001-{address}      [BEQ.S (*)+8;JMP <label>]
  2343:           case 0b0110_011_100:
  2344:             irpBeqsw ();
  2345:             break irpSwitch;
  2346: 
  2347:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  2348:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  2349:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  2350:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  2351:             //BEQ.S <label>                                   |-|012346|-|--*--|-----|          |0110_011_101_sss_sss
  2352:             //BNNE.S <label>                                  |A|012346|-|--*--|-----|          |0110_011_101_sss_sss [BEQ.S <label>]
  2353:             //BNNZ.S <label>                                  |A|012346|-|--*--|-----|          |0110_011_101_sss_sss [BEQ.S <label>]
  2354:             //BZE.S <label>                                   |A|012346|-|--*--|-----|          |0110_011_101_sss_sss [BEQ.S <label>]
  2355:             //JBEQ.S <label>                                  |A|012346|-|--*--|-----|          |0110_011_101_sss_sss [BEQ.S <label>]
  2356:             //JBNNE.S <label>                                 |A|012346|-|--*--|-----|          |0110_011_101_sss_sss [BEQ.S <label>]
  2357:             //JBNNZ.S <label>                                 |A|012346|-|--*--|-----|          |0110_011_101_sss_sss [BEQ.S <label>]
  2358:             //JBZE.S <label>                                  |A|012346|-|--*--|-----|          |0110_011_101_sss_sss [BEQ.S <label>]
  2359:           case 0b0110_011_101:
  2360:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  2361:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  2362:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  2363:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  2364:             //BEQ.S <label>                                   |-|012346|-|--*--|-----|          |0110_011_110_sss_sss
  2365:             //BNNE.S <label>                                  |A|012346|-|--*--|-----|          |0110_011_110_sss_sss [BEQ.S <label>]
  2366:             //BNNZ.S <label>                                  |A|012346|-|--*--|-----|          |0110_011_110_sss_sss [BEQ.S <label>]
  2367:             //BZE.S <label>                                   |A|012346|-|--*--|-----|          |0110_011_110_sss_sss [BEQ.S <label>]
  2368:             //JBEQ.S <label>                                  |A|012346|-|--*--|-----|          |0110_011_110_sss_sss [BEQ.S <label>]
  2369:             //JBNNE.S <label>                                 |A|012346|-|--*--|-----|          |0110_011_110_sss_sss [BEQ.S <label>]
  2370:             //JBNNZ.S <label>                                 |A|012346|-|--*--|-----|          |0110_011_110_sss_sss [BEQ.S <label>]
  2371:             //JBZE.S <label>                                  |A|012346|-|--*--|-----|          |0110_011_110_sss_sss [BEQ.S <label>]
  2372:           case 0b0110_011_110:
  2373:             irpBeqs ();
  2374:             break irpSwitch;
  2375: 
  2376:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  2377:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  2378:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  2379:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  2380:             //BEQ.S <label>                                   |-|--2346|-|--*--|-----|          |0110_011_111_sss_sss (s is not equal to 63)
  2381:             //BNNE.S <label>                                  |A|--2346|-|--*--|-----|          |0110_011_111_sss_sss (s is not equal to 63)  [BEQ.S <label>]
  2382:             //BNNZ.S <label>                                  |A|--2346|-|--*--|-----|          |0110_011_111_sss_sss (s is not equal to 63)  [BEQ.S <label>]
  2383:             //BZE.S <label>                                   |A|--2346|-|--*--|-----|          |0110_011_111_sss_sss (s is not equal to 63)  [BEQ.S <label>]
  2384:             //JBEQ.S <label>                                  |A|--2346|-|--*--|-----|          |0110_011_111_sss_sss (s is not equal to 63)  [BEQ.S <label>]
  2385:             //JBNNE.S <label>                                 |A|--2346|-|--*--|-----|          |0110_011_111_sss_sss (s is not equal to 63)  [BEQ.S <label>]
  2386:             //JBNNZ.S <label>                                 |A|--2346|-|--*--|-----|          |0110_011_111_sss_sss (s is not equal to 63)  [BEQ.S <label>]
  2387:             //JBZE.S <label>                                  |A|--2346|-|--*--|-----|          |0110_011_111_sss_sss (s is not equal to 63)  [BEQ.S <label>]
  2388:             //BEQ.L <label>                                   |-|--2346|-|--*--|-----|          |0110_011_111_111_111-{offset}
  2389:             //BNNE.L <label>                                  |A|--2346|-|--*--|-----|          |0110_011_111_111_111-{offset}        [BEQ.L <label>]
  2390:             //BNNZ.L <label>                                  |A|--2346|-|--*--|-----|          |0110_011_111_111_111-{offset}        [BEQ.L <label>]
  2391:             //BZE.L <label>                                   |A|--2346|-|--*--|-----|          |0110_011_111_111_111-{offset}        [BEQ.L <label>]
  2392:           case 0b0110_011_111:
  2393:             irpBeqsl ();
  2394:             break irpSwitch;
  2395: 
  2396:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  2397:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  2398:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  2399:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  2400:             //BVC.W <label>                                   |-|012346|-|---*-|-----|          |0110_100_000_000_000-{offset}
  2401:             //BNVS.W <label>                                  |A|012346|-|---*-|-----|          |0110_100_000_000_000-{offset}        [BVC.W <label>]
  2402:             //JBNVS.W <label>                                 |A|012346|-|---*-|-----|          |0110_100_000_000_000-{offset}        [BVC.W <label>]
  2403:             //JBVC.W <label>                                  |A|012346|-|---*-|-----|          |0110_100_000_000_000-{offset}        [BVC.W <label>]
  2404:             //BVC.S <label>                                   |-|012346|-|---*-|-----|          |0110_100_000_sss_sss (s is not equal to 0)
  2405:             //BNVS.S <label>                                  |A|012346|-|---*-|-----|          |0110_100_000_sss_sss (s is not equal to 0)   [BVC.S <label>]
  2406:             //JBNVS.S <label>                                 |A|012346|-|---*-|-----|          |0110_100_000_sss_sss (s is not equal to 0)   [BVC.S <label>]
  2407:             //JBVC.S <label>                                  |A|012346|-|---*-|-----|          |0110_100_000_sss_sss (s is not equal to 0)   [BVC.S <label>]
  2408:             //JBNVC.L <label>                                 |A|012346|-|---*-|-----|          |0110_100_000_000_110-0100111011111001-{address}      [BVC.S (*)+8;JMP <label>]
  2409:             //JBVS.L <label>                                  |A|012346|-|---*-|-----|          |0110_100_000_000_110-0100111011111001-{address}      [BVC.S (*)+8;JMP <label>]
  2410:           case 0b0110_100_000:
  2411:             irpBvcsw ();
  2412:             break irpSwitch;
  2413: 
  2414:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  2415:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  2416:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  2417:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  2418:             //BVC.S <label>                                   |-|012346|-|---*-|-----|          |0110_100_001_sss_sss
  2419:             //BNVS.S <label>                                  |A|012346|-|---*-|-----|          |0110_100_001_sss_sss [BVC.S <label>]
  2420:             //JBNVS.S <label>                                 |A|012346|-|---*-|-----|          |0110_100_001_sss_sss [BVC.S <label>]
  2421:             //JBVC.S <label>                                  |A|012346|-|---*-|-----|          |0110_100_001_sss_sss [BVC.S <label>]
  2422:           case 0b0110_100_001:
  2423:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  2424:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  2425:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  2426:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  2427:             //BVC.S <label>                                   |-|012346|-|---*-|-----|          |0110_100_010_sss_sss
  2428:             //BNVS.S <label>                                  |A|012346|-|---*-|-----|          |0110_100_010_sss_sss [BVC.S <label>]
  2429:             //JBNVS.S <label>                                 |A|012346|-|---*-|-----|          |0110_100_010_sss_sss [BVC.S <label>]
  2430:             //JBVC.S <label>                                  |A|012346|-|---*-|-----|          |0110_100_010_sss_sss [BVC.S <label>]
  2431:           case 0b0110_100_010:
  2432:             irpBvcs ();
  2433:             break irpSwitch;
  2434: 
  2435:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  2436:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  2437:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  2438:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  2439:             //BVC.S <label>                                   |-|--2346|-|---*-|-----|          |0110_100_011_sss_sss (s is not equal to 63)
  2440:             //BNVS.S <label>                                  |A|--2346|-|---*-|-----|          |0110_100_011_sss_sss (s is not equal to 63)  [BVC.S <label>]
  2441:             //JBNVS.S <label>                                 |A|--2346|-|---*-|-----|          |0110_100_011_sss_sss (s is not equal to 63)  [BVC.S <label>]
  2442:             //JBVC.S <label>                                  |A|--2346|-|---*-|-----|          |0110_100_011_sss_sss (s is not equal to 63)  [BVC.S <label>]
  2443:             //BVC.L <label>                                   |-|--2346|-|---*-|-----|          |0110_100_011_111_111-{offset}
  2444:             //BNVS.L <label>                                  |A|--2346|-|---*-|-----|          |0110_100_011_111_111-{offset}        [BVC.L <label>]
  2445:           case 0b0110_100_011:
  2446:             irpBvcsl ();
  2447:             break irpSwitch;
  2448: 
  2449:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  2450:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  2451:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  2452:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  2453:             //BVS.W <label>                                   |-|012346|-|---*-|-----|          |0110_100_100_000_000-{offset}
  2454:             //BNVC.W <label>                                  |A|012346|-|---*-|-----|          |0110_100_100_000_000-{offset}        [BVS.W <label>]
  2455:             //JBNVC.W <label>                                 |A|012346|-|---*-|-----|          |0110_100_100_000_000-{offset}        [BVS.W <label>]
  2456:             //JBVS.W <label>                                  |A|012346|-|---*-|-----|          |0110_100_100_000_000-{offset}        [BVS.W <label>]
  2457:             //BVS.S <label>                                   |-|012346|-|---*-|-----|          |0110_100_100_sss_sss (s is not equal to 0)
  2458:             //BNVC.S <label>                                  |A|012346|-|---*-|-----|          |0110_100_100_sss_sss (s is not equal to 0)   [BVS.S <label>]
  2459:             //JBNVC.S <label>                                 |A|012346|-|---*-|-----|          |0110_100_100_sss_sss (s is not equal to 0)   [BVS.S <label>]
  2460:             //JBVS.S <label>                                  |A|012346|-|---*-|-----|          |0110_100_100_sss_sss (s is not equal to 0)   [BVS.S <label>]
  2461:             //JBNVS.L <label>                                 |A|012346|-|---*-|-----|          |0110_100_100_000_110-0100111011111001-{address}      [BVS.S (*)+8;JMP <label>]
  2462:             //JBVC.L <label>                                  |A|012346|-|---*-|-----|          |0110_100_100_000_110-0100111011111001-{address}      [BVS.S (*)+8;JMP <label>]
  2463:           case 0b0110_100_100:
  2464:             irpBvssw ();
  2465:             break irpSwitch;
  2466: 
  2467:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  2468:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  2469:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  2470:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  2471:             //BVS.S <label>                                   |-|012346|-|---*-|-----|          |0110_100_101_sss_sss
  2472:             //BNVC.S <label>                                  |A|012346|-|---*-|-----|          |0110_100_101_sss_sss [BVS.S <label>]
  2473:             //JBNVC.S <label>                                 |A|012346|-|---*-|-----|          |0110_100_101_sss_sss [BVS.S <label>]
  2474:             //JBVS.S <label>                                  |A|012346|-|---*-|-----|          |0110_100_101_sss_sss [BVS.S <label>]
  2475:           case 0b0110_100_101:
  2476:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  2477:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  2478:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  2479:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  2480:             //BVS.S <label>                                   |-|012346|-|---*-|-----|          |0110_100_110_sss_sss
  2481:             //BNVC.S <label>                                  |A|012346|-|---*-|-----|          |0110_100_110_sss_sss [BVS.S <label>]
  2482:             //JBNVC.S <label>                                 |A|012346|-|---*-|-----|          |0110_100_110_sss_sss [BVS.S <label>]
  2483:             //JBVS.S <label>                                  |A|012346|-|---*-|-----|          |0110_100_110_sss_sss [BVS.S <label>]
  2484:           case 0b0110_100_110:
  2485:             irpBvss ();
  2486:             break irpSwitch;
  2487: 
  2488:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  2489:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  2490:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  2491:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  2492:             //BVS.S <label>                                   |-|--2346|-|---*-|-----|          |0110_100_111_sss_sss (s is not equal to 63)
  2493:             //BNVC.S <label>                                  |A|--2346|-|---*-|-----|          |0110_100_111_sss_sss (s is not equal to 63)  [BVS.S <label>]
  2494:             //JBNVC.S <label>                                 |A|--2346|-|---*-|-----|          |0110_100_111_sss_sss (s is not equal to 63)  [BVS.S <label>]
  2495:             //JBVS.S <label>                                  |A|--2346|-|---*-|-----|          |0110_100_111_sss_sss (s is not equal to 63)  [BVS.S <label>]
  2496:             //BVS.L <label>                                   |-|--2346|-|---*-|-----|          |0110_100_111_111_111-{offset}
  2497:             //BNVC.L <label>                                  |A|--2346|-|---*-|-----|          |0110_100_111_111_111-{offset}        [BVS.L <label>]
  2498:           case 0b0110_100_111:
  2499:             irpBvssl ();
  2500:             break irpSwitch;
  2501: 
  2502:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  2503:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  2504:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  2505:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  2506:             //BPL.W <label>                                   |-|012346|-|-*---|-----|          |0110_101_000_000_000-{offset}
  2507:             //BNMI.W <label>                                  |A|012346|-|-*---|-----|          |0110_101_000_000_000-{offset}        [BPL.W <label>]
  2508:             //JBNMI.W <label>                                 |A|012346|-|-*---|-----|          |0110_101_000_000_000-{offset}        [BPL.W <label>]
  2509:             //JBPL.W <label>                                  |A|012346|-|-*---|-----|          |0110_101_000_000_000-{offset}        [BPL.W <label>]
  2510:             //BPL.S <label>                                   |-|012346|-|-*---|-----|          |0110_101_000_sss_sss (s is not equal to 0)
  2511:             //BNMI.S <label>                                  |A|012346|-|-*---|-----|          |0110_101_000_sss_sss (s is not equal to 0)   [BPL.S <label>]
  2512:             //JBNMI.S <label>                                 |A|012346|-|-*---|-----|          |0110_101_000_sss_sss (s is not equal to 0)   [BPL.S <label>]
  2513:             //JBPL.S <label>                                  |A|012346|-|-*---|-----|          |0110_101_000_sss_sss (s is not equal to 0)   [BPL.S <label>]
  2514:             //JBMI.L <label>                                  |A|012346|-|-*---|-----|          |0110_101_000_000_110-0100111011111001-{address}      [BPL.S (*)+8;JMP <label>]
  2515:             //JBNPL.L <label>                                 |A|012346|-|-*---|-----|          |0110_101_000_000_110-0100111011111001-{address}      [BPL.S (*)+8;JMP <label>]
  2516:           case 0b0110_101_000:
  2517:             irpBplsw ();
  2518:             break irpSwitch;
  2519: 
  2520:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  2521:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  2522:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  2523:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  2524:             //BPL.S <label>                                   |-|012346|-|-*---|-----|          |0110_101_001_sss_sss
  2525:             //BNMI.S <label>                                  |A|012346|-|-*---|-----|          |0110_101_001_sss_sss [BPL.S <label>]
  2526:             //JBNMI.S <label>                                 |A|012346|-|-*---|-----|          |0110_101_001_sss_sss [BPL.S <label>]
  2527:             //JBPL.S <label>                                  |A|012346|-|-*---|-----|          |0110_101_001_sss_sss [BPL.S <label>]
  2528:           case 0b0110_101_001:
  2529:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  2530:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  2531:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  2532:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  2533:             //BPL.S <label>                                   |-|012346|-|-*---|-----|          |0110_101_010_sss_sss
  2534:             //BNMI.S <label>                                  |A|012346|-|-*---|-----|          |0110_101_010_sss_sss [BPL.S <label>]
  2535:             //JBNMI.S <label>                                 |A|012346|-|-*---|-----|          |0110_101_010_sss_sss [BPL.S <label>]
  2536:             //JBPL.S <label>                                  |A|012346|-|-*---|-----|          |0110_101_010_sss_sss [BPL.S <label>]
  2537:           case 0b0110_101_010:
  2538:             irpBpls ();
  2539:             break irpSwitch;
  2540: 
  2541:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  2542:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  2543:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  2544:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  2545:             //BPL.S <label>                                   |-|--2346|-|-*---|-----|          |0110_101_011_sss_sss (s is not equal to 63)
  2546:             //BNMI.S <label>                                  |A|--2346|-|-*---|-----|          |0110_101_011_sss_sss (s is not equal to 63)  [BPL.S <label>]
  2547:             //JBNMI.S <label>                                 |A|--2346|-|-*---|-----|          |0110_101_011_sss_sss (s is not equal to 63)  [BPL.S <label>]
  2548:             //JBPL.S <label>                                  |A|--2346|-|-*---|-----|          |0110_101_011_sss_sss (s is not equal to 63)  [BPL.S <label>]
  2549:             //BPL.L <label>                                   |-|--2346|-|-*---|-----|          |0110_101_011_111_111-{offset}
  2550:             //BNMI.L <label>                                  |A|--2346|-|-*---|-----|          |0110_101_011_111_111-{offset}        [BPL.L <label>]
  2551:           case 0b0110_101_011:
  2552:             irpBplsl ();
  2553:             break irpSwitch;
  2554: 
  2555:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  2556:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  2557:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  2558:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  2559:             //BMI.W <label>                                   |-|012346|-|-*---|-----|          |0110_101_100_000_000-{offset}
  2560:             //BNPL.W <label>                                  |A|012346|-|-*---|-----|          |0110_101_100_000_000-{offset}        [BMI.W <label>]
  2561:             //JBMI.W <label>                                  |A|012346|-|-*---|-----|          |0110_101_100_000_000-{offset}        [BMI.W <label>]
  2562:             //JBNPL.W <label>                                 |A|012346|-|-*---|-----|          |0110_101_100_000_000-{offset}        [BMI.W <label>]
  2563:             //BMI.S <label>                                   |-|012346|-|-*---|-----|          |0110_101_100_sss_sss (s is not equal to 0)
  2564:             //BNPL.S <label>                                  |A|012346|-|-*---|-----|          |0110_101_100_sss_sss (s is not equal to 0)   [BMI.S <label>]
  2565:             //JBMI.S <label>                                  |A|012346|-|-*---|-----|          |0110_101_100_sss_sss (s is not equal to 0)   [BMI.S <label>]
  2566:             //JBNPL.S <label>                                 |A|012346|-|-*---|-----|          |0110_101_100_sss_sss (s is not equal to 0)   [BMI.S <label>]
  2567:             //JBNMI.L <label>                                 |A|012346|-|-*---|-----|          |0110_101_100_000_110-0100111011111001-{address}      [BMI.S (*)+8;JMP <label>]
  2568:             //JBPL.L <label>                                  |A|012346|-|-*---|-----|          |0110_101_100_000_110-0100111011111001-{address}      [BMI.S (*)+8;JMP <label>]
  2569:           case 0b0110_101_100:
  2570:             irpBmisw ();
  2571:             break irpSwitch;
  2572: 
  2573:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  2574:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  2575:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  2576:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  2577:             //BMI.S <label>                                   |-|012346|-|-*---|-----|          |0110_101_101_sss_sss
  2578:             //BNPL.S <label>                                  |A|012346|-|-*---|-----|          |0110_101_101_sss_sss [BMI.S <label>]
  2579:             //JBMI.S <label>                                  |A|012346|-|-*---|-----|          |0110_101_101_sss_sss [BMI.S <label>]
  2580:             //JBNPL.S <label>                                 |A|012346|-|-*---|-----|          |0110_101_101_sss_sss [BMI.S <label>]
  2581:           case 0b0110_101_101:
  2582:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  2583:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  2584:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  2585:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  2586:             //BMI.S <label>                                   |-|012346|-|-*---|-----|          |0110_101_110_sss_sss
  2587:             //BNPL.S <label>                                  |A|012346|-|-*---|-----|          |0110_101_110_sss_sss [BMI.S <label>]
  2588:             //JBMI.S <label>                                  |A|012346|-|-*---|-----|          |0110_101_110_sss_sss [BMI.S <label>]
  2589:             //JBNPL.S <label>                                 |A|012346|-|-*---|-----|          |0110_101_110_sss_sss [BMI.S <label>]
  2590:           case 0b0110_101_110:
  2591:             irpBmis ();
  2592:             break irpSwitch;
  2593: 
  2594:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  2595:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  2596:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  2597:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  2598:             //BMI.S <label>                                   |-|--2346|-|-*---|-----|          |0110_101_111_sss_sss (s is not equal to 63)
  2599:             //BNPL.S <label>                                  |A|--2346|-|-*---|-----|          |0110_101_111_sss_sss (s is not equal to 63)  [BMI.S <label>]
  2600:             //JBMI.S <label>                                  |A|--2346|-|-*---|-----|          |0110_101_111_sss_sss (s is not equal to 63)  [BMI.S <label>]
  2601:             //JBNPL.S <label>                                 |A|--2346|-|-*---|-----|          |0110_101_111_sss_sss (s is not equal to 63)  [BMI.S <label>]
  2602:             //BMI.L <label>                                   |-|--2346|-|-*---|-----|          |0110_101_111_111_111-{offset}
  2603:             //BNPL.L <label>                                  |A|--2346|-|-*---|-----|          |0110_101_111_111_111-{offset}        [BMI.L <label>]
  2604:           case 0b0110_101_111:
  2605:             irpBmisl ();
  2606:             break irpSwitch;
  2607: 
  2608:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  2609:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  2610:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  2611:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  2612:             //BGE.W <label>                                   |-|012346|-|-*-*-|-----|          |0110_110_000_000_000-{offset}
  2613:             //BNLT.W <label>                                  |A|012346|-|-*-*-|-----|          |0110_110_000_000_000-{offset}        [BGE.W <label>]
  2614:             //JBGE.W <label>                                  |A|012346|-|-*-*-|-----|          |0110_110_000_000_000-{offset}        [BGE.W <label>]
  2615:             //JBNLT.W <label>                                 |A|012346|-|-*-*-|-----|          |0110_110_000_000_000-{offset}        [BGE.W <label>]
  2616:             //BGE.S <label>                                   |-|012346|-|-*-*-|-----|          |0110_110_000_sss_sss (s is not equal to 0)
  2617:             //BNLT.S <label>                                  |A|012346|-|-*-*-|-----|          |0110_110_000_sss_sss (s is not equal to 0)   [BGE.S <label>]
  2618:             //JBGE.S <label>                                  |A|012346|-|-*-*-|-----|          |0110_110_000_sss_sss (s is not equal to 0)   [BGE.S <label>]
  2619:             //JBNLT.S <label>                                 |A|012346|-|-*-*-|-----|          |0110_110_000_sss_sss (s is not equal to 0)   [BGE.S <label>]
  2620:             //JBLT.L <label>                                  |A|012346|-|-*-*-|-----|          |0110_110_000_000_110-0100111011111001-{address}      [BGE.S (*)+8;JMP <label>]
  2621:             //JBNGE.L <label>                                 |A|012346|-|-*-*-|-----|          |0110_110_000_000_110-0100111011111001-{address}      [BGE.S (*)+8;JMP <label>]
  2622:           case 0b0110_110_000:
  2623:             irpBgesw ();
  2624:             break irpSwitch;
  2625: 
  2626:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  2627:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  2628:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  2629:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  2630:             //BGE.S <label>                                   |-|012346|-|-*-*-|-----|          |0110_110_001_sss_sss
  2631:             //BNLT.S <label>                                  |A|012346|-|-*-*-|-----|          |0110_110_001_sss_sss [BGE.S <label>]
  2632:             //JBGE.S <label>                                  |A|012346|-|-*-*-|-----|          |0110_110_001_sss_sss [BGE.S <label>]
  2633:             //JBNLT.S <label>                                 |A|012346|-|-*-*-|-----|          |0110_110_001_sss_sss [BGE.S <label>]
  2634:           case 0b0110_110_001:
  2635:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  2636:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  2637:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  2638:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  2639:             //BGE.S <label>                                   |-|012346|-|-*-*-|-----|          |0110_110_010_sss_sss
  2640:             //BNLT.S <label>                                  |A|012346|-|-*-*-|-----|          |0110_110_010_sss_sss [BGE.S <label>]
  2641:             //JBGE.S <label>                                  |A|012346|-|-*-*-|-----|          |0110_110_010_sss_sss [BGE.S <label>]
  2642:             //JBNLT.S <label>                                 |A|012346|-|-*-*-|-----|          |0110_110_010_sss_sss [BGE.S <label>]
  2643:           case 0b0110_110_010:
  2644:             irpBges ();
  2645:             break irpSwitch;
  2646: 
  2647:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  2648:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  2649:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  2650:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  2651:             //BGE.S <label>                                   |-|--2346|-|-*-*-|-----|          |0110_110_011_sss_sss (s is not equal to 63)
  2652:             //BNLT.S <label>                                  |A|--2346|-|-*-*-|-----|          |0110_110_011_sss_sss (s is not equal to 63)  [BGE.S <label>]
  2653:             //JBGE.S <label>                                  |A|--2346|-|-*-*-|-----|          |0110_110_011_sss_sss (s is not equal to 63)  [BGE.S <label>]
  2654:             //JBNLT.S <label>                                 |A|--2346|-|-*-*-|-----|          |0110_110_011_sss_sss (s is not equal to 63)  [BGE.S <label>]
  2655:             //BGE.L <label>                                   |-|--2346|-|-*-*-|-----|          |0110_110_011_111_111-{offset}
  2656:             //BNLT.L <label>                                  |A|--2346|-|-*-*-|-----|          |0110_110_011_111_111-{offset}        [BGE.L <label>]
  2657:           case 0b0110_110_011:
  2658:             irpBgesl ();
  2659:             break irpSwitch;
  2660: 
  2661:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  2662:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  2663:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  2664:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  2665:             //BLT.W <label>                                   |-|012346|-|-*-*-|-----|          |0110_110_100_000_000-{offset}
  2666:             //BNGE.W <label>                                  |A|012346|-|-*-*-|-----|          |0110_110_100_000_000-{offset}        [BLT.W <label>]
  2667:             //JBLT.W <label>                                  |A|012346|-|-*-*-|-----|          |0110_110_100_000_000-{offset}        [BLT.W <label>]
  2668:             //JBNGE.W <label>                                 |A|012346|-|-*-*-|-----|          |0110_110_100_000_000-{offset}        [BLT.W <label>]
  2669:             //BLT.S <label>                                   |-|012346|-|-*-*-|-----|          |0110_110_100_sss_sss (s is not equal to 0)
  2670:             //BNGE.S <label>                                  |A|012346|-|-*-*-|-----|          |0110_110_100_sss_sss (s is not equal to 0)   [BLT.S <label>]
  2671:             //JBLT.S <label>                                  |A|012346|-|-*-*-|-----|          |0110_110_100_sss_sss (s is not equal to 0)   [BLT.S <label>]
  2672:             //JBNGE.S <label>                                 |A|012346|-|-*-*-|-----|          |0110_110_100_sss_sss (s is not equal to 0)   [BLT.S <label>]
  2673:             //JBGE.L <label>                                  |A|012346|-|-*-*-|-----|          |0110_110_100_000_110-0100111011111001-{address}      [BLT.S (*)+8;JMP <label>]
  2674:             //JBNLT.L <label>                                 |A|012346|-|-*-*-|-----|          |0110_110_100_000_110-0100111011111001-{address}      [BLT.S (*)+8;JMP <label>]
  2675:           case 0b0110_110_100:
  2676:             irpBltsw ();
  2677:             break irpSwitch;
  2678: 
  2679:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  2680:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  2681:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  2682:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  2683:             //BLT.S <label>                                   |-|012346|-|-*-*-|-----|          |0110_110_101_sss_sss
  2684:             //BNGE.S <label>                                  |A|012346|-|-*-*-|-----|          |0110_110_101_sss_sss [BLT.S <label>]
  2685:             //JBLT.S <label>                                  |A|012346|-|-*-*-|-----|          |0110_110_101_sss_sss [BLT.S <label>]
  2686:             //JBNGE.S <label>                                 |A|012346|-|-*-*-|-----|          |0110_110_101_sss_sss [BLT.S <label>]
  2687:           case 0b0110_110_101:
  2688:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  2689:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  2690:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  2691:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  2692:             //BLT.S <label>                                   |-|012346|-|-*-*-|-----|          |0110_110_110_sss_sss
  2693:             //BNGE.S <label>                                  |A|012346|-|-*-*-|-----|          |0110_110_110_sss_sss [BLT.S <label>]
  2694:             //JBLT.S <label>                                  |A|012346|-|-*-*-|-----|          |0110_110_110_sss_sss [BLT.S <label>]
  2695:             //JBNGE.S <label>                                 |A|012346|-|-*-*-|-----|          |0110_110_110_sss_sss [BLT.S <label>]
  2696:           case 0b0110_110_110:
  2697:             irpBlts ();
  2698:             break irpSwitch;
  2699: 
  2700:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  2701:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  2702:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  2703:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  2704:             //BLT.S <label>                                   |-|--2346|-|-*-*-|-----|          |0110_110_111_sss_sss (s is not equal to 63)
  2705:             //BNGE.S <label>                                  |A|--2346|-|-*-*-|-----|          |0110_110_111_sss_sss (s is not equal to 63)  [BLT.S <label>]
  2706:             //JBLT.S <label>                                  |A|--2346|-|-*-*-|-----|          |0110_110_111_sss_sss (s is not equal to 63)  [BLT.S <label>]
  2707:             //JBNGE.S <label>                                 |A|--2346|-|-*-*-|-----|          |0110_110_111_sss_sss (s is not equal to 63)  [BLT.S <label>]
  2708:             //BLT.L <label>                                   |-|--2346|-|-*-*-|-----|          |0110_110_111_111_111-{offset}
  2709:             //BNGE.L <label>                                  |A|--2346|-|-*-*-|-----|          |0110_110_111_111_111-{offset}        [BLT.L <label>]
  2710:           case 0b0110_110_111:
  2711:             irpBltsl ();
  2712:             break irpSwitch;
  2713: 
  2714:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  2715:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  2716:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  2717:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  2718:             //BGT.W <label>                                   |-|012346|-|-***-|-----|          |0110_111_000_000_000-{offset}
  2719:             //BNLE.W <label>                                  |A|012346|-|-***-|-----|          |0110_111_000_000_000-{offset}        [BGT.W <label>]
  2720:             //JBGT.W <label>                                  |A|012346|-|-***-|-----|          |0110_111_000_000_000-{offset}        [BGT.W <label>]
  2721:             //JBNLE.W <label>                                 |A|012346|-|-***-|-----|          |0110_111_000_000_000-{offset}        [BGT.W <label>]
  2722:             //BGT.S <label>                                   |-|012346|-|-***-|-----|          |0110_111_000_sss_sss (s is not equal to 0)
  2723:             //BNLE.S <label>                                  |A|012346|-|-***-|-----|          |0110_111_000_sss_sss (s is not equal to 0)   [BGT.S <label>]
  2724:             //JBGT.S <label>                                  |A|012346|-|-***-|-----|          |0110_111_000_sss_sss (s is not equal to 0)   [BGT.S <label>]
  2725:             //JBNLE.S <label>                                 |A|012346|-|-***-|-----|          |0110_111_000_sss_sss (s is not equal to 0)   [BGT.S <label>]
  2726:             //JBLE.L <label>                                  |A|012346|-|-***-|-----|          |0110_111_000_000_110-0100111011111001-{address}      [BGT.S (*)+8;JMP <label>]
  2727:             //JBNGT.L <label>                                 |A|012346|-|-***-|-----|          |0110_111_000_000_110-0100111011111001-{address}      [BGT.S (*)+8;JMP <label>]
  2728:           case 0b0110_111_000:
  2729:             irpBgtsw ();
  2730:             break irpSwitch;
  2731: 
  2732:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  2733:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  2734:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  2735:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  2736:             //BGT.S <label>                                   |-|012346|-|-***-|-----|          |0110_111_001_sss_sss
  2737:             //BNLE.S <label>                                  |A|012346|-|-***-|-----|          |0110_111_001_sss_sss [BGT.S <label>]
  2738:             //JBGT.S <label>                                  |A|012346|-|-***-|-----|          |0110_111_001_sss_sss [BGT.S <label>]
  2739:             //JBNLE.S <label>                                 |A|012346|-|-***-|-----|          |0110_111_001_sss_sss [BGT.S <label>]
  2740:           case 0b0110_111_001:
  2741:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  2742:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  2743:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  2744:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  2745:             //BGT.S <label>                                   |-|012346|-|-***-|-----|          |0110_111_010_sss_sss
  2746:             //BNLE.S <label>                                  |A|012346|-|-***-|-----|          |0110_111_010_sss_sss [BGT.S <label>]
  2747:             //JBGT.S <label>                                  |A|012346|-|-***-|-----|          |0110_111_010_sss_sss [BGT.S <label>]
  2748:             //JBNLE.S <label>                                 |A|012346|-|-***-|-----|          |0110_111_010_sss_sss [BGT.S <label>]
  2749:           case 0b0110_111_010:
  2750:             irpBgts ();
  2751:             break irpSwitch;
  2752: 
  2753:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  2754:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  2755:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  2756:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  2757:             //BGT.S <label>                                   |-|--2346|-|-***-|-----|          |0110_111_011_sss_sss (s is not equal to 63)
  2758:             //BNLE.S <label>                                  |A|--2346|-|-***-|-----|          |0110_111_011_sss_sss (s is not equal to 63)  [BGT.S <label>]
  2759:             //JBGT.S <label>                                  |A|--2346|-|-***-|-----|          |0110_111_011_sss_sss (s is not equal to 63)  [BGT.S <label>]
  2760:             //JBNLE.S <label>                                 |A|--2346|-|-***-|-----|          |0110_111_011_sss_sss (s is not equal to 63)  [BGT.S <label>]
  2761:             //BGT.L <label>                                   |-|--2346|-|-***-|-----|          |0110_111_011_111_111-{offset}
  2762:             //BNLE.L <label>                                  |A|--2346|-|-***-|-----|          |0110_111_011_111_111-{offset}        [BGT.L <label>]
  2763:           case 0b0110_111_011:
  2764:             irpBgtsl ();
  2765:             break irpSwitch;
  2766: 
  2767:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  2768:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  2769:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  2770:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  2771:             //BLE.W <label>                                   |-|012346|-|-***-|-----|          |0110_111_100_000_000-{offset}
  2772:             //BNGT.W <label>                                  |A|012346|-|-***-|-----|          |0110_111_100_000_000-{offset}        [BLE.W <label>]
  2773:             //JBLE.W <label>                                  |A|012346|-|-***-|-----|          |0110_111_100_000_000-{offset}        [BLE.W <label>]
  2774:             //JBNGT.W <label>                                 |A|012346|-|-***-|-----|          |0110_111_100_000_000-{offset}        [BLE.W <label>]
  2775:             //BLE.S <label>                                   |-|012346|-|-***-|-----|          |0110_111_100_sss_sss (s is not equal to 0)
  2776:             //BNGT.S <label>                                  |A|012346|-|-***-|-----|          |0110_111_100_sss_sss (s is not equal to 0)   [BLE.S <label>]
  2777:             //JBLE.S <label>                                  |A|012346|-|-***-|-----|          |0110_111_100_sss_sss (s is not equal to 0)   [BLE.S <label>]
  2778:             //JBNGT.S <label>                                 |A|012346|-|-***-|-----|          |0110_111_100_sss_sss (s is not equal to 0)   [BLE.S <label>]
  2779:             //JBGT.L <label>                                  |A|012346|-|-***-|-----|          |0110_111_100_000_110-0100111011111001-{address}      [BLE.S (*)+8;JMP <label>]
  2780:             //JBNLE.L <label>                                 |A|012346|-|-***-|-----|          |0110_111_100_000_110-0100111011111001-{address}      [BLE.S (*)+8;JMP <label>]
  2781:           case 0b0110_111_100:
  2782:             irpBlesw ();
  2783:             break irpSwitch;
  2784: 
  2785:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  2786:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  2787:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  2788:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  2789:             //BLE.S <label>                                   |-|012346|-|-***-|-----|          |0110_111_101_sss_sss
  2790:             //BNGT.S <label>                                  |A|012346|-|-***-|-----|          |0110_111_101_sss_sss [BLE.S <label>]
  2791:             //JBLE.S <label>                                  |A|012346|-|-***-|-----|          |0110_111_101_sss_sss [BLE.S <label>]
  2792:             //JBNGT.S <label>                                 |A|012346|-|-***-|-----|          |0110_111_101_sss_sss [BLE.S <label>]
  2793:           case 0b0110_111_101:
  2794:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  2795:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  2796:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  2797:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  2798:             //BLE.S <label>                                   |-|012346|-|-***-|-----|          |0110_111_110_sss_sss
  2799:             //BNGT.S <label>                                  |A|012346|-|-***-|-----|          |0110_111_110_sss_sss [BLE.S <label>]
  2800:             //JBLE.S <label>                                  |A|012346|-|-***-|-----|          |0110_111_110_sss_sss [BLE.S <label>]
  2801:             //JBNGT.S <label>                                 |A|012346|-|-***-|-----|          |0110_111_110_sss_sss [BLE.S <label>]
  2802:           case 0b0110_111_110:
  2803:             irpBles ();
  2804:             break irpSwitch;
  2805: 
  2806:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  2807:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  2808:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  2809:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  2810:             //BLE.S <label>                                   |-|--2346|-|-***-|-----|          |0110_111_111_sss_sss (s is not equal to 63)
  2811:             //BNGT.S <label>                                  |A|--2346|-|-***-|-----|          |0110_111_111_sss_sss (s is not equal to 63)  [BLE.S <label>]
  2812:             //JBLE.S <label>                                  |A|--2346|-|-***-|-----|          |0110_111_111_sss_sss (s is not equal to 63)  [BLE.S <label>]
  2813:             //JBNGT.S <label>                                 |A|--2346|-|-***-|-----|          |0110_111_111_sss_sss (s is not equal to 63)  [BLE.S <label>]
  2814:             //BLE.L <label>                                   |-|--2346|-|-***-|-----|          |0110_111_111_111_111-{offset}
  2815:             //BNGT.L <label>                                  |A|--2346|-|-***-|-----|          |0110_111_111_111_111-{offset}        [BLE.L <label>]
  2816:           case 0b0110_111_111:
  2817:             irpBlesl ();
  2818:             break irpSwitch;
  2819: 
  2820:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  2821:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  2822:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  2823:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  2824:             //IOCS <name>                                     |A|012346|-|UUUUU|UUUUU|          |0111_000_0dd_ddd_ddd-0100111001001111        [MOVEQ.L #<data>,D0;TRAP #15]
  2825:             //MOVEQ.L #<data>,Dq                              |-|012346|-|-UUUU|-**00|          |0111_qqq_0dd_ddd_ddd
  2826:           case 0b0111_000_000:
  2827:           case 0b0111_000_001:
  2828:           case 0b0111_000_010:
  2829:           case 0b0111_000_011:
  2830:           case 0b0111_001_000:
  2831:           case 0b0111_001_001:
  2832:           case 0b0111_001_010:
  2833:           case 0b0111_001_011:
  2834:           case 0b0111_010_000:
  2835:           case 0b0111_010_001:
  2836:           case 0b0111_010_010:
  2837:           case 0b0111_010_011:
  2838:           case 0b0111_011_000:
  2839:           case 0b0111_011_001:
  2840:           case 0b0111_011_010:
  2841:           case 0b0111_011_011:
  2842:           case 0b0111_100_000:
  2843:           case 0b0111_100_001:
  2844:           case 0b0111_100_010:
  2845:           case 0b0111_100_011:
  2846:           case 0b0111_101_000:
  2847:           case 0b0111_101_001:
  2848:           case 0b0111_101_010:
  2849:           case 0b0111_101_011:
  2850:           case 0b0111_110_000:
  2851:           case 0b0111_110_001:
  2852:           case 0b0111_110_010:
  2853:           case 0b0111_110_011:
  2854:           case 0b0111_111_000:
  2855:           case 0b0111_111_001:
  2856:           case 0b0111_111_010:
  2857:           case 0b0111_111_011:
  2858:             irpMoveq ();
  2859:             break irpSwitch;
  2860: 
  2861:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  2862:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  2863:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  2864:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  2865:             //MVS.B <ea>,Dq                                   |-|------|-|-UUUU|-**00|D M+-WXZPI|0111_qqq_100_mmm_rrr (ISA_B)
  2866:           case 0b0111_000_100:
  2867:           case 0b0111_001_100:
  2868:           case 0b0111_010_100:
  2869:           case 0b0111_011_100:
  2870:           case 0b0111_100_100:
  2871:           case 0b0111_101_100:
  2872:           case 0b0111_110_100:
  2873:           case 0b0111_111_100:
  2874:             irpMvsByte ();
  2875:             break irpSwitch;
  2876: 
  2877:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  2878:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  2879:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  2880:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  2881:             //MVS.W <ea>,Dq                                   |-|------|-|-UUUU|-**00|D M+-WXZPI|0111_qqq_101_mmm_rrr (ISA_B)
  2882:           case 0b0111_000_101:
  2883:           case 0b0111_001_101:
  2884:           case 0b0111_010_101:
  2885:           case 0b0111_011_101:
  2886:           case 0b0111_100_101:
  2887:           case 0b0111_101_101:
  2888:           case 0b0111_110_101:
  2889:           case 0b0111_111_101:
  2890:             irpMvsWord ();
  2891:             break irpSwitch;
  2892: 
  2893:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  2894:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  2895:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  2896:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  2897:             //MVZ.B <ea>,Dq                                   |-|------|-|-UUUU|-0*00|D M+-WXZPI|0111_qqq_110_mmm_rrr (ISA_B)
  2898:           case 0b0111_000_110:
  2899:           case 0b0111_001_110:
  2900:           case 0b0111_010_110:
  2901:           case 0b0111_011_110:
  2902:           case 0b0111_100_110:
  2903:           case 0b0111_101_110:
  2904:           case 0b0111_110_110:
  2905:           case 0b0111_111_110:
  2906:             irpMvzByte ();
  2907:             break irpSwitch;
  2908: 
  2909:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  2910:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  2911:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  2912:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  2913:             //MVZ.W <ea>,Dq                                   |-|------|-|-UUUU|-0*00|D M+-WXZPI|0111_qqq_111_mmm_rrr (ISA_B)
  2914:           case 0b0111_000_111:
  2915:           case 0b0111_001_111:
  2916:           case 0b0111_010_111:
  2917:           case 0b0111_011_111:
  2918:           case 0b0111_100_111:
  2919:           case 0b0111_101_111:
  2920:           case 0b0111_110_111:
  2921:           case 0b0111_111_111:
  2922:             irpMvzWord ();
  2923:             break irpSwitch;
  2924: 
  2925:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  2926:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  2927:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  2928:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  2929:             //OR.B <ea>,Dq                                    |-|012346|-|-UUUU|-**00|D M+-WXZPI|1000_qqq_000_mmm_rrr
  2930:           case 0b1000_000_000:
  2931:           case 0b1000_001_000:
  2932:           case 0b1000_010_000:
  2933:           case 0b1000_011_000:
  2934:           case 0b1000_100_000:
  2935:           case 0b1000_101_000:
  2936:           case 0b1000_110_000:
  2937:           case 0b1000_111_000:
  2938:             irpOrToRegByte ();
  2939:             break irpSwitch;
  2940: 
  2941:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  2942:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  2943:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  2944:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  2945:             //OR.W <ea>,Dq                                    |-|012346|-|-UUUU|-**00|D M+-WXZPI|1000_qqq_001_mmm_rrr
  2946:           case 0b1000_000_001:
  2947:           case 0b1000_001_001:
  2948:           case 0b1000_010_001:
  2949:           case 0b1000_011_001:
  2950:           case 0b1000_100_001:
  2951:           case 0b1000_101_001:
  2952:           case 0b1000_110_001:
  2953:           case 0b1000_111_001:
  2954:             irpOrToRegWord ();
  2955:             break irpSwitch;
  2956: 
  2957:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  2958:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  2959:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  2960:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  2961:             //OR.L <ea>,Dq                                    |-|012346|-|-UUUU|-**00|D M+-WXZPI|1000_qqq_010_mmm_rrr
  2962:           case 0b1000_000_010:
  2963:           case 0b1000_001_010:
  2964:           case 0b1000_010_010:
  2965:           case 0b1000_011_010:
  2966:           case 0b1000_100_010:
  2967:           case 0b1000_101_010:
  2968:           case 0b1000_110_010:
  2969:           case 0b1000_111_010:
  2970:             irpOrToRegLong ();
  2971:             break irpSwitch;
  2972: 
  2973:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  2974:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  2975:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  2976:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  2977:             //DIVU.W <ea>,Dq                                  |-|012346|-|-UUUU|-***0|D M+-WXZPI|1000_qqq_011_mmm_rrr
  2978:           case 0b1000_000_011:
  2979:           case 0b1000_001_011:
  2980:           case 0b1000_010_011:
  2981:           case 0b1000_011_011:
  2982:           case 0b1000_100_011:
  2983:           case 0b1000_101_011:
  2984:           case 0b1000_110_011:
  2985:           case 0b1000_111_011:
  2986:             irpDivuWord ();
  2987:             break irpSwitch;
  2988: 
  2989:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  2990:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  2991:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  2992:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  2993:             //SBCD.B Dr,Dq                                    |-|012346|-|UUUUU|*U*U*|          |1000_qqq_100_000_rrr
  2994:             //SBCD.B -(Ar),-(Aq)                              |-|012346|-|UUUUU|*U*U*|          |1000_qqq_100_001_rrr
  2995:             //OR.B Dq,<ea>                                    |-|012346|-|-UUUU|-**00|  M+-WXZ  |1000_qqq_100_mmm_rrr
  2996:           case 0b1000_000_100:
  2997:           case 0b1000_001_100:
  2998:           case 0b1000_010_100:
  2999:           case 0b1000_011_100:
  3000:           case 0b1000_100_100:
  3001:           case 0b1000_101_100:
  3002:           case 0b1000_110_100:
  3003:           case 0b1000_111_100:
  3004:             irpOrToMemByte ();
  3005:             break irpSwitch;
  3006: 
  3007:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  3008:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  3009:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  3010:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  3011:             //PACK Dr,Dq,#<data>                              |-|--2346|-|-----|-----|          |1000_qqq_101_000_rrr-{data}
  3012:             //PACK -(Ar),-(Aq),#<data>                        |-|--2346|-|-----|-----|          |1000_qqq_101_001_rrr-{data}
  3013:             //OR.W Dq,<ea>                                    |-|012346|-|-UUUU|-**00|  M+-WXZ  |1000_qqq_101_mmm_rrr
  3014:           case 0b1000_000_101:
  3015:           case 0b1000_001_101:
  3016:           case 0b1000_010_101:
  3017:           case 0b1000_011_101:
  3018:           case 0b1000_100_101:
  3019:           case 0b1000_101_101:
  3020:           case 0b1000_110_101:
  3021:           case 0b1000_111_101:
  3022:             irpOrToMemWord ();
  3023:             break irpSwitch;
  3024: 
  3025:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  3026:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  3027:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  3028:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  3029:             //UNPK Dr,Dq,#<data>                              |-|--2346|-|-----|-----|          |1000_qqq_110_000_rrr-{data}
  3030:             //UNPK -(Ar),-(Aq),#<data>                        |-|--2346|-|-----|-----|          |1000_qqq_110_001_rrr-{data}
  3031:             //OR.L Dq,<ea>                                    |-|012346|-|-UUUU|-**00|  M+-WXZ  |1000_qqq_110_mmm_rrr
  3032:           case 0b1000_000_110:
  3033:           case 0b1000_001_110:
  3034:           case 0b1000_010_110:
  3035:           case 0b1000_011_110:
  3036:           case 0b1000_100_110:
  3037:           case 0b1000_101_110:
  3038:           case 0b1000_110_110:
  3039:           case 0b1000_111_110:
  3040:             irpOrToMemLong ();
  3041:             break irpSwitch;
  3042: 
  3043:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  3044:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  3045:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  3046:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  3047:             //DIVS.W <ea>,Dq                                  |-|012346|-|-UUUU|-***0|D M+-WXZPI|1000_qqq_111_mmm_rrr
  3048:           case 0b1000_000_111:
  3049:           case 0b1000_001_111:
  3050:           case 0b1000_010_111:
  3051:           case 0b1000_011_111:
  3052:           case 0b1000_100_111:
  3053:           case 0b1000_101_111:
  3054:           case 0b1000_110_111:
  3055:           case 0b1000_111_111:
  3056:             irpDivsWord ();
  3057:             break irpSwitch;
  3058: 
  3059:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  3060:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  3061:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  3062:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  3063:             //SUB.B <ea>,Dq                                   |-|012346|-|UUUUU|*****|D M+-WXZPI|1001_qqq_000_mmm_rrr
  3064:           case 0b1001_000_000:
  3065:           case 0b1001_001_000:
  3066:           case 0b1001_010_000:
  3067:           case 0b1001_011_000:
  3068:           case 0b1001_100_000:
  3069:           case 0b1001_101_000:
  3070:           case 0b1001_110_000:
  3071:           case 0b1001_111_000:
  3072:             irpSubToRegByte ();
  3073:             break irpSwitch;
  3074: 
  3075:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  3076:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  3077:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  3078:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  3079:             //SUB.W <ea>,Dq                                   |-|012346|-|UUUUU|*****|DAM+-WXZPI|1001_qqq_001_mmm_rrr
  3080:           case 0b1001_000_001:
  3081:           case 0b1001_001_001:
  3082:           case 0b1001_010_001:
  3083:           case 0b1001_011_001:
  3084:           case 0b1001_100_001:
  3085:           case 0b1001_101_001:
  3086:           case 0b1001_110_001:
  3087:           case 0b1001_111_001:
  3088:             irpSubToRegWord ();
  3089:             break irpSwitch;
  3090: 
  3091:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  3092:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  3093:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  3094:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  3095:             //SUB.L <ea>,Dq                                   |-|012346|-|UUUUU|*****|DAM+-WXZPI|1001_qqq_010_mmm_rrr
  3096:           case 0b1001_000_010:
  3097:           case 0b1001_001_010:
  3098:           case 0b1001_010_010:
  3099:           case 0b1001_011_010:
  3100:           case 0b1001_100_010:
  3101:           case 0b1001_101_010:
  3102:           case 0b1001_110_010:
  3103:           case 0b1001_111_010:
  3104:             irpSubToRegLong ();
  3105:             break irpSwitch;
  3106: 
  3107:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  3108:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  3109:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  3110:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  3111:             //SUBA.W <ea>,Aq                                  |-|012346|-|-----|-----|DAM+-WXZPI|1001_qqq_011_mmm_rrr
  3112:             //SUB.W <ea>,Aq                                   |A|012346|-|-----|-----|DAM+-WXZPI|1001_qqq_011_mmm_rrr [SUBA.W <ea>,Aq]
  3113:             //CLR.W Ar                                        |A|012346|-|-----|-----| A        |1001_rrr_011_001_rrr [SUBA.W Ar,Ar]
  3114:           case 0b1001_000_011:
  3115:           case 0b1001_001_011:
  3116:           case 0b1001_010_011:
  3117:           case 0b1001_011_011:
  3118:           case 0b1001_100_011:
  3119:           case 0b1001_101_011:
  3120:           case 0b1001_110_011:
  3121:           case 0b1001_111_011:
  3122:             irpSubaWord ();
  3123:             break irpSwitch;
  3124: 
  3125:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  3126:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  3127:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  3128:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  3129:             //SUBX.B Dr,Dq                                    |-|012346|-|*UUUU|*****|          |1001_qqq_100_000_rrr
  3130:             //SUBX.B -(Ar),-(Aq)                              |-|012346|-|*UUUU|*****|          |1001_qqq_100_001_rrr
  3131:             //SUB.B Dq,<ea>                                   |-|012346|-|UUUUU|*****|  M+-WXZ  |1001_qqq_100_mmm_rrr
  3132:           case 0b1001_000_100:
  3133:           case 0b1001_001_100:
  3134:           case 0b1001_010_100:
  3135:           case 0b1001_011_100:
  3136:           case 0b1001_100_100:
  3137:           case 0b1001_101_100:
  3138:           case 0b1001_110_100:
  3139:           case 0b1001_111_100:
  3140:             irpSubToMemByte ();
  3141:             break irpSwitch;
  3142: 
  3143:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  3144:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  3145:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  3146:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  3147:             //SUBX.W Dr,Dq                                    |-|012346|-|*UUUU|*****|          |1001_qqq_101_000_rrr
  3148:             //SUBX.W -(Ar),-(Aq)                              |-|012346|-|*UUUU|*****|          |1001_qqq_101_001_rrr
  3149:             //SUB.W Dq,<ea>                                   |-|012346|-|UUUUU|*****|  M+-WXZ  |1001_qqq_101_mmm_rrr
  3150:           case 0b1001_000_101:
  3151:           case 0b1001_001_101:
  3152:           case 0b1001_010_101:
  3153:           case 0b1001_011_101:
  3154:           case 0b1001_100_101:
  3155:           case 0b1001_101_101:
  3156:           case 0b1001_110_101:
  3157:           case 0b1001_111_101:
  3158:             irpSubToMemWord ();
  3159:             break irpSwitch;
  3160: 
  3161:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  3162:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  3163:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  3164:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  3165:             //SUBX.L Dr,Dq                                    |-|012346|-|*UUUU|*****|          |1001_qqq_110_000_rrr
  3166:             //SUBX.L -(Ar),-(Aq)                              |-|012346|-|*UUUU|*****|          |1001_qqq_110_001_rrr
  3167:             //SUB.L Dq,<ea>                                   |-|012346|-|UUUUU|*****|  M+-WXZ  |1001_qqq_110_mmm_rrr
  3168:           case 0b1001_000_110:
  3169:           case 0b1001_001_110:
  3170:           case 0b1001_010_110:
  3171:           case 0b1001_011_110:
  3172:           case 0b1001_100_110:
  3173:           case 0b1001_101_110:
  3174:           case 0b1001_110_110:
  3175:           case 0b1001_111_110:
  3176:             irpSubToMemLong ();
  3177:             break irpSwitch;
  3178: 
  3179:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  3180:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  3181:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  3182:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  3183:             //SUBA.L <ea>,Aq                                  |-|012346|-|-----|-----|DAM+-WXZPI|1001_qqq_111_mmm_rrr
  3184:             //SUB.L <ea>,Aq                                   |A|012346|-|-----|-----|DAM+-WXZPI|1001_qqq_111_mmm_rrr [SUBA.L <ea>,Aq]
  3185:             //CLR.L Ar                                        |A|012346|-|-----|-----| A        |1001_rrr_111_001_rrr [SUBA.L Ar,Ar]
  3186:           case 0b1001_000_111:
  3187:           case 0b1001_001_111:
  3188:           case 0b1001_010_111:
  3189:           case 0b1001_011_111:
  3190:           case 0b1001_100_111:
  3191:           case 0b1001_101_111:
  3192:           case 0b1001_110_111:
  3193:           case 0b1001_111_111:
  3194:             irpSubaLong ();
  3195:             break irpSwitch;
  3196: 
  3197:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  3198:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  3199:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  3200:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  3201:             //SXCALL <name>                                   |A|012346|-|UUUUU|*****|          |1010_0dd_ddd_ddd_ddd [ALINE #<data>]
  3202:           case 0b1010_000_000:
  3203:           case 0b1010_000_001:
  3204:           case 0b1010_000_010:
  3205:           case 0b1010_000_011:
  3206:           case 0b1010_000_100:
  3207:           case 0b1010_000_101:
  3208:           case 0b1010_000_110:
  3209:           case 0b1010_000_111:
  3210:           case 0b1010_001_000:
  3211:           case 0b1010_001_001:
  3212:           case 0b1010_001_010:
  3213:           case 0b1010_001_011:
  3214:           case 0b1010_001_100:
  3215:           case 0b1010_001_101:
  3216:           case 0b1010_001_110:
  3217:           case 0b1010_001_111:
  3218:           case 0b1010_010_000:
  3219:           case 0b1010_010_001:
  3220:           case 0b1010_010_010:
  3221:           case 0b1010_010_011:
  3222:           case 0b1010_010_100:
  3223:           case 0b1010_010_101:
  3224:           case 0b1010_010_110:
  3225:           case 0b1010_010_111:
  3226:           case 0b1010_011_000:
  3227:           case 0b1010_011_001:
  3228:           case 0b1010_011_010:
  3229:           case 0b1010_011_011:
  3230:           case 0b1010_011_100:
  3231:           case 0b1010_011_101:
  3232:           case 0b1010_011_110:
  3233:           case 0b1010_011_111:
  3234:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  3235:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  3236:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  3237:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  3238:             //ALINE #<data>                                   |-|012346|-|UUUUU|*****|          |1010_ddd_ddd_ddd_ddd (line 1010 emulator)
  3239:           case 0b1010_100_000:
  3240:           case 0b1010_100_001:
  3241:           case 0b1010_100_010:
  3242:           case 0b1010_100_011:
  3243:           case 0b1010_100_100:
  3244:           case 0b1010_100_101:
  3245:           case 0b1010_100_110:
  3246:           case 0b1010_100_111:
  3247:           case 0b1010_101_000:
  3248:           case 0b1010_101_001:
  3249:           case 0b1010_101_010:
  3250:           case 0b1010_101_011:
  3251:           case 0b1010_101_100:
  3252:           case 0b1010_101_101:
  3253:           case 0b1010_101_110:
  3254:           case 0b1010_101_111:
  3255:           case 0b1010_110_000:
  3256:           case 0b1010_110_001:
  3257:           case 0b1010_110_010:
  3258:           case 0b1010_110_011:
  3259:           case 0b1010_110_100:
  3260:           case 0b1010_110_101:
  3261:           case 0b1010_110_110:
  3262:           case 0b1010_110_111:
  3263:           case 0b1010_111_000:
  3264:           case 0b1010_111_001:
  3265:           case 0b1010_111_010:
  3266:           case 0b1010_111_011:
  3267:           case 0b1010_111_100:
  3268:           case 0b1010_111_101:
  3269:           case 0b1010_111_110:
  3270:           case 0b1010_111_111:
  3271:             irpAline ();
  3272:             break irpSwitch;
  3273: 
  3274:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  3275:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  3276:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  3277:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  3278:             //CMP.B <ea>,Dq                                   |-|012346|-|-UUUU|-****|D M+-WXZPI|1011_qqq_000_mmm_rrr
  3279:           case 0b1011_000_000:
  3280:           case 0b1011_001_000:
  3281:           case 0b1011_010_000:
  3282:           case 0b1011_011_000:
  3283:           case 0b1011_100_000:
  3284:           case 0b1011_101_000:
  3285:           case 0b1011_110_000:
  3286:           case 0b1011_111_000:
  3287:             irpCmpByte ();
  3288:             break irpSwitch;
  3289: 
  3290:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  3291:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  3292:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  3293:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  3294:             //CMP.W <ea>,Dq                                   |-|012346|-|-UUUU|-****|DAM+-WXZPI|1011_qqq_001_mmm_rrr
  3295:           case 0b1011_000_001:
  3296:           case 0b1011_001_001:
  3297:           case 0b1011_010_001:
  3298:           case 0b1011_011_001:
  3299:           case 0b1011_100_001:
  3300:           case 0b1011_101_001:
  3301:           case 0b1011_110_001:
  3302:           case 0b1011_111_001:
  3303:             irpCmpWord ();
  3304:             break irpSwitch;
  3305: 
  3306:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  3307:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  3308:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  3309:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  3310:             //CMP.L <ea>,Dq                                   |-|012346|-|-UUUU|-****|DAM+-WXZPI|1011_qqq_010_mmm_rrr
  3311:           case 0b1011_000_010:
  3312:           case 0b1011_001_010:
  3313:           case 0b1011_010_010:
  3314:           case 0b1011_011_010:
  3315:           case 0b1011_100_010:
  3316:           case 0b1011_101_010:
  3317:           case 0b1011_110_010:
  3318:           case 0b1011_111_010:
  3319:             irpCmpLong ();
  3320:             break irpSwitch;
  3321: 
  3322:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  3323:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  3324:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  3325:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  3326:             //CMPA.W <ea>,Aq                                  |-|012346|-|-UUUU|-****|DAM+-WXZPI|1011_qqq_011_mmm_rrr
  3327:             //CMP.W <ea>,Aq                                   |A|012346|-|-UUUU|-****|DAM+-WXZPI|1011_qqq_011_mmm_rrr [CMPA.W <ea>,Aq]
  3328:           case 0b1011_000_011:
  3329:           case 0b1011_001_011:
  3330:           case 0b1011_010_011:
  3331:           case 0b1011_011_011:
  3332:           case 0b1011_100_011:
  3333:           case 0b1011_101_011:
  3334:           case 0b1011_110_011:
  3335:           case 0b1011_111_011:
  3336:             irpCmpaWord ();
  3337:             break irpSwitch;
  3338: 
  3339:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  3340:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  3341:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  3342:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  3343:             //EOR.B Dq,<ea>                                   |-|012346|-|-UUUU|-**00|D M+-WXZ  |1011_qqq_100_mmm_rrr
  3344:             //CMPM.B (Ar)+,(Aq)+                              |-|012346|-|-UUUU|-****|          |1011_qqq_100_001_rrr
  3345:           case 0b1011_000_100:
  3346:           case 0b1011_001_100:
  3347:           case 0b1011_010_100:
  3348:           case 0b1011_011_100:
  3349:           case 0b1011_100_100:
  3350:           case 0b1011_101_100:
  3351:           case 0b1011_110_100:
  3352:           case 0b1011_111_100:
  3353:             irpEorByte ();
  3354:             break irpSwitch;
  3355: 
  3356:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  3357:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  3358:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  3359:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  3360:             //EOR.W Dq,<ea>                                   |-|012346|-|-UUUU|-**00|D M+-WXZ  |1011_qqq_101_mmm_rrr
  3361:             //CMPM.W (Ar)+,(Aq)+                              |-|012346|-|-UUUU|-****|          |1011_qqq_101_001_rrr
  3362:           case 0b1011_000_101:
  3363:           case 0b1011_001_101:
  3364:           case 0b1011_010_101:
  3365:           case 0b1011_011_101:
  3366:           case 0b1011_100_101:
  3367:           case 0b1011_101_101:
  3368:           case 0b1011_110_101:
  3369:           case 0b1011_111_101:
  3370:             irpEorWord ();
  3371:             break irpSwitch;
  3372: 
  3373:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  3374:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  3375:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  3376:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  3377:             //EOR.L Dq,<ea>                                   |-|012346|-|-UUUU|-**00|D M+-WXZ  |1011_qqq_110_mmm_rrr
  3378:             //CMPM.L (Ar)+,(Aq)+                              |-|012346|-|-UUUU|-****|          |1011_qqq_110_001_rrr
  3379:           case 0b1011_000_110:
  3380:           case 0b1011_001_110:
  3381:           case 0b1011_010_110:
  3382:           case 0b1011_011_110:
  3383:           case 0b1011_100_110:
  3384:           case 0b1011_101_110:
  3385:           case 0b1011_110_110:
  3386:           case 0b1011_111_110:
  3387:             irpEorLong ();
  3388:             break irpSwitch;
  3389: 
  3390:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  3391:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  3392:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  3393:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  3394:             //CMPA.L <ea>,Aq                                  |-|012346|-|-UUUU|-****|DAM+-WXZPI|1011_qqq_111_mmm_rrr
  3395:             //CMP.L <ea>,Aq                                   |A|012346|-|-UUUU|-****|DAM+-WXZPI|1011_qqq_111_mmm_rrr [CMPA.L <ea>,Aq]
  3396:           case 0b1011_000_111:
  3397:           case 0b1011_001_111:
  3398:           case 0b1011_010_111:
  3399:           case 0b1011_011_111:
  3400:           case 0b1011_100_111:
  3401:           case 0b1011_101_111:
  3402:           case 0b1011_110_111:
  3403:           case 0b1011_111_111:
  3404:             irpCmpaLong ();
  3405:             break irpSwitch;
  3406: 
  3407:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  3408:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  3409:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  3410:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  3411:             //AND.B <ea>,Dq                                   |-|012346|-|-UUUU|-**00|D M+-WXZPI|1100_qqq_000_mmm_rrr
  3412:           case 0b1100_000_000:
  3413:           case 0b1100_001_000:
  3414:           case 0b1100_010_000:
  3415:           case 0b1100_011_000:
  3416:           case 0b1100_100_000:
  3417:           case 0b1100_101_000:
  3418:           case 0b1100_110_000:
  3419:           case 0b1100_111_000:
  3420:             irpAndToRegByte ();
  3421:             break irpSwitch;
  3422: 
  3423:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  3424:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  3425:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  3426:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  3427:             //AND.W <ea>,Dq                                   |-|012346|-|-UUUU|-**00|D M+-WXZPI|1100_qqq_001_mmm_rrr
  3428:           case 0b1100_000_001:
  3429:           case 0b1100_001_001:
  3430:           case 0b1100_010_001:
  3431:           case 0b1100_011_001:
  3432:           case 0b1100_100_001:
  3433:           case 0b1100_101_001:
  3434:           case 0b1100_110_001:
  3435:           case 0b1100_111_001:
  3436:             irpAndToRegWord ();
  3437:             break irpSwitch;
  3438: 
  3439:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  3440:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  3441:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  3442:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  3443:             //AND.L <ea>,Dq                                   |-|012346|-|-UUUU|-**00|D M+-WXZPI|1100_qqq_010_mmm_rrr
  3444:           case 0b1100_000_010:
  3445:           case 0b1100_001_010:
  3446:           case 0b1100_010_010:
  3447:           case 0b1100_011_010:
  3448:           case 0b1100_100_010:
  3449:           case 0b1100_101_010:
  3450:           case 0b1100_110_010:
  3451:           case 0b1100_111_010:
  3452:             irpAndToRegLong ();
  3453:             break irpSwitch;
  3454: 
  3455:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  3456:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  3457:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  3458:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  3459:             //MULU.W <ea>,Dq                                  |-|012346|-|-UUUU|-***0|D M+-WXZPI|1100_qqq_011_mmm_rrr
  3460:           case 0b1100_000_011:
  3461:           case 0b1100_001_011:
  3462:           case 0b1100_010_011:
  3463:           case 0b1100_011_011:
  3464:           case 0b1100_100_011:
  3465:           case 0b1100_101_011:
  3466:           case 0b1100_110_011:
  3467:           case 0b1100_111_011:
  3468:             irpMuluWord ();
  3469:             break irpSwitch;
  3470: 
  3471:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  3472:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  3473:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  3474:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  3475:             //ABCD.B Dr,Dq                                    |-|012346|-|UUUUU|*U*U*|          |1100_qqq_100_000_rrr
  3476:             //ABCD.B -(Ar),-(Aq)                              |-|012346|-|UUUUU|*U*U*|          |1100_qqq_100_001_rrr
  3477:             //AND.B Dq,<ea>                                   |-|012346|-|-UUUU|-**00|  M+-WXZ  |1100_qqq_100_mmm_rrr
  3478:           case 0b1100_000_100:
  3479:           case 0b1100_001_100:
  3480:           case 0b1100_010_100:
  3481:           case 0b1100_011_100:
  3482:           case 0b1100_100_100:
  3483:           case 0b1100_101_100:
  3484:           case 0b1100_110_100:
  3485:           case 0b1100_111_100:
  3486:             irpAndToMemByte ();
  3487:             break irpSwitch;
  3488: 
  3489:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  3490:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  3491:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  3492:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  3493:             //EXG.L Dq,Dr                                     |-|012346|-|-----|-----|          |1100_qqq_101_000_rrr
  3494:             //EXG.L Aq,Ar                                     |-|012346|-|-----|-----|          |1100_qqq_101_001_rrr
  3495:             //AND.W Dq,<ea>                                   |-|012346|-|-UUUU|-**00|  M+-WXZ  |1100_qqq_101_mmm_rrr
  3496:           case 0b1100_000_101:
  3497:           case 0b1100_001_101:
  3498:           case 0b1100_010_101:
  3499:           case 0b1100_011_101:
  3500:           case 0b1100_100_101:
  3501:           case 0b1100_101_101:
  3502:           case 0b1100_110_101:
  3503:           case 0b1100_111_101:
  3504:             irpAndToMemWord ();
  3505:             break irpSwitch;
  3506: 
  3507:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  3508:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  3509:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  3510:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  3511:             //EXG.L Dq,Ar                                     |-|012346|-|-----|-----|          |1100_qqq_110_001_rrr
  3512:             //AND.L Dq,<ea>                                   |-|012346|-|-UUUU|-**00|  M+-WXZ  |1100_qqq_110_mmm_rrr
  3513:           case 0b1100_000_110:
  3514:           case 0b1100_001_110:
  3515:           case 0b1100_010_110:
  3516:           case 0b1100_011_110:
  3517:           case 0b1100_100_110:
  3518:           case 0b1100_101_110:
  3519:           case 0b1100_110_110:
  3520:           case 0b1100_111_110:
  3521:             irpAndToMemLong ();
  3522:             break irpSwitch;
  3523: 
  3524:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  3525:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  3526:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  3527:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  3528:             //MULS.W <ea>,Dq                                  |-|012346|-|-UUUU|-***0|D M+-WXZPI|1100_qqq_111_mmm_rrr
  3529:           case 0b1100_000_111:
  3530:           case 0b1100_001_111:
  3531:           case 0b1100_010_111:
  3532:           case 0b1100_011_111:
  3533:           case 0b1100_100_111:
  3534:           case 0b1100_101_111:
  3535:           case 0b1100_110_111:
  3536:           case 0b1100_111_111:
  3537:             irpMulsWord ();
  3538:             break irpSwitch;
  3539: 
  3540:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  3541:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  3542:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  3543:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  3544:             //ADD.B <ea>,Dq                                   |-|012346|-|UUUUU|*****|D M+-WXZPI|1101_qqq_000_mmm_rrr
  3545:           case 0b1101_000_000:
  3546:           case 0b1101_001_000:
  3547:           case 0b1101_010_000:
  3548:           case 0b1101_011_000:
  3549:           case 0b1101_100_000:
  3550:           case 0b1101_101_000:
  3551:           case 0b1101_110_000:
  3552:           case 0b1101_111_000:
  3553:             irpAddToRegByte ();
  3554:             break irpSwitch;
  3555: 
  3556:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  3557:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  3558:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  3559:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  3560:             //ADD.W <ea>,Dq                                   |-|012346|-|UUUUU|*****|DAM+-WXZPI|1101_qqq_001_mmm_rrr
  3561:           case 0b1101_000_001:
  3562:           case 0b1101_001_001:
  3563:           case 0b1101_010_001:
  3564:           case 0b1101_011_001:
  3565:           case 0b1101_100_001:
  3566:           case 0b1101_101_001:
  3567:           case 0b1101_110_001:
  3568:           case 0b1101_111_001:
  3569:             irpAddToRegWord ();
  3570:             break irpSwitch;
  3571: 
  3572:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  3573:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  3574:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  3575:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  3576:             //ADD.L <ea>,Dq                                   |-|012346|-|UUUUU|*****|DAM+-WXZPI|1101_qqq_010_mmm_rrr
  3577:           case 0b1101_000_010:
  3578:           case 0b1101_001_010:
  3579:           case 0b1101_010_010:
  3580:           case 0b1101_011_010:
  3581:           case 0b1101_100_010:
  3582:           case 0b1101_101_010:
  3583:           case 0b1101_110_010:
  3584:           case 0b1101_111_010:
  3585:             irpAddToRegLong ();
  3586:             break irpSwitch;
  3587: 
  3588:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  3589:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  3590:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  3591:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  3592:             //ADDA.W <ea>,Aq                                  |-|012346|-|-----|-----|DAM+-WXZPI|1101_qqq_011_mmm_rrr
  3593:             //ADD.W <ea>,Aq                                   |A|012346|-|-----|-----|DAM+-WXZPI|1101_qqq_011_mmm_rrr [ADDA.W <ea>,Aq]
  3594:           case 0b1101_000_011:
  3595:           case 0b1101_001_011:
  3596:           case 0b1101_010_011:
  3597:           case 0b1101_011_011:
  3598:           case 0b1101_100_011:
  3599:           case 0b1101_101_011:
  3600:           case 0b1101_110_011:
  3601:           case 0b1101_111_011:
  3602:             irpAddaWord ();
  3603:             break irpSwitch;
  3604: 
  3605:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  3606:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  3607:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  3608:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  3609:             //ADDX.B Dr,Dq                                    |-|012346|-|*UUUU|*****|          |1101_qqq_100_000_rrr
  3610:             //ADDX.B -(Ar),-(Aq)                              |-|012346|-|*UUUU|*****|          |1101_qqq_100_001_rrr
  3611:             //ADD.B Dq,<ea>                                   |-|012346|-|UUUUU|*****|  M+-WXZ  |1101_qqq_100_mmm_rrr
  3612:           case 0b1101_000_100:
  3613:           case 0b1101_001_100:
  3614:           case 0b1101_010_100:
  3615:           case 0b1101_011_100:
  3616:           case 0b1101_100_100:
  3617:           case 0b1101_101_100:
  3618:           case 0b1101_110_100:
  3619:           case 0b1101_111_100:
  3620:             irpAddToMemByte ();
  3621:             break irpSwitch;
  3622: 
  3623:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  3624:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  3625:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  3626:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  3627:             //ADDX.W Dr,Dq                                    |-|012346|-|*UUUU|*****|          |1101_qqq_101_000_rrr
  3628:             //ADDX.W -(Ar),-(Aq)                              |-|012346|-|*UUUU|*****|          |1101_qqq_101_001_rrr
  3629:             //ADD.W Dq,<ea>                                   |-|012346|-|UUUUU|*****|  M+-WXZ  |1101_qqq_101_mmm_rrr
  3630:           case 0b1101_000_101:
  3631:           case 0b1101_001_101:
  3632:           case 0b1101_010_101:
  3633:           case 0b1101_011_101:
  3634:           case 0b1101_100_101:
  3635:           case 0b1101_101_101:
  3636:           case 0b1101_110_101:
  3637:           case 0b1101_111_101:
  3638:             irpAddToMemWord ();
  3639:             break irpSwitch;
  3640: 
  3641:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  3642:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  3643:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  3644:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  3645:             //ADDX.L Dr,Dq                                    |-|012346|-|*UUUU|*****|          |1101_qqq_110_000_rrr
  3646:             //ADDX.L -(Ar),-(Aq)                              |-|012346|-|*UUUU|*****|          |1101_qqq_110_001_rrr
  3647:             //ADD.L Dq,<ea>                                   |-|012346|-|UUUUU|*****|  M+-WXZ  |1101_qqq_110_mmm_rrr
  3648:           case 0b1101_000_110:
  3649:           case 0b1101_001_110:
  3650:           case 0b1101_010_110:
  3651:           case 0b1101_011_110:
  3652:           case 0b1101_100_110:
  3653:           case 0b1101_101_110:
  3654:           case 0b1101_110_110:
  3655:           case 0b1101_111_110:
  3656:             irpAddToMemLong ();
  3657:             break irpSwitch;
  3658: 
  3659:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  3660:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  3661:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  3662:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  3663:             //ADDA.L <ea>,Aq                                  |-|012346|-|-----|-----|DAM+-WXZPI|1101_qqq_111_mmm_rrr
  3664:             //ADD.L <ea>,Aq                                   |A|012346|-|-----|-----|DAM+-WXZPI|1101_qqq_111_mmm_rrr [ADDA.L <ea>,Aq]
  3665:           case 0b1101_000_111:
  3666:           case 0b1101_001_111:
  3667:           case 0b1101_010_111:
  3668:           case 0b1101_011_111:
  3669:           case 0b1101_100_111:
  3670:           case 0b1101_101_111:
  3671:           case 0b1101_110_111:
  3672:           case 0b1101_111_111:
  3673:             irpAddaLong ();
  3674:             break irpSwitch;
  3675: 
  3676:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  3677:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  3678:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  3679:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  3680:             //ASR.B #<data>,Dr                                |-|012346|-|UUUUU|***0*|          |1110_qqq_000_000_rrr
  3681:             //LSR.B #<data>,Dr                                |-|012346|-|UUUUU|***0*|          |1110_qqq_000_001_rrr
  3682:             //ROXR.B #<data>,Dr                               |-|012346|-|*UUUU|***0*|          |1110_qqq_000_010_rrr
  3683:             //ROR.B #<data>,Dr                                |-|012346|-|-UUUU|-**0*|          |1110_qqq_000_011_rrr
  3684:             //ASR.B Dq,Dr                                     |-|012346|-|UUUUU|***0*|          |1110_qqq_000_100_rrr
  3685:             //LSR.B Dq,Dr                                     |-|012346|-|UUUUU|***0*|          |1110_qqq_000_101_rrr
  3686:             //ROXR.B Dq,Dr                                    |-|012346|-|*UUUU|***0*|          |1110_qqq_000_110_rrr
  3687:             //ROR.B Dq,Dr                                     |-|012346|-|-UUUU|-**0*|          |1110_qqq_000_111_rrr
  3688:             //ASR.B Dr                                        |A|012346|-|UUUUU|***0*|          |1110_001_000_000_rrr [ASR.B #1,Dr]
  3689:             //LSR.B Dr                                        |A|012346|-|UUUUU|***0*|          |1110_001_000_001_rrr [LSR.B #1,Dr]
  3690:             //ROXR.B Dr                                       |A|012346|-|*UUUU|***0*|          |1110_001_000_010_rrr [ROXR.B #1,Dr]
  3691:             //ROR.B Dr                                        |A|012346|-|-UUUU|-**0*|          |1110_001_000_011_rrr [ROR.B #1,Dr]
  3692:           case 0b1110_000_000:
  3693:           case 0b1110_001_000:
  3694:           case 0b1110_010_000:
  3695:           case 0b1110_011_000:
  3696:           case 0b1110_100_000:
  3697:           case 0b1110_101_000:
  3698:           case 0b1110_110_000:
  3699:           case 0b1110_111_000:
  3700:             irpXxrToRegByte ();
  3701:             break irpSwitch;
  3702: 
  3703:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  3704:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  3705:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  3706:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  3707:             //ASR.W #<data>,Dr                                |-|012346|-|UUUUU|***0*|          |1110_qqq_001_000_rrr
  3708:             //LSR.W #<data>,Dr                                |-|012346|-|UUUUU|***0*|          |1110_qqq_001_001_rrr
  3709:             //ROXR.W #<data>,Dr                               |-|012346|-|*UUUU|***0*|          |1110_qqq_001_010_rrr
  3710:             //ROR.W #<data>,Dr                                |-|012346|-|-UUUU|-**0*|          |1110_qqq_001_011_rrr
  3711:             //ASR.W Dq,Dr                                     |-|012346|-|UUUUU|***0*|          |1110_qqq_001_100_rrr
  3712:             //LSR.W Dq,Dr                                     |-|012346|-|UUUUU|***0*|          |1110_qqq_001_101_rrr
  3713:             //ROXR.W Dq,Dr                                    |-|012346|-|*UUUU|***0*|          |1110_qqq_001_110_rrr
  3714:             //ROR.W Dq,Dr                                     |-|012346|-|-UUUU|-**0*|          |1110_qqq_001_111_rrr
  3715:             //ASR.W Dr                                        |A|012346|-|UUUUU|***0*|          |1110_001_001_000_rrr [ASR.W #1,Dr]
  3716:             //LSR.W Dr                                        |A|012346|-|UUUUU|***0*|          |1110_001_001_001_rrr [LSR.W #1,Dr]
  3717:             //ROXR.W Dr                                       |A|012346|-|*UUUU|***0*|          |1110_001_001_010_rrr [ROXR.W #1,Dr]
  3718:             //ROR.W Dr                                        |A|012346|-|-UUUU|-**0*|          |1110_001_001_011_rrr [ROR.W #1,Dr]
  3719:           case 0b1110_000_001:
  3720:           case 0b1110_001_001:
  3721:           case 0b1110_010_001:
  3722:           case 0b1110_011_001:
  3723:           case 0b1110_100_001:
  3724:           case 0b1110_101_001:
  3725:           case 0b1110_110_001:
  3726:           case 0b1110_111_001:
  3727:             irpXxrToRegWord ();
  3728:             break irpSwitch;
  3729: 
  3730:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  3731:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  3732:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  3733:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  3734:             //ASR.L #<data>,Dr                                |-|012346|-|UUUUU|***0*|          |1110_qqq_010_000_rrr
  3735:             //LSR.L #<data>,Dr                                |-|012346|-|UUUUU|***0*|          |1110_qqq_010_001_rrr
  3736:             //ROXR.L #<data>,Dr                               |-|012346|-|*UUUU|***0*|          |1110_qqq_010_010_rrr
  3737:             //ROR.L #<data>,Dr                                |-|012346|-|-UUUU|-**0*|          |1110_qqq_010_011_rrr
  3738:             //ASR.L Dq,Dr                                     |-|012346|-|UUUUU|***0*|          |1110_qqq_010_100_rrr
  3739:             //LSR.L Dq,Dr                                     |-|012346|-|UUUUU|***0*|          |1110_qqq_010_101_rrr
  3740:             //ROXR.L Dq,Dr                                    |-|012346|-|*UUUU|***0*|          |1110_qqq_010_110_rrr
  3741:             //ROR.L Dq,Dr                                     |-|012346|-|-UUUU|-**0*|          |1110_qqq_010_111_rrr
  3742:             //ASR.L Dr                                        |A|012346|-|UUUUU|***0*|          |1110_001_010_000_rrr [ASR.L #1,Dr]
  3743:             //LSR.L Dr                                        |A|012346|-|UUUUU|***0*|          |1110_001_010_001_rrr [LSR.L #1,Dr]
  3744:             //ROXR.L Dr                                       |A|012346|-|*UUUU|***0*|          |1110_001_010_010_rrr [ROXR.L #1,Dr]
  3745:             //ROR.L Dr                                        |A|012346|-|-UUUU|-**0*|          |1110_001_010_011_rrr [ROR.L #1,Dr]
  3746:           case 0b1110_000_010:
  3747:           case 0b1110_001_010:
  3748:           case 0b1110_010_010:
  3749:           case 0b1110_011_010:
  3750:           case 0b1110_100_010:
  3751:           case 0b1110_101_010:
  3752:           case 0b1110_110_010:
  3753:           case 0b1110_111_010:
  3754:             irpXxrToRegLong ();
  3755:             break irpSwitch;
  3756: 
  3757:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  3758:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  3759:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  3760:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  3761:             //ASR.W <ea>                                      |-|012346|-|UUUUU|***0*|  M+-WXZ  |1110_000_011_mmm_rrr
  3762:           case 0b1110_000_011:
  3763:             irpAsrToMem ();
  3764:             break irpSwitch;
  3765: 
  3766:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  3767:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  3768:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  3769:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  3770:             //ASL.B #<data>,Dr                                |-|012346|-|UUUUU|*****|          |1110_qqq_100_000_rrr
  3771:             //LSL.B #<data>,Dr                                |-|012346|-|UUUUU|***0*|          |1110_qqq_100_001_rrr
  3772:             //ROXL.B #<data>,Dr                               |-|012346|-|*UUUU|***0*|          |1110_qqq_100_010_rrr
  3773:             //ROL.B #<data>,Dr                                |-|012346|-|-UUUU|-**0*|          |1110_qqq_100_011_rrr
  3774:             //ASL.B Dq,Dr                                     |-|012346|-|UUUUU|*****|          |1110_qqq_100_100_rrr
  3775:             //LSL.B Dq,Dr                                     |-|012346|-|UUUUU|***0*|          |1110_qqq_100_101_rrr
  3776:             //ROXL.B Dq,Dr                                    |-|012346|-|*UUUU|***0*|          |1110_qqq_100_110_rrr
  3777:             //ROL.B Dq,Dr                                     |-|012346|-|-UUUU|-**0*|          |1110_qqq_100_111_rrr
  3778:             //ASL.B Dr                                        |A|012346|-|UUUUU|*****|          |1110_001_100_000_rrr [ASL.B #1,Dr]
  3779:             //LSL.B Dr                                        |A|012346|-|UUUUU|***0*|          |1110_001_100_001_rrr [LSL.B #1,Dr]
  3780:             //ROXL.B Dr                                       |A|012346|-|*UUUU|***0*|          |1110_001_100_010_rrr [ROXL.B #1,Dr]
  3781:             //ROL.B Dr                                        |A|012346|-|-UUUU|-**0*|          |1110_001_100_011_rrr [ROL.B #1,Dr]
  3782:           case 0b1110_000_100:
  3783:           case 0b1110_001_100:
  3784:           case 0b1110_010_100:
  3785:           case 0b1110_011_100:
  3786:           case 0b1110_100_100:
  3787:           case 0b1110_101_100:
  3788:           case 0b1110_110_100:
  3789:           case 0b1110_111_100:
  3790:             irpXxlToRegByte ();
  3791:             break irpSwitch;
  3792: 
  3793:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  3794:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  3795:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  3796:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  3797:             //ASL.W #<data>,Dr                                |-|012346|-|UUUUU|*****|          |1110_qqq_101_000_rrr
  3798:             //LSL.W #<data>,Dr                                |-|012346|-|UUUUU|***0*|          |1110_qqq_101_001_rrr
  3799:             //ROXL.W #<data>,Dr                               |-|012346|-|*UUUU|***0*|          |1110_qqq_101_010_rrr
  3800:             //ROL.W #<data>,Dr                                |-|012346|-|-UUUU|-**0*|          |1110_qqq_101_011_rrr
  3801:             //ASL.W Dq,Dr                                     |-|012346|-|UUUUU|*****|          |1110_qqq_101_100_rrr
  3802:             //LSL.W Dq,Dr                                     |-|012346|-|UUUUU|***0*|          |1110_qqq_101_101_rrr
  3803:             //ROXL.W Dq,Dr                                    |-|012346|-|*UUUU|***0*|          |1110_qqq_101_110_rrr
  3804:             //ROL.W Dq,Dr                                     |-|012346|-|-UUUU|-**0*|          |1110_qqq_101_111_rrr
  3805:             //ASL.W Dr                                        |A|012346|-|UUUUU|*****|          |1110_001_101_000_rrr [ASL.W #1,Dr]
  3806:             //LSL.W Dr                                        |A|012346|-|UUUUU|***0*|          |1110_001_101_001_rrr [LSL.W #1,Dr]
  3807:             //ROXL.W Dr                                       |A|012346|-|*UUUU|***0*|          |1110_001_101_010_rrr [ROXL.W #1,Dr]
  3808:             //ROL.W Dr                                        |A|012346|-|-UUUU|-**0*|          |1110_001_101_011_rrr [ROL.W #1,Dr]
  3809:           case 0b1110_000_101:
  3810:           case 0b1110_001_101:
  3811:           case 0b1110_010_101:
  3812:           case 0b1110_011_101:
  3813:           case 0b1110_100_101:
  3814:           case 0b1110_101_101:
  3815:           case 0b1110_110_101:
  3816:           case 0b1110_111_101:
  3817:             irpXxlToRegWord ();
  3818:             break irpSwitch;
  3819: 
  3820:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  3821:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  3822:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  3823:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  3824:             //ASL.L #<data>,Dr                                |-|012346|-|UUUUU|*****|          |1110_qqq_110_000_rrr
  3825:             //LSL.L #<data>,Dr                                |-|012346|-|UUUUU|***0*|          |1110_qqq_110_001_rrr
  3826:             //ROXL.L #<data>,Dr                               |-|012346|-|*UUUU|***0*|          |1110_qqq_110_010_rrr
  3827:             //ROL.L #<data>,Dr                                |-|012346|-|-UUUU|-**0*|          |1110_qqq_110_011_rrr
  3828:             //ASL.L Dq,Dr                                     |-|012346|-|UUUUU|*****|          |1110_qqq_110_100_rrr
  3829:             //LSL.L Dq,Dr                                     |-|012346|-|UUUUU|***0*|          |1110_qqq_110_101_rrr
  3830:             //ROXL.L Dq,Dr                                    |-|012346|-|*UUUU|***0*|          |1110_qqq_110_110_rrr
  3831:             //ROL.L Dq,Dr                                     |-|012346|-|-UUUU|-**0*|          |1110_qqq_110_111_rrr
  3832:             //ASL.L Dr                                        |A|012346|-|UUUUU|*****|          |1110_001_110_000_rrr [ASL.L #1,Dr]
  3833:             //LSL.L Dr                                        |A|012346|-|UUUUU|***0*|          |1110_001_110_001_rrr [LSL.L #1,Dr]
  3834:             //ROXL.L Dr                                       |A|012346|-|*UUUU|***0*|          |1110_001_110_010_rrr [ROXL.L #1,Dr]
  3835:             //ROL.L Dr                                        |A|012346|-|-UUUU|-**0*|          |1110_001_110_011_rrr [ROL.L #1,Dr]
  3836:           case 0b1110_000_110:
  3837:           case 0b1110_001_110:
  3838:           case 0b1110_010_110:
  3839:           case 0b1110_011_110:
  3840:           case 0b1110_100_110:
  3841:           case 0b1110_101_110:
  3842:           case 0b1110_110_110:
  3843:           case 0b1110_111_110:
  3844:             irpXxlToRegLong ();
  3845:             break irpSwitch;
  3846: 
  3847:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  3848:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  3849:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  3850:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  3851:             //ASL.W <ea>                                      |-|012346|-|UUUUU|*****|  M+-WXZ  |1110_000_111_mmm_rrr
  3852:           case 0b1110_000_111:
  3853:             irpAslToMem ();
  3854:             break irpSwitch;
  3855: 
  3856:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  3857:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  3858:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  3859:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  3860:             //LSR.W <ea>                                      |-|012346|-|UUUUU|*0*0*|  M+-WXZ  |1110_001_011_mmm_rrr
  3861:           case 0b1110_001_011:
  3862:             irpLsrToMem ();
  3863:             break irpSwitch;
  3864: 
  3865:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  3866:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  3867:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  3868:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  3869:             //LSL.W <ea>                                      |-|012346|-|UUUUU|***0*|  M+-WXZ  |1110_001_111_mmm_rrr
  3870:           case 0b1110_001_111:
  3871:             irpLslToMem ();
  3872:             break irpSwitch;
  3873: 
  3874:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  3875:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  3876:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  3877:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  3878:             //ROXR.W <ea>                                     |-|012346|-|*UUUU|***0*|  M+-WXZ  |1110_010_011_mmm_rrr
  3879:           case 0b1110_010_011:
  3880:             irpRoxrToMem ();
  3881:             break irpSwitch;
  3882: 
  3883:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  3884:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  3885:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  3886:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  3887:             //ROXL.W <ea>                                     |-|012346|-|*UUUU|***0*|  M+-WXZ  |1110_010_111_mmm_rrr
  3888:           case 0b1110_010_111:
  3889:             irpRoxlToMem ();
  3890:             break irpSwitch;
  3891: 
  3892:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  3893:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  3894:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  3895:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  3896:             //ROR.W <ea>                                      |-|012346|-|-UUUU|-**0*|  M+-WXZ  |1110_011_011_mmm_rrr
  3897:           case 0b1110_011_011:
  3898:             irpRorToMem ();
  3899:             break irpSwitch;
  3900: 
  3901:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  3902:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  3903:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  3904:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  3905:             //ROL.W <ea>                                      |-|012346|-|-UUUU|-**0*|  M+-WXZ  |1110_011_111_mmm_rrr
  3906:           case 0b1110_011_111:
  3907:             irpRolToMem ();
  3908:             break irpSwitch;
  3909: 
  3910:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  3911:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  3912:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  3913:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  3914:             //BFTST <ea>{#o:#w}                               |-|--2346|-|-UUUU|-**00|D M  WXZP |1110_100_011_mmm_rrr-00000ooooo0wwwww
  3915:             //BFTST <ea>{#o:Dw}                               |-|--2346|-|-UUUU|-**00|D M  WXZP |1110_100_011_mmm_rrr-00000ooooo100www
  3916:             //BFTST <ea>{Do:#w}                               |-|--2346|-|-UUUU|-**00|D M  WXZP |1110_100_011_mmm_rrr-0000100ooo0wwwww
  3917:             //BFTST <ea>{Do:Dw}                               |-|--2346|-|-UUUU|-**00|D M  WXZP |1110_100_011_mmm_rrr-0000100ooo100www
  3918:           case 0b1110_100_011:
  3919:             irpBftst ();
  3920:             break irpSwitch;
  3921: 
  3922:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  3923:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  3924:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  3925:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  3926:             //BFEXTU <ea>{#o:#w},Dn                           |-|--2346|-|-UUUU|-**00|D M  WXZP |1110_100_111_mmm_rrr-0nnn0ooooo0wwwww
  3927:             //BFEXTU <ea>{#o:Dw},Dn                           |-|--2346|-|-UUUU|-**00|D M  WXZP |1110_100_111_mmm_rrr-0nnn0ooooo100www
  3928:             //BFEXTU <ea>{Do:#w},Dn                           |-|--2346|-|-UUUU|-**00|D M  WXZP |1110_100_111_mmm_rrr-0nnn100ooo0wwwww
  3929:             //BFEXTU <ea>{Do:Dw},Dn                           |-|--2346|-|-UUUU|-**00|D M  WXZP |1110_100_111_mmm_rrr-0nnn100ooo100www
  3930:           case 0b1110_100_111:
  3931:             irpBfextu ();
  3932:             break irpSwitch;
  3933: 
  3934:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  3935:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  3936:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  3937:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  3938:             //BFCHG <ea>{#o:#w}                               |-|--2346|-|-UUUU|-**00|D M  WXZ  |1110_101_011_mmm_rrr-00000ooooo0wwwww
  3939:             //BFCHG <ea>{#o:Dw}                               |-|--2346|-|-UUUU|-**00|D M  WXZ  |1110_101_011_mmm_rrr-00000ooooo100www
  3940:             //BFCHG <ea>{Do:#w}                               |-|--2346|-|-UUUU|-**00|D M  WXZ  |1110_101_011_mmm_rrr-0000100ooo0wwwww
  3941:             //BFCHG <ea>{Do:Dw}                               |-|--2346|-|-UUUU|-**00|D M  WXZ  |1110_101_011_mmm_rrr-0000100ooo100www
  3942:           case 0b1110_101_011:
  3943:             irpBfchg ();
  3944:             break irpSwitch;
  3945: 
  3946:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  3947:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  3948:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  3949:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  3950:             //BFEXTS <ea>{#o:#w},Dn                           |-|--2346|-|-UUUU|-**00|D M  WXZP |1110_101_111_mmm_rrr-0nnn0ooooo0wwwww
  3951:             //BFEXTS <ea>{#o:Dw},Dn                           |-|--2346|-|-UUUU|-**00|D M  WXZP |1110_101_111_mmm_rrr-0nnn0ooooo100www
  3952:             //BFEXTS <ea>{Do:#w},Dn                           |-|--2346|-|-UUUU|-**00|D M  WXZP |1110_101_111_mmm_rrr-0nnn100ooo0wwwww
  3953:             //BFEXTS <ea>{Do:Dw},Dn                           |-|--2346|-|-UUUU|-**00|D M  WXZP |1110_101_111_mmm_rrr-0nnn100ooo100www
  3954:           case 0b1110_101_111:
  3955:             irpBfexts ();
  3956:             break irpSwitch;
  3957: 
  3958:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  3959:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  3960:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  3961:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  3962:             //BFCLR <ea>{#o:#w}                               |-|--2346|-|-UUUU|-**00|D M  WXZ  |1110_110_011_mmm_rrr-00000ooooo0wwwww
  3963:             //BFCLR <ea>{#o:Dw}                               |-|--2346|-|-UUUU|-**00|D M  WXZ  |1110_110_011_mmm_rrr-00000ooooo100www
  3964:             //BFCLR <ea>{Do:#w}                               |-|--2346|-|-UUUU|-**00|D M  WXZ  |1110_110_011_mmm_rrr-0000100ooo0wwwww
  3965:             //BFCLR <ea>{Do:Dw}                               |-|--2346|-|-UUUU|-**00|D M  WXZ  |1110_110_011_mmm_rrr-0000100ooo100www
  3966:           case 0b1110_110_011:
  3967:             irpBfclr ();
  3968:             break irpSwitch;
  3969: 
  3970:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  3971:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  3972:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  3973:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  3974:             //BFFFO <ea>{#o:#w},Dn                            |-|--2346|-|-UUUU|-**00|D M  WXZP |1110_110_111_mmm_rrr-0nnn0ooooo0wwwww
  3975:             //BFFFO <ea>{#o:Dw},Dn                            |-|--2346|-|-UUUU|-**00|D M  WXZP |1110_110_111_mmm_rrr-0nnn0ooooo100www
  3976:             //BFFFO <ea>{Do:#w},Dn                            |-|--2346|-|-UUUU|-**00|D M  WXZP |1110_110_111_mmm_rrr-0nnn100ooo0wwwww
  3977:             //BFFFO <ea>{Do:Dw},Dn                            |-|--2346|-|-UUUU|-**00|D M  WXZP |1110_110_111_mmm_rrr-0nnn100ooo100www
  3978:           case 0b1110_110_111:
  3979:             irpBfffo ();
  3980:             break irpSwitch;
  3981: 
  3982:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  3983:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  3984:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  3985:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  3986:             //BFSET <ea>{#o:#w}                               |-|--2346|-|-UUUU|-**00|D M  WXZ  |1110_111_011_mmm_rrr-00000ooooo0wwwww
  3987:             //BFSET <ea>{#o:Dw}                               |-|--2346|-|-UUUU|-**00|D M  WXZ  |1110_111_011_mmm_rrr-00000ooooo100www
  3988:             //BFSET <ea>{Do:#w}                               |-|--2346|-|-UUUU|-**00|D M  WXZ  |1110_111_011_mmm_rrr-0000100ooo0wwwww
  3989:             //BFSET <ea>{Do:Dw}                               |-|--2346|-|-UUUU|-**00|D M  WXZ  |1110_111_011_mmm_rrr-0000100ooo100www
  3990:           case 0b1110_111_011:
  3991:             irpBfset ();
  3992:             break irpSwitch;
  3993: 
  3994:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  3995:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  3996:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  3997:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  3998:             //BFINS Dn,<ea>{#o:#w}                            |-|--2346|-|-UUUU|-**00|D M  WXZ  |1110_111_111_mmm_rrr-0nnn0ooooo0wwwww
  3999:             //BFINS Dn,<ea>{#o:Dw}                            |-|--2346|-|-UUUU|-**00|D M  WXZ  |1110_111_111_mmm_rrr-0nnn0ooooo100www
  4000:             //BFINS Dn,<ea>{Do:#w}                            |-|--2346|-|-UUUU|-**00|D M  WXZ  |1110_111_111_mmm_rrr-0nnn100ooo0wwwww
  4001:             //BFINS Dn,<ea>{Do:Dw}                            |-|--2346|-|-UUUU|-**00|D M  WXZ  |1110_111_111_mmm_rrr-0nnn100ooo100www
  4002:           case 0b1110_111_111:
  4003:             irpBfins ();
  4004:             break irpSwitch;
  4005: 
  4006:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  4007:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  4008:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  4009:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  4010:             //FTST.X FPm                                      |-|--CC46|-|-----|-----|          |1111_001_000_000_000-000mmm0000111010
  4011:             //FMOVE.X FPm,FPn                                 |-|--CC46|-|-----|-----|          |1111_001_000_000_000-000mmmnnn0000000
  4012:             //FINT.X FPm,FPn                                  |-|--CCS6|-|-----|-----|          |1111_001_000_000_000-000mmmnnn0000001
  4013:             //FSINH.X FPm,FPn                                 |-|--CCSS|-|-----|-----|          |1111_001_000_000_000-000mmmnnn0000010
  4014:             //FINTRZ.X FPm,FPn                                |-|--CCS6|-|-----|-----|          |1111_001_000_000_000-000mmmnnn0000011
  4015:             //FSQRT.X FPm,FPn                                 |-|--CC46|-|-----|-----|          |1111_001_000_000_000-000mmmnnn0000100
  4016:             //FLOGNP1.X FPm,FPn                               |-|--CCSS|-|-----|-----|          |1111_001_000_000_000-000mmmnnn0000110
  4017:             //FETOXM1.X FPm,FPn                               |-|--CCSS|-|-----|-----|          |1111_001_000_000_000-000mmmnnn0001000
  4018:             //FTANH.X FPm,FPn                                 |-|--CCSS|-|-----|-----|          |1111_001_000_000_000-000mmmnnn0001001
  4019:             //FATAN.X FPm,FPn                                 |-|--CCSS|-|-----|-----|          |1111_001_000_000_000-000mmmnnn0001010
  4020:             //FASIN.X FPm,FPn                                 |-|--CCSS|-|-----|-----|          |1111_001_000_000_000-000mmmnnn0001100
  4021:             //FATANH.X FPm,FPn                                |-|--CCSS|-|-----|-----|          |1111_001_000_000_000-000mmmnnn0001101
  4022:             //FSIN.X FPm,FPn                                  |-|--CCSS|-|-----|-----|          |1111_001_000_000_000-000mmmnnn0001110
  4023:             //FTAN.X FPm,FPn                                  |-|--CCSS|-|-----|-----|          |1111_001_000_000_000-000mmmnnn0001111
  4024:             //FETOX.X FPm,FPn                                 |-|--CCSS|-|-----|-----|          |1111_001_000_000_000-000mmmnnn0010000
  4025:             //FTWOTOX.X FPm,FPn                               |-|--CCSS|-|-----|-----|          |1111_001_000_000_000-000mmmnnn0010001
  4026:             //FTENTOX.X FPm,FPn                               |-|--CCSS|-|-----|-----|          |1111_001_000_000_000-000mmmnnn0010010
  4027:             //FLOGN.X FPm,FPn                                 |-|--CCSS|-|-----|-----|          |1111_001_000_000_000-000mmmnnn0010100
  4028:             //FLOG10.X FPm,FPn                                |-|--CCSS|-|-----|-----|          |1111_001_000_000_000-000mmmnnn0010101
  4029:             //FLOG2.X FPm,FPn                                 |-|--CCSS|-|-----|-----|          |1111_001_000_000_000-000mmmnnn0010110
  4030:             //FABS.X FPm,FPn                                  |-|--CC46|-|-----|-----|          |1111_001_000_000_000-000mmmnnn0011000
  4031:             //FCOSH.X FPm,FPn                                 |-|--CCSS|-|-----|-----|          |1111_001_000_000_000-000mmmnnn0011001
  4032:             //FNEG.X FPm,FPn                                  |-|--CC46|-|-----|-----|          |1111_001_000_000_000-000mmmnnn0011010
  4033:             //FACOS.X FPm,FPn                                 |-|--CCSS|-|-----|-----|          |1111_001_000_000_000-000mmmnnn0011100
  4034:             //FCOS.X FPm,FPn                                  |-|--CCSS|-|-----|-----|          |1111_001_000_000_000-000mmmnnn0011101
  4035:             //FGETEXP.X FPm,FPn                               |-|--CCSS|-|-----|-----|          |1111_001_000_000_000-000mmmnnn0011110
  4036:             //FGETMAN.X FPm,FPn                               |-|--CCSS|-|-----|-----|          |1111_001_000_000_000-000mmmnnn0011111
  4037:             //FDIV.X FPm,FPn                                  |-|--CC46|-|-----|-----|          |1111_001_000_000_000-000mmmnnn0100000
  4038:             //FMOD.X FPm,FPn                                  |-|--CCSS|-|-----|-----|          |1111_001_000_000_000-000mmmnnn0100001
  4039:             //FADD.X FPm,FPn                                  |-|--CC46|-|-----|-----|          |1111_001_000_000_000-000mmmnnn0100010
  4040:             //FMUL.X FPm,FPn                                  |-|--CC46|-|-----|-----|          |1111_001_000_000_000-000mmmnnn0100011
  4041:             //FSGLDIV.X FPm,FPn                               |-|--CCS6|-|-----|-----|          |1111_001_000_000_000-000mmmnnn0100100
  4042:             //FREM.X FPm,FPn                                  |-|--CCSS|-|-----|-----|          |1111_001_000_000_000-000mmmnnn0100101
  4043:             //FSCALE.X FPm,FPn                                |-|--CCSS|-|-----|-----|          |1111_001_000_000_000-000mmmnnn0100110
  4044:             //FSGLMUL.X FPm,FPn                               |-|--CCS6|-|-----|-----|          |1111_001_000_000_000-000mmmnnn0100111
  4045:             //FSUB.X FPm,FPn                                  |-|--CC46|-|-----|-----|          |1111_001_000_000_000-000mmmnnn0101000
  4046:             //FCMP.X FPm,FPn                                  |-|--CC46|-|-----|-----|          |1111_001_000_000_000-000mmmnnn0111000
  4047:             //FSMOVE.X FPm,FPn                                |-|----46|-|-----|-----|          |1111_001_000_000_000-000mmmnnn1000000
  4048:             //FSSQRT.X FPm,FPn                                |-|----46|-|-----|-----|          |1111_001_000_000_000-000mmmnnn1000001
  4049:             //FDMOVE.X FPm,FPn                                |-|----46|-|-----|-----|          |1111_001_000_000_000-000mmmnnn1000100
  4050:             //FDSQRT.X FPm,FPn                                |-|----46|-|-----|-----|          |1111_001_000_000_000-000mmmnnn1000101
  4051:             //FSABS.X FPm,FPn                                 |-|----46|-|-----|-----|          |1111_001_000_000_000-000mmmnnn1011000
  4052:             //FSNEG.X FPm,FPn                                 |-|----46|-|-----|-----|          |1111_001_000_000_000-000mmmnnn1011010
  4053:             //FDABS.X FPm,FPn                                 |-|----46|-|-----|-----|          |1111_001_000_000_000-000mmmnnn1011100
  4054:             //FDNEG.X FPm,FPn                                 |-|----46|-|-----|-----|          |1111_001_000_000_000-000mmmnnn1011110
  4055:             //FSDIV.X FPm,FPn                                 |-|----46|-|-----|-----|          |1111_001_000_000_000-000mmmnnn1100000
  4056:             //FSADD.X FPm,FPn                                 |-|----46|-|-----|-----|          |1111_001_000_000_000-000mmmnnn1100010
  4057:             //FSMUL.X FPm,FPn                                 |-|----46|-|-----|-----|          |1111_001_000_000_000-000mmmnnn1100011
  4058:             //FDDIV.X FPm,FPn                                 |-|----46|-|-----|-----|          |1111_001_000_000_000-000mmmnnn1100100
  4059:             //FDADD.X FPm,FPn                                 |-|----46|-|-----|-----|          |1111_001_000_000_000-000mmmnnn1100110
  4060:             //FDMUL.X FPm,FPn                                 |-|----46|-|-----|-----|          |1111_001_000_000_000-000mmmnnn1100111
  4061:             //FSSUB.X FPm,FPn                                 |-|----46|-|-----|-----|          |1111_001_000_000_000-000mmmnnn1101000
  4062:             //FDSUB.X FPm,FPn                                 |-|----46|-|-----|-----|          |1111_001_000_000_000-000mmmnnn1101100
  4063:             //FSINCOS.X FPm,FPc:FPs                           |-|--CCSS|-|-----|-----|          |1111_001_000_000_000-000mmmsss0110ccc
  4064:             //FMOVECR.X #ccc,FPn                              |-|--CCSS|-|-----|-----|          |1111_001_000_000_000-010111nnn0cccccc
  4065:             //FMOVE.L FPn,<ea>                                |-|--CC46|-|-----|-----|D M+-WXZ  |1111_001_000_mmm_rrr-011000nnn0000000
  4066:             //FMOVE.S FPn,<ea>                                |-|--CC46|-|-----|-----|D M+-WXZ  |1111_001_000_mmm_rrr-011001nnn0000000
  4067:             //FMOVE.W FPn,<ea>                                |-|--CC46|-|-----|-----|D M+-WXZ  |1111_001_000_mmm_rrr-011100nnn0000000
  4068:             //FMOVE.B FPn,<ea>                                |-|--CC46|-|-----|-----|D M+-WXZ  |1111_001_000_mmm_rrr-011110nnn0000000
  4069:             //FMOVE.L FPIAR,<ea>                              |-|--CC46|-|-----|-----|DAM+-WXZ  |1111_001_000_mmm_rrr-1010010000000000
  4070:             //FMOVEM.L FPIAR,<ea>                             |-|--CC46|-|-----|-----|DAM+-WXZ  |1111_001_000_mmm_rrr-1010010000000000
  4071:             //FMOVE.L FPSR,<ea>                               |-|--CC46|-|-----|-----|D M+-WXZ  |1111_001_000_mmm_rrr-1010100000000000
  4072:             //FMOVEM.L FPSR,<ea>                              |-|--CC46|-|-----|-----|D M+-WXZ  |1111_001_000_mmm_rrr-1010100000000000
  4073:             //FMOVE.L FPCR,<ea>                               |-|--CC46|-|-----|-----|D M+-WXZ  |1111_001_000_mmm_rrr-1011000000000000
  4074:             //FMOVEM.L FPCR,<ea>                              |-|--CC46|-|-----|-----|D M+-WXZ  |1111_001_000_mmm_rrr-1011000000000000
  4075:             //FTST.L <ea>                                     |-|--CC46|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-0100000000111010
  4076:             //FMOVE.L <ea>,FPn                                |-|--CC46|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010000nnn0000000
  4077:             //FINT.L <ea>,FPn                                 |-|--CCS6|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010000nnn0000001
  4078:             //FSINH.L <ea>,FPn                                |-|--CCSS|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010000nnn0000010
  4079:             //FINTRZ.L <ea>,FPn                               |-|--CCS6|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010000nnn0000011
  4080:             //FSQRT.L <ea>,FPn                                |-|--CC46|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010000nnn0000100
  4081:             //FLOGNP1.L <ea>,FPn                              |-|--CCSS|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010000nnn0000110
  4082:             //FETOXM1.L <ea>,FPn                              |-|--CCSS|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010000nnn0001000
  4083:             //FTANH.L <ea>,FPn                                |-|--CCSS|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010000nnn0001001
  4084:             //FATAN.L <ea>,FPn                                |-|--CCSS|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010000nnn0001010
  4085:             //FASIN.L <ea>,FPn                                |-|--CCSS|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010000nnn0001100
  4086:             //FATANH.L <ea>,FPn                               |-|--CCSS|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010000nnn0001101
  4087:             //FSIN.L <ea>,FPn                                 |-|--CCSS|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010000nnn0001110
  4088:             //FTAN.L <ea>,FPn                                 |-|--CCSS|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010000nnn0001111
  4089:             //FETOX.L <ea>,FPn                                |-|--CCSS|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010000nnn0010000
  4090:             //FTWOTOX.L <ea>,FPn                              |-|--CCSS|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010000nnn0010001
  4091:             //FTENTOX.L <ea>,FPn                              |-|--CCSS|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010000nnn0010010
  4092:             //FLOGN.L <ea>,FPn                                |-|--CCSS|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010000nnn0010100
  4093:             //FLOG10.L <ea>,FPn                               |-|--CCSS|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010000nnn0010101
  4094:             //FLOG2.L <ea>,FPn                                |-|--CCSS|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010000nnn0010110
  4095:             //FABS.L <ea>,FPn                                 |-|--CC46|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010000nnn0011000
  4096:             //FCOSH.L <ea>,FPn                                |-|--CCSS|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010000nnn0011001
  4097:             //FNEG.L <ea>,FPn                                 |-|--CC46|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010000nnn0011010
  4098:             //FACOS.L <ea>,FPn                                |-|--CCSS|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010000nnn0011100
  4099:             //FCOS.L <ea>,FPn                                 |-|--CCSS|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010000nnn0011101
  4100:             //FGETEXP.L <ea>,FPn                              |-|--CCSS|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010000nnn0011110
  4101:             //FGETMAN.L <ea>,FPn                              |-|--CCSS|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010000nnn0011111
  4102:             //FDIV.L <ea>,FPn                                 |-|--CC46|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010000nnn0100000
  4103:             //FMOD.L <ea>,FPn                                 |-|--CCSS|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010000nnn0100001
  4104:             //FADD.L <ea>,FPn                                 |-|--CC46|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010000nnn0100010
  4105:             //FMUL.L <ea>,FPn                                 |-|--CC46|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010000nnn0100011
  4106:             //FSGLDIV.L <ea>,FPn                              |-|--CCS6|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010000nnn0100100
  4107:             //FREM.L <ea>,FPn                                 |-|--CCSS|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010000nnn0100101
  4108:             //FSCALE.L <ea>,FPn                               |-|--CCSS|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010000nnn0100110
  4109:             //FSGLMUL.L <ea>,FPn                              |-|--CCS6|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010000nnn0100111
  4110:             //FSUB.L <ea>,FPn                                 |-|--CC46|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010000nnn0101000
  4111:             //FCMP.L <ea>,FPn                                 |-|--CC46|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010000nnn0111000
  4112:             //FSMOVE.L <ea>,FPn                               |-|----46|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010000nnn1000000
  4113:             //FSSQRT.L <ea>,FPn                               |-|----46|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010000nnn1000001
  4114:             //FDMOVE.L <ea>,FPn                               |-|----46|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010000nnn1000100
  4115:             //FDSQRT.L <ea>,FPn                               |-|----46|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010000nnn1000101
  4116:             //FSABS.L <ea>,FPn                                |-|----46|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010000nnn1011000
  4117:             //FSNEG.L <ea>,FPn                                |-|----46|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010000nnn1011010
  4118:             //FDABS.L <ea>,FPn                                |-|----46|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010000nnn1011100
  4119:             //FDNEG.L <ea>,FPn                                |-|----46|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010000nnn1011110
  4120:             //FSDIV.L <ea>,FPn                                |-|----46|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010000nnn1100000
  4121:             //FSADD.L <ea>,FPn                                |-|----46|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010000nnn1100010
  4122:             //FSMUL.L <ea>,FPn                                |-|----46|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010000nnn1100011
  4123:             //FDDIV.L <ea>,FPn                                |-|----46|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010000nnn1100100
  4124:             //FDADD.L <ea>,FPn                                |-|----46|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010000nnn1100110
  4125:             //FDMUL.L <ea>,FPn                                |-|----46|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010000nnn1100111
  4126:             //FSSUB.L <ea>,FPn                                |-|----46|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010000nnn1101000
  4127:             //FDSUB.L <ea>,FPn                                |-|----46|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010000nnn1101100
  4128:             //FSINCOS.L <ea>,FPc:FPs                          |-|--CCSS|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010000sss0110ccc
  4129:             //FTST.S <ea>                                     |-|--CC46|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-0100010000111010
  4130:             //FMOVE.S <ea>,FPn                                |-|--CC46|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010001nnn0000000
  4131:             //FINT.S <ea>,FPn                                 |-|--CCS6|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010001nnn0000001
  4132:             //FSINH.S <ea>,FPn                                |-|--CCSS|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010001nnn0000010
  4133:             //FINTRZ.S <ea>,FPn                               |-|--CCS6|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010001nnn0000011
  4134:             //FSQRT.S <ea>,FPn                                |-|--CC46|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010001nnn0000100
  4135:             //FLOGNP1.S <ea>,FPn                              |-|--CCSS|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010001nnn0000110
  4136:             //FETOXM1.S <ea>,FPn                              |-|--CCSS|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010001nnn0001000
  4137:             //FTANH.S <ea>,FPn                                |-|--CCSS|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010001nnn0001001
  4138:             //FATAN.S <ea>,FPn                                |-|--CCSS|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010001nnn0001010
  4139:             //FASIN.S <ea>,FPn                                |-|--CCSS|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010001nnn0001100
  4140:             //FATANH.S <ea>,FPn                               |-|--CCSS|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010001nnn0001101
  4141:             //FSIN.S <ea>,FPn                                 |-|--CCSS|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010001nnn0001110
  4142:             //FTAN.S <ea>,FPn                                 |-|--CCSS|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010001nnn0001111
  4143:             //FETOX.S <ea>,FPn                                |-|--CCSS|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010001nnn0010000
  4144:             //FTWOTOX.S <ea>,FPn                              |-|--CCSS|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010001nnn0010001
  4145:             //FTENTOX.S <ea>,FPn                              |-|--CCSS|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010001nnn0010010
  4146:             //FLOGN.S <ea>,FPn                                |-|--CCSS|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010001nnn0010100
  4147:             //FLOG10.S <ea>,FPn                               |-|--CCSS|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010001nnn0010101
  4148:             //FLOG2.S <ea>,FPn                                |-|--CCSS|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010001nnn0010110
  4149:             //FABS.S <ea>,FPn                                 |-|--CC46|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010001nnn0011000
  4150:             //FCOSH.S <ea>,FPn                                |-|--CCSS|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010001nnn0011001
  4151:             //FNEG.S <ea>,FPn                                 |-|--CC46|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010001nnn0011010
  4152:             //FACOS.S <ea>,FPn                                |-|--CCSS|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010001nnn0011100
  4153:             //FCOS.S <ea>,FPn                                 |-|--CCSS|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010001nnn0011101
  4154:             //FGETEXP.S <ea>,FPn                              |-|--CCSS|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010001nnn0011110
  4155:             //FGETMAN.S <ea>,FPn                              |-|--CCSS|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010001nnn0011111
  4156:             //FDIV.S <ea>,FPn                                 |-|--CC46|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010001nnn0100000
  4157:             //FMOD.S <ea>,FPn                                 |-|--CCSS|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010001nnn0100001
  4158:             //FADD.S <ea>,FPn                                 |-|--CC46|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010001nnn0100010
  4159:             //FMUL.S <ea>,FPn                                 |-|--CC46|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010001nnn0100011
  4160:             //FSGLDIV.S <ea>,FPn                              |-|--CCS6|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010001nnn0100100
  4161:             //FREM.S <ea>,FPn                                 |-|--CCSS|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010001nnn0100101
  4162:             //FSCALE.S <ea>,FPn                               |-|--CCSS|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010001nnn0100110
  4163:             //FSGLMUL.S <ea>,FPn                              |-|--CCS6|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010001nnn0100111
  4164:             //FSUB.S <ea>,FPn                                 |-|--CC46|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010001nnn0101000
  4165:             //FCMP.S <ea>,FPn                                 |-|--CC46|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010001nnn0111000
  4166:             //FSMOVE.S <ea>,FPn                               |-|----46|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010001nnn1000000
  4167:             //FSSQRT.S <ea>,FPn                               |-|----46|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010001nnn1000001
  4168:             //FDMOVE.S <ea>,FPn                               |-|----46|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010001nnn1000100
  4169:             //FDSQRT.S <ea>,FPn                               |-|----46|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010001nnn1000101
  4170:             //FSABS.S <ea>,FPn                                |-|----46|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010001nnn1011000
  4171:             //FSNEG.S <ea>,FPn                                |-|----46|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010001nnn1011010
  4172:             //FDABS.S <ea>,FPn                                |-|----46|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010001nnn1011100
  4173:             //FDNEG.S <ea>,FPn                                |-|----46|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010001nnn1011110
  4174:             //FSDIV.S <ea>,FPn                                |-|----46|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010001nnn1100000
  4175:             //FSADD.S <ea>,FPn                                |-|----46|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010001nnn1100010
  4176:             //FSMUL.S <ea>,FPn                                |-|----46|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010001nnn1100011
  4177:             //FDDIV.S <ea>,FPn                                |-|----46|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010001nnn1100100
  4178:             //FDADD.S <ea>,FPn                                |-|----46|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010001nnn1100110
  4179:             //FDMUL.S <ea>,FPn                                |-|----46|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010001nnn1100111
  4180:             //FSSUB.S <ea>,FPn                                |-|----46|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010001nnn1101000
  4181:             //FDSUB.S <ea>,FPn                                |-|----46|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010001nnn1101100
  4182:             //FSINCOS.S <ea>,FPc:FPs                          |-|--CCSS|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010001sss0110ccc
  4183:             //FTST.W <ea>                                     |-|--CC46|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-0101000000111010
  4184:             //FMOVE.W <ea>,FPn                                |-|--CC46|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010100nnn0000000
  4185:             //FINT.W <ea>,FPn                                 |-|--CCS6|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010100nnn0000001
  4186:             //FSINH.W <ea>,FPn                                |-|--CCSS|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010100nnn0000010
  4187:             //FINTRZ.W <ea>,FPn                               |-|--CCS6|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010100nnn0000011
  4188:             //FSQRT.W <ea>,FPn                                |-|--CC46|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010100nnn0000100
  4189:             //FLOGNP1.W <ea>,FPn                              |-|--CCSS|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010100nnn0000110
  4190:             //FETOXM1.W <ea>,FPn                              |-|--CCSS|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010100nnn0001000
  4191:             //FTANH.W <ea>,FPn                                |-|--CCSS|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010100nnn0001001
  4192:             //FATAN.W <ea>,FPn                                |-|--CCSS|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010100nnn0001010
  4193:             //FASIN.W <ea>,FPn                                |-|--CCSS|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010100nnn0001100
  4194:             //FATANH.W <ea>,FPn                               |-|--CCSS|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010100nnn0001101
  4195:             //FSIN.W <ea>,FPn                                 |-|--CCSS|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010100nnn0001110
  4196:             //FTAN.W <ea>,FPn                                 |-|--CCSS|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010100nnn0001111
  4197:             //FETOX.W <ea>,FPn                                |-|--CCSS|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010100nnn0010000
  4198:             //FTWOTOX.W <ea>,FPn                              |-|--CCSS|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010100nnn0010001
  4199:             //FTENTOX.W <ea>,FPn                              |-|--CCSS|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010100nnn0010010
  4200:             //FLOGN.W <ea>,FPn                                |-|--CCSS|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010100nnn0010100
  4201:             //FLOG10.W <ea>,FPn                               |-|--CCSS|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010100nnn0010101
  4202:             //FLOG2.W <ea>,FPn                                |-|--CCSS|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010100nnn0010110
  4203:             //FABS.W <ea>,FPn                                 |-|--CC46|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010100nnn0011000
  4204:             //FCOSH.W <ea>,FPn                                |-|--CCSS|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010100nnn0011001
  4205:             //FNEG.W <ea>,FPn                                 |-|--CC46|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010100nnn0011010
  4206:             //FACOS.W <ea>,FPn                                |-|--CCSS|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010100nnn0011100
  4207:             //FCOS.W <ea>,FPn                                 |-|--CCSS|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010100nnn0011101
  4208:             //FGETEXP.W <ea>,FPn                              |-|--CCSS|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010100nnn0011110
  4209:             //FGETMAN.W <ea>,FPn                              |-|--CCSS|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010100nnn0011111
  4210:             //FDIV.W <ea>,FPn                                 |-|--CC46|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010100nnn0100000
  4211:             //FMOD.W <ea>,FPn                                 |-|--CCSS|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010100nnn0100001
  4212:             //FADD.W <ea>,FPn                                 |-|--CC46|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010100nnn0100010
  4213:             //FMUL.W <ea>,FPn                                 |-|--CC46|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010100nnn0100011
  4214:             //FSGLDIV.W <ea>,FPn                              |-|--CCS6|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010100nnn0100100
  4215:             //FREM.W <ea>,FPn                                 |-|--CCSS|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010100nnn0100101
  4216:             //FSCALE.W <ea>,FPn                               |-|--CCSS|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010100nnn0100110
  4217:             //FSGLMUL.W <ea>,FPn                              |-|--CCS6|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010100nnn0100111
  4218:             //FSUB.W <ea>,FPn                                 |-|--CC46|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010100nnn0101000
  4219:             //FCMP.W <ea>,FPn                                 |-|--CC46|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010100nnn0111000
  4220:             //FSMOVE.W <ea>,FPn                               |-|----46|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010100nnn1000000
  4221:             //FSSQRT.W <ea>,FPn                               |-|----46|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010100nnn1000001
  4222:             //FDMOVE.W <ea>,FPn                               |-|----46|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010100nnn1000100
  4223:             //FDSQRT.W <ea>,FPn                               |-|----46|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010100nnn1000101
  4224:             //FSABS.W <ea>,FPn                                |-|----46|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010100nnn1011000
  4225:             //FSNEG.W <ea>,FPn                                |-|----46|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010100nnn1011010
  4226:             //FDABS.W <ea>,FPn                                |-|----46|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010100nnn1011100
  4227:             //FDNEG.W <ea>,FPn                                |-|----46|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010100nnn1011110
  4228:             //FSDIV.W <ea>,FPn                                |-|----46|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010100nnn1100000
  4229:             //FSADD.W <ea>,FPn                                |-|----46|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010100nnn1100010
  4230:             //FSMUL.W <ea>,FPn                                |-|----46|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010100nnn1100011
  4231:             //FDDIV.W <ea>,FPn                                |-|----46|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010100nnn1100100
  4232:             //FDADD.W <ea>,FPn                                |-|----46|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010100nnn1100110
  4233:             //FDMUL.W <ea>,FPn                                |-|----46|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010100nnn1100111
  4234:             //FSSUB.W <ea>,FPn                                |-|----46|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010100nnn1101000
  4235:             //FDSUB.W <ea>,FPn                                |-|----46|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010100nnn1101100
  4236:             //FSINCOS.W <ea>,FPc:FPs                          |-|--CCSS|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010100sss0110ccc
  4237:             //FTST.B <ea>                                     |-|--CC46|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-0101100000111010
  4238:             //FMOVE.B <ea>,FPn                                |-|--CC46|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010110nnn0000000
  4239:             //FINT.B <ea>,FPn                                 |-|--CCS6|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010110nnn0000001
  4240:             //FSINH.B <ea>,FPn                                |-|--CCSS|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010110nnn0000010
  4241:             //FINTRZ.B <ea>,FPn                               |-|--CCS6|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010110nnn0000011
  4242:             //FSQRT.B <ea>,FPn                                |-|--CC46|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010110nnn0000100
  4243:             //FLOGNP1.B <ea>,FPn                              |-|--CCSS|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010110nnn0000110
  4244:             //FETOXM1.B <ea>,FPn                              |-|--CCSS|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010110nnn0001000
  4245:             //FTANH.B <ea>,FPn                                |-|--CCSS|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010110nnn0001001
  4246:             //FATAN.B <ea>,FPn                                |-|--CCSS|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010110nnn0001010
  4247:             //FASIN.B <ea>,FPn                                |-|--CCSS|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010110nnn0001100
  4248:             //FATANH.B <ea>,FPn                               |-|--CCSS|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010110nnn0001101
  4249:             //FSIN.B <ea>,FPn                                 |-|--CCSS|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010110nnn0001110
  4250:             //FTAN.B <ea>,FPn                                 |-|--CCSS|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010110nnn0001111
  4251:             //FETOX.B <ea>,FPn                                |-|--CCSS|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010110nnn0010000
  4252:             //FTWOTOX.B <ea>,FPn                              |-|--CCSS|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010110nnn0010001
  4253:             //FTENTOX.B <ea>,FPn                              |-|--CCSS|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010110nnn0010010
  4254:             //FLOGN.B <ea>,FPn                                |-|--CCSS|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010110nnn0010100
  4255:             //FLOG10.B <ea>,FPn                               |-|--CCSS|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010110nnn0010101
  4256:             //FLOG2.B <ea>,FPn                                |-|--CCSS|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010110nnn0010110
  4257:             //FABS.B <ea>,FPn                                 |-|--CC46|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010110nnn0011000
  4258:             //FCOSH.B <ea>,FPn                                |-|--CCSS|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010110nnn0011001
  4259:             //FNEG.B <ea>,FPn                                 |-|--CC46|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010110nnn0011010
  4260:             //FACOS.B <ea>,FPn                                |-|--CCSS|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010110nnn0011100
  4261:             //FCOS.B <ea>,FPn                                 |-|--CCSS|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010110nnn0011101
  4262:             //FGETEXP.B <ea>,FPn                              |-|--CCSS|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010110nnn0011110
  4263:             //FGETMAN.B <ea>,FPn                              |-|--CCSS|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010110nnn0011111
  4264:             //FDIV.B <ea>,FPn                                 |-|--CC46|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010110nnn0100000
  4265:             //FMOD.B <ea>,FPn                                 |-|--CCSS|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010110nnn0100001
  4266:             //FADD.B <ea>,FPn                                 |-|--CC46|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010110nnn0100010
  4267:             //FMUL.B <ea>,FPn                                 |-|--CC46|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010110nnn0100011
  4268:             //FSGLDIV.B <ea>,FPn                              |-|--CCS6|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010110nnn0100100
  4269:             //FREM.B <ea>,FPn                                 |-|--CCSS|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010110nnn0100101
  4270:             //FSCALE.B <ea>,FPn                               |-|--CCSS|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010110nnn0100110
  4271:             //FSGLMUL.B <ea>,FPn                              |-|--CCS6|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010110nnn0100111
  4272:             //FSUB.B <ea>,FPn                                 |-|--CC46|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010110nnn0101000
  4273:             //FCMP.B <ea>,FPn                                 |-|--CC46|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010110nnn0111000
  4274:             //FSMOVE.B <ea>,FPn                               |-|----46|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010110nnn1000000
  4275:             //FSSQRT.B <ea>,FPn                               |-|----46|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010110nnn1000001
  4276:             //FDMOVE.B <ea>,FPn                               |-|----46|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010110nnn1000100
  4277:             //FDSQRT.B <ea>,FPn                               |-|----46|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010110nnn1000101
  4278:             //FSABS.B <ea>,FPn                                |-|----46|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010110nnn1011000
  4279:             //FSNEG.B <ea>,FPn                                |-|----46|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010110nnn1011010
  4280:             //FDABS.B <ea>,FPn                                |-|----46|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010110nnn1011100
  4281:             //FDNEG.B <ea>,FPn                                |-|----46|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010110nnn1011110
  4282:             //FSDIV.B <ea>,FPn                                |-|----46|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010110nnn1100000
  4283:             //FSADD.B <ea>,FPn                                |-|----46|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010110nnn1100010
  4284:             //FSMUL.B <ea>,FPn                                |-|----46|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010110nnn1100011
  4285:             //FDDIV.B <ea>,FPn                                |-|----46|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010110nnn1100100
  4286:             //FDADD.B <ea>,FPn                                |-|----46|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010110nnn1100110
  4287:             //FDMUL.B <ea>,FPn                                |-|----46|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010110nnn1100111
  4288:             //FSSUB.B <ea>,FPn                                |-|----46|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010110nnn1101000
  4289:             //FDSUB.B <ea>,FPn                                |-|----46|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010110nnn1101100
  4290:             //FSINCOS.B <ea>,FPc:FPs                          |-|--CCSS|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010110sss0110ccc
  4291:             //FMOVE.L <ea>,FPIAR                              |-|--CC46|-|-----|-----|DAM+-WXZPI|1111_001_000_mmm_rrr-1000010000000000
  4292:             //FMOVEM.L <ea>,FPIAR                             |-|--CC46|-|-----|-----|DAM+-WXZPI|1111_001_000_mmm_rrr-1000010000000000
  4293:             //FMOVE.L <ea>,FPSR                               |-|--CC46|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-1000100000000000
  4294:             //FMOVEM.L <ea>,FPSR                              |-|--CC46|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-1000100000000000
  4295:             //FMOVE.L <ea>,FPCR                               |-|--CC46|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-1001000000000000
  4296:             //FMOVEM.L <ea>,FPCR                              |-|--CC46|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-1001000000000000
  4297:             //FMOVE.X FPn,<ea>                                |-|--CC46|-|-----|-----|  M+-WXZ  |1111_001_000_mmm_rrr-011010nnn0000000
  4298:             //FMOVE.P FPn,<ea>{#k}                            |-|--CCSS|-|-----|-----|  M+-WXZ  |1111_001_000_mmm_rrr-011011nnnkkkkkkk
  4299:             //FMOVE.D FPn,<ea>                                |-|--CC46|-|-----|-----|  M+-WXZ  |1111_001_000_mmm_rrr-011101nnn0000000
  4300:             //FMOVE.P FPn,<ea>{Dk}                            |-|--CCSS|-|-----|-----|  M+-WXZ  |1111_001_000_mmm_rrr-011111nnnkkk0000
  4301:             //FMOVEM.L FPSR/FPIAR,<ea>                        |-|--CC46|-|-----|-----|  M+-WXZ  |1111_001_000_mmm_rrr-1010110000000000
  4302:             //FMOVEM.L FPCR/FPIAR,<ea>                        |-|--CC46|-|-----|-----|  M+-WXZ  |1111_001_000_mmm_rrr-1011010000000000
  4303:             //FMOVEM.L FPCR/FPSR,<ea>                         |-|--CC46|-|-----|-----|  M+-WXZ  |1111_001_000_mmm_rrr-1011100000000000
  4304:             //FMOVEM.L FPCR/FPSR/FPIAR,<ea>                   |-|--CC46|-|-----|-----|  M+-WXZ  |1111_001_000_mmm_rrr-1011110000000000
  4305:             //FMOVEM.X #<data>,<ea>                           |-|--CC46|-|-----|-----|  M  WXZ  |1111_001_000_mmm_rrr-11110000dddddddd
  4306:             //FMOVEM.X <list>,<ea>                            |-|--CC46|-|-----|-----|  M  WXZ  |1111_001_000_mmm_rrr-11110000llllllll
  4307:             //FMOVEM.X Dl,<ea>                                |-|--CC4S|-|-----|-----|  M  WXZ  |1111_001_000_mmm_rrr-111110000lll0000
  4308:             //FMOVEM.L <ea>,FPSR/FPIAR                        |-|--CC46|-|-----|-----|  M+-WXZP |1111_001_000_mmm_rrr-1000110000000000
  4309:             //FMOVEM.L <ea>,FPCR/FPIAR                        |-|--CC46|-|-----|-----|  M+-WXZP |1111_001_000_mmm_rrr-1001010000000000
  4310:             //FMOVEM.L <ea>,FPCR/FPSR                         |-|--CC46|-|-----|-----|  M+-WXZP |1111_001_000_mmm_rrr-1001100000000000
  4311:             //FMOVEM.L <ea>,FPCR/FPSR/FPIAR                   |-|--CC46|-|-----|-----|  M+-WXZP |1111_001_000_mmm_rrr-1001110000000000
  4312:             //FMOVEM.X <ea>,#<data>                           |-|--CC46|-|-----|-----|  M+ WXZP |1111_001_000_mmm_rrr-11010000dddddddd
  4313:             //FMOVEM.X <ea>,<list>                            |-|--CC46|-|-----|-----|  M+ WXZP |1111_001_000_mmm_rrr-11010000llllllll
  4314:             //FMOVEM.X <ea>,Dl                                |-|--CC4S|-|-----|-----|  M+ WXZP |1111_001_000_mmm_rrr-110110000lll0000
  4315:             //FTST.X <ea>                                     |-|--CC46|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-0100100000111010
  4316:             //FMOVE.X <ea>,FPn                                |-|--CC46|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010010nnn0000000
  4317:             //FINT.X <ea>,FPn                                 |-|--CCS6|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010010nnn0000001
  4318:             //FSINH.X <ea>,FPn                                |-|--CCSS|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010010nnn0000010
  4319:             //FINTRZ.X <ea>,FPn                               |-|--CCS6|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010010nnn0000011
  4320:             //FSQRT.X <ea>,FPn                                |-|--CC46|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010010nnn0000100
  4321:             //FLOGNP1.X <ea>,FPn                              |-|--CCSS|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010010nnn0000110
  4322:             //FETOXM1.X <ea>,FPn                              |-|--CCSS|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010010nnn0001000
  4323:             //FTANH.X <ea>,FPn                                |-|--CCSS|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010010nnn0001001
  4324:             //FATAN.X <ea>,FPn                                |-|--CCSS|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010010nnn0001010
  4325:             //FASIN.X <ea>,FPn                                |-|--CCSS|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010010nnn0001100
  4326:             //FATANH.X <ea>,FPn                               |-|--CCSS|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010010nnn0001101
  4327:             //FSIN.X <ea>,FPn                                 |-|--CCSS|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010010nnn0001110
  4328:             //FTAN.X <ea>,FPn                                 |-|--CCSS|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010010nnn0001111
  4329:             //FETOX.X <ea>,FPn                                |-|--CCSS|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010010nnn0010000
  4330:             //FTWOTOX.X <ea>,FPn                              |-|--CCSS|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010010nnn0010001
  4331:             //FTENTOX.X <ea>,FPn                              |-|--CCSS|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010010nnn0010010
  4332:             //FLOGN.X <ea>,FPn                                |-|--CCSS|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010010nnn0010100
  4333:             //FLOG10.X <ea>,FPn                               |-|--CCSS|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010010nnn0010101
  4334:             //FLOG2.X <ea>,FPn                                |-|--CCSS|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010010nnn0010110
  4335:             //FABS.X <ea>,FPn                                 |-|--CC46|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010010nnn0011000
  4336:             //FCOSH.X <ea>,FPn                                |-|--CCSS|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010010nnn0011001
  4337:             //FNEG.X <ea>,FPn                                 |-|--CC46|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010010nnn0011010
  4338:             //FACOS.X <ea>,FPn                                |-|--CCSS|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010010nnn0011100
  4339:             //FCOS.X <ea>,FPn                                 |-|--CCSS|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010010nnn0011101
  4340:             //FGETEXP.X <ea>,FPn                              |-|--CCSS|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010010nnn0011110
  4341:             //FGETMAN.X <ea>,FPn                              |-|--CCSS|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010010nnn0011111
  4342:             //FDIV.X <ea>,FPn                                 |-|--CC46|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010010nnn0100000
  4343:             //FMOD.X <ea>,FPn                                 |-|--CCSS|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010010nnn0100001
  4344:             //FADD.X <ea>,FPn                                 |-|--CC46|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010010nnn0100010
  4345:             //FMUL.X <ea>,FPn                                 |-|--CC46|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010010nnn0100011
  4346:             //FSGLDIV.X <ea>,FPn                              |-|--CCS6|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010010nnn0100100
  4347:             //FREM.X <ea>,FPn                                 |-|--CCSS|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010010nnn0100101
  4348:             //FSCALE.X <ea>,FPn                               |-|--CCSS|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010010nnn0100110
  4349:             //FSGLMUL.X <ea>,FPn                              |-|--CCS6|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010010nnn0100111
  4350:             //FSUB.X <ea>,FPn                                 |-|--CC46|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010010nnn0101000
  4351:             //FCMP.X <ea>,FPn                                 |-|--CC46|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010010nnn0111000
  4352:             //FSMOVE.X <ea>,FPn                               |-|----46|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010010nnn1000000
  4353:             //FSSQRT.X <ea>,FPn                               |-|----46|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010010nnn1000001
  4354:             //FDMOVE.X <ea>,FPn                               |-|----46|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010010nnn1000100
  4355:             //FDSQRT.X <ea>,FPn                               |-|----46|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010010nnn1000101
  4356:             //FSABS.X <ea>,FPn                                |-|----46|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010010nnn1011000
  4357:             //FSNEG.X <ea>,FPn                                |-|----46|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010010nnn1011010
  4358:             //FDABS.X <ea>,FPn                                |-|----46|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010010nnn1011100
  4359:             //FDNEG.X <ea>,FPn                                |-|----46|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010010nnn1011110
  4360:             //FSDIV.X <ea>,FPn                                |-|----46|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010010nnn1100000
  4361:             //FSADD.X <ea>,FPn                                |-|----46|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010010nnn1100010
  4362:             //FSMUL.X <ea>,FPn                                |-|----46|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010010nnn1100011
  4363:             //FDDIV.X <ea>,FPn                                |-|----46|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010010nnn1100100
  4364:             //FDADD.X <ea>,FPn                                |-|----46|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010010nnn1100110
  4365:             //FDMUL.X <ea>,FPn                                |-|----46|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010010nnn1100111
  4366:             //FSSUB.X <ea>,FPn                                |-|----46|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010010nnn1101000
  4367:             //FDSUB.X <ea>,FPn                                |-|----46|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010010nnn1101100
  4368:             //FSINCOS.X <ea>,FPc:FPs                          |-|--CCSS|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010010sss0110ccc
  4369:             //FTST.P <ea>                                     |-|--CCSS|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-0100110000111010
  4370:             //FMOVE.P <ea>,FPn                                |-|--CCSS|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010011nnn0000000
  4371:             //FINT.P <ea>,FPn                                 |-|--CCSS|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010011nnn0000001
  4372:             //FSINH.P <ea>,FPn                                |-|--CCSS|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010011nnn0000010
  4373:             //FINTRZ.P <ea>,FPn                               |-|--CCSS|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010011nnn0000011
  4374:             //FSQRT.P <ea>,FPn                                |-|--CCSS|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010011nnn0000100
  4375:             //FLOGNP1.P <ea>,FPn                              |-|--CCSS|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010011nnn0000110
  4376:             //FETOXM1.P <ea>,FPn                              |-|--CCSS|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010011nnn0001000
  4377:             //FTANH.P <ea>,FPn                                |-|--CCSS|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010011nnn0001001
  4378:             //FATAN.P <ea>,FPn                                |-|--CCSS|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010011nnn0001010
  4379:             //FASIN.P <ea>,FPn                                |-|--CCSS|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010011nnn0001100
  4380:             //FATANH.P <ea>,FPn                               |-|--CCSS|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010011nnn0001101
  4381:             //FSIN.P <ea>,FPn                                 |-|--CCSS|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010011nnn0001110
  4382:             //FTAN.P <ea>,FPn                                 |-|--CCSS|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010011nnn0001111
  4383:             //FETOX.P <ea>,FPn                                |-|--CCSS|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010011nnn0010000
  4384:             //FTWOTOX.P <ea>,FPn                              |-|--CCSS|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010011nnn0010001
  4385:             //FTENTOX.P <ea>,FPn                              |-|--CCSS|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010011nnn0010010
  4386:             //FLOGN.P <ea>,FPn                                |-|--CCSS|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010011nnn0010100
  4387:             //FLOG10.P <ea>,FPn                               |-|--CCSS|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010011nnn0010101
  4388:             //FLOG2.P <ea>,FPn                                |-|--CCSS|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010011nnn0010110
  4389:             //FABS.P <ea>,FPn                                 |-|--CCSS|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010011nnn0011000
  4390:             //FCOSH.P <ea>,FPn                                |-|--CCSS|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010011nnn0011001
  4391:             //FNEG.P <ea>,FPn                                 |-|--CCSS|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010011nnn0011010
  4392:             //FACOS.P <ea>,FPn                                |-|--CCSS|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010011nnn0011100
  4393:             //FCOS.P <ea>,FPn                                 |-|--CCSS|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010011nnn0011101
  4394:             //FGETEXP.P <ea>,FPn                              |-|--CCSS|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010011nnn0011110
  4395:             //FGETMAN.P <ea>,FPn                              |-|--CCSS|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010011nnn0011111
  4396:             //FDIV.P <ea>,FPn                                 |-|--CCSS|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010011nnn0100000
  4397:             //FMOD.P <ea>,FPn                                 |-|--CCSS|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010011nnn0100001
  4398:             //FADD.P <ea>,FPn                                 |-|--CCSS|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010011nnn0100010
  4399:             //FMUL.P <ea>,FPn                                 |-|--CCSS|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010011nnn0100011
  4400:             //FSGLDIV.P <ea>,FPn                              |-|--CCSS|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010011nnn0100100
  4401:             //FREM.P <ea>,FPn                                 |-|--CCSS|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010011nnn0100101
  4402:             //FSCALE.P <ea>,FPn                               |-|--CCSS|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010011nnn0100110
  4403:             //FSGLMUL.P <ea>,FPn                              |-|--CCSS|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010011nnn0100111
  4404:             //FSUB.P <ea>,FPn                                 |-|--CCSS|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010011nnn0101000
  4405:             //FCMP.P <ea>,FPn                                 |-|--CCSS|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010011nnn0111000
  4406:             //FSMOVE.P <ea>,FPn                               |-|----SS|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010011nnn1000000
  4407:             //FSSQRT.P <ea>,FPn                               |-|----SS|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010011nnn1000001
  4408:             //FDMOVE.P <ea>,FPn                               |-|----SS|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010011nnn1000100
  4409:             //FDSQRT.P <ea>,FPn                               |-|----SS|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010011nnn1000101
  4410:             //FSABS.P <ea>,FPn                                |-|----SS|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010011nnn1011000
  4411:             //FSNEG.P <ea>,FPn                                |-|----SS|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010011nnn1011010
  4412:             //FDABS.P <ea>,FPn                                |-|----SS|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010011nnn1011100
  4413:             //FDNEG.P <ea>,FPn                                |-|----SS|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010011nnn1011110
  4414:             //FSDIV.P <ea>,FPn                                |-|----SS|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010011nnn1100000
  4415:             //FSADD.P <ea>,FPn                                |-|----SS|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010011nnn1100010
  4416:             //FSMUL.P <ea>,FPn                                |-|----SS|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010011nnn1100011
  4417:             //FDDIV.P <ea>,FPn                                |-|----SS|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010011nnn1100100
  4418:             //FDADD.P <ea>,FPn                                |-|----SS|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010011nnn1100110
  4419:             //FDMUL.P <ea>,FPn                                |-|----SS|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010011nnn1100111
  4420:             //FSSUB.P <ea>,FPn                                |-|----SS|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010011nnn1101000
  4421:             //FDSUB.P <ea>,FPn                                |-|----SS|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010011nnn1101100
  4422:             //FSINCOS.P <ea>,FPc:FPs                          |-|--CCSS|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010011sss0110ccc
  4423:             //FTST.D <ea>                                     |-|--CC46|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-0101010000111010
  4424:             //FMOVE.D <ea>,FPn                                |-|--CC46|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010101nnn0000000
  4425:             //FINT.D <ea>,FPn                                 |-|--CCS6|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010101nnn0000001
  4426:             //FSINH.D <ea>,FPn                                |-|--CCSS|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010101nnn0000010
  4427:             //FINTRZ.D <ea>,FPn                               |-|--CCS6|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010101nnn0000011
  4428:             //FSQRT.D <ea>,FPn                                |-|--CC46|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010101nnn0000100
  4429:             //FLOGNP1.D <ea>,FPn                              |-|--CCSS|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010101nnn0000110
  4430:             //FETOXM1.D <ea>,FPn                              |-|--CCSS|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010101nnn0001000
  4431:             //FTANH.D <ea>,FPn                                |-|--CCSS|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010101nnn0001001
  4432:             //FATAN.D <ea>,FPn                                |-|--CCSS|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010101nnn0001010
  4433:             //FASIN.D <ea>,FPn                                |-|--CCSS|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010101nnn0001100
  4434:             //FATANH.D <ea>,FPn                               |-|--CCSS|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010101nnn0001101
  4435:             //FSIN.D <ea>,FPn                                 |-|--CCSS|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010101nnn0001110
  4436:             //FTAN.D <ea>,FPn                                 |-|--CCSS|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010101nnn0001111
  4437:             //FETOX.D <ea>,FPn                                |-|--CCSS|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010101nnn0010000
  4438:             //FTWOTOX.D <ea>,FPn                              |-|--CCSS|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010101nnn0010001
  4439:             //FTENTOX.D <ea>,FPn                              |-|--CCSS|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010101nnn0010010
  4440:             //FLOGN.D <ea>,FPn                                |-|--CCSS|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010101nnn0010100
  4441:             //FLOG10.D <ea>,FPn                               |-|--CCSS|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010101nnn0010101
  4442:             //FLOG2.D <ea>,FPn                                |-|--CCSS|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010101nnn0010110
  4443:             //FABS.D <ea>,FPn                                 |-|--CC46|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010101nnn0011000
  4444:             //FCOSH.D <ea>,FPn                                |-|--CCSS|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010101nnn0011001
  4445:             //FNEG.D <ea>,FPn                                 |-|--CC46|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010101nnn0011010
  4446:             //FACOS.D <ea>,FPn                                |-|--CCSS|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010101nnn0011100
  4447:             //FCOS.D <ea>,FPn                                 |-|--CCSS|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010101nnn0011101
  4448:             //FGETEXP.D <ea>,FPn                              |-|--CCSS|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010101nnn0011110
  4449:             //FGETMAN.D <ea>,FPn                              |-|--CCSS|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010101nnn0011111
  4450:             //FDIV.D <ea>,FPn                                 |-|--CC46|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010101nnn0100000
  4451:             //FMOD.D <ea>,FPn                                 |-|--CCSS|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010101nnn0100001
  4452:             //FADD.D <ea>,FPn                                 |-|--CC46|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010101nnn0100010
  4453:             //FMUL.D <ea>,FPn                                 |-|--CC46|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010101nnn0100011
  4454:             //FSGLDIV.D <ea>,FPn                              |-|--CCS6|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010101nnn0100100
  4455:             //FREM.D <ea>,FPn                                 |-|--CCSS|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010101nnn0100101
  4456:             //FSCALE.D <ea>,FPn                               |-|--CCSS|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010101nnn0100110
  4457:             //FSGLMUL.D <ea>,FPn                              |-|--CCS6|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010101nnn0100111
  4458:             //FSUB.D <ea>,FPn                                 |-|--CC46|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010101nnn0101000
  4459:             //FCMP.D <ea>,FPn                                 |-|--CC46|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010101nnn0111000
  4460:             //FSMOVE.D <ea>,FPn                               |-|----46|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010101nnn1000000
  4461:             //FSSQRT.D <ea>,FPn                               |-|----46|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010101nnn1000001
  4462:             //FDMOVE.D <ea>,FPn                               |-|----46|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010101nnn1000100
  4463:             //FDSQRT.D <ea>,FPn                               |-|----46|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010101nnn1000101
  4464:             //FSABS.D <ea>,FPn                                |-|----46|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010101nnn1011000
  4465:             //FSNEG.D <ea>,FPn                                |-|----46|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010101nnn1011010
  4466:             //FDABS.D <ea>,FPn                                |-|----46|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010101nnn1011100
  4467:             //FDNEG.D <ea>,FPn                                |-|----46|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010101nnn1011110
  4468:             //FSDIV.D <ea>,FPn                                |-|----46|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010101nnn1100000
  4469:             //FSADD.D <ea>,FPn                                |-|----46|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010101nnn1100010
  4470:             //FSMUL.D <ea>,FPn                                |-|----46|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010101nnn1100011
  4471:             //FDDIV.D <ea>,FPn                                |-|----46|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010101nnn1100100
  4472:             //FDADD.D <ea>,FPn                                |-|----46|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010101nnn1100110
  4473:             //FDMUL.D <ea>,FPn                                |-|----46|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010101nnn1100111
  4474:             //FSSUB.D <ea>,FPn                                |-|----46|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010101nnn1101000
  4475:             //FDSUB.D <ea>,FPn                                |-|----46|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010101nnn1101100
  4476:             //FSINCOS.D <ea>,FPc:FPs                          |-|--CCSS|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010101sss0110ccc
  4477:             //FMOVEM.X #<data>,-(Ar)                          |-|--CC46|-|-----|-----|    -     |1111_001_000_100_rrr-11100000dddddddd
  4478:             //FMOVEM.X <list>,-(Ar)                           |-|--CC46|-|-----|-----|    -     |1111_001_000_100_rrr-11100000llllllll
  4479:             //FMOVEM.X Dl,-(Ar)                               |-|--CC4S|-|-----|-----|    -     |1111_001_000_100_rrr-111010000lll0000
  4480:             //FMOVEM.L #<data>,#<data>,FPSR/FPIAR             |-|--CC4S|-|-----|-----|         I|1111_001_000_111_100-1000110000000000-{data}
  4481:             //FMOVEM.L #<data>,#<data>,FPCR/FPIAR             |-|--CC4S|-|-----|-----|         I|1111_001_000_111_100-1001010000000000-{data}
  4482:             //FMOVEM.L #<data>,#<data>,FPCR/FPSR              |-|--CC4S|-|-----|-----|         I|1111_001_000_111_100-1001100000000000-{data}
  4483:             //FMOVEM.L #<data>,#<data>,#<data>,FPCR/FPSR/FPIAR|-|--CC4S|-|-----|-----|         I|1111_001_000_111_100-1001110000000000-{data}
  4484:           case 0b1111_001_000:
  4485:             irpFgen ();
  4486:             break irpSwitch;
  4487: 
  4488:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  4489:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  4490:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  4491:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  4492:             //FSF.B <ea>                                      |-|--CC4S|-|-----|-----|D M+-WXZ  |1111_001_001_mmm_rrr-0000000000000000
  4493:             //FSEQ.B <ea>                                     |-|--CC4S|-|-----|-----|D M+-WXZ  |1111_001_001_mmm_rrr-0000000000000001
  4494:             //FSOGT.B <ea>                                    |-|--CC4S|-|-----|-----|D M+-WXZ  |1111_001_001_mmm_rrr-0000000000000010
  4495:             //FSOGE.B <ea>                                    |-|--CC4S|-|-----|-----|D M+-WXZ  |1111_001_001_mmm_rrr-0000000000000011
  4496:             //FSOLT.B <ea>                                    |-|--CC4S|-|-----|-----|D M+-WXZ  |1111_001_001_mmm_rrr-0000000000000100
  4497:             //FSOLE.B <ea>                                    |-|--CC4S|-|-----|-----|D M+-WXZ  |1111_001_001_mmm_rrr-0000000000000101
  4498:             //FSOGL.B <ea>                                    |-|--CC4S|-|-----|-----|D M+-WXZ  |1111_001_001_mmm_rrr-0000000000000110
  4499:             //FSOR.B <ea>                                     |-|--CC4S|-|-----|-----|D M+-WXZ  |1111_001_001_mmm_rrr-0000000000000111
  4500:             //FSUN.B <ea>                                     |-|--CC4S|-|-----|-----|D M+-WXZ  |1111_001_001_mmm_rrr-0000000000001000
  4501:             //FSUEQ.B <ea>                                    |-|--CC4S|-|-----|-----|D M+-WXZ  |1111_001_001_mmm_rrr-0000000000001001
  4502:             //FSUGT.B <ea>                                    |-|--CC4S|-|-----|-----|D M+-WXZ  |1111_001_001_mmm_rrr-0000000000001010
  4503:             //FSUGE.B <ea>                                    |-|--CC4S|-|-----|-----|D M+-WXZ  |1111_001_001_mmm_rrr-0000000000001011
  4504:             //FSULT.B <ea>                                    |-|--CC4S|-|-----|-----|D M+-WXZ  |1111_001_001_mmm_rrr-0000000000001100
  4505:             //FSULE.B <ea>                                    |-|--CC4S|-|-----|-----|D M+-WXZ  |1111_001_001_mmm_rrr-0000000000001101
  4506:             //FSNE.B <ea>                                     |-|--CC4S|-|-----|-----|D M+-WXZ  |1111_001_001_mmm_rrr-0000000000001110
  4507:             //FST.B <ea>                                      |-|--CC4S|-|-----|-----|D M+-WXZ  |1111_001_001_mmm_rrr-0000000000001111
  4508:             //FSSF.B <ea>                                     |-|--CC4S|-|-----|-----|D M+-WXZ  |1111_001_001_mmm_rrr-0000000000010000
  4509:             //FSSEQ.B <ea>                                    |-|--CC4S|-|-----|-----|D M+-WXZ  |1111_001_001_mmm_rrr-0000000000010001
  4510:             //FSGT.B <ea>                                     |-|--CC4S|-|-----|-----|D M+-WXZ  |1111_001_001_mmm_rrr-0000000000010010
  4511:             //FSGE.B <ea>                                     |-|--CC4S|-|-----|-----|D M+-WXZ  |1111_001_001_mmm_rrr-0000000000010011
  4512:             //FSLT.B <ea>                                     |-|--CC4S|-|-----|-----|D M+-WXZ  |1111_001_001_mmm_rrr-0000000000010100
  4513:             //FSLE.B <ea>                                     |-|--CC4S|-|-----|-----|D M+-WXZ  |1111_001_001_mmm_rrr-0000000000010101
  4514:             //FSGL.B <ea>                                     |-|--CC4S|-|-----|-----|D M+-WXZ  |1111_001_001_mmm_rrr-0000000000010110
  4515:             //FSGLE.B <ea>                                    |-|--CC4S|-|-----|-----|D M+-WXZ  |1111_001_001_mmm_rrr-0000000000010111
  4516:             //FSNGLE.B <ea>                                   |-|--CC4S|-|-----|-----|D M+-WXZ  |1111_001_001_mmm_rrr-0000000000011000
  4517:             //FSNGL.B <ea>                                    |-|--CC4S|-|-----|-----|D M+-WXZ  |1111_001_001_mmm_rrr-0000000000011001
  4518:             //FSNLE.B <ea>                                    |-|--CC4S|-|-----|-----|D M+-WXZ  |1111_001_001_mmm_rrr-0000000000011010
  4519:             //FSNLT.B <ea>                                    |-|--CC4S|-|-----|-----|D M+-WXZ  |1111_001_001_mmm_rrr-0000000000011011
  4520:             //FSNGE.B <ea>                                    |-|--CC4S|-|-----|-----|D M+-WXZ  |1111_001_001_mmm_rrr-0000000000011100
  4521:             //FSNGT.B <ea>                                    |-|--CC4S|-|-----|-----|D M+-WXZ  |1111_001_001_mmm_rrr-0000000000011101
  4522:             //FSSNE.B <ea>                                    |-|--CC4S|-|-----|-----|D M+-WXZ  |1111_001_001_mmm_rrr-0000000000011110
  4523:             //FSST.B <ea>                                     |-|--CC4S|-|-----|-----|D M+-WXZ  |1111_001_001_mmm_rrr-0000000000011111
  4524:             //FDBF Dr,<label>                                 |-|--CC4S|-|-----|-----|          |1111_001_001_001_rrr-0000000000000000-{offset}
  4525:             //FDBRA Dr,<label>                                |A|--CC4S|-|-----|-----|          |1111_001_001_001_rrr-0000000000000000-{offset}       [FDBF Dr,<label>]
  4526:             //FDBEQ Dr,<label>                                |-|--CC4S|-|-----|-----|          |1111_001_001_001_rrr-0000000000000001-{offset}
  4527:             //FDBOGT Dr,<label>                               |-|--CC4S|-|-----|-----|          |1111_001_001_001_rrr-0000000000000010-{offset}
  4528:             //FDBOGE Dr,<label>                               |-|--CC4S|-|-----|-----|          |1111_001_001_001_rrr-0000000000000011-{offset}
  4529:             //FDBOLT Dr,<label>                               |-|--CC4S|-|-----|-----|          |1111_001_001_001_rrr-0000000000000100-{offset}
  4530:             //FDBOLE Dr,<label>                               |-|--CC4S|-|-----|-----|          |1111_001_001_001_rrr-0000000000000101-{offset}
  4531:             //FDBOGL Dr,<label>                               |-|--CC4S|-|-----|-----|          |1111_001_001_001_rrr-0000000000000110-{offset}
  4532:             //FDBOR Dr,<label>                                |-|--CC4S|-|-----|-----|          |1111_001_001_001_rrr-0000000000000111-{offset}
  4533:             //FDBUN Dr,<label>                                |-|--CC4S|-|-----|-----|          |1111_001_001_001_rrr-0000000000001000-{offset}
  4534:             //FDBUEQ Dr,<label>                               |-|--CC4S|-|-----|-----|          |1111_001_001_001_rrr-0000000000001001-{offset}
  4535:             //FDBUGT Dr,<label>                               |-|--CC4S|-|-----|-----|          |1111_001_001_001_rrr-0000000000001010-{offset}
  4536:             //FDBUGE Dr,<label>                               |-|--CC4S|-|-----|-----|          |1111_001_001_001_rrr-0000000000001011-{offset}
  4537:             //FDBULT Dr,<label>                               |-|--CC4S|-|-----|-----|          |1111_001_001_001_rrr-0000000000001100-{offset}
  4538:             //FDBULE Dr,<label>                               |-|--CC4S|-|-----|-----|          |1111_001_001_001_rrr-0000000000001101-{offset}
  4539:             //FDBNE Dr,<label>                                |-|--CC4S|-|-----|-----|          |1111_001_001_001_rrr-0000000000001110-{offset}
  4540:             //FDBT Dr,<label>                                 |-|--CC4S|-|-----|-----|          |1111_001_001_001_rrr-0000000000001111-{offset}
  4541:             //FDBSF Dr,<label>                                |-|--CC4S|-|-----|-----|          |1111_001_001_001_rrr-0000000000010000-{offset}
  4542:             //FDBSEQ Dr,<label>                               |-|--CC4S|-|-----|-----|          |1111_001_001_001_rrr-0000000000010001-{offset}
  4543:             //FDBGT Dr,<label>                                |-|--CC4S|-|-----|-----|          |1111_001_001_001_rrr-0000000000010010-{offset}
  4544:             //FDBGE Dr,<label>                                |-|--CC4S|-|-----|-----|          |1111_001_001_001_rrr-0000000000010011-{offset}
  4545:             //FDBLT Dr,<label>                                |-|--CC4S|-|-----|-----|          |1111_001_001_001_rrr-0000000000010100-{offset}
  4546:             //FDBLE Dr,<label>                                |-|--CC4S|-|-----|-----|          |1111_001_001_001_rrr-0000000000010101-{offset}
  4547:             //FDBGL Dr,<label>                                |-|--CC4S|-|-----|-----|          |1111_001_001_001_rrr-0000000000010110-{offset}
  4548:             //FDBGLE Dr,<label>                               |-|--CC4S|-|-----|-----|          |1111_001_001_001_rrr-0000000000010111-{offset}
  4549:             //FDBNGLE Dr,<label>                              |-|--CC4S|-|-----|-----|          |1111_001_001_001_rrr-0000000000011000-{offset}
  4550:             //FDBNGL Dr,<label>                               |-|--CC4S|-|-----|-----|          |1111_001_001_001_rrr-0000000000011001-{offset}
  4551:             //FDBNLE Dr,<label>                               |-|--CC4S|-|-----|-----|          |1111_001_001_001_rrr-0000000000011010-{offset}
  4552:             //FDBNLT Dr,<label>                               |-|--CC4S|-|-----|-----|          |1111_001_001_001_rrr-0000000000011011-{offset}
  4553:             //FDBNGE Dr,<label>                               |-|--CC4S|-|-----|-----|          |1111_001_001_001_rrr-0000000000011100-{offset}
  4554:             //FDBNGT Dr,<label>                               |-|--CC4S|-|-----|-----|          |1111_001_001_001_rrr-0000000000011101-{offset}
  4555:             //FDBSNE Dr,<label>                               |-|--CC4S|-|-----|-----|          |1111_001_001_001_rrr-0000000000011110-{offset}
  4556:             //FDBST Dr,<label>                                |-|--CC4S|-|-----|-----|          |1111_001_001_001_rrr-0000000000011111-{offset}
  4557:             //FTRAPF.W #<data>                                |-|--CC4S|-|-----|-----|          |1111_001_001_111_010-0000000000000000-{data}
  4558:             //FTRAPEQ.W #<data>                               |-|--CC4S|-|-----|-----|          |1111_001_001_111_010-0000000000000001-{data}
  4559:             //FTRAPOGT.W #<data>                              |-|--CC4S|-|-----|-----|          |1111_001_001_111_010-0000000000000010-{data}
  4560:             //FTRAPOGE.W #<data>                              |-|--CC4S|-|-----|-----|          |1111_001_001_111_010-0000000000000011-{data}
  4561:             //FTRAPOLT.W #<data>                              |-|--CC4S|-|-----|-----|          |1111_001_001_111_010-0000000000000100-{data}
  4562:             //FTRAPOLE.W #<data>                              |-|--CC4S|-|-----|-----|          |1111_001_001_111_010-0000000000000101-{data}
  4563:             //FTRAPOGL.W #<data>                              |-|--CC4S|-|-----|-----|          |1111_001_001_111_010-0000000000000110-{data}
  4564:             //FTRAPOR.W #<data>                               |-|--CC4S|-|-----|-----|          |1111_001_001_111_010-0000000000000111-{data}
  4565:             //FTRAPUN.W #<data>                               |-|--CC4S|-|-----|-----|          |1111_001_001_111_010-0000000000001000-{data}
  4566:             //FTRAPUEQ.W #<data>                              |-|--CC4S|-|-----|-----|          |1111_001_001_111_010-0000000000001001-{data}
  4567:             //FTRAPUGT.W #<data>                              |-|--CC4S|-|-----|-----|          |1111_001_001_111_010-0000000000001010-{data}
  4568:             //FTRAPUGE.W #<data>                              |-|--CC4S|-|-----|-----|          |1111_001_001_111_010-0000000000001011-{data}
  4569:             //FTRAPULT.W #<data>                              |-|--CC4S|-|-----|-----|          |1111_001_001_111_010-0000000000001100-{data}
  4570:             //FTRAPULE.W #<data>                              |-|--CC4S|-|-----|-----|          |1111_001_001_111_010-0000000000001101-{data}
  4571:             //FTRAPNE.W #<data>                               |-|--CC4S|-|-----|-----|          |1111_001_001_111_010-0000000000001110-{data}
  4572:             //FTRAPT.W #<data>                                |-|--CC4S|-|-----|-----|          |1111_001_001_111_010-0000000000001111-{data}
  4573:             //FTRAPSF.W #<data>                               |-|--CC4S|-|-----|-----|          |1111_001_001_111_010-0000000000010000-{data}
  4574:             //FTRAPSEQ.W #<data>                              |-|--CC4S|-|-----|-----|          |1111_001_001_111_010-0000000000010001-{data}
  4575:             //FTRAPGT.W #<data>                               |-|--CC4S|-|-----|-----|          |1111_001_001_111_010-0000000000010010-{data}
  4576:             //FTRAPGE.W #<data>                               |-|--CC4S|-|-----|-----|          |1111_001_001_111_010-0000000000010011-{data}
  4577:             //FTRAPLT.W #<data>                               |-|--CC4S|-|-----|-----|          |1111_001_001_111_010-0000000000010100-{data}
  4578:             //FTRAPLE.W #<data>                               |-|--CC4S|-|-----|-----|          |1111_001_001_111_010-0000000000010101-{data}
  4579:             //FTRAPGL.W #<data>                               |-|--CC4S|-|-----|-----|          |1111_001_001_111_010-0000000000010110-{data}
  4580:             //FTRAPGLE.W #<data>                              |-|--CC4S|-|-----|-----|          |1111_001_001_111_010-0000000000010111-{data}
  4581:             //FTRAPNGLE.W #<data>                             |-|--CC4S|-|-----|-----|          |1111_001_001_111_010-0000000000011000-{data}
  4582:             //FTRAPNGL.W #<data>                              |-|--CC4S|-|-----|-----|          |1111_001_001_111_010-0000000000011001-{data}
  4583:             //FTRAPNLE.W #<data>                              |-|--CC4S|-|-----|-----|          |1111_001_001_111_010-0000000000011010-{data}
  4584:             //FTRAPNLT.W #<data>                              |-|--CC4S|-|-----|-----|          |1111_001_001_111_010-0000000000011011-{data}
  4585:             //FTRAPNGE.W #<data>                              |-|--CC4S|-|-----|-----|          |1111_001_001_111_010-0000000000011100-{data}
  4586:             //FTRAPNGT.W #<data>                              |-|--CC4S|-|-----|-----|          |1111_001_001_111_010-0000000000011101-{data}
  4587:             //FTRAPSNE.W #<data>                              |-|--CC4S|-|-----|-----|          |1111_001_001_111_010-0000000000011110-{data}
  4588:             //FTRAPST.W #<data>                               |-|--CC4S|-|-----|-----|          |1111_001_001_111_010-0000000000011111-{data}
  4589:             //FTRAPF.L #<data>                                |-|--CC4S|-|-----|-----|          |1111_001_001_111_011-0000000000000000-{data}
  4590:             //FTRAPEQ.L #<data>                               |-|--CC4S|-|-----|-----|          |1111_001_001_111_011-0000000000000001-{data}
  4591:             //FTRAPOGT.L #<data>                              |-|--CC4S|-|-----|-----|          |1111_001_001_111_011-0000000000000010-{data}
  4592:             //FTRAPOGE.L #<data>                              |-|--CC4S|-|-----|-----|          |1111_001_001_111_011-0000000000000011-{data}
  4593:             //FTRAPOLT.L #<data>                              |-|--CC4S|-|-----|-----|          |1111_001_001_111_011-0000000000000100-{data}
  4594:             //FTRAPOLE.L #<data>                              |-|--CC4S|-|-----|-----|          |1111_001_001_111_011-0000000000000101-{data}
  4595:             //FTRAPOGL.L #<data>                              |-|--CC4S|-|-----|-----|          |1111_001_001_111_011-0000000000000110-{data}
  4596:             //FTRAPOR.L #<data>                               |-|--CC4S|-|-----|-----|          |1111_001_001_111_011-0000000000000111-{data}
  4597:             //FTRAPUN.L #<data>                               |-|--CC4S|-|-----|-----|          |1111_001_001_111_011-0000000000001000-{data}
  4598:             //FTRAPUEQ.L #<data>                              |-|--CC4S|-|-----|-----|          |1111_001_001_111_011-0000000000001001-{data}
  4599:             //FTRAPUGT.L #<data>                              |-|--CC4S|-|-----|-----|          |1111_001_001_111_011-0000000000001010-{data}
  4600:             //FTRAPUGE.L #<data>                              |-|--CC4S|-|-----|-----|          |1111_001_001_111_011-0000000000001011-{data}
  4601:             //FTRAPULT.L #<data>                              |-|--CC4S|-|-----|-----|          |1111_001_001_111_011-0000000000001100-{data}
  4602:             //FTRAPULE.L #<data>                              |-|--CC4S|-|-----|-----|          |1111_001_001_111_011-0000000000001101-{data}
  4603:             //FTRAPNE.L #<data>                               |-|--CC4S|-|-----|-----|          |1111_001_001_111_011-0000000000001110-{data}
  4604:             //FTRAPT.L #<data>                                |-|--CC4S|-|-----|-----|          |1111_001_001_111_011-0000000000001111-{data}
  4605:             //FTRAPSF.L #<data>                               |-|--CC4S|-|-----|-----|          |1111_001_001_111_011-0000000000010000-{data}
  4606:             //FTRAPSEQ.L #<data>                              |-|--CC4S|-|-----|-----|          |1111_001_001_111_011-0000000000010001-{data}
  4607:             //FTRAPGT.L #<data>                               |-|--CC4S|-|-----|-----|          |1111_001_001_111_011-0000000000010010-{data}
  4608:             //FTRAPGE.L #<data>                               |-|--CC4S|-|-----|-----|          |1111_001_001_111_011-0000000000010011-{data}
  4609:             //FTRAPLT.L #<data>                               |-|--CC4S|-|-----|-----|          |1111_001_001_111_011-0000000000010100-{data}
  4610:             //FTRAPLE.L #<data>                               |-|--CC4S|-|-----|-----|          |1111_001_001_111_011-0000000000010101-{data}
  4611:             //FTRAPGL.L #<data>                               |-|--CC4S|-|-----|-----|          |1111_001_001_111_011-0000000000010110-{data}
  4612:             //FTRAPGLE.L #<data>                              |-|--CC4S|-|-----|-----|          |1111_001_001_111_011-0000000000010111-{data}
  4613:             //FTRAPNGLE.L #<data>                             |-|--CC4S|-|-----|-----|          |1111_001_001_111_011-0000000000011000-{data}
  4614:             //FTRAPNGL.L #<data>                              |-|--CC4S|-|-----|-----|          |1111_001_001_111_011-0000000000011001-{data}
  4615:             //FTRAPNLE.L #<data>                              |-|--CC4S|-|-----|-----|          |1111_001_001_111_011-0000000000011010-{data}
  4616:             //FTRAPNLT.L #<data>                              |-|--CC4S|-|-----|-----|          |1111_001_001_111_011-0000000000011011-{data}
  4617:             //FTRAPNGE.L #<data>                              |-|--CC4S|-|-----|-----|          |1111_001_001_111_011-0000000000011100-{data}
  4618:             //FTRAPNGT.L #<data>                              |-|--CC4S|-|-----|-----|          |1111_001_001_111_011-0000000000011101-{data}
  4619:             //FTRAPSNE.L #<data>                              |-|--CC4S|-|-----|-----|          |1111_001_001_111_011-0000000000011110-{data}
  4620:             //FTRAPST.L #<data>                               |-|--CC4S|-|-----|-----|          |1111_001_001_111_011-0000000000011111-{data}
  4621:             //FTRAPF                                          |-|--CC4S|-|-----|-----|          |1111_001_001_111_100-0000000000000000
  4622:             //FTRAPEQ                                         |-|--CC4S|-|-----|-----|          |1111_001_001_111_100-0000000000000001
  4623:             //FTRAPOGT                                        |-|--CC4S|-|-----|-----|          |1111_001_001_111_100-0000000000000010
  4624:             //FTRAPOGE                                        |-|--CC4S|-|-----|-----|          |1111_001_001_111_100-0000000000000011
  4625:             //FTRAPOLT                                        |-|--CC4S|-|-----|-----|          |1111_001_001_111_100-0000000000000100
  4626:             //FTRAPOLE                                        |-|--CC4S|-|-----|-----|          |1111_001_001_111_100-0000000000000101
  4627:             //FTRAPOGL                                        |-|--CC4S|-|-----|-----|          |1111_001_001_111_100-0000000000000110
  4628:             //FTRAPOR                                         |-|--CC4S|-|-----|-----|          |1111_001_001_111_100-0000000000000111
  4629:             //FTRAPUN                                         |-|--CC4S|-|-----|-----|          |1111_001_001_111_100-0000000000001000
  4630:             //FTRAPUEQ                                        |-|--CC4S|-|-----|-----|          |1111_001_001_111_100-0000000000001001
  4631:             //FTRAPUGT                                        |-|--CC4S|-|-----|-----|          |1111_001_001_111_100-0000000000001010
  4632:             //FTRAPUGE                                        |-|--CC4S|-|-----|-----|          |1111_001_001_111_100-0000000000001011
  4633:             //FTRAPULT                                        |-|--CC4S|-|-----|-----|          |1111_001_001_111_100-0000000000001100
  4634:             //FTRAPULE                                        |-|--CC4S|-|-----|-----|          |1111_001_001_111_100-0000000000001101
  4635:             //FTRAPNE                                         |-|--CC4S|-|-----|-----|          |1111_001_001_111_100-0000000000001110
  4636:             //FTRAPT                                          |-|--CC4S|-|-----|-----|          |1111_001_001_111_100-0000000000001111
  4637:             //FTRAPSF                                         |-|--CC4S|-|-----|-----|          |1111_001_001_111_100-0000000000010000
  4638:             //FTRAPSEQ                                        |-|--CC4S|-|-----|-----|          |1111_001_001_111_100-0000000000010001
  4639:             //FTRAPGT                                         |-|--CC4S|-|-----|-----|          |1111_001_001_111_100-0000000000010010
  4640:             //FTRAPGE                                         |-|--CC4S|-|-----|-----|          |1111_001_001_111_100-0000000000010011
  4641:             //FTRAPLT                                         |-|--CC4S|-|-----|-----|          |1111_001_001_111_100-0000000000010100
  4642:             //FTRAPLE                                         |-|--CC4S|-|-----|-----|          |1111_001_001_111_100-0000000000010101
  4643:             //FTRAPGL                                         |-|--CC4S|-|-----|-----|          |1111_001_001_111_100-0000000000010110
  4644:             //FTRAPGLE                                        |-|--CC4S|-|-----|-----|          |1111_001_001_111_100-0000000000010111
  4645:             //FTRAPNGLE                                       |-|--CC4S|-|-----|-----|          |1111_001_001_111_100-0000000000011000
  4646:             //FTRAPNGL                                        |-|--CC4S|-|-----|-----|          |1111_001_001_111_100-0000000000011001
  4647:             //FTRAPNLE                                        |-|--CC4S|-|-----|-----|          |1111_001_001_111_100-0000000000011010
  4648:             //FTRAPNLT                                        |-|--CC4S|-|-----|-----|          |1111_001_001_111_100-0000000000011011
  4649:             //FTRAPNGE                                        |-|--CC4S|-|-----|-----|          |1111_001_001_111_100-0000000000011100
  4650:             //FTRAPNGT                                        |-|--CC4S|-|-----|-----|          |1111_001_001_111_100-0000000000011101
  4651:             //FTRAPSNE                                        |-|--CC4S|-|-----|-----|          |1111_001_001_111_100-0000000000011110
  4652:             //FTRAPST                                         |-|--CC4S|-|-----|-----|          |1111_001_001_111_100-0000000000011111
  4653:           case 0b1111_001_001:
  4654:             irpFscc ();
  4655:             break irpSwitch;
  4656: 
  4657:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  4658:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  4659:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  4660:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  4661:             //FNOP                                            |A|--CC46|-|-----|-----|          |1111_001_010_000_000-0000000000000000        [FBF.W (*)+2]
  4662:             //FBF.W <label>                                   |-|--CC46|-|-----|-----|          |1111_001_010_000_000-{offset}
  4663:             //FBEQ.W <label>                                  |-|--CC46|-|-----|-----|          |1111_001_010_000_001-{offset}
  4664:             //FBOGT.W <label>                                 |-|--CC46|-|-----|-----|          |1111_001_010_000_010-{offset}
  4665:             //FBOGE.W <label>                                 |-|--CC46|-|-----|-----|          |1111_001_010_000_011-{offset}
  4666:             //FBOLT.W <label>                                 |-|--CC46|-|-----|-----|          |1111_001_010_000_100-{offset}
  4667:             //FBOLE.W <label>                                 |-|--CC46|-|-----|-----|          |1111_001_010_000_101-{offset}
  4668:             //FBOGL.W <label>                                 |-|--CC46|-|-----|-----|          |1111_001_010_000_110-{offset}
  4669:             //FBOR.W <label>                                  |-|--CC46|-|-----|-----|          |1111_001_010_000_111-{offset}
  4670:             //FBUN.W <label>                                  |-|--CC46|-|-----|-----|          |1111_001_010_001_000-{offset}
  4671:             //FBUEQ.W <label>                                 |-|--CC46|-|-----|-----|          |1111_001_010_001_001-{offset}
  4672:             //FBUGT.W <label>                                 |-|--CC46|-|-----|-----|          |1111_001_010_001_010-{offset}
  4673:             //FBUGE.W <label>                                 |-|--CC46|-|-----|-----|          |1111_001_010_001_011-{offset}
  4674:             //FBULT.W <label>                                 |-|--CC46|-|-----|-----|          |1111_001_010_001_100-{offset}
  4675:             //FBULE.W <label>                                 |-|--CC46|-|-----|-----|          |1111_001_010_001_101-{offset}
  4676:             //FBNE.W <label>                                  |-|--CC46|-|-----|-----|          |1111_001_010_001_110-{offset}
  4677:             //FBT.W <label>                                   |-|--CC46|-|-----|-----|          |1111_001_010_001_111-{offset}
  4678:             //FBRA.W <label>                                  |A|--CC46|-|-----|-----|          |1111_001_010_001_111-{offset}        [FBT.W <label>]
  4679:             //FBSF.W <label>                                  |-|--CC46|-|-----|-----|          |1111_001_010_010_000-{offset}
  4680:             //FBSEQ.W <label>                                 |-|--CC46|-|-----|-----|          |1111_001_010_010_001-{offset}
  4681:             //FBGT.W <label>                                  |-|--CC46|-|-----|-----|          |1111_001_010_010_010-{offset}
  4682:             //FBGE.W <label>                                  |-|--CC46|-|-----|-----|          |1111_001_010_010_011-{offset}
  4683:             //FBLT.W <label>                                  |-|--CC46|-|-----|-----|          |1111_001_010_010_100-{offset}
  4684:             //FBLE.W <label>                                  |-|--CC46|-|-----|-----|          |1111_001_010_010_101-{offset}
  4685:             //FBGL.W <label>                                  |-|--CC46|-|-----|-----|          |1111_001_010_010_110-{offset}
  4686:             //FBGLE.W <label>                                 |-|--CC46|-|-----|-----|          |1111_001_010_010_111-{offset}
  4687:             //FBNGLE.W <label>                                |-|--CC46|-|-----|-----|          |1111_001_010_011_000-{offset}
  4688:             //FBNGL.W <label>                                 |-|--CC46|-|-----|-----|          |1111_001_010_011_001-{offset}
  4689:             //FBNLE.W <label>                                 |-|--CC46|-|-----|-----|          |1111_001_010_011_010-{offset}
  4690:             //FBNLT.W <label>                                 |-|--CC46|-|-----|-----|          |1111_001_010_011_011-{offset}
  4691:             //FBNGE.W <label>                                 |-|--CC46|-|-----|-----|          |1111_001_010_011_100-{offset}
  4692:             //FBNGT.W <label>                                 |-|--CC46|-|-----|-----|          |1111_001_010_011_101-{offset}
  4693:             //FBSNE.W <label>                                 |-|--CC46|-|-----|-----|          |1111_001_010_011_110-{offset}
  4694:             //FBST.W <label>                                  |-|--CC46|-|-----|-----|          |1111_001_010_011_111-{offset}
  4695:           case 0b1111_001_010:
  4696:             irpFbccWord ();
  4697:             break irpSwitch;
  4698: 
  4699:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  4700:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  4701:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  4702:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  4703:             //FBF.L <label>                                   |-|--CC46|-|-----|-----|          |1111_001_011_000_000-{offset}
  4704:             //FBEQ.L <label>                                  |-|--CC46|-|-----|-----|          |1111_001_011_000_001-{offset}
  4705:             //FBOGT.L <label>                                 |-|--CC46|-|-----|-----|          |1111_001_011_000_010-{offset}
  4706:             //FBOGE.L <label>                                 |-|--CC46|-|-----|-----|          |1111_001_011_000_011-{offset}
  4707:             //FBOLT.L <label>                                 |-|--CC46|-|-----|-----|          |1111_001_011_000_100-{offset}
  4708:             //FBOLE.L <label>                                 |-|--CC46|-|-----|-----|          |1111_001_011_000_101-{offset}
  4709:             //FBOGL.L <label>                                 |-|--CC46|-|-----|-----|          |1111_001_011_000_110-{offset}
  4710:             //FBOR.L <label>                                  |-|--CC46|-|-----|-----|          |1111_001_011_000_111-{offset}
  4711:             //FBUN.L <label>                                  |-|--CC46|-|-----|-----|          |1111_001_011_001_000-{offset}
  4712:             //FBUEQ.L <label>                                 |-|--CC46|-|-----|-----|          |1111_001_011_001_001-{offset}
  4713:             //FBUGT.L <label>                                 |-|--CC46|-|-----|-----|          |1111_001_011_001_010-{offset}
  4714:             //FBUGE.L <label>                                 |-|--CC46|-|-----|-----|          |1111_001_011_001_011-{offset}
  4715:             //FBULT.L <label>                                 |-|--CC46|-|-----|-----|          |1111_001_011_001_100-{offset}
  4716:             //FBULE.L <label>                                 |-|--CC46|-|-----|-----|          |1111_001_011_001_101-{offset}
  4717:             //FBNE.L <label>                                  |-|--CC46|-|-----|-----|          |1111_001_011_001_110-{offset}
  4718:             //FBT.L <label>                                   |-|--CC46|-|-----|-----|          |1111_001_011_001_111-{offset}
  4719:             //FBRA.L <label>                                  |A|--CC46|-|-----|-----|          |1111_001_011_001_111-{offset}        [FBT.L <label>]
  4720:             //FBSF.L <label>                                  |-|--CC46|-|-----|-----|          |1111_001_011_010_000-{offset}
  4721:             //FBSEQ.L <label>                                 |-|--CC46|-|-----|-----|          |1111_001_011_010_001-{offset}
  4722:             //FBGT.L <label>                                  |-|--CC46|-|-----|-----|          |1111_001_011_010_010-{offset}
  4723:             //FBGE.L <label>                                  |-|--CC46|-|-----|-----|          |1111_001_011_010_011-{offset}
  4724:             //FBLT.L <label>                                  |-|--CC46|-|-----|-----|          |1111_001_011_010_100-{offset}
  4725:             //FBLE.L <label>                                  |-|--CC46|-|-----|-----|          |1111_001_011_010_101-{offset}
  4726:             //FBGL.L <label>                                  |-|--CC46|-|-----|-----|          |1111_001_011_010_110-{offset}
  4727:             //FBGLE.L <label>                                 |-|--CC46|-|-----|-----|          |1111_001_011_010_111-{offset}
  4728:             //FBNGLE.L <label>                                |-|--CC46|-|-----|-----|          |1111_001_011_011_000-{offset}
  4729:             //FBNGL.L <label>                                 |-|--CC46|-|-----|-----|          |1111_001_011_011_001-{offset}
  4730:             //FBNLE.L <label>                                 |-|--CC46|-|-----|-----|          |1111_001_011_011_010-{offset}
  4731:             //FBNLT.L <label>                                 |-|--CC46|-|-----|-----|          |1111_001_011_011_011-{offset}
  4732:             //FBNGE.L <label>                                 |-|--CC46|-|-----|-----|          |1111_001_011_011_100-{offset}
  4733:             //FBNGT.L <label>                                 |-|--CC46|-|-----|-----|          |1111_001_011_011_101-{offset}
  4734:             //FBSNE.L <label>                                 |-|--CC46|-|-----|-----|          |1111_001_011_011_110-{offset}
  4735:             //FBST.L <label>                                  |-|--CC46|-|-----|-----|          |1111_001_011_011_111-{offset}
  4736:           case 0b1111_001_011:
  4737:             irpFbccLong ();
  4738:             break irpSwitch;
  4739: 
  4740:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  4741:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  4742:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  4743:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  4744:             //FSAVE <ea>                                      |-|--CC46|P|-----|-----|  M -WXZ  |1111_001_100_mmm_rrr
  4745:           case 0b1111_001_100:
  4746:             irpFsave ();
  4747:             break irpSwitch;
  4748: 
  4749:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  4750:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  4751:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  4752:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  4753:             //FRESTORE <ea>                                   |-|--CC46|P|-----|-----|  M+ WXZP |1111_001_101_mmm_rrr
  4754:           case 0b1111_001_101:
  4755:             irpFrestore ();
  4756:             break irpSwitch;
  4757: 
  4758:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  4759:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  4760:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  4761:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  4762:             //CINVL NC,(Ar)                                   |-|----46|P|-----|-----|          |1111_010_000_001_rrr
  4763:             //CINVP NC,(Ar)                                   |-|----46|P|-----|-----|          |1111_010_000_010_rrr
  4764:             //CINVA NC                                        |-|----46|P|-----|-----|          |1111_010_000_011_000
  4765:             //CPUSHL NC,(Ar)                                  |-|----46|P|-----|-----|          |1111_010_000_101_rrr
  4766:             //CPUSHP NC,(Ar)                                  |-|----46|P|-----|-----|          |1111_010_000_110_rrr
  4767:             //CPUSHA NC                                       |-|----46|P|-----|-----|          |1111_010_000_111_000
  4768:           case 0b1111_010_000:
  4769:             irpCinvCpushNC ();
  4770:             break irpSwitch;
  4771: 
  4772:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  4773:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  4774:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  4775:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  4776:             //CINVL DC,(Ar)                                   |-|----46|P|-----|-----|          |1111_010_001_001_rrr
  4777:             //CINVP DC,(Ar)                                   |-|----46|P|-----|-----|          |1111_010_001_010_rrr
  4778:             //CINVA DC                                        |-|----46|P|-----|-----|          |1111_010_001_011_000
  4779:             //CPUSHL DC,(Ar)                                  |-|----46|P|-----|-----|          |1111_010_001_101_rrr
  4780:             //CPUSHP DC,(Ar)                                  |-|----46|P|-----|-----|          |1111_010_001_110_rrr
  4781:             //CPUSHA DC                                       |-|----46|P|-----|-----|          |1111_010_001_111_000
  4782:           case 0b1111_010_001:
  4783:             irpCinvCpushDC ();
  4784:             break irpSwitch;
  4785: 
  4786:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  4787:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  4788:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  4789:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  4790:             //CINVL IC,(Ar)                                   |-|----46|P|-----|-----|          |1111_010_010_001_rrr
  4791:             //CINVP IC,(Ar)                                   |-|----46|P|-----|-----|          |1111_010_010_010_rrr
  4792:             //CINVA IC                                        |-|----46|P|-----|-----|          |1111_010_010_011_000
  4793:             //CPUSHL IC,(Ar)                                  |-|----46|P|-----|-----|          |1111_010_010_101_rrr
  4794:             //CPUSHP IC,(Ar)                                  |-|----46|P|-----|-----|          |1111_010_010_110_rrr
  4795:             //CPUSHA IC                                       |-|----46|P|-----|-----|          |1111_010_010_111_000
  4796:           case 0b1111_010_010:
  4797:             irpCinvCpushIC ();
  4798:             break irpSwitch;
  4799: 
  4800:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  4801:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  4802:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  4803:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  4804:             //CINVL BC,(Ar)                                   |-|----46|P|-----|-----|          |1111_010_011_001_rrr
  4805:             //CINVP BC,(Ar)                                   |-|----46|P|-----|-----|          |1111_010_011_010_rrr
  4806:             //CINVA BC                                        |-|----46|P|-----|-----|          |1111_010_011_011_000
  4807:             //CPUSHL BC,(Ar)                                  |-|----46|P|-----|-----|          |1111_010_011_101_rrr
  4808:             //CPUSHP BC,(Ar)                                  |-|----46|P|-----|-----|          |1111_010_011_110_rrr
  4809:             //CPUSHA BC                                       |-|----46|P|-----|-----|          |1111_010_011_111_000
  4810:           case 0b1111_010_011:
  4811:             irpCinvCpushBC ();
  4812:             break irpSwitch;
  4813: 
  4814:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  4815:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  4816:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  4817:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  4818:             //PFLUSHN (Ar)                                    |-|----46|P|-----|-----|          |1111_010_100_000_rrr
  4819:             //PFLUSH (Ar)                                     |-|----46|P|-----|-----|          |1111_010_100_001_rrr
  4820:             //PFLUSHAN                                        |-|----46|P|-----|-----|          |1111_010_100_010_000
  4821:             //PFLUSHA                                         |-|----46|P|-----|-----|          |1111_010_100_011_000
  4822:           case 0b1111_010_100:
  4823:             irpPflush ();
  4824:             break irpSwitch;
  4825: 
  4826:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  4827:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  4828:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  4829:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  4830:             //PLPAW (Ar)                                      |-|-----6|P|-----|-----|          |1111_010_110_001_rrr
  4831:           case 0b1111_010_110:
  4832:             irpPlpaw ();
  4833:             break irpSwitch;
  4834: 
  4835:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  4836:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  4837:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  4838:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  4839:             //PLPAR (Ar)                                      |-|-----6|P|-----|-----|          |1111_010_111_001_rrr
  4840:           case 0b1111_010_111:
  4841:             irpPlpar ();
  4842:             break irpSwitch;
  4843: 
  4844:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  4845:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  4846:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  4847:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  4848:             //MOVE16 (Ar)+,xxx.L                              |-|----46|-|-----|-----|          |1111_011_000_000_rrr-{address}
  4849:             //MOVE16 xxx.L,(Ar)+                              |-|----46|-|-----|-----|          |1111_011_000_001_rrr-{address}
  4850:             //MOVE16 (Ar),xxx.L                               |-|----46|-|-----|-----|          |1111_011_000_010_rrr-{address}
  4851:             //MOVE16 xxx.L,(Ar)                               |-|----46|-|-----|-----|          |1111_011_000_011_rrr-{address}
  4852:             //MOVE16 (Ar)+,(An)+                              |-|----46|-|-----|-----|          |1111_011_000_100_rrr-1nnn000000000000
  4853:           case 0b1111_011_000:
  4854:             irpMove16 ();
  4855:             break irpSwitch;
  4856: 
  4857:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  4858:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  4859:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  4860:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  4861:             //LPSTOP.W #<data>                                |-|-----6|P|-----|-----|          |1111_100_000_000_000-0000000111000000-{data}
  4862:           case 0b1111_100_000:
  4863:             irpLpstop ();
  4864:             break irpSwitch;
  4865: 
  4866:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  4867:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  4868:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  4869:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  4870:             //FPACK <data>                                    |A|012346|-|UUUUU|*****|          |1111_111_0dd_ddd_ddd [FLINE #<data>]
  4871:           case 0b1111_111_000:
  4872:           case 0b1111_111_001:
  4873:           case 0b1111_111_010:
  4874:           case 0b1111_111_011:
  4875:             irpFpack ();
  4876:             break irpSwitch;
  4877: 
  4878:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  4879:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  4880:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  4881:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  4882:             //DOS <data>                                      |A|012346|-|UUUUU|UUUUU|          |1111_111_1dd_ddd_ddd [FLINE #<data>]
  4883:           case 0b1111_111_100:
  4884:           case 0b1111_111_101:
  4885:           case 0b1111_111_110:
  4886:           case 0b1111_111_111:
  4887:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  4888:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  4889:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  4890:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  4891:             //FLINE #<data>                                   |-|012346|-|UUUUU|UUUUU|          |1111_ddd_ddd_ddd_ddd (line 1111 emulator)
  4892:           case 0b1111_000_000:
  4893:           case 0b1111_000_001:
  4894:           case 0b1111_000_010:
  4895:           case 0b1111_000_011:
  4896:           case 0b1111_000_100:
  4897:           case 0b1111_000_101:
  4898:           case 0b1111_000_110:
  4899:           case 0b1111_000_111:
  4900:           case 0b1111_001_110:
  4901:           case 0b1111_001_111:
  4902:           case 0b1111_010_101:
  4903:           case 0b1111_011_001:
  4904:           case 0b1111_011_010:
  4905:           case 0b1111_011_011:
  4906:           case 0b1111_011_100:
  4907:           case 0b1111_011_101:
  4908:           case 0b1111_011_110:
  4909:           case 0b1111_011_111:
  4910:           case 0b1111_100_001:
  4911:           case 0b1111_100_010:
  4912:           case 0b1111_100_011:
  4913:           case 0b1111_100_100:
  4914:           case 0b1111_100_101:
  4915:           case 0b1111_100_110:
  4916:           case 0b1111_100_111:
  4917:           case 0b1111_101_000:
  4918:           case 0b1111_101_001:
  4919:           case 0b1111_101_010:
  4920:           case 0b1111_101_011:
  4921:           case 0b1111_101_100:
  4922:           case 0b1111_101_101:
  4923:           case 0b1111_101_110:
  4924:           case 0b1111_101_111:
  4925:           case 0b1111_110_000:
  4926:           case 0b1111_110_001:
  4927:           case 0b1111_110_010:
  4928:           case 0b1111_110_011:
  4929:           case 0b1111_110_100:
  4930:           case 0b1111_110_101:
  4931:           case 0b1111_110_110:
  4932:           case 0b1111_110_111:
  4933:             irpFline ();
  4934:             break irpSwitch;
  4935: 
  4936:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  4937:             //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  4938:             //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  4939:             //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  4940:             //HFSBOOT                                         |-|012346|-|-----|-----|          |0100_111_000_000_000
  4941:             //HFSINST                                         |-|012346|-|-----|-----|          |0100_111_000_000_001
  4942:             //HFSSTR                                          |-|012346|-|-----|-----|          |0100_111_000_000_010
  4943:             //HFSINT                                          |-|012346|-|-----|-----|          |0100_111_000_000_011
  4944:             //EMXNOP                                          |-|012346|-|-----|-----|          |0100_111_000_000_100
  4945:           case 0b0100_111_000:
  4946:             irpEmx ();
  4947:             break;
  4948: 
  4949:           default:
  4950:             irpIllegal ();
  4951: 
  4952:           }  //switch XEiJ.regOC >>> 6
  4953: 
  4954:           //トレース例外
  4955:           //  命令実行前にsrのTビットがセットされていたとき命令実行後にトレース例外が発生する
  4956:           //  トレース例外の発動は命令の機能拡張であり、他の例外処理で命令が中断されたときはトレース例外は発生しない
  4957:           //  命令例外はトレース例外の前に、割り込み例外はトレース例外の後に処理される
  4958:           //  未実装命令のエミュレーションルーチンはrteの直前にsrのTビットを復元することで未実装命令が1個の命令としてトレースされたように見せる
  4959:           //    ;DOSコールの終了
  4960:           //    ~008616:
  4961:           //            btst.b  #$07,(sp)
  4962:           //            bne.s   ~00861E
  4963:           //            rte
  4964:           //    ~00861E:
  4965:           //            ori.w   #$8000,sr
  4966:           //            rte
  4967:           if (XEiJ.mpuTraceFlag != 0) {  //命令実行前にsrのTビットがセットされていた
  4968:             irpExceptionFormat2 (M68kException.M6E_TRACE << 2, XEiJ.regPC, XEiJ.regPC0);  //pcは次の命令
  4969:           }
  4970:           //クロックをカウントアップする
  4971:           //  オペランドをアクセスした時点ではまだXEiJ.mpuClockTimeが更新されていないのでXEiJ.mpuClockTime<xxxClock
  4972:           //  xxxTickを呼び出すときはXEiJ.mpuClockTime>=xxxClock
  4973:           XEiJ.mpuClockTime += XEiJ.mpuModifiedUnit * XEiJ.mpuCycleCount;
  4974:           //デバイスを呼び出す
  4975:           TickerQueue.tkqRun (XEiJ.mpuClockTime);
  4976:           //割り込みを受け付ける
  4977:           if ((t = XEiJ.mpuIMR & XEiJ.mpuIRR) != 0) {  //マスクされているレベルよりも高くて受け付けていない割り込みがあるとき
  4978:             if (XEiJ.MPU_INTERRUPT_SWITCH) {
  4979:               switch (t) {
  4980:               case 0b00000001:
  4981:               case 0b00000011:
  4982:               case 0b00000101:
  4983:               case 0b00000111:
  4984:               case 0b00001001:
  4985:               case 0b00001011:
  4986:               case 0b00001101:
  4987:               case 0b00001111:
  4988:               case 0b00010001:
  4989:               case 0b00010011:
  4990:               case 0b00010101:
  4991:               case 0b00010111:
  4992:               case 0b00011001:
  4993:               case 0b00011011:
  4994:               case 0b00011101:
  4995:               case 0b00011111:
  4996:               case 0b00100001:
  4997:               case 0b00100011:
  4998:               case 0b00100101:
  4999:               case 0b00100111:
  5000:               case 0b00101001:
  5001:               case 0b00101011:
  5002:               case 0b00101101:
  5003:               case 0b00101111:
  5004:               case 0b00110001:
  5005:               case 0b00110011:
  5006:               case 0b00110101:
  5007:               case 0b00110111:
  5008:               case 0b00111001:
  5009:               case 0b00111011:
  5010:               case 0b00111101:
  5011:               case 0b00111111:
  5012:               case 0b01000001:
  5013:               case 0b01000011:
  5014:               case 0b01000101:
  5015:               case 0b01000111:
  5016:               case 0b01001001:
  5017:               case 0b01001011:
  5018:               case 0b01001101:
  5019:               case 0b01001111:
  5020:               case 0b01010001:
  5021:               case 0b01010011:
  5022:               case 0b01010101:
  5023:               case 0b01010111:
  5024:               case 0b01011001:
  5025:               case 0b01011011:
  5026:               case 0b01011101:
  5027:               case 0b01011111:
  5028:               case 0b01100001:
  5029:               case 0b01100011:
  5030:               case 0b01100101:
  5031:               case 0b01100111:
  5032:               case 0b01101001:
  5033:               case 0b01101011:
  5034:               case 0b01101101:
  5035:               case 0b01101111:
  5036:               case 0b01110001:
  5037:               case 0b01110011:
  5038:               case 0b01110101:
  5039:               case 0b01110111:
  5040:               case 0b01111001:
  5041:               case 0b01111011:
  5042:               case 0b01111101:
  5043:               case 0b01111111:
  5044:               case 0b10000001:
  5045:               case 0b10000011:
  5046:               case 0b10000101:
  5047:               case 0b10000111:
  5048:               case 0b10001001:
  5049:               case 0b10001011:
  5050:               case 0b10001101:
  5051:               case 0b10001111:
  5052:               case 0b10010001:
  5053:               case 0b10010011:
  5054:               case 0b10010101:
  5055:               case 0b10010111:
  5056:               case 0b10011001:
  5057:               case 0b10011011:
  5058:               case 0b10011101:
  5059:               case 0b10011111:
  5060:               case 0b10100001:
  5061:               case 0b10100011:
  5062:               case 0b10100101:
  5063:               case 0b10100111:
  5064:               case 0b10101001:
  5065:               case 0b10101011:
  5066:               case 0b10101101:
  5067:               case 0b10101111:
  5068:               case 0b10110001:
  5069:               case 0b10110011:
  5070:               case 0b10110101:
  5071:               case 0b10110111:
  5072:               case 0b10111001:
  5073:               case 0b10111011:
  5074:               case 0b10111101:
  5075:               case 0b10111111:
  5076:               case 0b11000001:
  5077:               case 0b11000011:
  5078:               case 0b11000101:
  5079:               case 0b11000111:
  5080:               case 0b11001001:
  5081:               case 0b11001011:
  5082:               case 0b11001101:
  5083:               case 0b11001111:
  5084:               case 0b11010001:
  5085:               case 0b11010011:
  5086:               case 0b11010101:
  5087:               case 0b11010111:
  5088:               case 0b11011001:
  5089:               case 0b11011011:
  5090:               case 0b11011101:
  5091:               case 0b11011111:
  5092:               case 0b11100001:
  5093:               case 0b11100011:
  5094:               case 0b11100101:
  5095:               case 0b11100111:
  5096:               case 0b11101001:
  5097:               case 0b11101011:
  5098:               case 0b11101101:
  5099:               case 0b11101111:
  5100:               case 0b11110001:
  5101:               case 0b11110011:
  5102:               case 0b11110101:
  5103:               case 0b11110111:
  5104:               case 0b11111001:
  5105:               case 0b11111011:
  5106:               case 0b11111101:
  5107:               case 0b11111111:
  5108:                 //レベル7
  5109:                 XEiJ.mpuIRR &= ~XEiJ.MPU_SYS_INTERRUPT_MASK;  //割り込みを受け付ける
  5110:                 if ((t = XEiJ.sysAcknowledge ()) != 0) {  //デバイスにベクタ番号を要求して割り込み処理中の状態になったとき
  5111:                   irpInterrupt (t << 2, XEiJ.MPU_SYS_INTERRUPT_LEVEL);  //割り込み処理を開始する
  5112:                 }
  5113:                 break;
  5114:               case 0b00000010:
  5115:               case 0b00000110:
  5116:               case 0b00001010:
  5117:               case 0b00001110:
  5118:               case 0b00010010:
  5119:               case 0b00010110:
  5120:               case 0b00011010:
  5121:               case 0b00011110:
  5122:               case 0b00100010:
  5123:               case 0b00100110:
  5124:               case 0b00101010:
  5125:               case 0b00101110:
  5126:               case 0b00110010:
  5127:               case 0b00110110:
  5128:               case 0b00111010:
  5129:               case 0b00111110:
  5130:               case 0b01000010:
  5131:               case 0b01000110:
  5132:               case 0b01001010:
  5133:               case 0b01001110:
  5134:               case 0b01010010:
  5135:               case 0b01010110:
  5136:               case 0b01011010:
  5137:               case 0b01011110:
  5138:               case 0b01100010:
  5139:               case 0b01100110:
  5140:               case 0b01101010:
  5141:               case 0b01101110:
  5142:               case 0b01110010:
  5143:               case 0b01110110:
  5144:               case 0b01111010:
  5145:               case 0b01111110:
  5146:               case 0b10000010:
  5147:               case 0b10000110:
  5148:               case 0b10001010:
  5149:               case 0b10001110:
  5150:               case 0b10010010:
  5151:               case 0b10010110:
  5152:               case 0b10011010:
  5153:               case 0b10011110:
  5154:               case 0b10100010:
  5155:               case 0b10100110:
  5156:               case 0b10101010:
  5157:               case 0b10101110:
  5158:               case 0b10110010:
  5159:               case 0b10110110:
  5160:               case 0b10111010:
  5161:               case 0b10111110:
  5162:               case 0b11000010:
  5163:               case 0b11000110:
  5164:               case 0b11001010:
  5165:               case 0b11001110:
  5166:               case 0b11010010:
  5167:               case 0b11010110:
  5168:               case 0b11011010:
  5169:               case 0b11011110:
  5170:               case 0b11100010:
  5171:               case 0b11100110:
  5172:               case 0b11101010:
  5173:               case 0b11101110:
  5174:               case 0b11110010:
  5175:               case 0b11110110:
  5176:               case 0b11111010:
  5177:               case 0b11111110:
  5178:                 //レベル6
  5179:                 XEiJ.mpuIRR &= ~XEiJ.MPU_MFP_INTERRUPT_MASK;  //割り込みを受け付ける
  5180:                 if ((t = MC68901.mfpAcknowledge ()) != 0) {  //デバイスにベクタ番号を要求して割り込み処理中の状態になったとき
  5181:                   irpInterrupt (t << 2, XEiJ.MPU_MFP_INTERRUPT_LEVEL);  //割り込み処理を開始する
  5182:                 }
  5183:                 break;
  5184:               case 0b00000100:
  5185:               case 0b00001100:
  5186:               case 0b00010100:
  5187:               case 0b00011100:
  5188:               case 0b00100100:
  5189:               case 0b00101100:
  5190:               case 0b00110100:
  5191:               case 0b00111100:
  5192:               case 0b01000100:
  5193:               case 0b01001100:
  5194:               case 0b01010100:
  5195:               case 0b01011100:
  5196:               case 0b01100100:
  5197:               case 0b01101100:
  5198:               case 0b01110100:
  5199:               case 0b01111100:
  5200:               case 0b10000100:
  5201:               case 0b10001100:
  5202:               case 0b10010100:
  5203:               case 0b10011100:
  5204:               case 0b10100100:
  5205:               case 0b10101100:
  5206:               case 0b10110100:
  5207:               case 0b10111100:
  5208:               case 0b11000100:
  5209:               case 0b11001100:
  5210:               case 0b11010100:
  5211:               case 0b11011100:
  5212:               case 0b11100100:
  5213:               case 0b11101100:
  5214:               case 0b11110100:
  5215:               case 0b11111100:
  5216:                 //レベル5
  5217:                 XEiJ.mpuIRR &= ~XEiJ.MPU_SCC_INTERRUPT_MASK;  //割り込みを受け付ける
  5218:                 if ((t = Z8530.sccAcknowledge ()) != 0) {  //デバイスにベクタ番号を要求して割り込み処理中の状態になったとき
  5219:                   irpInterrupt (t << 2, XEiJ.MPU_SCC_INTERRUPT_LEVEL);  //割り込み処理を開始する
  5220:                 }
  5221:                 break;
  5222:               case 0b00010000:
  5223:               case 0b00110000:
  5224:               case 0b01010000:
  5225:               case 0b01110000:
  5226:               case 0b10010000:
  5227:               case 0b10110000:
  5228:               case 0b11010000:
  5229:               case 0b11110000:
  5230:                 //レベル3
  5231:                 XEiJ.mpuIRR &= ~XEiJ.MPU_DMA_INTERRUPT_MASK;  //割り込みを受け付ける
  5232:                 if ((t = HD63450.dmaAcknowledge ()) != 0) {  //デバイスにベクタ番号を要求して割り込み処理中の状態になったとき
  5233:                   irpInterrupt (t << 2, XEiJ.MPU_DMA_INTERRUPT_LEVEL);  //割り込み処理を開始する
  5234:                 }
  5235:                 break;
  5236:               case 0b00100000:
  5237:               case 0b01100000:
  5238:               case 0b10100000:
  5239:               case 0b11100000:
  5240:                 //レベル2
  5241:                 XEiJ.mpuIRR &= ~XEiJ.MPU_EB2_INTERRUPT_MASK;  //割り込みを受け付ける
  5242:                 if ((t = XEiJ.eb2Acknowledge ()) != 0) {  //デバイスにベクタ番号を要求して割り込み処理中の状態になったとき
  5243:                   irpInterrupt (t << 2, XEiJ.MPU_EB2_INTERRUPT_LEVEL);  //割り込み処理を開始する
  5244:                 }
  5245:                 break;
  5246:               case 0b01000000:
  5247:               case 0b11000000:
  5248:                 //レベル1
  5249:                 XEiJ.mpuIRR &= ~XEiJ.MPU_IOI_INTERRUPT_MASK;  //割り込みを受け付ける
  5250:                 if ((t = IOInterrupt.ioiAcknowledge ()) != 0) {  //デバイスにベクタ番号を要求して割り込み処理中の状態になったとき
  5251:                   irpInterrupt (t << 2, XEiJ.MPU_IOI_INTERRUPT_LEVEL);  //割り込み処理を開始する
  5252:                 }
  5253:                 break;
  5254:               }
  5255:             } else {
  5256:               t &= -t;
  5257:               //  x&=-xはxの最下位の1のビットだけを残す演算
  5258:               //  すなわちマスクされているレベルよりも高くて受け付けていない割り込みの中で最高レベルの割り込みのビットだけが残る
  5259:               //  最高レベルの割り込みのビットしか残っていないので、割り込みの有無をレベルの高い順ではなく使用頻度の高い順に調べられる
  5260:               //  MFPやDMAの割り込みがかかる度にそれより優先度の高いインタラプトスイッチが押されていないかどうかを確かめる必要がない
  5261:               if (t == XEiJ.MPU_MFP_INTERRUPT_MASK) {
  5262:                 XEiJ.mpuIRR &= ~XEiJ.MPU_MFP_INTERRUPT_MASK;  //割り込みを受け付ける
  5263:                 if ((t = MC68901.mfpAcknowledge ()) != 0) {  //デバイスにベクタ番号を要求して割り込み処理中の状態になったとき
  5264:                   irpInterrupt (t << 2, XEiJ.MPU_MFP_INTERRUPT_LEVEL);  //割り込み処理を開始する
  5265:                 }
  5266:               } else if (t == XEiJ.MPU_DMA_INTERRUPT_MASK) {
  5267:                 XEiJ.mpuIRR &= ~XEiJ.MPU_DMA_INTERRUPT_MASK;  //割り込みを受け付ける
  5268:                 if ((t = HD63450.dmaAcknowledge ()) != 0) {  //デバイスにベクタ番号を要求して割り込み処理中の状態になったとき
  5269:                   irpInterrupt (t << 2, XEiJ.MPU_DMA_INTERRUPT_LEVEL);  //割り込み処理を開始する
  5270:                 }
  5271:               } else if (t == XEiJ.MPU_SCC_INTERRUPT_MASK) {
  5272:                 XEiJ.mpuIRR &= ~XEiJ.MPU_SCC_INTERRUPT_MASK;  //割り込みを受け付ける
  5273:                 if ((t = Z8530.sccAcknowledge ()) != 0) {  //デバイスにベクタ番号を要求して割り込み処理中の状態になったとき
  5274:                   irpInterrupt (t << 2, XEiJ.MPU_SCC_INTERRUPT_LEVEL);  //割り込み処理を開始する
  5275:                 }
  5276:               } else if (t == XEiJ.MPU_IOI_INTERRUPT_MASK) {
  5277:                 XEiJ.mpuIRR &= ~XEiJ.MPU_IOI_INTERRUPT_MASK;  //割り込みを受け付ける
  5278:                 if ((t = IOInterrupt.ioiAcknowledge ()) != 0) {  //デバイスにベクタ番号を要求して割り込み処理中の状態になったとき
  5279:                   irpInterrupt (t << 2, XEiJ.MPU_IOI_INTERRUPT_LEVEL);  //割り込み処理を開始する
  5280:                 }
  5281:               } else if (t == XEiJ.MPU_EB2_INTERRUPT_MASK) {
  5282:                 XEiJ.mpuIRR &= ~XEiJ.MPU_EB2_INTERRUPT_MASK;  //割り込みを受け付ける
  5283:                 if ((t = XEiJ.eb2Acknowledge ()) != 0) {  //デバイスにベクタ番号を要求して割り込み処理中の状態になったとき
  5284:                   irpInterrupt (t << 2, XEiJ.MPU_EB2_INTERRUPT_LEVEL);  //割り込み処理を開始する
  5285:                 }
  5286:               } else if (t == XEiJ.MPU_SYS_INTERRUPT_MASK) {
  5287:                 XEiJ.mpuIRR &= ~XEiJ.MPU_SYS_INTERRUPT_MASK;  //割り込みを受け付ける
  5288:                 if ((t = XEiJ.sysAcknowledge ()) != 0) {  //デバイスにベクタ番号を要求して割り込み処理中の状態になったとき
  5289:                   irpInterrupt (t << 2, XEiJ.MPU_SYS_INTERRUPT_LEVEL);  //割り込み処理を開始する
  5290:                 }
  5291:               }
  5292:             }
  5293:           }  //if t!=0
  5294:           if (MC68901.MFP_DELAYED_INTERRUPT) {
  5295:             XEiJ.mpuIRR |= XEiJ.mpuDIRR;  //遅延割り込み要求
  5296:             XEiJ.mpuDIRR = 0;
  5297:           }
  5298:         }  //命令ループ
  5299:       } catch (M68kException e) {
  5300:         if (M68kException.m6eNumber == M68kException.M6E_WAIT_EXCEPTION) {  //待機例外
  5301:           if (irpWaitException ()) {
  5302:             continue;
  5303:           } else {
  5304:             break errorLoop;
  5305:           }
  5306:         }
  5307:         if (M68kException.m6eNumber == M68kException.M6E_INSTRUCTION_BREAK_POINT) {  //命令ブレークポイントによる停止
  5308:           XEiJ.regPC = XEiJ.regPC0;
  5309:           XEiJ.mpuStop1 (null);  //"Instruction Break Point"
  5310:           break errorLoop;
  5311:         }
  5312:         //例外処理
  5313:         //  ここで処理するのはベクタ番号が2~63の例外に限る
  5314:         //  例外処理のサイクル数はACCESS_FAULTとADDRESS_ERROR以外は19になっているので必要ならば補正してからthrowする
  5315:         //  使用頻度が高いと思われる例外はインライン展開するのでここには来ない
  5316:         //  セーブされるpcは以下の例外は命令の先頭、これ以外は次の命令
  5317:         //     2  ACCESS_FAULT
  5318:         //     3  ADDRESS_ERROR
  5319:         //     4  ILLEGAL_INSTRUCTION
  5320:         //     8  PRIVILEGE_VIOLATION
  5321:         //    10  LINE_1010_EMULATOR
  5322:         //    11  LINE_1111_EMULATOR
  5323:         //    14  FORMAT_ERROR
  5324:         //    48  FP_BRANCH_SET_UNORDERED
  5325:         //    60  UNIMPLEMENTED_EFFECTIVE
  5326:         //    61  UNIMPLEMENTED_INSTRUCTION
  5327:         //              111111111122222222223333333333444444444455555555556666
  5328:         //    0123456789012345678901234567890123456789012345678901234567890123
  5329:         if (0b0011100010110010000000000000000000000000000000001000000000001100L << M68kException.m6eNumber < 0L) {
  5330:           XEiJ.regPC = XEiJ.regPC0;  //セーブされるpcは命令の先頭
  5331:           //アドレスレジスタを巻き戻す
  5332:           //  A7を含むのでユーザモードのときはスーパーバイザモードに移行する前に巻き戻すこと
  5333:           for (int arr = 8; M68kException.m6eIncremented != 0L; arr++) {
  5334:             XEiJ.regRn[arr] -= (byte) M68kException.m6eIncremented;
  5335:             M68kException.m6eIncremented = M68kException.m6eIncremented + 0x80L >> 8;
  5336:           }
  5337:         }
  5338:         //FSLWのTTRを設定する
  5339:         //  透過変換でアドレス変換キャッシュがヒットしてバスエラーが発生したときFSLWのTTRが設定されていない
  5340:         if ((M68kException.m6eFSLW & (M68kException.M6E_FSLW_BUS_ERROR_ON_READ | M68kException.M6E_FSLW_BUS_ERROR_ON_WRITE)) != 0) {  //バスエラーのとき
  5341:           if (((M68kException.m6eFSLW & M68kException.M6E_FSLW_TM_SUPERVISOR) != 0 ?
  5342:                (M68kException.m6eFSLW & M68kException.M6E_FSLW_TM_CODE) != 0 ? mmuSuperCodeTransparent : mmuSuperDataTransparent :
  5343:                (M68kException.m6eFSLW & M68kException.M6E_FSLW_TM_CODE) != 0 ? mmuUserCodeTransparent : mmuUserDataTransparent)[M68kException.m6eAddress >>> 24] != 0) {  //透過変換
  5344:             M68kException.m6eFSLW |= M68kException.M6E_FSLW_TRANSPARENT;
  5345:           }
  5346:         }
  5347:         if (M68kException.M6E_DEBUG_ERROR) {
  5348:           System.out.println (M68kException.m6eToString6 ());  //srを表示するのでsrを更新する前に呼び出すこと
  5349:         }
  5350:         try {
  5351:           int save_sr = XEiJ.regSRT1 | XEiJ.regSRS | XEiJ.regSRM | XEiJ.regSRI | XEiJ.regCCR;
  5352:           XEiJ.regSRT1 = XEiJ.regSRT0 = 0;  //srのTビットを消す
  5353:           int sp;
  5354:           if (XEiJ.regSRS != 0) {  //スーパーバイザモード
  5355:             sp = XEiJ.regRn[15];
  5356:           } else {  //ユーザモード
  5357:             XEiJ.regSRS = XEiJ.REG_SR_S;  //スーパーバイザモードへ移行する
  5358:             XEiJ.mpuUSP = XEiJ.regRn[15];  //USPを保存
  5359:             sp = XEiJ.mpuISP;  //SSPを復元
  5360:             if (DataBreakPoint.DBP_ON) {
  5361:               DataBreakPoint.dbpMemoryMap = DataBreakPoint.dbpSuperMap;  //スーパーバイザメモリマップに切り替える
  5362:             } else {
  5363:               XEiJ.busMemoryMap = XEiJ.busSuperMap;  //スーパーバイザメモリマップに切り替える
  5364:             }
  5365:             if (InstructionBreakPoint.IBP_ON) {
  5366:               InstructionBreakPoint.ibpOp1MemoryMap = InstructionBreakPoint.ibpOp1SuperMap;
  5367:             }
  5368:           }
  5369:           //以下はスーパーバイザモード
  5370:           XEiJ.mpuClockTime += XEiJ.mpuModifiedUnit * 19;
  5371:           //  同じオフセットで異なるフォーマットになるものはここでは処理できない
  5372:           if (M68kException.m6eNumber == M68kException.M6E_ACCESS_FAULT) {
  5373:             //ホストファイルシステムのデバイスコマンドを強制終了させる
  5374:             HFS.hfsState = HFS.HFS_STATE_IDLE;
  5375:             //FORMAT $4の例外スタックフレームを作る
  5376:             XEiJ.regRn[15] = sp -= 16;
  5377:             mmuWriteLongData (sp + 12, M68kException.m6eFSLW, 1);  //15-12:フォルトステータスロングワード(FSLW)
  5378:             mmuWriteLongData (sp + 8, M68kException.m6eAddress, 1);  //11-8:フォルトアドレス
  5379:             mmuWriteWordData (sp + 6, 0x4000 | M68kException.M6E_ACCESS_FAULT << 2, 1);  //7-6:フォーマットとベクタオフセット
  5380:             //                   111111111122222222223333333333444444444455555555556666
  5381:             //         0123456789012345678901234567890123456789012345678901234567890123
  5382:           } else if (0b0001011101000000000000000000000000000000000000000000000000000000L << M68kException.m6eNumber < 0L) {
  5383:             //FORMAT $2の例外スタックフレームを作る
  5384:             XEiJ.regRn[15] = sp -= 12;
  5385:             mmuWriteLongData (sp + 8, M68kException.m6eAddress, 1);  //11-8:命令アドレス
  5386:             mmuWriteWordData (sp + 6, 0x2000 | M68kException.m6eNumber << 2, 1);  //7-6:フォーマットとベクタオフセット
  5387:           } else {
  5388:             //FORMAT $0の例外スタックフレームを作る
  5389:             XEiJ.regRn[15] = sp -= 8;
  5390:             mmuWriteWordData (sp + 6, M68kException.m6eNumber << 2, 1);  //7-6:フォーマットとベクタオフセット
  5391:           }
  5392:           mmuWriteLongData (sp + 2, XEiJ.regPC, 1);  //5-2:プログラムカウンタ
  5393:           mmuWriteWordData (sp, save_sr, 1);  //1-0:ステータスレジスタ
  5394:           irpSetPC (mmuReadLongFour (XEiJ.mpuVBR + (M68kException.m6eNumber << 2), 1));  //例外ベクタを取り出してジャンプする
  5395:           if (XEiJ.dbgStopOnError) {  //エラーで停止する場合
  5396:             if (XEiJ.dbgDoStopOnError ()) {
  5397:               break errorLoop;
  5398:             }
  5399:           }
  5400:         } catch (M68kException ee) {  //ダブルバスフォルト
  5401:           XEiJ.dbgDoubleBusFault ();
  5402:           break errorLoop;
  5403:         }
  5404:       }  //catch M68kException
  5405:     }  //例外ループ
  5406: 
  5407:     //  通常
  5408:     //    pc0  最後に実行した命令
  5409:     //    pc  次に実行する命令
  5410:     //  バスエラー、アドレスエラー、不当命令、特権違反で停止したとき
  5411:     //    pc0  エラーを発生させた命令
  5412:     //    pc  例外処理ルーチンの先頭
  5413:     //  ダブルバスフォルトで停止したとき
  5414:     //    pc0  エラーを発生させた命令
  5415:     //    pc  エラーを発生させた命令
  5416:     //  命令ブレークポイントで停止したとき
  5417:     //    pc0  命令ブレークポイントが設定された、次に実行する命令
  5418:     //    pc  命令ブレークポイントが設定された、次に実行する命令
  5419:     //  データブレークポイントで停止したとき
  5420:     //    pc0  データを書き換えた、最後に実行した命令
  5421:     //    pc  次に実行する命令
  5422: 
  5423:     //分岐ログに停止レコードを記録する
  5424:     if (BranchLog.BLG_ON) {
  5425:       //BranchLog.blgStop ();
  5426:       int i = (char) BranchLog.blgNewestRecord << BranchLog.BLG_RECORD_SHIFT;
  5427:       BranchLog.blgArray[i] = BranchLog.blgHead | BranchLog.blgSuper;
  5428:       BranchLog.blgArray[i + 1] = XEiJ.regPC;  //次に実行する命令
  5429:     }
  5430: 
  5431:   }  //mpuCore()
  5432: 
  5433: 
  5434: 
  5435:   //cont = irpWaitException ()
  5436:   //  待機例外をキャッチしたとき
  5437:   public static boolean irpWaitException () {
  5438:     XEiJ.regPC = XEiJ.regPC0;  //PCを巻き戻す
  5439:     XEiJ.regRn[8 + (XEiJ.regOC & 7)] += WaitInstruction.REWIND_AR[XEiJ.regOC >> 3];  //(Ar)+|-(Ar)で変化したArを巻き戻す
  5440:     try {
  5441:       //トレース例外を処理する
  5442:       if (XEiJ.mpuTraceFlag != 0) {  //命令実行前にsrのTビットがセットされていた
  5443:         irpExceptionFormat2 (M68kException.M6E_TRACE << 2, XEiJ.regPC, XEiJ.regPC0);  //pcは次の命令
  5444:       }
  5445:       //デバイスを呼び出す
  5446:       TickerQueue.tkqRun (XEiJ.mpuClockTime);
  5447:       //割り込みを受け付ける
  5448:       int t;
  5449:       if ((t = XEiJ.mpuIMR & XEiJ.mpuIRR) != 0) {  //マスクされているレベルよりも高くて受け付けていない割り込みがあるとき
  5450:         t &= -t;
  5451:         //  x&=-xはxの最下位の1のビットだけを残す演算
  5452:         //  すなわちマスクされているレベルよりも高くて受け付けていない割り込みの中で最高レベルの割り込みのビットだけが残る
  5453:         //  最高レベルの割り込みのビットしか残っていないので、割り込みの有無をレベルの高い順ではなく使用頻度の高い順に調べられる
  5454:         //  MFPやDMAの割り込みがかかる度にそれより優先度の高いインタラプトスイッチが押されていないかどうかを確かめる必要がない
  5455:         if (t == XEiJ.MPU_MFP_INTERRUPT_MASK) {
  5456:           XEiJ.mpuIRR &= ~XEiJ.MPU_MFP_INTERRUPT_MASK;  //割り込みを受け付ける
  5457:           if ((t = MC68901.mfpAcknowledge ()) != 0) {  //デバイスにベクタ番号を要求して割り込み処理中の状態になったとき
  5458:             irpInterrupt (t << 2, XEiJ.MPU_MFP_INTERRUPT_LEVEL);  //割り込み処理を開始する
  5459:           }
  5460:         } else if (t == XEiJ.MPU_DMA_INTERRUPT_MASK) {
  5461:           XEiJ.mpuIRR &= ~XEiJ.MPU_DMA_INTERRUPT_MASK;  //割り込みを受け付ける
  5462:           if ((t = HD63450.dmaAcknowledge ()) != 0) {  //デバイスにベクタ番号を要求して割り込み処理中の状態になったとき
  5463:             irpInterrupt (t << 2, XEiJ.MPU_DMA_INTERRUPT_LEVEL);  //割り込み処理を開始する
  5464:           }
  5465:         } else if (t == XEiJ.MPU_SCC_INTERRUPT_MASK) {
  5466:           XEiJ.mpuIRR &= ~XEiJ.MPU_SCC_INTERRUPT_MASK;  //割り込みを受け付ける
  5467:           if ((t = Z8530.sccAcknowledge ()) != 0) {  //デバイスにベクタ番号を要求して割り込み処理中の状態になったとき
  5468:             irpInterrupt (t << 2, XEiJ.MPU_SCC_INTERRUPT_LEVEL);  //割り込み処理を開始する
  5469:           }
  5470:         } else if (t == XEiJ.MPU_IOI_INTERRUPT_MASK) {
  5471:           XEiJ.mpuIRR &= ~XEiJ.MPU_IOI_INTERRUPT_MASK;  //割り込みを受け付ける
  5472:           if ((t = IOInterrupt.ioiAcknowledge ()) != 0) {  //デバイスにベクタ番号を要求して割り込み処理中の状態になったとき
  5473:             irpInterrupt (t << 2, XEiJ.MPU_IOI_INTERRUPT_LEVEL);  //割り込み処理を開始する
  5474:           }
  5475:         } else if (t == XEiJ.MPU_EB2_INTERRUPT_MASK) {
  5476:           XEiJ.mpuIRR &= ~XEiJ.MPU_EB2_INTERRUPT_MASK;  //割り込みを受け付ける
  5477:           if ((t = XEiJ.eb2Acknowledge ()) != 0) {  //デバイスにベクタ番号を要求して割り込み処理中の状態になったとき
  5478:             irpInterrupt (t << 2, XEiJ.MPU_EB2_INTERRUPT_LEVEL);  //割り込み処理を開始する
  5479:           }
  5480:         } else if (t == XEiJ.MPU_SYS_INTERRUPT_MASK) {
  5481:           XEiJ.mpuIRR &= ~XEiJ.MPU_SYS_INTERRUPT_MASK;  //割り込みを受け付ける
  5482:           if ((t = XEiJ.sysAcknowledge ()) != 0) {  //デバイスにベクタ番号を要求して割り込み処理中の状態になったとき
  5483:             irpInterrupt (t << 2, XEiJ.MPU_SYS_INTERRUPT_LEVEL);  //割り込み処理を開始する
  5484:           }
  5485:         }
  5486:       }  //if t!=0
  5487:       if (MC68901.MFP_DELAYED_INTERRUPT) {
  5488:         XEiJ.mpuIRR |= XEiJ.mpuDIRR;  //遅延割り込み要求
  5489:         XEiJ.mpuDIRR = 0;
  5490:       }
  5491:     } catch (M68kException e) {
  5492:       //!!! 待機例外処理中のバスエラーの処理は省略
  5493:       XEiJ.dbgDoubleBusFault ();
  5494:       return false;
  5495:     }  //catch M68kException
  5496:     return true;
  5497:   }  //irpWaitException
  5498: 
  5499: 
  5500: 
  5501:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  5502:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  5503:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  5504:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  5505:   //ORI.B #<data>,<ea>                              |-|012346|-|-UUUU|-**00|D M+-WXZ  |0000_000_000_mmm_rrr-{data}
  5506:   //OR.B #<data>,<ea>                               |A|012346|-|-UUUU|-**00|  M+-WXZ  |0000_000_000_mmm_rrr-{data}  [ORI.B #<data>,<ea>]
  5507:   //ORI.B #<data>,CCR                               |-|012346|-|*****|*****|          |0000_000_000_111_100-{data}
  5508:   public static void irpOriByte () throws M68kException {
  5509:     int ea = XEiJ.regOC & 63;
  5510:     int z = mmuReadByteSignExword ((XEiJ.regPC += 2) - 1, XEiJ.regSRS);  //pcbs
  5511:     if (ea < XEiJ.EA_AR) {  //ORI.B #<data>,Dr
  5512:       if (XEiJ.DBG_ORI_BYTE_ZERO_D0) {
  5513:         if (z == 0 && ea == 0 && XEiJ.dbgOriByteZeroD0) {  //ORI.B #$00,D0
  5514:           M68kException.m6eNumber = M68kException.M6E_ILLEGAL_INSTRUCTION;
  5515:           throw M68kException.m6eSignal;
  5516:         }
  5517:       }
  5518:       XEiJ.mpuCycleCount++;
  5519:       z = XEiJ.regRn[ea] |= 255 & z;  //0拡張してからOR
  5520:       XEiJ.regCCR = XEiJ.regCCR & XEiJ.REG_CCR_X | XEiJ.MPU_TSTB_TABLE[255 & z];  //ccr_tst_byte
  5521:     } else if (ea == XEiJ.EA_IM) {  //ORI.B #<data>,CCR
  5522:       XEiJ.mpuCycleCount++;
  5523:       XEiJ.regCCR |= XEiJ.REG_CCR_MASK & z;
  5524:     } else {  //ORI.B #<data>,<mem>
  5525:       XEiJ.mpuCycleCount++;
  5526:       int a = efaMltByte (ea);
  5527:       mmuWriteByteData (a, z |= mmuModifyByteSignData (a, XEiJ.regSRS), XEiJ.regSRS);
  5528:       XEiJ.regCCR = XEiJ.regCCR & XEiJ.REG_CCR_X | XEiJ.MPU_TSTB_TABLE[255 & z];  //ccr_tst_byte
  5529:     }
  5530:   }  //irpOriByte
  5531: 
  5532:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  5533:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  5534:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  5535:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  5536:   //ORI.W #<data>,<ea>                              |-|012346|-|-UUUU|-**00|D M+-WXZ  |0000_000_001_mmm_rrr-{data}
  5537:   //OR.W #<data>,<ea>                               |A|012346|-|-UUUU|-**00|  M+-WXZ  |0000_000_001_mmm_rrr-{data}  [ORI.W #<data>,<ea>]
  5538:   //ORI.W #<data>,SR                                |-|012346|P|*****|*****|          |0000_000_001_111_100-{data}
  5539:   public static void irpOriWord () throws M68kException {
  5540:     int ea = XEiJ.regOC & 63;
  5541:     if (ea < XEiJ.EA_AR) {  //ORI.W #<data>,Dr
  5542:       int z = mmuReadWordSignExword ((XEiJ.regPC += 2) - 2, XEiJ.regSRS);  //pcws
  5543:       XEiJ.mpuCycleCount++;
  5544:       z = XEiJ.regRn[ea] |= (char) z;  //0拡張してからOR
  5545:       XEiJ.regCCR = XEiJ.regCCR & XEiJ.REG_CCR_X | (char) z - 1 >> 31 & XEiJ.REG_CCR_Z | ((short) z < 0 ? XEiJ.REG_CCR_N : 0);  //ccr_tst_word
  5546:     } else if (ea == XEiJ.EA_IM) {  //ORI.W #<data>,SR
  5547:       if (XEiJ.regSRS == 0) {  //ユーザモードのとき
  5548:         M68kException.m6eNumber = M68kException.M6E_PRIVILEGE_VIOLATION;
  5549:         throw M68kException.m6eSignal;
  5550:       }
  5551:       //以下はスーパーバイザモード
  5552:       XEiJ.mpuCycleCount += 5;
  5553:       irpSetSR (XEiJ.regSRT1 | XEiJ.regSRS | XEiJ.regSRM | XEiJ.regSRI | XEiJ.regCCR | mmuReadWordSignExword ((XEiJ.regPC += 2) - 2, 1));  //pcws。特権違反チェックが先
  5554:     } else {  //ORI.W #<data>,<mem>
  5555:       int z = mmuReadWordSignExword ((XEiJ.regPC += 2) - 2, XEiJ.regSRS);  //pcws
  5556:       XEiJ.mpuCycleCount++;
  5557:       int a = efaMltWord (ea);
  5558:       mmuWriteWordData (a, z |= mmuModifyWordSignData (a, XEiJ.regSRS), XEiJ.regSRS);
  5559:       XEiJ.regCCR = XEiJ.regCCR & XEiJ.REG_CCR_X | (char) z - 1 >> 31 & XEiJ.REG_CCR_Z | ((short) z < 0 ? XEiJ.REG_CCR_N : 0);  //ccr_tst_word
  5560:     }
  5561:   }  //irpOriWord
  5562: 
  5563:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  5564:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  5565:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  5566:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  5567:   //ORI.L #<data>,<ea>                              |-|012346|-|-UUUU|-**00|D M+-WXZ  |0000_000_010_mmm_rrr-{data}
  5568:   //OR.L #<data>,<ea>                               |A|012346|-|-UUUU|-**00|  M+-WXZ  |0000_000_010_mmm_rrr-{data}  [ORI.L #<data>,<ea>]
  5569:   public static void irpOriLong () throws M68kException {
  5570:     int ea = XEiJ.regOC & 63;
  5571:     int y = mmuReadLongExword ((XEiJ.regPC += 4) - 4, XEiJ.regSRS);  //pcls
  5572:     int z;
  5573:     if (ea < XEiJ.EA_AR) {  //ORI.L #<data>,Dr
  5574:       XEiJ.mpuCycleCount++;
  5575:       z = XEiJ.regRn[ea] |= y;
  5576:     } else {  //ORI.L #<data>,<mem>
  5577:       XEiJ.mpuCycleCount++;
  5578:       int a = efaMltLong (ea);
  5579:       mmuWriteLongData (a, z = mmuModifyLongData (a, XEiJ.regSRS) | y, XEiJ.regSRS);
  5580:     }
  5581:     XEiJ.regCCR = z >> 28 & XEiJ.REG_CCR_N | (z == 0 ? XEiJ.regCCR & XEiJ.REG_CCR_X | XEiJ.REG_CCR_Z : XEiJ.regCCR & XEiJ.REG_CCR_X);  //ccr_tst
  5582:   }  //irpOriLong
  5583: 
  5584:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  5585:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  5586:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  5587:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  5588:   //BITREV.L Dr                                     |-|------|-|-----|-----|D         |0000_000_011_000_rrr (ISA_C)
  5589:   //CMP2.B <ea>,Rn                                  |-|--234S|-|-UUUU|-U*U*|  M  WXZP |0000_000_011_mmm_rrr-rnnn000000000000
  5590:   //CHK2.B <ea>,Rn                                  |-|--234S|-|-UUUU|-U*U*|  M  WXZP |0000_000_011_mmm_rrr-rnnn100000000000
  5591:   //
  5592:   //BITREV.L Dr
  5593:   //  Drのビットの並びを逆順にする。CCRは変化しない
  5594:   //
  5595:   //CHK2.B <ea>,Rn
  5596:   //  <ea>から下限と上限をリードしてRnが範囲内か調べる
  5597:   //  CHK2.B <ea>,Anは下限と上限をそれぞれロングに符号拡張してロングで比較する
  5598:   //  Rnが下限または上限と等しいときZをセットする
  5599:   //  Rnが範囲外のときCをセットする。このときCHK instruction例外が発生する
  5600:   //  060ISPのソースは注釈に誤りが多いので注釈ではなくコードを参考にする
  5601:   //  CCR
  5602:   //    X  変化しない
  5603:   //    N  変化しない(M68000PRMでは未定義)
  5604:   //    Z  Rn-LB==0||Rn-LB==UB-LB
  5605:   //    V  変化しない(M68000PRMでは未定義)
  5606:   //    C  Rn-LB>UB-LB(符号なし比較)
  5607:   //
  5608:   //CMP2.B <ea>,Rn
  5609:   //  <ea>から下限と上限をリードしてRnが範囲内か調べる
  5610:   //  CMP2.B <ea>,Anは下限と上限をそれぞれロングに符号拡張してロングで比較する
  5611:   //  Rnが下限または上限と等しいときZをセットする
  5612:   //  Rnが範囲外のときCをセットする
  5613:   //  060ISPのソースは注釈に誤りが多いので注釈ではなくコードを参考にする
  5614:   //  CCR
  5615:   //    X  変化しない
  5616:   //    N  変化しない(M68000PRMでは未定義)
  5617:   //    Z  Rn-LB==0||Rn-LB==UB-LB
  5618:   //    V  変化しない(M68000PRMでは未定義)
  5619:   //    C  Rn-LB>UB-LB(符号なし比較)
  5620:   public static void irpCmp2Chk2Byte () throws M68kException {
  5621:     int ea = XEiJ.regOC & 63;
  5622:     if (ea < XEiJ.EA_AR) {  //BITREV.L Dr
  5623:       XEiJ.mpuCycleCount++;
  5624:       int x = XEiJ.regRn[ea];
  5625:       XEiJ.regRn[ea] = XEiJ.MPU_BITREV_TABLE_0[x & 2047] | XEiJ.MPU_BITREV_TABLE_1[x << 10 >>> 21] | XEiJ.MPU_BITREV_TABLE_2[x >>> 22];
  5626:     } else {  //CMP2/CHK2.B <ea>,Rn
  5627:       M68kException.m6eNumber = M68kException.M6E_UNIMPLEMENTED_INSTRUCTION;
  5628:       throw M68kException.m6eSignal;
  5629:     }
  5630:   }  //irpCmp2Chk2Byte
  5631: 
  5632:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  5633:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  5634:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  5635:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  5636:   //BTST.L Dq,Dr                                    |-|012346|-|--U--|--*--|D         |0000_qqq_100_000_rrr
  5637:   //MOVEP.W (d16,Ar),Dq                             |-|01234S|-|-----|-----|          |0000_qqq_100_001_rrr-{data}
  5638:   //BTST.B Dq,<ea>                                  |-|012346|-|--U--|--*--|  M+-WXZPI|0000_qqq_100_mmm_rrr
  5639:   public static void irpBtstReg () throws M68kException {
  5640:     int ea = XEiJ.regOC & 63;
  5641:     int qqq = XEiJ.regOC >> 9;  //qqq
  5642:     if (ea >> 3 == XEiJ.MMM_AR) {  //MOVEP.W (d16,Ar),Dq
  5643:       M68kException.m6eNumber = M68kException.M6E_UNIMPLEMENTED_INSTRUCTION;
  5644:       throw M68kException.m6eSignal;
  5645:     } else {  //BTST.L Dq,Dr/<ea>
  5646:       int y = XEiJ.regRn[qqq];
  5647:       if (ea < XEiJ.EA_AR) {  //BTST.L Dq,Dr
  5648:         XEiJ.mpuCycleCount++;
  5649:         XEiJ.regCCR = XEiJ.regCCR & (XEiJ.REG_CCR_X | XEiJ.REG_CCR_N | XEiJ.REG_CCR_V | XEiJ.REG_CCR_C) | (~XEiJ.regRn[ea] >>> y & 1) << 2;  //ccr_btst。intのシフトは5bitでマスクされるので&31を省略
  5650:       } else {  //BTST.B Dq,<ea>
  5651:         XEiJ.mpuCycleCount++;
  5652:         XEiJ.regCCR = XEiJ.regCCR & (XEiJ.REG_CCR_X | XEiJ.REG_CCR_N | XEiJ.REG_CCR_V | XEiJ.REG_CCR_C) | (~(ea == XEiJ.EA_IM ? mmuReadByteSignExword ((XEiJ.regPC += 2) - 1, XEiJ.regSRS) : mmuReadByteSignData (efaAnyByte (ea), XEiJ.regSRS)) >>> (y & 7) & 1) << 2;  //ccr_btst。pcbs。イミディエイトを分離
  5653:       }
  5654:     }
  5655:   }  //irpBtstReg
  5656: 
  5657:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  5658:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  5659:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  5660:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  5661:   //BCHG.L Dq,Dr                                    |-|012346|-|--U--|--*--|D         |0000_qqq_101_000_rrr
  5662:   //MOVEP.L (d16,Ar),Dq                             |-|01234S|-|-----|-----|          |0000_qqq_101_001_rrr-{data}
  5663:   //BCHG.B Dq,<ea>                                  |-|012346|-|--U--|--*--|  M+-WXZ  |0000_qqq_101_mmm_rrr
  5664:   public static void irpBchgReg () throws M68kException {
  5665:     int ea = XEiJ.regOC & 63;
  5666:     int qqq = XEiJ.regOC >> 9;  //qqq
  5667:     if (ea >> 3 == XEiJ.MMM_AR) {  //MOVEP.L (d16,Ar),Dq
  5668:       M68kException.m6eNumber = M68kException.M6E_UNIMPLEMENTED_INSTRUCTION;
  5669:       throw M68kException.m6eSignal;
  5670:     } else {  //BCHG.L Dq,Dr/<ea>
  5671:       int x;
  5672:       int y = XEiJ.regRn[qqq];
  5673:       if (ea < XEiJ.EA_AR) {  //BCHG.L Dq,Dr
  5674:         XEiJ.mpuCycleCount++;
  5675:         XEiJ.regRn[ea] = (x = XEiJ.regRn[ea]) ^ (y = 1 << y);  //intのシフトは5bitでマスクされるので1<<(y&0x1f)の&0x1fを省略
  5676:       } else {  //BCHG.B Dq,<ea>
  5677:         XEiJ.mpuCycleCount++;
  5678:         int a = efaMltByte (ea);
  5679:         mmuWriteByteData (a, (x = mmuModifyByteSignData (a, XEiJ.regSRS)) ^ (y = 1 << (y & 7)), XEiJ.regSRS);
  5680:       }
  5681:       XEiJ.regCCR = XEiJ.regCCR & (XEiJ.REG_CCR_X | XEiJ.REG_CCR_N | XEiJ.REG_CCR_V | XEiJ.REG_CCR_C) | (x & y) - 1 >>> 31 << 2;  //ccr_btst
  5682:     }
  5683:   }  //irpBchgReg
  5684: 
  5685:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  5686:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  5687:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  5688:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  5689:   //BCLR.L Dq,Dr                                    |-|012346|-|--U--|--*--|D         |0000_qqq_110_000_rrr
  5690:   //MOVEP.W Dq,(d16,Ar)                             |-|01234S|-|-----|-----|          |0000_qqq_110_001_rrr-{data}
  5691:   //BCLR.B Dq,<ea>                                  |-|012346|-|--U--|--*--|  M+-WXZ  |0000_qqq_110_mmm_rrr
  5692:   public static void irpBclrReg () throws M68kException {
  5693:     int ea = XEiJ.regOC & 63;
  5694:     int y = XEiJ.regRn[XEiJ.regOC >> 9];  //qqq
  5695:     if (ea >> 3 == XEiJ.MMM_AR) {  //MOVEP.W Dq,(d16,Ar)
  5696:       M68kException.m6eNumber = M68kException.M6E_UNIMPLEMENTED_INSTRUCTION;
  5697:       throw M68kException.m6eSignal;
  5698:     } else {  //BCLR.L Dq,Dr/<ea>
  5699:       int x;
  5700:       if (ea < XEiJ.EA_AR) {  //BCLR.L Dq,Dr
  5701:         XEiJ.mpuCycleCount++;
  5702:         XEiJ.regRn[ea] = (x = XEiJ.regRn[ea]) & ~(y = 1 << y);  //intのシフトは5bitでマスクされるので1<<(y&0x1f)の&0x1fを省略
  5703:       } else {  //BCLR.B Dq,<ea>
  5704:         XEiJ.mpuCycleCount++;
  5705:         int a = efaMltByte (ea);
  5706:         mmuWriteByteData (a, (x = mmuModifyByteSignData (a, XEiJ.regSRS)) & ~(y = 1 << (y & 7)), XEiJ.regSRS);
  5707:       }
  5708:       XEiJ.regCCR = XEiJ.regCCR & (XEiJ.REG_CCR_X | XEiJ.REG_CCR_N | XEiJ.REG_CCR_V | XEiJ.REG_CCR_C) | (x & y) - 1 >>> 31 << 2;  //ccr_btst
  5709:     }
  5710:   }  //irpBclrReg
  5711: 
  5712:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  5713:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  5714:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  5715:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  5716:   //BSET.L Dq,Dr                                    |-|012346|-|--U--|--*--|D         |0000_qqq_111_000_rrr
  5717:   //MOVEP.L Dq,(d16,Ar)                             |-|01234S|-|-----|-----|          |0000_qqq_111_001_rrr-{data}
  5718:   //BSET.B Dq,<ea>                                  |-|012346|-|--U--|--*--|  M+-WXZ  |0000_qqq_111_mmm_rrr
  5719:   public static void irpBsetReg () throws M68kException {
  5720:     int ea = XEiJ.regOC & 63;
  5721:     int y = XEiJ.regRn[XEiJ.regOC >> 9];  //qqq
  5722:     if (ea >> 3 == XEiJ.MMM_AR) {  //MOVEP.L Dq,(d16,Ar)
  5723:       M68kException.m6eNumber = M68kException.M6E_UNIMPLEMENTED_INSTRUCTION;
  5724:       throw M68kException.m6eSignal;
  5725:     } else {  //BSET.L Dq,Dr/<ea>
  5726:       int x;
  5727:       if (ea < XEiJ.EA_AR) {  //BSET.L Dq,Dr
  5728:         XEiJ.mpuCycleCount++;
  5729:         XEiJ.regRn[ea] = (x = XEiJ.regRn[ea]) | (y = 1 << y);  //intのシフトは5bitでマスクされるので1<<(y&0x1f)の&0x1fを省略
  5730:       } else {  //BSET.B Dq,<ea>
  5731:         XEiJ.mpuCycleCount++;
  5732:         int a = efaMltByte (ea);
  5733:         mmuWriteByteData (a, (x = mmuModifyByteSignData (a, XEiJ.regSRS)) | (y = 1 << (y & 7)), XEiJ.regSRS);
  5734:       }
  5735:       XEiJ.regCCR = XEiJ.regCCR & (XEiJ.REG_CCR_X | XEiJ.REG_CCR_N | XEiJ.REG_CCR_V | XEiJ.REG_CCR_C) | (x & y) - 1 >>> 31 << 2;  //ccr_btst
  5736:     }
  5737:   }  //irpBsetReg
  5738: 
  5739:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  5740:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  5741:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  5742:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  5743:   //ANDI.B #<data>,<ea>                             |-|012346|-|-UUUU|-**00|D M+-WXZ  |0000_001_000_mmm_rrr-{data}
  5744:   //AND.B #<data>,<ea>                              |A|012346|-|-UUUU|-**00|  M+-WXZ  |0000_001_000_mmm_rrr-{data}  [ANDI.B #<data>,<ea>]
  5745:   //ANDI.B #<data>,CCR                              |-|012346|-|*****|*****|          |0000_001_000_111_100-{data}
  5746:   public static void irpAndiByte () throws M68kException {
  5747:     int ea = XEiJ.regOC & 63;
  5748:     int z = mmuReadByteSignExword ((XEiJ.regPC += 2) - 1, XEiJ.regSRS);  //pcbs
  5749:     if (ea < XEiJ.EA_AR) {  //ANDI.B #<data>,Dr
  5750:       XEiJ.mpuCycleCount++;
  5751:       z = XEiJ.regRn[ea] &= ~255 | z;  //1拡張してからAND
  5752:       XEiJ.regCCR = XEiJ.regCCR & XEiJ.REG_CCR_X | XEiJ.MPU_TSTB_TABLE[255 & z];  //ccr_tst_byte
  5753:     } else if (ea == XEiJ.EA_IM) {  //ANDI.B #<data>,CCR
  5754:       XEiJ.mpuCycleCount++;
  5755:       XEiJ.regCCR &= z;
  5756:     } else {  //ANDI.B #<data>,<mem>
  5757:       XEiJ.mpuCycleCount++;
  5758:       int a = efaMltByte (ea);
  5759:       mmuWriteByteData (a, z &= mmuModifyByteSignData (a, XEiJ.regSRS), XEiJ.regSRS);
  5760:       XEiJ.regCCR = XEiJ.regCCR & XEiJ.REG_CCR_X | XEiJ.MPU_TSTB_TABLE[255 & z];  //ccr_tst_byte
  5761:     }
  5762:   }  //irpAndiByte
  5763: 
  5764:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  5765:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  5766:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  5767:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  5768:   //ANDI.W #<data>,<ea>                             |-|012346|-|-UUUU|-**00|D M+-WXZ  |0000_001_001_mmm_rrr-{data}
  5769:   //AND.W #<data>,<ea>                              |A|012346|-|-UUUU|-**00|  M+-WXZ  |0000_001_001_mmm_rrr-{data}  [ANDI.W #<data>,<ea>]
  5770:   //ANDI.W #<data>,SR                               |-|012346|P|*****|*****|          |0000_001_001_111_100-{data}
  5771:   public static void irpAndiWord () throws M68kException {
  5772:     int ea = XEiJ.regOC & 63;
  5773:     if (ea < XEiJ.EA_AR) {  //ANDI.W #<data>,Dr
  5774:       int z = mmuReadWordSignExword ((XEiJ.regPC += 2) - 2, XEiJ.regSRS);  //pcws
  5775:       XEiJ.mpuCycleCount++;
  5776:       z = XEiJ.regRn[ea] &= ~65535 | z;  //1拡張してからAND
  5777:       XEiJ.regCCR = XEiJ.regCCR & XEiJ.REG_CCR_X | (char) z - 1 >> 31 & XEiJ.REG_CCR_Z | ((short) z < 0 ? XEiJ.REG_CCR_N : 0);  //ccr_tst_word
  5778:     } else if (ea == XEiJ.EA_IM) {  //ANDI.W #<data>,SR
  5779:       if (XEiJ.regSRS == 0) {  //ユーザモードのとき
  5780:         M68kException.m6eNumber = M68kException.M6E_PRIVILEGE_VIOLATION;
  5781:         throw M68kException.m6eSignal;
  5782:       }
  5783:       //以下はスーパーバイザモード
  5784:       XEiJ.mpuCycleCount += 12;
  5785:       irpSetSR ((XEiJ.regSRT1 | XEiJ.regSRS | XEiJ.regSRM | XEiJ.regSRI | XEiJ.regCCR) & mmuReadWordSignExword ((XEiJ.regPC += 2) - 2, 1));  //pcws。特権違反チェックが先
  5786:     } else {  //ANDI.W #<data>,<mem>
  5787:       int z = mmuReadWordSignExword ((XEiJ.regPC += 2) - 2, XEiJ.regSRS);  //pcws
  5788:       XEiJ.mpuCycleCount++;
  5789:       int a = efaMltWord (ea);
  5790:       mmuWriteWordData (a, z &= mmuModifyWordSignData (a, XEiJ.regSRS), XEiJ.regSRS);
  5791:       XEiJ.regCCR = XEiJ.regCCR & XEiJ.REG_CCR_X | (char) z - 1 >> 31 & XEiJ.REG_CCR_Z | ((short) z < 0 ? XEiJ.REG_CCR_N : 0);  //ccr_tst_word
  5792:     }
  5793:   }  //irpAndiWord
  5794: 
  5795:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  5796:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  5797:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  5798:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  5799:   //ANDI.L #<data>,<ea>                             |-|012346|-|-UUUU|-**00|D M+-WXZ  |0000_001_010_mmm_rrr-{data}
  5800:   //AND.L #<data>,<ea>                              |A|012346|-|-UUUU|-**00|  M+-WXZ  |0000_001_010_mmm_rrr-{data}  [ANDI.L #<data>,<ea>]
  5801:   public static void irpAndiLong () throws M68kException {
  5802:     int ea = XEiJ.regOC & 63;
  5803:     int y = mmuReadLongExword ((XEiJ.regPC += 4) - 4, XEiJ.regSRS);  //pcls
  5804:     int z;
  5805:     if (ea < XEiJ.EA_AR) {  //ANDI.L #<data>,Dr
  5806:       XEiJ.mpuCycleCount++;
  5807:       z = XEiJ.regRn[ea] &= y;
  5808:     } else {  //ANDI.L #<data>,<mem>
  5809:       XEiJ.mpuCycleCount++;
  5810:       int a = efaMltLong (ea);
  5811:       mmuWriteLongData (a, z = mmuModifyLongData (a, XEiJ.regSRS) & y, XEiJ.regSRS);
  5812:     }
  5813:     XEiJ.regCCR = z >> 28 & XEiJ.REG_CCR_N | (z == 0 ? XEiJ.regCCR & XEiJ.REG_CCR_X | XEiJ.REG_CCR_Z : XEiJ.regCCR & XEiJ.REG_CCR_X);  //ccr_tst
  5814:   }  //irpAndiLong
  5815: 
  5816:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  5817:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  5818:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  5819:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  5820:   //BYTEREV.L Dr                                    |-|------|-|-----|-----|D         |0000_001_011_000_rrr (ISA_C)
  5821:   //CMP2.W <ea>,Rn                                  |-|--234S|-|-UUUU|-U*U*|  M  WXZP |0000_001_011_mmm_rrr-rnnn000000000000
  5822:   //CHK2.W <ea>,Rn                                  |-|--234S|-|-UUUU|-U*U*|  M  WXZP |0000_001_011_mmm_rrr-rnnn100000000000
  5823:   //
  5824:   //BYTEREV.L Dr
  5825:   //  Drのバイトの並びを逆順にする。CCRは変化しない
  5826:   //
  5827:   //CHK2.W <ea>,Rn
  5828:   //  <ea>から下限と上限をリードしてRnが範囲内か調べる
  5829:   //  CHK2.W <ea>,Anは下限と上限をそれぞれロングに符号拡張してロングで比較する
  5830:   //  Rnが下限または上限と等しいときZをセットする
  5831:   //  Rnが範囲外のときCをセットする。このときCHK instruction例外が発生する
  5832:   //  060ISPのソースは注釈に誤りが多いので注釈ではなくコードを参考にする
  5833:   //  CCR
  5834:   //    X  変化しない
  5835:   //    N  変化しない(M68000PRMでは未定義)
  5836:   //    Z  Rn-LB==0||Rn-LB==UB-LB
  5837:   //    V  変化しない(M68000PRMでは未定義)
  5838:   //    C  Rn-LB>UB-LB(符号なし比較)
  5839:   //
  5840:   //CMP2.W <ea>,Rn
  5841:   //  <ea>から下限と上限をリードしてRnが範囲内か調べる
  5842:   //  CMP2.W <ea>,Anは下限と上限をそれぞれロングに符号拡張してロングで比較する
  5843:   //  Rnが下限または上限と等しいときZをセットする
  5844:   //  Rnが範囲外のときCをセットする
  5845:   //  060ISPのソースは注釈に誤りが多いので注釈ではなくコードを参考にする
  5846:   //  CCR
  5847:   //    X  変化しない
  5848:   //    N  変化しない(M68000PRMでは未定義)
  5849:   //    Z  Rn-LB==0||Rn-LB==UB-LB
  5850:   //    V  変化しない(M68000PRMでは未定義)
  5851:   //    C  Rn-LB>UB-LB(符号なし比較)
  5852:   public static void irpCmp2Chk2Word () throws M68kException {
  5853:     int ea = XEiJ.regOC & 63;
  5854:     if (ea < XEiJ.EA_AR) {  //BYTEREV.L Dr
  5855:       XEiJ.mpuCycleCount++;
  5856:       XEiJ.regRn[ea] = Integer.reverseBytes (XEiJ.regRn[ea]);
  5857:     } else {  //CMP2/CHK2.W <ea>,Rn
  5858:       M68kException.m6eNumber = M68kException.M6E_UNIMPLEMENTED_INSTRUCTION;
  5859:       throw M68kException.m6eSignal;
  5860:     }
  5861:   }  //irpCmp2Chk2Word
  5862: 
  5863:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  5864:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  5865:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  5866:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  5867:   //SUBI.B #<data>,<ea>                             |-|012346|-|UUUUU|*****|D M+-WXZ  |0000_010_000_mmm_rrr-{data}
  5868:   //SUB.B #<data>,<ea>                              |A|012346|-|UUUUU|*****|  M+-WXZ  |0000_010_000_mmm_rrr-{data}  [SUBI.B #<data>,<ea>]
  5869:   public static void irpSubiByte () throws M68kException {
  5870:     int ea = XEiJ.regOC & 63;
  5871:     int x;
  5872:     int y = mmuReadByteSignExword ((XEiJ.regPC += 2) - 1, XEiJ.regSRS);  //pcbs
  5873:     int z;
  5874:     if (ea < XEiJ.EA_AR) {  //SUBI.B #<data>,Dr
  5875:       XEiJ.mpuCycleCount++;
  5876:       z = (byte) (XEiJ.regRn[ea] = ~0xff & (x = XEiJ.regRn[ea]) | 0xff & (x = (byte) x) - y);
  5877:     } else {  //SUBI.B #<data>,<mem>
  5878:       XEiJ.mpuCycleCount++;
  5879:       int a = efaMltByte (ea);
  5880:       mmuWriteByteData (a, z = (byte) ((x = mmuModifyByteSignData (a, XEiJ.regSRS)) - y), XEiJ.regSRS);
  5881:     }
  5882:     XEiJ.regCCR = (z >> 28 & XEiJ.REG_CCR_N | (z == 0 ? XEiJ.REG_CCR_Z : 0) |
  5883:            ((x ^ y) & (x ^ z)) >>> 31 << 1 |
  5884:            (x & (y ^ z) ^ (y | z)) >> 31 & (XEiJ.REG_CCR_X | XEiJ.REG_CCR_C));  //ccr_sub
  5885:   }  //irpSubiByte
  5886: 
  5887:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  5888:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  5889:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  5890:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  5891:   //SUBI.W #<data>,<ea>                             |-|012346|-|UUUUU|*****|D M+-WXZ  |0000_010_001_mmm_rrr-{data}
  5892:   //SUB.W #<data>,<ea>                              |A|012346|-|UUUUU|*****|  M+-WXZ  |0000_010_001_mmm_rrr-{data}  [SUBI.W #<data>,<ea>]
  5893:   public static void irpSubiWord () throws M68kException {
  5894:     int ea = XEiJ.regOC & 63;
  5895:     int x;
  5896:     int y = mmuReadWordSignExword ((XEiJ.regPC += 2) - 2, XEiJ.regSRS);  //pcws
  5897:     int z;
  5898:     if (ea < XEiJ.EA_AR) {  //SUBI.W #<data>,Dr
  5899:       XEiJ.mpuCycleCount++;
  5900:       z = (short) (XEiJ.regRn[ea] = ~0xffff & (x = XEiJ.regRn[ea]) | (char) ((x = (short) x) - y));
  5901:     } else {  //SUBI.W #<data>,<mem>
  5902:       XEiJ.mpuCycleCount++;
  5903:       int a = efaMltWord (ea);
  5904:       mmuWriteWordData (a, z = (short) ((x = mmuModifyWordSignData (a, XEiJ.regSRS)) - y), XEiJ.regSRS);
  5905:     }
  5906:     XEiJ.regCCR = (z >> 28 & XEiJ.REG_CCR_N | (z == 0 ? XEiJ.REG_CCR_Z : 0) |
  5907:            ((x ^ y) & (x ^ z)) >>> 31 << 1 |
  5908:            (x & (y ^ z) ^ (y | z)) >> 31 & (XEiJ.REG_CCR_X | XEiJ.REG_CCR_C));  //ccr_sub
  5909:   }  //irpSubiWord
  5910: 
  5911:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  5912:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  5913:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  5914:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  5915:   //SUBI.L #<data>,<ea>                             |-|012346|-|UUUUU|*****|D M+-WXZ  |0000_010_010_mmm_rrr-{data}
  5916:   //SUB.L #<data>,<ea>                              |A|012346|-|UUUUU|*****|  M+-WXZ  |0000_010_010_mmm_rrr-{data}  [SUBI.L #<data>,<ea>]
  5917:   public static void irpSubiLong () throws M68kException {
  5918:     int ea = XEiJ.regOC & 63;
  5919:     int x;
  5920:     int y = mmuReadLongExword ((XEiJ.regPC += 4) - 4, XEiJ.regSRS);  //pcls
  5921:     int z;
  5922:     if (ea < XEiJ.EA_AR) {  //SUBI.L #<data>,Dr
  5923:       XEiJ.mpuCycleCount++;
  5924:       XEiJ.regRn[ea] = z = (x = XEiJ.regRn[ea]) - y;
  5925:     } else {  //SUBI.L #<data>,<mem>
  5926:       XEiJ.mpuCycleCount++;
  5927:       int a = efaMltLong (ea);
  5928:       mmuWriteLongData (a, z = (x = mmuModifyLongData (a, XEiJ.regSRS)) - y, XEiJ.regSRS);
  5929:     }
  5930:     XEiJ.regCCR = (z >> 28 & XEiJ.REG_CCR_N | (z == 0 ? XEiJ.REG_CCR_Z : 0) |
  5931:            ((x ^ y) & (x ^ z)) >>> 31 << 1 |
  5932:            (x & (y ^ z) ^ (y | z)) >> 31 & (XEiJ.REG_CCR_X | XEiJ.REG_CCR_C));  //ccr_sub
  5933:   }  //irpSubiLong
  5934: 
  5935:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  5936:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  5937:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  5938:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  5939:   //FF1.L Dr                                        |-|------|-|-UUUU|-**00|D         |0000_010_011_000_rrr (ISA_C)
  5940:   //CMP2.L <ea>,Rn                                  |-|--234S|-|-UUUU|-U*U*|  M  WXZP |0000_010_011_mmm_rrr-rnnn000000000000
  5941:   //CHK2.L <ea>,Rn                                  |-|--234S|-|-UUUU|-U*U*|  M  WXZP |0000_010_011_mmm_rrr-rnnn100000000000
  5942:   //
  5943:   //CHK2.L <ea>,Rn
  5944:   //  <ea>から下限と上限をリードしてRnが範囲内か調べる
  5945:   //  Rnが下限または上限と等しいときZをセットする
  5946:   //  Rnが範囲外のときCをセットする。このときCHK instruction例外が発生する
  5947:   //  060ISPのソースは注釈に誤りが多いので注釈ではなくコードを参考にする
  5948:   //  CCR
  5949:   //    X  変化しない
  5950:   //    N  変化しない(M68000PRMでは未定義)
  5951:   //    Z  Rn-LB==0||Rn-LB==UB-LB
  5952:   //    V  変化しない(M68000PRMでは未定義)
  5953:   //    C  Rn-LB>UB-LB(符号なし比較)
  5954:   //
  5955:   //CMP2.L <ea>,Rn
  5956:   //  <ea>から下限と上限をリードしてRnが範囲内か調べる
  5957:   //  Rnが下限または上限と等しいときZをセットする
  5958:   //  Rnが範囲外のときCをセットする
  5959:   //  060ISPのソースは注釈に誤りが多いので注釈ではなくコードを参考にする
  5960:   //  CCR
  5961:   //    X  変化しない
  5962:   //    N  変化しない(M68000PRMでは未定義)
  5963:   //    Z  Rn-LB==0||Rn-LB==UB-LB
  5964:   //    V  変化しない(M68000PRMでは未定義)
  5965:   //    C  Rn-LB>UB-LB(符号なし比較)
  5966:   //
  5967:   //FF1.L Dr
  5968:   //  Drの最上位の1のbit31からのオフセットをDrに格納する
  5969:   //  Drが0のときは32になる
  5970:   public static void irpCmp2Chk2Long () throws M68kException {
  5971:     int ea = XEiJ.regOC & 63;
  5972:     if (ea < XEiJ.EA_AR) {  //FF1.L Dr
  5973:       XEiJ.mpuCycleCount++;
  5974:       int z = XEiJ.regRn[ea];
  5975:       XEiJ.regRn[ea] = Integer.numberOfLeadingZeros (z);
  5976:       XEiJ.regCCR = z >> 28 & XEiJ.REG_CCR_N | (z == 0 ? XEiJ.regCCR & XEiJ.REG_CCR_X | XEiJ.REG_CCR_Z : XEiJ.regCCR & XEiJ.REG_CCR_X);  //ccr_tst
  5977:     } else {  //CMP2/CHK2.L <ea>,Rn
  5978:       M68kException.m6eNumber = M68kException.M6E_UNIMPLEMENTED_INSTRUCTION;
  5979:       throw M68kException.m6eSignal;
  5980:     }
  5981:   }  //irpCmp2Chk2Long
  5982: 
  5983:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  5984:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  5985:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  5986:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  5987:   //ADDI.B #<data>,<ea>                             |-|012346|-|UUUUU|*****|D M+-WXZ  |0000_011_000_mmm_rrr-{data}
  5988:   public static void irpAddiByte () throws M68kException {
  5989:     int ea = XEiJ.regOC & 63;
  5990:     int x;
  5991:     int y = mmuReadByteSignExword ((XEiJ.regPC += 2) - 1, XEiJ.regSRS);  //pcbs
  5992:     int z;
  5993:     if (ea < XEiJ.EA_AR) {  //ADDI.B #<data>,Dr
  5994:       XEiJ.mpuCycleCount++;
  5995:       z = (byte) (XEiJ.regRn[ea] = ~0xff & (x = XEiJ.regRn[ea]) | 0xff & (x = (byte) x) + y);
  5996:     } else {  //ADDI.B #<data>,<mem>
  5997:       XEiJ.mpuCycleCount++;
  5998:       int a = efaMltByte (ea);
  5999:       mmuWriteByteData (a, z = (byte) ((x = mmuModifyByteSignData (a, XEiJ.regSRS)) + y), XEiJ.regSRS);
  6000:     }
  6001:     XEiJ.regCCR = (z >> 28 & XEiJ.REG_CCR_N | (z == 0 ? XEiJ.REG_CCR_Z : 0) |
  6002:            ((x ^ z) & (y ^ z)) >>> 31 << 1 |
  6003:            ((x | y) ^ (x ^ y) & z) >> 31 & (XEiJ.REG_CCR_X | XEiJ.REG_CCR_C));  //ccr_add
  6004:   }  //irpAddiByte
  6005: 
  6006:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  6007:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  6008:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  6009:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  6010:   //ADDI.W #<data>,<ea>                             |-|012346|-|UUUUU|*****|D M+-WXZ  |0000_011_001_mmm_rrr-{data}
  6011:   public static void irpAddiWord () throws M68kException {
  6012:     int ea = XEiJ.regOC & 63;
  6013:     int x;
  6014:     int y = mmuReadWordSignExword ((XEiJ.regPC += 2) - 2, XEiJ.regSRS);  //pcws
  6015:     int z;
  6016:     if (ea < XEiJ.EA_AR) {  //ADDI.W #<data>,Dr
  6017:       XEiJ.mpuCycleCount++;
  6018:       z = (short) (XEiJ.regRn[ea] = ~0xffff & (x = XEiJ.regRn[ea]) | (char) ((x = (short) x) + y));
  6019:     } else {  //ADDI.W #<data>,<mem>
  6020:       XEiJ.mpuCycleCount++;
  6021:       int a = efaMltWord (ea);
  6022:       mmuWriteWordData (a, z = (short) ((x = mmuModifyWordSignData (a, XEiJ.regSRS)) + y), XEiJ.regSRS);
  6023:     }
  6024:     XEiJ.regCCR = (z >> 28 & XEiJ.REG_CCR_N | (z == 0 ? XEiJ.REG_CCR_Z : 0) |
  6025:            ((x ^ z) & (y ^ z)) >>> 31 << 1 |
  6026:            ((x | y) ^ (x ^ y) & z) >> 31 & (XEiJ.REG_CCR_X | XEiJ.REG_CCR_C));  //ccr_add
  6027:   }  //irpAddiWord
  6028: 
  6029:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  6030:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  6031:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  6032:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  6033:   //ADDI.L #<data>,<ea>                             |-|012346|-|UUUUU|*****|D M+-WXZ  |0000_011_010_mmm_rrr-{data}
  6034:   public static void irpAddiLong () throws M68kException {
  6035:     int ea = XEiJ.regOC & 63;
  6036:     int x;
  6037:     int y = mmuReadLongExword ((XEiJ.regPC += 4) - 4, XEiJ.regSRS);  //pcls
  6038:     int z;
  6039:     if (ea < XEiJ.EA_AR) {  //ADDI.L #<data>,Dr
  6040:       XEiJ.mpuCycleCount++;
  6041:       XEiJ.regRn[ea] = z = (x = XEiJ.regRn[ea]) + y;
  6042:     } else {  //ADDI.L #<data>,<mem>
  6043:       XEiJ.mpuCycleCount++;
  6044:       int a = efaMltLong (ea);
  6045:       mmuWriteLongData (a, z = (x = mmuModifyLongData (a, XEiJ.regSRS)) + y, XEiJ.regSRS);
  6046:     }
  6047:     XEiJ.regCCR = (z >> 28 & XEiJ.REG_CCR_N | (z == 0 ? XEiJ.REG_CCR_Z : 0) |
  6048:            ((x ^ z) & (y ^ z)) >>> 31 << 1 |
  6049:            ((x | y) ^ (x ^ y) & z) >> 31 & (XEiJ.REG_CCR_X | XEiJ.REG_CCR_C));  //ccr_add
  6050:   }  //irpAddiLong
  6051: 
  6052:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  6053:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  6054:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  6055:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  6056:   //BTST.L #<data>,Dr                               |-|012346|-|--U--|--*--|D         |0000_100_000_000_rrr-{data}
  6057:   //BTST.B #<data>,<ea>                             |-|012346|-|--U--|--*--|  M+-WXZP |0000_100_000_mmm_rrr-{data}
  6058:   public static void irpBtstImm () throws M68kException {
  6059:     int ea = XEiJ.regOC & 63;
  6060:     int y = mmuReadByteSignExword ((XEiJ.regPC += 2) - 1, XEiJ.regSRS);  //pcbs
  6061:     if (ea < XEiJ.EA_AR) {  //BTST.L #<data>,Dr
  6062:       XEiJ.mpuCycleCount++;
  6063:       XEiJ.regCCR = XEiJ.regCCR & (XEiJ.REG_CCR_X | XEiJ.REG_CCR_N | XEiJ.REG_CCR_V | XEiJ.REG_CCR_C) | (~XEiJ.regRn[ea] >>> y & 1) << 2;  //ccr_btst。intのシフトは5bitでマスクされるので&31を省略
  6064:     } else {  //BTST.B #<data>,<ea>
  6065:       XEiJ.mpuCycleCount++;
  6066:       XEiJ.regCCR = XEiJ.regCCR & (XEiJ.REG_CCR_X | XEiJ.REG_CCR_N | XEiJ.REG_CCR_V | XEiJ.REG_CCR_C) | (~mmuReadByteSignData (efaMemByte (ea), XEiJ.regSRS) >>> (y & 7) & 1) << 2;  //ccr_btst
  6067:     }
  6068:   }  //irpBtstImm
  6069: 
  6070:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  6071:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  6072:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  6073:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  6074:   //BCHG.L #<data>,Dr                               |-|012346|-|--U--|--*--|D         |0000_100_001_000_rrr-{data}
  6075:   //BCHG.B #<data>,<ea>                             |-|012346|-|--U--|--*--|  M+-WXZ  |0000_100_001_mmm_rrr-{data}
  6076:   public static void irpBchgImm () throws M68kException {
  6077:     int ea = XEiJ.regOC & 63;
  6078:     int x;
  6079:     int y = mmuReadByteSignExword ((XEiJ.regPC += 2) - 1, XEiJ.regSRS);  //pcbs
  6080:     if (ea < XEiJ.EA_AR) {  //BCHG.L #<data>,Dr
  6081:       XEiJ.mpuCycleCount++;
  6082:       XEiJ.regRn[ea] = (x = XEiJ.regRn[ea]) ^ (y = 1 << y);  //intのシフトは5bitでマスクされるので1<<(y&0x1f)の&0x1fを省略
  6083:     } else {  //BCHG.B #<data>,<ea>
  6084:       XEiJ.mpuCycleCount++;
  6085:       int a = efaMltByte (ea);
  6086:       mmuWriteByteData (a, (x = mmuModifyByteSignData (a, XEiJ.regSRS)) ^ (y = 1 << (y & 7)), XEiJ.regSRS);
  6087:     }
  6088:     XEiJ.regCCR = XEiJ.regCCR & (XEiJ.REG_CCR_X | XEiJ.REG_CCR_N | XEiJ.REG_CCR_V | XEiJ.REG_CCR_C) | (x & y) - 1 >>> 31 << 2;  //ccr_btst
  6089:   }  //irpBchgImm
  6090: 
  6091:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  6092:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  6093:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  6094:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  6095:   //BCLR.L #<data>,Dr                               |-|012346|-|--U--|--*--|D         |0000_100_010_000_rrr-{data}
  6096:   //BCLR.B #<data>,<ea>                             |-|012346|-|--U--|--*--|  M+-WXZ  |0000_100_010_mmm_rrr-{data}
  6097:   public static void irpBclrImm () throws M68kException {
  6098:     int ea = XEiJ.regOC & 63;
  6099:     int x;
  6100:     int y = mmuReadByteSignExword ((XEiJ.regPC += 2) - 1, XEiJ.regSRS);  //pcbs
  6101:     if (ea < XEiJ.EA_AR) {  //BCLR.L #<data>,Dr
  6102:       XEiJ.mpuCycleCount++;
  6103:       XEiJ.regRn[ea] = (x = XEiJ.regRn[ea]) & ~(y = 1 << y);  //intのシフトは5bitでマスクされるので1<<(y&0x1f)の&0x1fを省略
  6104:     } else {  //BCLR.B #<data>,<ea>
  6105:       XEiJ.mpuCycleCount++;
  6106:       int a = efaMltByte (ea);
  6107:       mmuWriteByteData (a, (x = mmuModifyByteSignData (a, XEiJ.regSRS)) & ~(y = 1 << (y & 7)), XEiJ.regSRS);
  6108:     }
  6109:     XEiJ.regCCR = XEiJ.regCCR & (XEiJ.REG_CCR_X | XEiJ.REG_CCR_N | XEiJ.REG_CCR_V | XEiJ.REG_CCR_C) | (x & y) - 1 >>> 31 << 2;  //ccr_btst
  6110:   }  //irpBclrImm
  6111: 
  6112:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  6113:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  6114:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  6115:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  6116:   //BSET.L #<data>,Dr                               |-|012346|-|--U--|--*--|D         |0000_100_011_000_rrr-{data}
  6117:   //BSET.B #<data>,<ea>                             |-|012346|-|--U--|--*--|  M+-WXZ  |0000_100_011_mmm_rrr-{data}
  6118:   public static void irpBsetImm () throws M68kException {
  6119:     int ea = XEiJ.regOC & 63;
  6120:     int x;
  6121:     int y = mmuReadByteSignExword ((XEiJ.regPC += 2) - 1, XEiJ.regSRS);  //pcbs
  6122:     if (ea < XEiJ.EA_AR) {  //BSET.L #<data>,Dr
  6123:       XEiJ.mpuCycleCount++;
  6124:       XEiJ.regRn[ea] = (x = XEiJ.regRn[ea]) | (y = 1 << y);  //intのシフトは5bitでマスクされるので1<<(y&0x1f)の&0x1fを省略
  6125:     } else {  //BSET.B #<data>,<ea>
  6126:       XEiJ.mpuCycleCount++;
  6127:       int a = efaMltByte (ea);
  6128:       mmuWriteByteData (a, (x = mmuModifyByteSignData (a, XEiJ.regSRS)) | (y = 1 << (y & 7)), XEiJ.regSRS);
  6129:     }
  6130:     XEiJ.regCCR = XEiJ.regCCR & (XEiJ.REG_CCR_X | XEiJ.REG_CCR_N | XEiJ.REG_CCR_V | XEiJ.REG_CCR_C) | (x & y) - 1 >>> 31 << 2;  //ccr_btst
  6131:   }  //irpBsetImm
  6132: 
  6133:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  6134:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  6135:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  6136:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  6137:   //EORI.B #<data>,<ea>                             |-|012346|-|-UUUU|-**00|D M+-WXZ  |0000_101_000_mmm_rrr-{data}
  6138:   //EOR.B #<data>,<ea>                              |A|012346|-|-UUUU|-**00|D M+-WXZ  |0000_101_000_mmm_rrr-{data}  [EORI.B #<data>,<ea>]
  6139:   //EORI.B #<data>,CCR                              |-|012346|-|*****|*****|          |0000_101_000_111_100-{data}
  6140:   public static void irpEoriByte () throws M68kException {
  6141:     int ea = XEiJ.regOC & 63;
  6142:     int z = mmuReadByteSignExword ((XEiJ.regPC += 2) - 1, XEiJ.regSRS);  //pcbs
  6143:     if (ea < XEiJ.EA_AR) {  //EORI.B #<data>,Dr
  6144:       XEiJ.mpuCycleCount++;
  6145:       z = XEiJ.regRn[ea] ^= 255 & z;  //0拡張してからEOR
  6146:       XEiJ.regCCR = XEiJ.regCCR & XEiJ.REG_CCR_X | XEiJ.MPU_TSTB_TABLE[255 & z];  //ccr_tst_byte
  6147:     } else if (ea == XEiJ.EA_IM) {  //EORI.B #<data>,CCR
  6148:       XEiJ.mpuCycleCount++;
  6149:       XEiJ.regCCR ^= XEiJ.REG_CCR_MASK & z;
  6150:     } else {  //EORI.B #<data>,<mem>
  6151:       XEiJ.mpuCycleCount++;
  6152:       int a = efaMltByte (ea);
  6153:       mmuWriteByteData (a, z ^= mmuModifyByteSignData (a, XEiJ.regSRS), XEiJ.regSRS);
  6154:       XEiJ.regCCR = XEiJ.regCCR & XEiJ.REG_CCR_X | XEiJ.MPU_TSTB_TABLE[255 & z];  //ccr_tst_byte
  6155:     }
  6156:   }  //irpEoriByte
  6157: 
  6158:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  6159:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  6160:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  6161:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  6162:   //EORI.W #<data>,<ea>                             |-|012346|-|-UUUU|-**00|D M+-WXZ  |0000_101_001_mmm_rrr-{data}
  6163:   //EOR.W #<data>,<ea>                              |A|012346|-|-UUUU|-**00|D M+-WXZ  |0000_101_001_mmm_rrr-{data}  [EORI.W #<data>,<ea>]
  6164:   //EORI.W #<data>,SR                               |-|012346|P|*****|*****|          |0000_101_001_111_100-{data}
  6165:   public static void irpEoriWord () throws M68kException {
  6166:     int ea = XEiJ.regOC & 63;
  6167:     if (ea < XEiJ.EA_AR) {  //EORI.W #<data>,Dr
  6168:       int z = mmuReadWordSignExword ((XEiJ.regPC += 2) - 2, XEiJ.regSRS);  //pcws
  6169:       XEiJ.mpuCycleCount++;
  6170:       z = XEiJ.regRn[ea] ^= (char) z;  //0拡張してからEOR
  6171:       XEiJ.regCCR = XEiJ.regCCR & XEiJ.REG_CCR_X | (char) z - 1 >> 31 & XEiJ.REG_CCR_Z | ((short) z < 0 ? XEiJ.REG_CCR_N : 0);  //ccr_tst_word
  6172:     } else if (ea == XEiJ.EA_IM) {  //EORI.W #<data>,SR
  6173:       if (XEiJ.regSRS == 0) {  //ユーザモードのとき
  6174:         M68kException.m6eNumber = M68kException.M6E_PRIVILEGE_VIOLATION;
  6175:         throw M68kException.m6eSignal;
  6176:       }
  6177:       //以下はスーパーバイザモード
  6178:       XEiJ.mpuCycleCount += 12;
  6179:       irpSetSR ((XEiJ.regSRT1 | XEiJ.regSRS | XEiJ.regSRM | XEiJ.regSRI | XEiJ.regCCR) ^ mmuReadWordSignExword ((XEiJ.regPC += 2) - 2, 1));  //pcws。特権違反チェックが先
  6180:     } else {  //EORI.W #<data>,<mem>
  6181:       int z = mmuReadWordSignExword ((XEiJ.regPC += 2) - 2, XEiJ.regSRS);  //pcws
  6182:       XEiJ.mpuCycleCount++;
  6183:       int a = efaMltWord (ea);
  6184:       mmuWriteWordData (a, z ^= mmuModifyWordSignData (a, XEiJ.regSRS), XEiJ.regSRS);
  6185:       XEiJ.regCCR = XEiJ.regCCR & XEiJ.REG_CCR_X | (char) z - 1 >> 31 & XEiJ.REG_CCR_Z | ((short) z < 0 ? XEiJ.REG_CCR_N : 0);  //ccr_tst_word
  6186:     }
  6187:   }  //irpEoriWord
  6188: 
  6189:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  6190:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  6191:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  6192:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  6193:   //EORI.L #<data>,<ea>                             |-|012346|-|-UUUU|-**00|D M+-WXZ  |0000_101_010_mmm_rrr-{data}
  6194:   //EOR.L #<data>,<ea>                              |A|012346|-|-UUUU|-**00|D M+-WXZ  |0000_101_010_mmm_rrr-{data}  [EORI.L #<data>,<ea>]
  6195:   public static void irpEoriLong () throws M68kException {
  6196:     int ea = XEiJ.regOC & 63;
  6197:     int y = mmuReadLongExword ((XEiJ.regPC += 4) - 4, XEiJ.regSRS);  //pcls
  6198:     int z;
  6199:     if (ea < XEiJ.EA_AR) {  //EORI.L #<data>,Dr
  6200:       XEiJ.mpuCycleCount++;
  6201:       z = XEiJ.regRn[ea] ^= y;
  6202:     } else {  //EORI.L #<data>,<mem>
  6203:       XEiJ.mpuCycleCount++;
  6204:       int a = efaMltLong (ea);
  6205:       mmuWriteLongData (a, z = mmuModifyLongData (a, XEiJ.regSRS) ^ y, XEiJ.regSRS);
  6206:     }
  6207:     XEiJ.regCCR = z >> 28 & XEiJ.REG_CCR_N | (z == 0 ? XEiJ.regCCR & XEiJ.REG_CCR_X | XEiJ.REG_CCR_Z : XEiJ.regCCR & XEiJ.REG_CCR_X);  //ccr_tst
  6208:   }  //irpEoriLong
  6209: 
  6210:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  6211:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  6212:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  6213:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  6214:   //CAS.B Dc,Du,<ea>                                |-|--2346|-|-UUUU|-****|  M+-WXZ  |0000_101_011_mmm_rrr-0000000uuu000ccc
  6215:   public static void irpCasByte () throws M68kException {
  6216:     int w = mmuReadWordZeroExword ((XEiJ.regPC += 2) - 2, XEiJ.regSRS);  //pcwz。拡張ワード
  6217:     if ((w & ~0b0000_000_111_000_111) != 0) {
  6218:       M68kException.m6eNumber = M68kException.M6E_ILLEGAL_INSTRUCTION;
  6219:       throw M68kException.m6eSignal;
  6220:     }
  6221:     int c = w & 7;
  6222:     int y = (byte) XEiJ.regRn[c];  //y=Dc
  6223:     int a = efaMltByte (XEiJ.regOC & 63);
  6224:     int x = mmuReadByteSignData (a, XEiJ.regSRS);  //x=<ea>
  6225:     int z = (byte) (x - y);  //z=<ea>-Dc
  6226:     XEiJ.regCCR = (XEiJ.regCCR & XEiJ.REG_CCR_X |
  6227:                    (z < 0 ? XEiJ.REG_CCR_N : 0) |
  6228:                    (z == 0 ? XEiJ.REG_CCR_Z : 0) |
  6229:                    ((x ^ y) & (x ^ z)) >>> 31 << 1 |
  6230:                    (x & (y ^ z) ^ (y | z)) >>> 31);  //ccr_cmp
  6231:     if (z == 0) {  //<ea>==Dc
  6232:       XEiJ.mpuCycleCount += 19;
  6233:       mmuWriteByteData (a, XEiJ.regRn[w >> 6], XEiJ.regSRS);  //Du→<ea>
  6234:     } else {  //<ea>!=Dc
  6235:       XEiJ.mpuCycleCount += 19;
  6236:       XEiJ.regRn[c] = ~0xff & XEiJ.regRn[c] | 0xff & x;  //<ea>→Dc
  6237:     }
  6238:   }  //irpCasByte
  6239: 
  6240:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  6241:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  6242:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  6243:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  6244:   //CMPI.B #<data>,<ea>                             |-|--2346|-|-UUUU|-****|D M+-WXZP |0000_110_000_mmm_rrr-{data}
  6245:   //CMP.B #<data>,<ea>                              |A|--2346|-|-UUUU|-****|  M+-WXZP |0000_110_000_mmm_rrr-{data}  [CMPI.B #<data>,<ea>]
  6246:   public static void irpCmpiByte () throws M68kException {
  6247:     XEiJ.mpuCycleCount++;
  6248:     int ea = XEiJ.regOC & 63;
  6249:     int x;
  6250:     int y = mmuReadByteSignExword ((XEiJ.regPC += 2) - 1, XEiJ.regSRS);  //pcbs
  6251:     int z = (byte) ((x = ea < XEiJ.EA_AR ? (byte) XEiJ.regRn[ea] : mmuReadByteSignData (efaMemByte (ea), XEiJ.regSRS)) - y);  //アドレッシングモードに注意
  6252:     XEiJ.regCCR = (z >> 28 & XEiJ.REG_CCR_N | (z == 0 ? XEiJ.regCCR & XEiJ.REG_CCR_X | XEiJ.REG_CCR_Z : XEiJ.regCCR & XEiJ.REG_CCR_X) |
  6253:            ((x ^ y) & (x ^ z)) >>> 31 << 1 |
  6254:            (x & (y ^ z) ^ (y | z)) >>> 31);  //ccr_cmp
  6255:   }  //irpCmpiByte
  6256: 
  6257:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  6258:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  6259:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  6260:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  6261:   //CMPI.W #<data>,<ea>                             |-|--2346|-|-UUUU|-****|D M+-WXZP |0000_110_001_mmm_rrr-{data}
  6262:   //CMP.W #<data>,<ea>                              |A|--2346|-|-UUUU|-****|  M+-WXZP |0000_110_001_mmm_rrr-{data}  [CMPI.W #<data>,<ea>]
  6263:   public static void irpCmpiWord () throws M68kException {
  6264:     XEiJ.mpuCycleCount++;
  6265:     int ea = XEiJ.regOC & 63;
  6266:     int x;
  6267:     int y = mmuReadWordSignExword ((XEiJ.regPC += 2) - 2, XEiJ.regSRS);  //pcws
  6268:     int z = (short) ((x = ea < XEiJ.EA_AR ? (short) XEiJ.regRn[ea] : mmuReadWordSignData (efaMemWord (ea), XEiJ.regSRS)) - y);  //アドレッシングモードに注意
  6269:     XEiJ.regCCR = (z >> 28 & XEiJ.REG_CCR_N | (z == 0 ? XEiJ.regCCR & XEiJ.REG_CCR_X | XEiJ.REG_CCR_Z : XEiJ.regCCR & XEiJ.REG_CCR_X) |
  6270:            ((x ^ y) & (x ^ z)) >>> 31 << 1 |
  6271:            (x & (y ^ z) ^ (y | z)) >>> 31);  //ccr_cmp
  6272:   }  //irpCmpiWord
  6273: 
  6274:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  6275:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  6276:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  6277:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  6278:   //CMPI.L #<data>,<ea>                             |-|--2346|-|-UUUU|-****|D M+-WXZP |0000_110_010_mmm_rrr-{data}
  6279:   //CMP.L #<data>,<ea>                              |A|--2346|-|-UUUU|-****|  M+-WXZP |0000_110_010_mmm_rrr-{data}  [CMPI.L #<data>,<ea>]
  6280:   public static void irpCmpiLong () throws M68kException {
  6281:     int ea = XEiJ.regOC & 63;
  6282:     int x;
  6283:     int y = mmuReadLongExword ((XEiJ.regPC += 4) - 4, XEiJ.regSRS);  //pcls
  6284:     int z;
  6285:     if (ea < XEiJ.EA_AR) {  //CMPI.L #<data>,Dr
  6286:       XEiJ.mpuCycleCount++;
  6287:       z = (x = XEiJ.regRn[ea]) - y;
  6288:     } else {  //CMPI.L #<data>,<mem>
  6289:       XEiJ.mpuCycleCount++;
  6290:       z = (x = mmuReadLongData (efaMemLong (ea), XEiJ.regSRS)) - y;  //アドレッシングモードに注意
  6291:     }
  6292:     XEiJ.regCCR = (z >> 28 & XEiJ.REG_CCR_N | (z == 0 ? XEiJ.regCCR & XEiJ.REG_CCR_X | XEiJ.REG_CCR_Z : XEiJ.regCCR & XEiJ.REG_CCR_X) |
  6293:            ((x ^ y) & (x ^ z)) >>> 31 << 1 |
  6294:            (x & (y ^ z) ^ (y | z)) >>> 31);  //ccr_cmp
  6295:   }  //irpCmpiLong
  6296: 
  6297:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  6298:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  6299:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  6300:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  6301:   //CAS.W Dc,Du,<ea>                                |-|--2346|-|-UUUU|-****|  M+-WXZ  |0000_110_011_mmm_rrr-0000000uuu000ccc        (68060 software emulate misaligned <ea>)
  6302:   //CAS2.W Dc1:Dc2,Du1:Du2,(Rn1):(Rn2)              |-|--234S|-|-UUUU|-****|          |0000_110_011_111_100-rnnn000uuu000ccc(1)-rnnn_000_uuu_000_ccc(2)
  6303:   public static void irpCasWord () throws M68kException {
  6304:     int ea = XEiJ.regOC & 63;
  6305:     if (ea == XEiJ.EA_IM) {  //CAS2.W Dc1:Dc2,Du1:Du2,(Rn1):(Rn2)
  6306:       M68kException.m6eNumber = M68kException.M6E_UNIMPLEMENTED_INSTRUCTION;
  6307:       throw M68kException.m6eSignal;
  6308:     } else {  //CAS.W Dc,Du,<ea>
  6309:       int w = mmuReadWordZeroExword ((XEiJ.regPC += 2) - 2, XEiJ.regSRS);  //pcwz
  6310:       if ((w & ~0b0000_000_111_000_111) != 0) {
  6311:         M68kException.m6eNumber = M68kException.M6E_ILLEGAL_INSTRUCTION;
  6312:         throw M68kException.m6eSignal;
  6313:       }
  6314:       int a = efaMltWord (ea);  //a=ea
  6315:       if ((a & 1) != 0) {  //misaligned <ea>
  6316:         M68kException.m6eNumber = M68kException.M6E_UNIMPLEMENTED_INSTRUCTION;
  6317:         throw M68kException.m6eSignal;
  6318:       }
  6319:       int c = w & 7;
  6320:       int y = (short) XEiJ.regRn[c];  //y=Dc
  6321:       int x = mmuReadWordSignData (a, XEiJ.regSRS);  //x=<ea>
  6322:       int z = (short) (x - y);  //z=<ea>-Dc
  6323:       XEiJ.regCCR = (XEiJ.regCCR & XEiJ.REG_CCR_X |
  6324:                      (z < 0 ? XEiJ.REG_CCR_N : 0) |
  6325:                      (z == 0 ? XEiJ.REG_CCR_Z : 0) |
  6326:                      ((x ^ y) & (x ^ z)) >>> 31 << 1 |
  6327:                      (x & (y ^ z) ^ (y | z)) >>> 31);  //ccr_cmp
  6328:       if (z == 0) {  //<ea>==Dc
  6329:         XEiJ.mpuCycleCount += 19;
  6330:         mmuWriteWordData (a, XEiJ.regRn[w >> 6], XEiJ.regSRS);  //Du→<ea>
  6331:       } else {  //<ea>!=Dc
  6332:         XEiJ.mpuCycleCount += 19;
  6333:         XEiJ.regRn[c] = ~0xffff & XEiJ.regRn[c] | (char) x;  //<ea>→Dc
  6334:       }
  6335:     }
  6336:   }  //irpCasWord
  6337: 
  6338:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  6339:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  6340:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  6341:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  6342:   //MOVES.B <ea>,Rn                                 |-|-12346|P|-----|-----|  M+-WXZ  |0000_111_000_mmm_rrr-rnnn000000000000
  6343:   //MOVES.B Rn,<ea>                                 |-|-12346|P|-----|-----|  M+-WXZ  |0000_111_000_mmm_rrr-rnnn100000000000
  6344:   //
  6345:   //MOVES.B <ea>,Rn
  6346:   //  MOVES.B <ea>,DnはDnの最下位バイトだけ更新する
  6347:   //  MOVES.B <ea>,Anはバイトデータをロングに符号拡張してAnの全体を更新する
  6348:   //  SFC=1,2,5,6はアドレス変換あり、SFC=0,3,4はアドレス変換なし、
  6349:   //  SFC=7はCPU空間なのでコプロセッサが割り当てられている領域以外はバスエラーになる
  6350:   //
  6351:   //MOVES.B Rn,<ea>
  6352:   //  DFC=1,2,5,6はアドレス変換あり、DFC=0,3,4はアドレス変換なし、
  6353:   //  DFC=7はCPU空間なのでコプロセッサが割り当てられている領域以外はバスエラーになる
  6354:   public static void irpMovesByte () throws M68kException {
  6355:     int w = mmuReadWordZeroExword ((XEiJ.regPC += 2) - 2, XEiJ.regSRS);  //pcwz
  6356:     if (w << -11 != 0) {
  6357:       M68kException.m6eNumber = M68kException.M6E_ILLEGAL_INSTRUCTION;
  6358:       throw M68kException.m6eSignal;
  6359:     }
  6360:     if (XEiJ.regSRS == 0) {  //ユーザモードのとき
  6361:       M68kException.m6eNumber = M68kException.M6E_PRIVILEGE_VIOLATION;
  6362:       throw M68kException.m6eSignal;
  6363:     }
  6364:     //以下はスーパーバイザモード
  6365:     XEiJ.mpuCycleCount++;
  6366:     int a = efaMltByte (XEiJ.regOC & 63);
  6367:     int n = w >>> 12;  //n
  6368:     if (w << 31 - 11 >= 0) {  //MOVES.B <ea>,Rn。リード
  6369:       boolean supervisor = (0b10011111 << 24 << XEiJ.mpuSFC) < 0;
  6370:       boolean instruction = (0b00101010 << 24 << XEiJ.mpuSFC) < 0;
  6371:       MemoryMappedDevice[] mm = (DataBreakPoint.DBP_ON ?
  6372:                                  supervisor ? DataBreakPoint.dbpSuperMap : DataBreakPoint.dbpUserMap :
  6373:                                  supervisor ? XEiJ.busSuperMap : XEiJ.busUserMap);
  6374:       int z;
  6375:       //    01234567
  6376:       if (0b01100110 << 24 << XEiJ.mpuSFC < 0) {  //SFC=1,2,5,6。アドレス変換あり
  6377:         M68kException.m6eFSLW = M68kException.M6E_FSLW_IOMA_FIRST | M68kException.M6E_FSLW_RW_READ | M68kException.M6E_FSLW_SIZE_BYTE | XEiJ.mpuSFC << 16;
  6378:         int pa = (supervisor ?
  6379:                   instruction ? mmuTranslateReadSuperCode (a) : mmuTranslateReadSuperData (a) :
  6380:                   instruction ? mmuTranslateReadUserCode (a) : mmuTranslateReadUserData (a));
  6381:         //z = XEiJ.busRbz (pa);
  6382:         z = mm[pa >>> XEiJ.BUS_PAGE_BITS].mmdRbz (pa);
  6383:       } else if (XEiJ.mpuSFC != 7) {  //SFC=0,3,4。アドレス変換なし
  6384:         M68kException.m6eFSLW = M68kException.M6E_FSLW_IOMA_FIRST | M68kException.M6E_FSLW_RW_READ | M68kException.M6E_FSLW_SIZE_BYTE | XEiJ.mpuSFC << 16;
  6385:         //z = XEiJ.busRbz (a);
  6386:         z = mm[a >>> XEiJ.BUS_PAGE_BITS].mmdRbz (a);
  6387:       } else {  //SFC=7。CPU空間
  6388:         if (0x00022000 <= a && a <= 0x0002201f) {  //コプロセッサID=1
  6389:           z = XEiJ.fpuMotherboardCoprocessor.cirReadByteZero (a);
  6390:         } else {
  6391:           M68kException.m6eFSLW = M68kException.M6E_FSLW_IOMA_FIRST | M68kException.M6E_FSLW_RW_READ | M68kException.M6E_FSLW_SIZE_BYTE | XEiJ.mpuSFC << 16 | M68kException.M6E_FSLW_BUS_ERROR_ON_READ;
  6392:           M68kException.m6eNumber = M68kException.M6E_ACCESS_FAULT;
  6393:           M68kException.m6eAddress = a;
  6394:           M68kException.m6eDirection = XEiJ.MPU_WR_READ;
  6395:           M68kException.m6eSize = XEiJ.MPU_SS_BYTE;
  6396:           throw M68kException.m6eSignal;
  6397:         }
  6398:       }
  6399:       if (n < 8) {  //MOVES.B <ea>,Dn
  6400:         XEiJ.regRn[n] = XEiJ.regRn[n] & ~255 | z;
  6401:       } else {  //MOVES.B <ea>,An
  6402:         XEiJ.regRn[n] = (byte) z;
  6403:       }
  6404:       if (MMU_DEBUG_COMMAND) {
  6405:         System.out.printf ("%08x movesReadByte(%d,0x%08x)=0x%02x\n", XEiJ.regPC0, XEiJ.mpuSFC, a, XEiJ.regRn[n] & 255);
  6406:       }
  6407:     } else {  //MOVES.B Rn,<ea>。ライト
  6408:       if (MMU_DEBUG_COMMAND) {
  6409:         System.out.printf ("%08x movesWriteByte(%d,0x%08x,0x%02x)\n", XEiJ.regPC0, XEiJ.mpuDFC, a, XEiJ.regRn[n] & 255);
  6410:       }
  6411:       boolean supervisor = (0b10011111 << 24 << XEiJ.mpuDFC) < 0;
  6412:       boolean instruction = (0b00101010 << 24 << XEiJ.mpuDFC) < 0;
  6413:       MemoryMappedDevice mm[] = (DataBreakPoint.DBP_ON ?
  6414:                                  supervisor ? DataBreakPoint.dbpSuperMap : DataBreakPoint.dbpUserMap :
  6415:                                  supervisor ? XEiJ.busSuperMap : XEiJ.busUserMap);
  6416:       int z = XEiJ.regRn[n];
  6417:       //    01234567
  6418:       if (0b01100110 << 24 << XEiJ.mpuDFC < 0) {  //DFC=1,2,5,6。アドレス変換あり
  6419:         M68kException.m6eFSLW = M68kException.M6E_FSLW_IOMA_FIRST | M68kException.M6E_FSLW_RW_WRITE | M68kException.M6E_FSLW_SIZE_BYTE | XEiJ.mpuDFC << 16;
  6420:         int pa = (supervisor ?
  6421:                   instruction ? mmuTranslateWriteSuperCode (a) : mmuTranslateWriteSuperData (a) :
  6422:                   instruction ? mmuTranslateWriteUserCode (a) : mmuTranslateWriteUserData (a));
  6423:         //XEiJ.busWb (pa, z);
  6424:         mm[pa >>> XEiJ.BUS_PAGE_BITS].mmdWb (pa, z);
  6425:       } else if (XEiJ.mpuDFC != 7) {  //DFC=0,3,4。アドレス変換なし
  6426:         M68kException.m6eFSLW = M68kException.M6E_FSLW_IOMA_FIRST | M68kException.M6E_FSLW_RW_WRITE | M68kException.M6E_FSLW_SIZE_BYTE | XEiJ.mpuDFC << 16;
  6427:         //XEiJ.busWb (a, z);
  6428:         mm[a >>> XEiJ.BUS_PAGE_BITS].mmdWb (a, z);
  6429:       } else {  //DFC=7。CPU空間
  6430:         if (0x00022000 <= a && a <= 0x0002201f) {  //コプロセッサID=1
  6431:           XEiJ.fpuMotherboardCoprocessor.cirWriteByte (a, z);
  6432:         } else {
  6433:           M68kException.m6eFSLW = M68kException.M6E_FSLW_IOMA_FIRST | M68kException.M6E_FSLW_RW_WRITE | M68kException.M6E_FSLW_SIZE_BYTE | XEiJ.mpuDFC << 16 | M68kException.M6E_FSLW_BUS_ERROR_ON_WRITE;
  6434:           M68kException.m6eNumber = M68kException.M6E_ACCESS_FAULT;
  6435:           M68kException.m6eAddress = a;
  6436:           M68kException.m6eDirection = XEiJ.MPU_WR_WRITE;
  6437:           M68kException.m6eSize = XEiJ.MPU_SS_BYTE;
  6438:           throw M68kException.m6eSignal;
  6439:         }
  6440:       }
  6441:     }
  6442:   }  //irpMovesByte
  6443: 
  6444:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  6445:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  6446:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  6447:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  6448:   //MOVES.W <ea>,Rn                                 |-|-12346|P|-----|-----|  M+-WXZ  |0000_111_001_mmm_rrr-rnnn000000000000
  6449:   //MOVES.W Rn,<ea>                                 |-|-12346|P|-----|-----|  M+-WXZ  |0000_111_001_mmm_rrr-rnnn100000000000
  6450:   //
  6451:   //MOVES.W <ea>,Rn
  6452:   //  MOVES.W <ea>,DnはDnの下位ワードだけ更新する
  6453:   //  MOVES.W <ea>,Anはワードデータをロングに符号拡張してAnの全体を更新する
  6454:   //  SFC=1,2,5,6はアドレス変換あり、SFC=0,3,4はアドレス変換なし、
  6455:   //  SFC=7はCPU空間なのでコプロセッサが割り当てられている領域以外はバスエラーになる
  6456:   //
  6457:   //MOVES.W Rn,<ea>
  6458:   //  DFC=1,2,5,6はアドレス変換あり、DFC=0,3,4はアドレス変換なし、
  6459:   //  DFC=7はCPU空間なのでコプロセッサが割り当てられている領域以外はバスエラーになる
  6460:   public static void irpMovesWord () throws M68kException {
  6461:     int w = mmuReadWordZeroExword ((XEiJ.regPC += 2) - 2, XEiJ.regSRS);  //pcwz
  6462:     if (w << -11 != 0) {
  6463:       M68kException.m6eNumber = M68kException.M6E_ILLEGAL_INSTRUCTION;
  6464:       throw M68kException.m6eSignal;
  6465:     }
  6466:     if (XEiJ.regSRS == 0) {  //ユーザモードのとき
  6467:       M68kException.m6eNumber = M68kException.M6E_PRIVILEGE_VIOLATION;
  6468:       throw M68kException.m6eSignal;
  6469:     }
  6470:     //以下はスーパーバイザモード
  6471:     XEiJ.mpuCycleCount++;
  6472:     int a = efaMltWord (XEiJ.regOC & 63);
  6473:     int n = w >>> 12;  //n
  6474:     if (w << 31 - 11 >= 0) {  //MOVES.W <ea>,Rn。リード
  6475:       boolean supervisor = (0b10011111 << 24 << XEiJ.mpuSFC) < 0;
  6476:       boolean instruction = (0b00101010 << 24 << XEiJ.mpuSFC) < 0;
  6477:       MemoryMappedDevice[] mm = (DataBreakPoint.DBP_ON ?
  6478:                                  supervisor ? DataBreakPoint.dbpSuperMap : DataBreakPoint.dbpUserMap :
  6479:                                  supervisor ? XEiJ.busSuperMap : XEiJ.busUserMap);
  6480:       int z;
  6481:       //    01234567
  6482:       if (0b01100110 << 24 << XEiJ.mpuSFC < 0) {  //SFC=1,2,5,6。アドレス変換あり
  6483:         if ((a & 1) == 0) {  //偶数
  6484:           M68kException.m6eFSLW = M68kException.M6E_FSLW_IOMA_FIRST | M68kException.M6E_FSLW_RW_READ | M68kException.M6E_FSLW_SIZE_WORD | XEiJ.mpuSFC << 16;
  6485:           int pa = (supervisor ?
  6486:                     instruction ? mmuTranslateReadSuperCode (a) : mmuTranslateReadSuperData (a) :
  6487:                     instruction ? mmuTranslateReadUserCode (a) : mmuTranslateReadUserData (a));
  6488:           //z = XEiJ.busRwze (pa);
  6489:           z = mm[pa >>> XEiJ.BUS_PAGE_BITS].mmdRwz (pa);
  6490:         } else {  //奇数
  6491:           M68kException.m6eFSLW = M68kException.M6E_FSLW_IOMA_FIRST | M68kException.M6E_FSLW_RW_READ | M68kException.M6E_FSLW_SIZE_WORD | XEiJ.mpuSFC << 16;
  6492:           int pa = (supervisor ?
  6493:                     instruction ? mmuTranslateReadSuperCode (a) : mmuTranslateReadSuperData (a) :
  6494:                     instruction ? mmuTranslateReadUserCode (a) : mmuTranslateReadUserData (a));
  6495:           //z = XEiJ.busRbz (pa) << 8;
  6496:           z = mm[pa >>> XEiJ.BUS_PAGE_BITS].mmdRbz (pa) << 8;
  6497:           M68kException.m6eFSLW ^= M68kException.M6E_FSLW_IOMA_FIRST ^ M68kException.M6E_FSLW_IOMA_SECOND;
  6498:           pa = (supervisor ?
  6499:                 instruction ? mmuTranslateReadSuperCode (a + 1) : mmuTranslateReadSuperData (a + 1) :
  6500:                 instruction ? mmuTranslateReadUserCode (a + 1) : mmuTranslateReadUserData (a + 1));
  6501:           //z |= XEiJ.busRbz (pa);
  6502:           z |= mm[pa >>> XEiJ.BUS_PAGE_BITS].mmdRbz (pa);
  6503:         }
  6504:       } else if (XEiJ.mpuSFC != 7) {  //SFC=0,3,4。アドレス変換なし
  6505:         if ((a & 1) == 0) {  //偶数
  6506:           M68kException.m6eFSLW = M68kException.M6E_FSLW_IOMA_FIRST | M68kException.M6E_FSLW_RW_READ | M68kException.M6E_FSLW_SIZE_WORD | XEiJ.mpuSFC << 16;
  6507:           //z = XEiJ.busRwze (a);
  6508:           z = mm[a >>> XEiJ.BUS_PAGE_BITS].mmdRwz (a);
  6509:         } else {  //奇数
  6510:           M68kException.m6eFSLW = M68kException.M6E_FSLW_IOMA_FIRST | M68kException.M6E_FSLW_RW_READ | M68kException.M6E_FSLW_SIZE_WORD | XEiJ.mpuSFC << 16;
  6511:           //z = XEiJ.busRbz (a) << 8;
  6512:           z = mm[a >>> XEiJ.BUS_PAGE_BITS].mmdRbz (a) << 8;
  6513:           M68kException.m6eFSLW ^= M68kException.M6E_FSLW_IOMA_FIRST ^ M68kException.M6E_FSLW_IOMA_SECOND;
  6514:           a++;
  6515:           //z |= XEiJ.busRbz (a);
  6516:           z |= mm[a >>> XEiJ.BUS_PAGE_BITS].mmdRbz (a);
  6517:         }
  6518:       } else {  //SFC=7。CPU空間
  6519:         if (0x00022000 <= a && a <= 0x0002201f) {  //コプロセッサID=1
  6520:           z = XEiJ.fpuMotherboardCoprocessor.cirReadWordZero (a);
  6521:         } else {
  6522:           M68kException.m6eFSLW = M68kException.M6E_FSLW_IOMA_FIRST | M68kException.M6E_FSLW_RW_READ | M68kException.M6E_FSLW_SIZE_WORD | XEiJ.mpuSFC << 16 | M68kException.M6E_FSLW_BUS_ERROR_ON_READ;
  6523:           M68kException.m6eNumber = M68kException.M6E_ACCESS_FAULT;
  6524:           M68kException.m6eAddress = a;
  6525:           M68kException.m6eDirection = XEiJ.MPU_WR_READ;
  6526:           M68kException.m6eSize = XEiJ.MPU_SS_WORD;
  6527:           throw M68kException.m6eSignal;
  6528:         }
  6529:       }
  6530:       if (n < 8) {  //MOVES.W <ea>,Dn
  6531:         XEiJ.regRn[n] = XEiJ.regRn[n] & ~65535 | z;
  6532:       } else {  //MOVES.W <ea>,An
  6533:         XEiJ.regRn[n] = (short) z;
  6534:       }
  6535:       if (MMU_DEBUG_COMMAND) {
  6536:         System.out.printf ("%08x movesReadWord(%d,0x%08x)=0x%04x\n", XEiJ.regPC0, XEiJ.mpuSFC, a, XEiJ.regRn[n] & 65535);
  6537:       }
  6538:     } else {  //MOVES.W Rn,<ea>。ライト
  6539:       if (MMU_DEBUG_COMMAND) {
  6540:         System.out.printf ("%08x movesWriteWord(%d,0x%08x,0x%04x)\n", XEiJ.regPC0, XEiJ.mpuDFC, a, XEiJ.regRn[n] & 65535);
  6541:       }
  6542:       boolean supervisor = (0b10011111 << 24 << XEiJ.mpuDFC) < 0;
  6543:       boolean instruction = (0b00101010 << 24 << XEiJ.mpuDFC) < 0;
  6544:       MemoryMappedDevice[] mm = (DataBreakPoint.DBP_ON ?
  6545:                                  supervisor ? DataBreakPoint.dbpSuperMap : DataBreakPoint.dbpUserMap :
  6546:                                  supervisor ? XEiJ.busSuperMap : XEiJ.busUserMap);
  6547:       int z = XEiJ.regRn[n];
  6548:       //    01234567
  6549:       if (0b01100110 << 24 << XEiJ.mpuDFC < 0) {  //DFC=1,2,5,6。アドレス変換あり
  6550:         if ((a & 1) == 0) {  //偶数
  6551:           M68kException.m6eFSLW = M68kException.M6E_FSLW_IOMA_FIRST | M68kException.M6E_FSLW_RW_WRITE | M68kException.M6E_FSLW_SIZE_WORD | XEiJ.mpuDFC << 16;
  6552:           int pa = (supervisor ?
  6553:                     instruction ? mmuTranslateWriteSuperCode (a) : mmuTranslateWriteSuperData (a) :
  6554:                     instruction ? mmuTranslateWriteUserCode (a) : mmuTranslateWriteUserData (a));
  6555:           //XEiJ.busWwe (pa, z);
  6556:           mm[pa >>> XEiJ.BUS_PAGE_BITS].mmdWw (pa, z);
  6557:         } else {  //奇数
  6558:           M68kException.m6eFSLW = M68kException.M6E_FSLW_IOMA_FIRST | M68kException.M6E_FSLW_RW_WRITE | M68kException.M6E_FSLW_SIZE_WORD | XEiJ.mpuDFC << 16;
  6559:           int pa = (supervisor ?
  6560:                     instruction ? mmuTranslateWriteSuperCode (a) : mmuTranslateWriteSuperData (a) :
  6561:                     instruction ? mmuTranslateWriteUserCode (a) : mmuTranslateWriteUserData (a));
  6562:           //XEiJ.busWb (pa, z >> 8);
  6563:           mm[pa >>> XEiJ.BUS_PAGE_BITS].mmdWb (pa, z >> 8);
  6564:           M68kException.m6eFSLW ^= M68kException.M6E_FSLW_IOMA_FIRST ^ M68kException.M6E_FSLW_IOMA_SECOND;
  6565:           pa = (supervisor ?
  6566:                 instruction ? mmuTranslateWriteSuperCode (a + 1) : mmuTranslateWriteSuperData (a + 1) :
  6567:                 instruction ? mmuTranslateWriteUserCode (a + 1) : mmuTranslateWriteUserData (a + 1));
  6568:           //XEiJ.busWb (pa, z);
  6569:           mm[pa >>> XEiJ.BUS_PAGE_BITS].mmdWb (pa, z);
  6570:         }
  6571:       } else if (XEiJ.mpuDFC != 7) {  //DFC=0,3,4。アドレス変換なし
  6572:         if ((a & 1) == 0) {  //偶数
  6573:           M68kException.m6eFSLW = M68kException.M6E_FSLW_IOMA_FIRST | M68kException.M6E_FSLW_RW_WRITE | M68kException.M6E_FSLW_SIZE_WORD | XEiJ.mpuDFC << 16;
  6574:           //XEiJ.busWwe (a, z);
  6575:           mm[a >>> XEiJ.BUS_PAGE_BITS].mmdWw (a, z);
  6576:         } else {  //奇数
  6577:           M68kException.m6eFSLW = M68kException.M6E_FSLW_IOMA_FIRST | M68kException.M6E_FSLW_RW_WRITE | M68kException.M6E_FSLW_SIZE_WORD | XEiJ.mpuDFC << 16;
  6578:           //XEiJ.busWb (a, z >> 8);
  6579:           mm[a >>> XEiJ.BUS_PAGE_BITS].mmdWb (a, z >> 8);
  6580:           M68kException.m6eFSLW ^= M68kException.M6E_FSLW_IOMA_FIRST ^ M68kException.M6E_FSLW_IOMA_SECOND;
  6581:           a++;
  6582:           //XEiJ.busWb (a, z);
  6583:           mm[a >>> XEiJ.BUS_PAGE_BITS].mmdWb (a, z);
  6584:         }
  6585:       } else {  //DFC=7。CPU空間
  6586:         if (0x00022000 <= a && a <= 0x0002201f) {  //コプロセッサID=1
  6587:           XEiJ.fpuMotherboardCoprocessor.cirWriteWord (a, z);
  6588:         } else {
  6589:           M68kException.m6eFSLW = M68kException.M6E_FSLW_IOMA_FIRST | M68kException.M6E_FSLW_RW_WRITE | M68kException.M6E_FSLW_SIZE_WORD | XEiJ.mpuDFC << 16 | M68kException.M6E_FSLW_BUS_ERROR_ON_WRITE;
  6590:           M68kException.m6eNumber = M68kException.M6E_ACCESS_FAULT;
  6591:           M68kException.m6eAddress = a;
  6592:           M68kException.m6eDirection = XEiJ.MPU_WR_WRITE;
  6593:           M68kException.m6eSize = XEiJ.MPU_SS_WORD;
  6594:           throw M68kException.m6eSignal;
  6595:         }
  6596:       }
  6597:     }
  6598:   }  //irpMovesWord
  6599: 
  6600:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  6601:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  6602:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  6603:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  6604:   //MOVES.L <ea>,Rn                                 |-|-12346|P|-----|-----|  M+-WXZ  |0000_111_010_mmm_rrr-rnnn000000000000
  6605:   //MOVES.L Rn,<ea>                                 |-|-12346|P|-----|-----|  M+-WXZ  |0000_111_010_mmm_rrr-rnnn100000000000
  6606:   //
  6607:   //MOVES.L <ea>,Rn
  6608:   //  SFC=1,2,5,6はアドレス変換あり、SFC=0,3,4はアドレス変換なし、
  6609:   //  SFC=7はCPU空間なのでコプロセッサが割り当てられている領域以外はバスエラーになる
  6610:   //
  6611:   //MOVES.L Rn,<ea>
  6612:   //  DFC=1,2,5,6はアドレス変換あり、DFC=0,3,4はアドレス変換なし、
  6613:   //  DFC=7はCPU空間なのでコプロセッサが割り当てられている領域以外はバスエラーになる
  6614:   public static void irpMovesLong () throws M68kException {
  6615:     int w = mmuReadWordZeroExword ((XEiJ.regPC += 2) - 2, XEiJ.regSRS);  //pcwz
  6616:     if (w << -11 != 0) {
  6617:       M68kException.m6eNumber = M68kException.M6E_ILLEGAL_INSTRUCTION;
  6618:       throw M68kException.m6eSignal;
  6619:     }
  6620:     if (XEiJ.regSRS == 0) {  //ユーザモードのとき
  6621:       M68kException.m6eNumber = M68kException.M6E_PRIVILEGE_VIOLATION;
  6622:       throw M68kException.m6eSignal;
  6623:     }
  6624:     //以下はスーパーバイザモード
  6625:     XEiJ.mpuCycleCount++;
  6626:     int a = efaMltLong (XEiJ.regOC & 63);
  6627:     int n = w >>> 12;  //n
  6628:     if (w << 31 - 11 >= 0) {  //MOVES.L <ea>,Rn。リード
  6629:       boolean supervisor = (0b10011111 << 24 << XEiJ.mpuSFC) < 0;
  6630:       boolean instruction = (0b00101010 << 24 << XEiJ.mpuSFC) < 0;
  6631:       MemoryMappedDevice[] mm = (DataBreakPoint.DBP_ON ?
  6632:                                  supervisor ? DataBreakPoint.dbpSuperMap : DataBreakPoint.dbpUserMap :
  6633:                                  supervisor ? XEiJ.busSuperMap : XEiJ.busUserMap);
  6634:       int z;
  6635:       //    01234567
  6636:       if (0b01100110 << 24 << XEiJ.mpuSFC < 0) {  //SFC=1,2,5,6。アドレス変換あり
  6637:         if ((a & 3) == 0) {  //4の倍数
  6638:           M68kException.m6eFSLW = M68kException.M6E_FSLW_IOMA_FIRST | M68kException.M6E_FSLW_RW_READ | M68kException.M6E_FSLW_SIZE_LONG | XEiJ.mpuSFC << 16;
  6639:           int pa = (supervisor ?
  6640:                     instruction ? mmuTranslateReadSuperCode (a) : mmuTranslateReadSuperData (a) :
  6641:                     instruction ? mmuTranslateReadUserCode (a) : mmuTranslateReadUserData (a));
  6642:           //z = XEiJ.busRlsf (pa);
  6643:           z = mm[pa >>> XEiJ.BUS_PAGE_BITS].mmdRls (pa);
  6644:         } else if ((a & 1) == 0) {  //4の倍数+2
  6645:           M68kException.m6eFSLW = M68kException.M6E_FSLW_IOMA_FIRST | M68kException.M6E_FSLW_RW_READ | M68kException.M6E_FSLW_SIZE_LONG | XEiJ.mpuSFC << 16;
  6646:           int pa = (supervisor ?
  6647:                     instruction ? mmuTranslateReadSuperCode (a) : mmuTranslateReadSuperData (a) :
  6648:                     instruction ? mmuTranslateReadUserCode (a) : mmuTranslateReadUserData (a));
  6649:           //z = XEiJ.busRwse (pa) << 16;
  6650:           z = mm[pa >>> XEiJ.BUS_PAGE_BITS].mmdRws (pa) << 16;
  6651:           M68kException.m6eFSLW ^= M68kException.M6E_FSLW_IOMA_FIRST ^ M68kException.M6E_FSLW_IOMA_SECOND;
  6652:           pa = (supervisor ?
  6653:                 instruction ? mmuTranslateReadSuperCode (a + 2) : mmuTranslateReadSuperData (a + 2) :
  6654:                 instruction ? mmuTranslateReadUserCode (a + 2) : mmuTranslateReadUserData (a + 2));
  6655:           //z |= XEiJ.busRwze (pa);
  6656:           z |= mm[pa >>> XEiJ.BUS_PAGE_BITS].mmdRwz (pa);
  6657:         } else {  //奇数
  6658:           M68kException.m6eFSLW = M68kException.M6E_FSLW_IOMA_FIRST | M68kException.M6E_FSLW_RW_READ | M68kException.M6E_FSLW_SIZE_LONG | XEiJ.mpuSFC << 16;
  6659:           int pa = (supervisor ?
  6660:                     instruction ? mmuTranslateReadSuperCode (a) : mmuTranslateReadSuperData (a) :
  6661:                     instruction ? mmuTranslateReadUserCode (a) : mmuTranslateReadUserData (a));
  6662:           //z = XEiJ.busRbs (pa) << 24;
  6663:           z = mm[pa >>> XEiJ.BUS_PAGE_BITS].mmdRbs (pa) << 24;
  6664:           M68kException.m6eFSLW ^= M68kException.M6E_FSLW_IOMA_FIRST ^ M68kException.M6E_FSLW_IOMA_SECOND;
  6665:           pa = (supervisor ?
  6666:                 instruction ? mmuTranslateReadSuperCode (a + 1) : mmuTranslateReadSuperData (a + 1) :
  6667:                 instruction ? mmuTranslateReadUserCode (a + 1) : mmuTranslateReadUserData (a + 1));
  6668:           //z |= XEiJ.busRwze (pa) << 8;
  6669:           z |= mm[pa >>> XEiJ.BUS_PAGE_BITS].mmdRwz (pa) << 8;
  6670:           pa = (supervisor ?
  6671:                 instruction ? mmuTranslateReadSuperCode (a + 3) : mmuTranslateReadSuperData (a + 3) :
  6672:                 instruction ? mmuTranslateReadUserCode (a + 3) : mmuTranslateReadUserData (a + 3));
  6673:           //z |= XEiJ.busRbz (pa);
  6674:           z |= mm[pa >>> XEiJ.BUS_PAGE_BITS].mmdRbz (pa);
  6675:         }
  6676:       } else if (XEiJ.mpuSFC != 7) {  //SFC=0,3,4。アドレス変換なし
  6677:         if ((a & 3) == 0) {  //4の倍数
  6678:           M68kException.m6eFSLW = M68kException.M6E_FSLW_IOMA_FIRST | M68kException.M6E_FSLW_RW_READ | M68kException.M6E_FSLW_SIZE_LONG | XEiJ.mpuSFC << 16;
  6679:           //z = XEiJ.busRlsf (a);
  6680:           z = mm[a >>> XEiJ.BUS_PAGE_BITS].mmdRls (a);
  6681:         } else if ((a & 1) == 0) {  //4の倍数+2
  6682:           M68kException.m6eFSLW = M68kException.M6E_FSLW_IOMA_FIRST | M68kException.M6E_FSLW_RW_READ | M68kException.M6E_FSLW_SIZE_LONG | XEiJ.mpuSFC << 16;
  6683:           //z = XEiJ.busRwse (a) << 16;
  6684:           z = mm[a >>> XEiJ.BUS_PAGE_BITS].mmdRws (a) << 16;
  6685:           M68kException.m6eFSLW ^= M68kException.M6E_FSLW_IOMA_FIRST ^ M68kException.M6E_FSLW_IOMA_SECOND;
  6686:           a += 2;
  6687:           //z |= XEiJ.busRwze (a);
  6688:           z |= mm[a >>> XEiJ.BUS_PAGE_BITS].mmdRwz (a);
  6689:         } else {  //奇数
  6690:           M68kException.m6eFSLW = M68kException.M6E_FSLW_IOMA_FIRST | M68kException.M6E_FSLW_RW_READ | M68kException.M6E_FSLW_SIZE_LONG | XEiJ.mpuSFC << 16;
  6691:           //z = XEiJ.busRbs (a) << 24;
  6692:           z = mm[a >>> XEiJ.BUS_PAGE_BITS].mmdRbs (a) << 24;
  6693:           M68kException.m6eFSLW ^= M68kException.M6E_FSLW_IOMA_FIRST ^ M68kException.M6E_FSLW_IOMA_SECOND;
  6694:           a++;
  6695:           //z |= XEiJ.busRwze (a) << 8;
  6696:           z |= mm[a >>> XEiJ.BUS_PAGE_BITS].mmdRwz (a) << 8;
  6697:           a += 2;
  6698:           //z |= XEiJ.busRbz (a);
  6699:           z |= mm[a >>> XEiJ.BUS_PAGE_BITS].mmdRbz (a);
  6700:         }
  6701:       } else {  //SFC=7。CPU空間
  6702:         if (0x00022000 <= a && a <= 0x0002201f) {  //コプロセッサID=1
  6703:           z = XEiJ.fpuMotherboardCoprocessor.cirReadLong (a);
  6704:         } else {
  6705:           M68kException.m6eFSLW = M68kException.M6E_FSLW_IOMA_FIRST | M68kException.M6E_FSLW_RW_READ | M68kException.M6E_FSLW_SIZE_LONG | XEiJ.mpuSFC << 16 | M68kException.M6E_FSLW_BUS_ERROR_ON_READ;
  6706:           M68kException.m6eNumber = M68kException.M6E_ACCESS_FAULT;
  6707:           M68kException.m6eAddress = a;
  6708:           M68kException.m6eDirection = XEiJ.MPU_WR_READ;
  6709:           M68kException.m6eSize = XEiJ.MPU_SS_LONG;
  6710:           throw M68kException.m6eSignal;
  6711:         }
  6712:       }
  6713:       XEiJ.regRn[n] = z;
  6714:       if (MMU_DEBUG_COMMAND) {
  6715:         System.out.printf ("%08x movesReadLong(%d,0x%08x)=0x%08x\n", XEiJ.regPC0, XEiJ.mpuSFC, a, XEiJ.regRn[n]);
  6716:       }
  6717:     } else {  //MOVES.L Rn,<ea>。ライト
  6718:       if (MMU_DEBUG_COMMAND) {
  6719:         System.out.printf ("%08x movesWriteLong(%d,0x%08x,0x%08x)\n", XEiJ.regPC0, XEiJ.mpuDFC, a, XEiJ.regRn[n]);
  6720:       }
  6721:       boolean supervisor = (0b10011111 << 24 << XEiJ.mpuDFC) < 0;
  6722:       boolean instruction = (0b00101010 << 24 << XEiJ.mpuDFC) < 0;
  6723:       MemoryMappedDevice[] mm = (DataBreakPoint.DBP_ON ?
  6724:                                  supervisor ? DataBreakPoint.dbpSuperMap : DataBreakPoint.dbpUserMap :
  6725:                                  supervisor ? XEiJ.busSuperMap : XEiJ.busUserMap);
  6726:       int z = XEiJ.regRn[n];
  6727:       //    01234567
  6728:       if (0b01100110 << 24 << XEiJ.mpuDFC < 0) {  //DFC=1,2,5,6。アドレス変換あり
  6729:         if ((a & 3) == 0) {  //4の倍数
  6730:           M68kException.m6eFSLW = M68kException.M6E_FSLW_IOMA_FIRST | M68kException.M6E_FSLW_RW_WRITE | M68kException.M6E_FSLW_SIZE_LONG | XEiJ.mpuDFC << 16;
  6731:           int pa = (supervisor ?
  6732:                     instruction ? mmuTranslateWriteSuperCode (a) : mmuTranslateWriteSuperData (a) :
  6733:                     instruction ? mmuTranslateWriteUserCode (a) : mmuTranslateWriteUserData (a));
  6734:           //XEiJ.busWlf (pa, z);
  6735:           mm[pa >>> XEiJ.BUS_PAGE_BITS].mmdWl (pa, z);
  6736:         } else if ((a & 1) == 0) {  //4の倍数+2
  6737:           M68kException.m6eFSLW = M68kException.M6E_FSLW_IOMA_FIRST | M68kException.M6E_FSLW_RW_WRITE | M68kException.M6E_FSLW_SIZE_LONG | XEiJ.mpuDFC << 16;
  6738:           int pa = (supervisor ?
  6739:                     instruction ? mmuTranslateWriteSuperCode (a) : mmuTranslateWriteSuperData (a) :
  6740:                     instruction ? mmuTranslateWriteUserCode (a) : mmuTranslateWriteUserData (a));
  6741:           //XEiJ.busWwe (pa, z >> 16);
  6742:           mm[pa >>> XEiJ.BUS_PAGE_BITS].mmdWw (pa, z >> 16);
  6743:           M68kException.m6eFSLW ^= M68kException.M6E_FSLW_IOMA_FIRST ^ M68kException.M6E_FSLW_IOMA_SECOND;
  6744:           pa = (supervisor ?
  6745:                 instruction ? mmuTranslateWriteSuperCode (a + 2) : mmuTranslateWriteSuperData (a + 2) :
  6746:                 instruction ? mmuTranslateWriteUserCode (a + 2) : mmuTranslateWriteUserData (a + 2));
  6747:           //XEiJ.busWwe (pa, z);
  6748:           mm[pa >>> XEiJ.BUS_PAGE_BITS].mmdWw (pa, z);
  6749:         } else {  //奇数
  6750:           M68kException.m6eFSLW = M68kException.M6E_FSLW_IOMA_FIRST | M68kException.M6E_FSLW_RW_WRITE | M68kException.M6E_FSLW_SIZE_LONG | XEiJ.mpuDFC << 16;
  6751:           int pa = (supervisor ?
  6752:                     instruction ? mmuTranslateWriteSuperCode (a) : mmuTranslateWriteSuperData (a) :
  6753:                     instruction ? mmuTranslateWriteUserCode (a) : mmuTranslateWriteUserData (a));
  6754:           //XEiJ.busWb (pa, z >> 24);
  6755:           mm[pa >>> XEiJ.BUS_PAGE_BITS].mmdWb (pa, z >> 24);
  6756:           M68kException.m6eFSLW ^= M68kException.M6E_FSLW_IOMA_FIRST ^ M68kException.M6E_FSLW_IOMA_SECOND;
  6757:           pa = (supervisor ?
  6758:                 instruction ? mmuTranslateWriteSuperCode (a + 1) : mmuTranslateWriteSuperData (a + 1) :
  6759:                 instruction ? mmuTranslateWriteUserCode (a + 1) : mmuTranslateWriteUserData (a + 1));
  6760:           //XEiJ.busWwe (pa, z >> 8);
  6761:           mm[pa >>> XEiJ.BUS_PAGE_BITS].mmdWw (pa, z >> 8);
  6762:           pa = (supervisor ?
  6763:                 instruction ? mmuTranslateWriteSuperCode (a + 3) : mmuTranslateWriteSuperData (a + 3) :
  6764:                 instruction ? mmuTranslateWriteUserCode (a + 3) : mmuTranslateWriteUserData (a + 3));
  6765:           //XEiJ.busWb (pa, z);
  6766:           mm[pa >>> XEiJ.BUS_PAGE_BITS].mmdWb (pa, z);
  6767:         }
  6768:       } else if (XEiJ.mpuDFC != 7) {  //DFC=0,3,4。アドレス変換なし
  6769:         if ((a & 3) == 0) {  //4の倍数
  6770:           M68kException.m6eFSLW = M68kException.M6E_FSLW_IOMA_FIRST | M68kException.M6E_FSLW_RW_WRITE | M68kException.M6E_FSLW_SIZE_LONG | XEiJ.mpuDFC << 16;
  6771:           //XEiJ.busWlf (a, z);
  6772:           mm[a >>> XEiJ.BUS_PAGE_BITS].mmdWl (a, z);
  6773:         } else if ((a & 1) == 0) {  //4の倍数+2
  6774:           M68kException.m6eFSLW = M68kException.M6E_FSLW_IOMA_FIRST | M68kException.M6E_FSLW_RW_WRITE | M68kException.M6E_FSLW_SIZE_LONG | XEiJ.mpuDFC << 16;
  6775:           //XEiJ.busWwe (a, z >> 16);
  6776:           mm[a >>> XEiJ.BUS_PAGE_BITS].mmdWw (a, z >> 16);
  6777:           M68kException.m6eFSLW ^= M68kException.M6E_FSLW_IOMA_FIRST ^ M68kException.M6E_FSLW_IOMA_SECOND;
  6778:           a += 2;
  6779:           //XEiJ.busWwe (a, z);
  6780:           mm[a >>> XEiJ.BUS_PAGE_BITS].mmdWw (a, z);
  6781:         } else {  //奇数
  6782:           M68kException.m6eFSLW = M68kException.M6E_FSLW_IOMA_FIRST | M68kException.M6E_FSLW_RW_WRITE | M68kException.M6E_FSLW_SIZE_LONG | XEiJ.mpuDFC << 16;
  6783:           //XEiJ.busWb (a, z >> 24);
  6784:           mm[a >>> XEiJ.BUS_PAGE_BITS].mmdWb (a, z >> 24);
  6785:           M68kException.m6eFSLW ^= M68kException.M6E_FSLW_IOMA_FIRST ^ M68kException.M6E_FSLW_IOMA_SECOND;
  6786:           a++;
  6787:           //XEiJ.busWwe (a, z >> 8);
  6788:           mm[a >>> XEiJ.BUS_PAGE_BITS].mmdWw (a, z >> 8);
  6789:           a += 2;
  6790:           //XEiJ.busWb (a, z);
  6791:           mm[a >>> XEiJ.BUS_PAGE_BITS].mmdWb (a, z);
  6792:         }
  6793:       } else {  //DFC=7。CPU空間
  6794:         if (0x00022000 <= a && a <= 0x0002201f) {  //コプロセッサID=1
  6795:           XEiJ.fpuMotherboardCoprocessor.cirWriteLong (a, z);
  6796:         } else {
  6797:           M68kException.m6eFSLW = M68kException.M6E_FSLW_IOMA_FIRST | M68kException.M6E_FSLW_RW_WRITE | M68kException.M6E_FSLW_SIZE_LONG | XEiJ.mpuDFC << 16 | M68kException.M6E_FSLW_BUS_ERROR_ON_WRITE;
  6798:           M68kException.m6eNumber = M68kException.M6E_ACCESS_FAULT;
  6799:           M68kException.m6eAddress = a;
  6800:           M68kException.m6eDirection = XEiJ.MPU_WR_WRITE;
  6801:           M68kException.m6eSize = XEiJ.MPU_SS_LONG;
  6802:           throw M68kException.m6eSignal;
  6803:         }
  6804:       }
  6805:     }
  6806:   }  //irpMovesLong
  6807: 
  6808:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  6809:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  6810:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  6811:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  6812:   //CAS.L Dc,Du,<ea>                                |-|--2346|-|-UUUU|-****|  M+-WXZ  |0000_111_011_mmm_rrr-0000000uuu000ccc        (68060 software emulate misaligned <ea>)
  6813:   //CAS2.L Dc1:Dc2,Du1:Du2,(Rn1):(Rn2)              |-|--234S|-|-UUUU|-****|          |0000_111_011_111_100-rnnn000uuu000ccc(1)-rnnn_000_uuu_000_ccc(2)
  6814:   public static void irpCasLong () throws M68kException {
  6815:     int ea = XEiJ.regOC & 63;
  6816:     if (ea == XEiJ.EA_IM) {  //CAS2.L Dc1:Dc2,Du1:Du2,(Rn1):(Rn2)
  6817:       M68kException.m6eNumber = M68kException.M6E_UNIMPLEMENTED_INSTRUCTION;
  6818:       throw M68kException.m6eSignal;
  6819:     } else {  //CAS.L Dc,Du,<ea>
  6820:       int w = mmuReadWordZeroExword ((XEiJ.regPC += 2) - 2, XEiJ.regSRS);  //pcwz
  6821:       if ((w & ~0b0000_000_111_000_111) != 0) {
  6822:         M68kException.m6eNumber = M68kException.M6E_ILLEGAL_INSTRUCTION;
  6823:         throw M68kException.m6eSignal;
  6824:       }
  6825:       int a = efaMltLong (ea);  //a=ea
  6826:       if ((a & 1) != 0) {  //misaligned <ea>
  6827:         M68kException.m6eNumber = M68kException.M6E_UNIMPLEMENTED_INSTRUCTION;
  6828:         throw M68kException.m6eSignal;
  6829:       }
  6830:       int c = w & 7;
  6831:       int y = XEiJ.regRn[c];  //y=Dc
  6832:       int x = mmuReadLongData (a, XEiJ.regSRS);  //x=<ea>
  6833:       int z = x - y;  //z=<ea>-Dc
  6834:       XEiJ.regCCR = (XEiJ.regCCR & XEiJ.REG_CCR_X |
  6835:                      (z < 0 ? XEiJ.REG_CCR_N : 0) |
  6836:                      (z == 0 ? XEiJ.REG_CCR_Z : 0) |
  6837:                      ((x ^ y) & (x ^ z)) >>> 31 << 1 |
  6838:                      (x & (y ^ z) ^ (y | z)) >>> 31);  //ccr_cmp
  6839:       if (z == 0) {  //<ea>==Dc
  6840:         XEiJ.mpuCycleCount += 19;
  6841:         mmuWriteLongData (a, XEiJ.regRn[w >> 6], XEiJ.regSRS);  //Du→<ea>
  6842:       } else {  //<ea>!=Dc
  6843:         XEiJ.mpuCycleCount += 19;
  6844:         XEiJ.regRn[c] = x;  //<ea>→Dc
  6845:       }
  6846:     }
  6847:   }  //irpCasLong
  6848: 
  6849:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  6850:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  6851:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  6852:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  6853:   //MOVE.B <ea>,Dq                                  |-|012346|-|-UUUU|-**00|D M+-WXZPI|0001_qqq_000_mmm_rrr
  6854:   public static void irpMoveToDRByte () throws M68kException {
  6855:     XEiJ.mpuCycleCount++;
  6856:     int ea = XEiJ.regOC & 63;
  6857:     int qqq = XEiJ.regOC >> 9 & 7;
  6858:     int z = ea < XEiJ.EA_AR ? XEiJ.regRn[ea] : ea == XEiJ.EA_IM ? mmuReadByteSignExword ((XEiJ.regPC += 2) - 1, XEiJ.regSRS) : mmuReadByteSignData (efaAnyByte (ea), XEiJ.regSRS);  //pcbs。イミディエイトを分離
  6859:     XEiJ.regRn[qqq] = ~255 & XEiJ.regRn[qqq] | 255 & z;
  6860:     XEiJ.regCCR = XEiJ.regCCR & XEiJ.REG_CCR_X | XEiJ.MPU_TSTB_TABLE[255 & z];  //ccr_tst_byte
  6861:   }  //irpMoveToDRByte
  6862: 
  6863:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  6864:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  6865:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  6866:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  6867:   //MOVE.B <ea>,(Aq)                                |-|012346|-|-UUUU|-**00|D M+-WXZPI|0001_qqq_010_mmm_rrr
  6868:   public static void irpMoveToMMByte () throws M68kException {
  6869:     XEiJ.mpuCycleCount++;
  6870:     int ea = XEiJ.regOC & 63;
  6871:     int z = ea < XEiJ.EA_AR ? XEiJ.regRn[ea] : ea == XEiJ.EA_IM ? mmuReadByteSignExword ((XEiJ.regPC += 2) - 1, XEiJ.regSRS) : mmuReadByteSignData (efaAnyByte (ea), XEiJ.regSRS);  //pcbs。イミディエイトを分離。ここでAqが変化する可能性があることに注意
  6872:     mmuWriteByteData (XEiJ.regRn[XEiJ.regOC >> 9], z, XEiJ.regSRS);  //1qqq=aqq
  6873:     XEiJ.regCCR = XEiJ.regCCR & XEiJ.REG_CCR_X | XEiJ.MPU_TSTB_TABLE[255 & z];  //ccr_tst_byte
  6874:   }  //irpMoveToMMByte
  6875: 
  6876:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  6877:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  6878:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  6879:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  6880:   //MOVE.B <ea>,(Aq)+                               |-|012346|-|-UUUU|-**00|D M+-WXZPI|0001_qqq_011_mmm_rrr
  6881:   public static void irpMoveToMPByte () throws M68kException {
  6882:     XEiJ.mpuCycleCount++;
  6883:     int ea = XEiJ.regOC & 63;
  6884:     int aqq = XEiJ.regOC >> 9;  //1qqq=aqq
  6885:     int z = ea < XEiJ.EA_AR ? XEiJ.regRn[ea] : ea == XEiJ.EA_IM ? mmuReadByteSignExword ((XEiJ.regPC += 2) - 1, XEiJ.regSRS) : mmuReadByteSignData (efaAnyByte (ea), XEiJ.regSRS);  //pcbs。イミディエイトを分離。ここでAqが変化する可能性があることに注意
  6886:     int a = XEiJ.regRn[aqq];
  6887:     if (aqq < 15) {
  6888:       M68kException.m6eIncremented += 1L << (aqq << 3);  //longのシフトカウントは6bitでマスクされる
  6889:       XEiJ.regRn[aqq] = a + 1;
  6890:     } else {
  6891:       M68kException.m6eIncremented += 2L << (7 << 3);
  6892:       XEiJ.regRn[15] = a + 2;
  6893:     }
  6894:     mmuWriteByteData (a, z, XEiJ.regSRS);
  6895:     XEiJ.regCCR = XEiJ.regCCR & XEiJ.REG_CCR_X | XEiJ.MPU_TSTB_TABLE[255 & z];  //ccr_tst_byte
  6896:   }  //irpMoveToMPByte
  6897: 
  6898:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  6899:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  6900:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  6901:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  6902:   //MOVE.B <ea>,-(Aq)                               |-|012346|-|-UUUU|-**00|D M+-WXZPI|0001_qqq_100_mmm_rrr
  6903:   public static void irpMoveToMNByte () throws M68kException {
  6904:     XEiJ.mpuCycleCount++;
  6905:     int ea = XEiJ.regOC & 63;
  6906:     int aqq = XEiJ.regOC >> 9;  //1qqq=aqq
  6907:     int z = ea < XEiJ.EA_AR ? XEiJ.regRn[ea] : ea == XEiJ.EA_IM ? mmuReadByteSignExword ((XEiJ.regPC += 2) - 1, XEiJ.regSRS) : mmuReadByteSignData (efaAnyByte (ea), XEiJ.regSRS);  //pcbs。イミディエイトを分離。ここでAqが変化する可能性があることに注意
  6908:     int a;
  6909:     if (aqq < 15) {
  6910:       M68kException.m6eIncremented -= 1L << (aqq << 3);  //longのシフトカウントは6bitでマスクされる
  6911:       a = --XEiJ.regRn[aqq];
  6912:     } else {
  6913:       M68kException.m6eIncremented -= 2L << (7 << 3);
  6914:       a = XEiJ.regRn[15] -= 2;
  6915:     }
  6916:     mmuWriteByteData (a, z, XEiJ.regSRS);
  6917:     XEiJ.regCCR = XEiJ.regCCR & XEiJ.REG_CCR_X | XEiJ.MPU_TSTB_TABLE[255 & z];  //ccr_tst_byte
  6918:   }  //irpMoveToMNByte
  6919: 
  6920:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  6921:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  6922:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  6923:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  6924:   //MOVE.B <ea>,(d16,Aq)                            |-|012346|-|-UUUU|-**00|D M+-WXZPI|0001_qqq_101_mmm_rrr
  6925:   public static void irpMoveToMWByte () throws M68kException {
  6926:     XEiJ.mpuCycleCount++;
  6927:     int ea = XEiJ.regOC & 63;
  6928:     int aqq = XEiJ.regOC >> 9;  //1qqq=aqq
  6929:     int z = ea < XEiJ.EA_AR ? XEiJ.regRn[ea] : ea == XEiJ.EA_IM ? mmuReadByteSignExword ((XEiJ.regPC += 2) - 1, XEiJ.regSRS) : mmuReadByteSignData (efaAnyByte (ea), XEiJ.regSRS);  //pcbs。イミディエイトを分離。ここでAqが変化する可能性があることに注意
  6930:     mmuWriteByteData (XEiJ.regRn[aqq]  //ベースレジスタ
  6931:                       + mmuReadWordSignExword ((XEiJ.regPC += 2) - 2, XEiJ.regSRS),  //pcws。ワードディスプレースメント
  6932:                       z, XEiJ.regSRS);
  6933:     XEiJ.regCCR = XEiJ.regCCR & XEiJ.REG_CCR_X | XEiJ.MPU_TSTB_TABLE[255 & z];  //ccr_tst_byte
  6934:   }  //irpMoveToMWByte
  6935: 
  6936:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  6937:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  6938:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  6939:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  6940:   //MOVE.B <ea>,(d8,Aq,Rn.wl)                       |-|012346|-|-UUUU|-**00|D M+-WXZPI|0001_qqq_110_mmm_rrr
  6941:   public static void irpMoveToMXByte () throws M68kException {
  6942:     XEiJ.mpuCycleCount++;
  6943:     int ea = XEiJ.regOC & 63;
  6944:     int aqq = XEiJ.regOC >> 9;  //1qqq=aqq
  6945:     int z = ea < XEiJ.EA_AR ? XEiJ.regRn[ea] : ea == XEiJ.EA_IM ? mmuReadByteSignExword ((XEiJ.regPC += 2) - 1, XEiJ.regSRS) : mmuReadByteSignData (efaAnyByte (ea), XEiJ.regSRS);  //pcbs。イミディエイトを分離。ここでAqが変化する可能性があることに注意
  6946:     int w = mmuReadWordZeroExword ((XEiJ.regPC += 2) - 2, XEiJ.regSRS);  //pcwz。拡張ワード
  6947:     int t = (((~w & 0x0180) == 0 ? 0 :  //ベースレジスタサプレス
  6948:               XEiJ.regRn[aqq])  //ベースレジスタ
  6949:              + (w << 31 - 8 >= 0 ? (byte) w :  //バイトディスプレースメント
  6950:                 w << 31 - 5 >= 0 ? 0 :  //ヌルベースディスプレースメント
  6951:                 w << 31 - 4 >= 0 ? mmuReadWordSignExword ((XEiJ.regPC += 2) - 2, XEiJ.regSRS) :  //pcws。ワードベースディスプレースメント
  6952:                 mmuReadLongExword ((XEiJ.regPC += 4) - 4, XEiJ.regSRS)));  //pcls。ロングベースディスプレースメント
  6953:     int x = ((~w & 0x0140) == 0 ? 0 :  //インデックスサプレス
  6954:              (w << 31 - 11 >= 0 ? (short) XEiJ.regRn[w >> 12] :  //ワードインデックス
  6955:               XEiJ.regRn[w >> 12])  //ロングインデックス
  6956:              << (w >> 9 & 3));  //スケールファクタ。ワードインデックスのときは符号拡張してから掛ける
  6957:     mmuWriteByteData ((w & 0x0103) <= 0x0100 ? t + x :  //メモリ間接なし
  6958:                       ((XEiJ.TEST_BIT_2_SHIFT ? w << 31 - 2 >= 0 : (w & 4) == 0) ? mmuReadLongData (t + x, XEiJ.regSRS) :  //プリインデックス
  6959:                        mmuReadLongData (t, XEiJ.regSRS) + x)  //ポストインデックス
  6960:                       + ((XEiJ.TEST_BIT_1_SHIFT ? w << 31 - 1 >= 0 : (w & 2) == 0) ? 0 :  //ヌルアウタディスプレースメント
  6961:                          (XEiJ.TEST_BIT_0_SHIFT ? w << 31 - 0 >= 0 : (w & 1) == 0) ? mmuReadWordSignExword ((XEiJ.regPC += 2) - 2, XEiJ.regSRS) :  //pcws。ワードアウタディスプレースメント
  6962:                          mmuReadLongExword ((XEiJ.regPC += 4) - 4, XEiJ.regSRS)),  //pcls。ロングアウタディスプレースメント
  6963:                       z, XEiJ.regSRS);
  6964:     XEiJ.regCCR = XEiJ.regCCR & XEiJ.REG_CCR_X | XEiJ.MPU_TSTB_TABLE[255 & z];  //ccr_tst_byte
  6965:   }  //irpMoveToMXByte
  6966: 
  6967:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  6968:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  6969:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  6970:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  6971:   //MOVE.B <ea>,(xxx).W                             |-|012346|-|-UUUU|-**00|D M+-WXZPI|0001_000_111_mmm_rrr
  6972:   public static void irpMoveToZWByte () throws M68kException {
  6973:     XEiJ.mpuCycleCount++;
  6974:     int ea = XEiJ.regOC & 63;
  6975:     int z = ea < XEiJ.EA_AR ? XEiJ.regRn[ea] : ea == XEiJ.EA_IM ? mmuReadByteSignExword ((XEiJ.regPC += 2) - 1, XEiJ.regSRS) : mmuReadByteSignData (efaAnyByte (ea), XEiJ.regSRS);  //pcbs。イミディエイトを分離
  6976:     mmuWriteByteData (mmuReadWordSignExword ((XEiJ.regPC += 2) - 2, XEiJ.regSRS),  //pcws
  6977:                       z, XEiJ.regSRS);
  6978:     XEiJ.regCCR = XEiJ.regCCR & XEiJ.REG_CCR_X | XEiJ.MPU_TSTB_TABLE[255 & z];  //ccr_tst_byte
  6979:   }  //irpMoveToZWByte
  6980: 
  6981:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  6982:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  6983:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  6984:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  6985:   //MOVE.B <ea>,(xxx).L                             |-|012346|-|-UUUU|-**00|D M+-WXZPI|0001_001_111_mmm_rrr
  6986:   public static void irpMoveToZLByte () throws M68kException {
  6987:     XEiJ.mpuCycleCount++;
  6988:     int ea = XEiJ.regOC & 63;
  6989:     int z = ea < XEiJ.EA_AR ? XEiJ.regRn[ea] : ea == XEiJ.EA_IM ? mmuReadByteSignExword ((XEiJ.regPC += 2) - 1, XEiJ.regSRS) : mmuReadByteSignData (efaAnyByte (ea), XEiJ.regSRS);  //pcbs。イミディエイトを分離
  6990:     mmuWriteByteData (mmuReadLongExword ((XEiJ.regPC += 4) - 4, XEiJ.regSRS),  //pcls
  6991:                       z, XEiJ.regSRS);
  6992:     XEiJ.regCCR = XEiJ.regCCR & XEiJ.REG_CCR_X | XEiJ.MPU_TSTB_TABLE[255 & z];  //ccr_tst_byte
  6993:   }  //irpMoveToZLByte
  6994: 
  6995:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  6996:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  6997:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  6998:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  6999:   //MOVE.L <ea>,Dq                                  |-|012346|-|-UUUU|-**00|DAM+-WXZPI|0010_qqq_000_mmm_rrr
  7000:   public static void irpMoveToDRLong () throws M68kException {
  7001:     XEiJ.mpuCycleCount++;
  7002:     int ea = XEiJ.regOC & 63;
  7003:     int z;
  7004:     XEiJ.regRn[XEiJ.regOC >> 9 & 7] = z = ea < XEiJ.EA_MM ? XEiJ.regRn[ea] : ea == XEiJ.EA_IM ? mmuReadLongExword ((XEiJ.regPC += 4) - 4, XEiJ.regSRS) : mmuReadLongData (efaAnyLong (ea), XEiJ.regSRS);  //pcls。イミディエイトを分離。このr[ea]はデータレジスタまたはアドレスレジスタ
  7005:     XEiJ.regCCR = z >> 28 & XEiJ.REG_CCR_N | (z == 0 ? XEiJ.regCCR & XEiJ.REG_CCR_X | XEiJ.REG_CCR_Z : XEiJ.regCCR & XEiJ.REG_CCR_X);  //ccr_tst
  7006:   }  //irpMoveToDRLong
  7007: 
  7008:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  7009:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  7010:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  7011:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  7012:   //MOVEA.L <ea>,Aq                                 |-|012346|-|-----|-----|DAM+-WXZPI|0010_qqq_001_mmm_rrr
  7013:   //MOVE.L <ea>,Aq                                  |A|012346|-|-----|-----|DAM+-WXZPI|0010_qqq_001_mmm_rrr [MOVEA.L <ea>,Aq]
  7014:   public static void irpMoveaLong () throws M68kException {
  7015:     XEiJ.mpuCycleCount++;
  7016:     int ea = XEiJ.regOC & 63;
  7017:     XEiJ.regRn[(XEiJ.regOC >> 9) - (16 - 8)] = ea < XEiJ.EA_MM ? XEiJ.regRn[ea] : ea == XEiJ.EA_IM ? mmuReadLongExword ((XEiJ.regPC += 4) - 4, XEiJ.regSRS) : mmuReadLongData (efaAnyLong (ea), XEiJ.regSRS);  //pcls。イミディエイトを分離。このr[ea]はデータレジスタまたはアドレスレジスタ。右辺でAqが変化する可能性があることに注意
  7018:   }  //irpMoveaLong
  7019: 
  7020:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  7021:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  7022:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  7023:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  7024:   //MOVE.L <ea>,(Aq)                                |-|012346|-|-UUUU|-**00|DAM+-WXZPI|0010_qqq_010_mmm_rrr
  7025:   public static void irpMoveToMMLong () throws M68kException {
  7026:     XEiJ.mpuCycleCount++;
  7027:     int ea = XEiJ.regOC & 63;
  7028:     int z = ea < XEiJ.EA_MM ? XEiJ.regRn[ea] : ea == XEiJ.EA_IM ? mmuReadLongExword ((XEiJ.regPC += 4) - 4, XEiJ.regSRS) : mmuReadLongData (efaAnyLong (ea), XEiJ.regSRS);  //pcls。イミディエイトを分離。このr[ea]はデータレジスタまたはアドレスレジスタ。ここでAqが変化する可能性があることに注意
  7029:     mmuWriteLongData (XEiJ.regRn[(XEiJ.regOC >> 9) - (16 - 8)], z, XEiJ.regSRS);
  7030:     XEiJ.regCCR = z >> 28 & XEiJ.REG_CCR_N | (z == 0 ? XEiJ.regCCR & XEiJ.REG_CCR_X | XEiJ.REG_CCR_Z : XEiJ.regCCR & XEiJ.REG_CCR_X);  //ccr_tst
  7031:   }  //irpMoveToMMLong
  7032: 
  7033:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  7034:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  7035:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  7036:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  7037:   //MOVE.L <ea>,(Aq)+                               |-|012346|-|-UUUU|-**00|DAM+-WXZPI|0010_qqq_011_mmm_rrr
  7038:   public static void irpMoveToMPLong () throws M68kException {
  7039:     XEiJ.mpuCycleCount++;
  7040:     int ea = XEiJ.regOC & 63;
  7041:     int z = ea < XEiJ.EA_MM ? XEiJ.regRn[ea] : ea == XEiJ.EA_IM ? mmuReadLongExword ((XEiJ.regPC += 4) - 4, XEiJ.regSRS) : mmuReadLongData (efaAnyLong (ea), XEiJ.regSRS);  //pcls。イミディエイトを分離。このr[ea]はデータレジスタまたはアドレスレジスタ。ここでAqが変化する可能性があることに注意
  7042:     int aqq = (XEiJ.regOC >> 9) - (16 - 8);
  7043:     M68kException.m6eIncremented += 4L << (aqq << 3);  //longのシフトカウントは6bitでマスクされる
  7044:     mmuWriteLongData ((XEiJ.regRn[aqq] += 4) - 4, z, XEiJ.regSRS);
  7045:     XEiJ.regCCR = z >> 28 & XEiJ.REG_CCR_N | (z == 0 ? XEiJ.regCCR & XEiJ.REG_CCR_X | XEiJ.REG_CCR_Z : XEiJ.regCCR & XEiJ.REG_CCR_X);  //ccr_tst
  7046:   }  //irpMoveToMPLong
  7047: 
  7048:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  7049:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  7050:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  7051:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  7052:   //MOVE.L <ea>,-(Aq)                               |-|012346|-|-UUUU|-**00|DAM+-WXZPI|0010_qqq_100_mmm_rrr
  7053:   public static void irpMoveToMNLong () throws M68kException {
  7054:     XEiJ.mpuCycleCount++;
  7055:     int ea = XEiJ.regOC & 63;
  7056:     int z = ea < XEiJ.EA_MM ? XEiJ.regRn[ea] : ea == XEiJ.EA_IM ? mmuReadLongExword ((XEiJ.regPC += 4) - 4, XEiJ.regSRS) : mmuReadLongData (efaAnyLong (ea), XEiJ.regSRS);  //pcls。イミディエイトを分離。このr[ea]はデータレジスタまたはアドレスレジスタ。ここでAqが変化する可能性があることに注意
  7057:     int aqq = (XEiJ.regOC >> 9) - (16 - 8);
  7058:     M68kException.m6eIncremented -= 4L << (aqq << 3);  //longのシフトカウントは6bitでマスクされる
  7059:     mmuWriteLongData ((XEiJ.regRn[aqq] -= 4), z, XEiJ.regSRS);
  7060:     XEiJ.regCCR = z >> 28 & XEiJ.REG_CCR_N | (z == 0 ? XEiJ.regCCR & XEiJ.REG_CCR_X | XEiJ.REG_CCR_Z : XEiJ.regCCR & XEiJ.REG_CCR_X);  //ccr_tst
  7061:   }  //irpMoveToMNLong
  7062: 
  7063:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  7064:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  7065:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  7066:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  7067:   //MOVE.L <ea>,(d16,Aq)                            |-|012346|-|-UUUU|-**00|DAM+-WXZPI|0010_qqq_101_mmm_rrr
  7068:   public static void irpMoveToMWLong () throws M68kException {
  7069:     XEiJ.mpuCycleCount++;
  7070:     int ea = XEiJ.regOC & 63;
  7071:     int z = ea < XEiJ.EA_MM ? XEiJ.regRn[ea] : ea == XEiJ.EA_IM ? mmuReadLongExword ((XEiJ.regPC += 4) - 4, XEiJ.regSRS) : mmuReadLongData (efaAnyLong (ea), XEiJ.regSRS);  //pcls。イミディエイトを分離。このr[ea]はデータレジスタまたはアドレスレジスタ。ここでAqが変化する可能性があることに注意
  7072:     mmuWriteLongData (XEiJ.regRn[(XEiJ.regOC >> 9) - (16 - 8)]  //ベースレジスタ
  7073:            + mmuReadWordSignExword ((XEiJ.regPC += 2) - 2, XEiJ.regSRS),  //pcws。ワードディスプレースメント
  7074:            z, XEiJ.regSRS);
  7075:     XEiJ.regCCR = z >> 28 & XEiJ.REG_CCR_N | (z == 0 ? XEiJ.regCCR & XEiJ.REG_CCR_X | XEiJ.REG_CCR_Z : XEiJ.regCCR & XEiJ.REG_CCR_X);  //ccr_tst
  7076:   }  //irpMoveToMWLong
  7077: 
  7078:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  7079:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  7080:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  7081:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  7082:   //MOVE.L <ea>,(d8,Aq,Rn.wl)                       |-|012346|-|-UUUU|-**00|DAM+-WXZPI|0010_qqq_110_mmm_rrr
  7083:   public static void irpMoveToMXLong () throws M68kException {
  7084:     XEiJ.mpuCycleCount++;
  7085:     int ea = XEiJ.regOC & 63;
  7086:     int aqq = (XEiJ.regOC >> 9) - (16 - 8);
  7087:     int z = ea < XEiJ.EA_MM ? XEiJ.regRn[ea] : ea == XEiJ.EA_IM ? mmuReadLongExword ((XEiJ.regPC += 4) - 4, XEiJ.regSRS) : mmuReadLongData (efaAnyLong (ea), XEiJ.regSRS);  //pcls。イミディエイトを分離。このr[ea]はデータレジスタまたはアドレスレジスタ。ここでAqが変化する可能性があることに注意
  7088:     int w = mmuReadWordZeroExword ((XEiJ.regPC += 2) - 2, XEiJ.regSRS);  //pcwz。拡張ワード
  7089:     int t = (((~w & 0x0180) == 0 ? 0 :  //ベースレジスタサプレス
  7090:               XEiJ.regRn[aqq])  //ベースレジスタ
  7091:              + (w << 31 - 8 >= 0 ? (byte) w :  //バイトディスプレースメント
  7092:                 w << 31 - 5 >= 0 ? 0 :  //ヌルベースディスプレースメント
  7093:                 w << 31 - 4 >= 0 ? mmuReadWordSignExword ((XEiJ.regPC += 2) - 2, XEiJ.regSRS) :  //pcws。ワードベースディスプレースメント
  7094:                 mmuReadLongExword ((XEiJ.regPC += 4) - 4, XEiJ.regSRS)));  //pcls。ロングベースディスプレースメント
  7095:     int x = ((~w & 0x0140) == 0 ? 0 :  //インデックスサプレス
  7096:              (w << 31 - 11 >= 0 ? (short) XEiJ.regRn[w >> 12] :  //ワードインデックス
  7097:               XEiJ.regRn[w >> 12])  //ロングインデックス
  7098:              << (w >> 9 & 3));  //スケールファクタ。ワードインデックスのときは符号拡張してから掛ける
  7099:     mmuWriteLongData ((w & 0x0103) <= 0x0100 ? t + x :  //メモリ間接なし
  7100:            ((XEiJ.TEST_BIT_2_SHIFT ? w << 31 - 2 >= 0 : (w & 4) == 0) ? mmuReadLongData (t + x, XEiJ.regSRS) :  //プリインデックス
  7101:             mmuReadLongData (t, XEiJ.regSRS) + x)  //ポストインデックス
  7102:            + ((XEiJ.TEST_BIT_1_SHIFT ? w << 31 - 1 >= 0 : (w & 2) == 0) ? 0 :  //ヌルアウタディスプレースメント
  7103:               (XEiJ.TEST_BIT_0_SHIFT ? w << 31 - 0 >= 0 : (w & 1) == 0) ? mmuReadWordSignExword ((XEiJ.regPC += 2) - 2, XEiJ.regSRS) :  //pcws。ワードアウタディスプレースメント
  7104:               mmuReadLongExword ((XEiJ.regPC += 4) - 4, XEiJ.regSRS)),  //pcls。ロングアウタディスプレースメント
  7105:            z, XEiJ.regSRS);
  7106:     XEiJ.regCCR = z >> 28 & XEiJ.REG_CCR_N | (z == 0 ? XEiJ.regCCR & XEiJ.REG_CCR_X | XEiJ.REG_CCR_Z : XEiJ.regCCR & XEiJ.REG_CCR_X);  //ccr_tst
  7107:   }  //irpMoveToMXLong
  7108: 
  7109:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  7110:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  7111:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  7112:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  7113:   //MOVE.L <ea>,(xxx).W                             |-|012346|-|-UUUU|-**00|DAM+-WXZPI|0010_000_111_mmm_rrr
  7114:   public static void irpMoveToZWLong () throws M68kException {
  7115:     XEiJ.mpuCycleCount++;
  7116:     int ea = XEiJ.regOC & 63;
  7117:     int z = ea < XEiJ.EA_MM ? XEiJ.regRn[ea] : ea == XEiJ.EA_IM ? mmuReadLongExword ((XEiJ.regPC += 4) - 4, XEiJ.regSRS) : mmuReadLongData (efaAnyLong (ea), XEiJ.regSRS);  //pcls。イミディエイトを分離。このr[ea]はデータレジスタまたはアドレスレジスタ
  7118:     mmuWriteLongData (mmuReadWordSignExword ((XEiJ.regPC += 2) - 2, XEiJ.regSRS),  //pcws
  7119:            z, XEiJ.regSRS);
  7120:     XEiJ.regCCR = z >> 28 & XEiJ.REG_CCR_N | (z == 0 ? XEiJ.regCCR & XEiJ.REG_CCR_X | XEiJ.REG_CCR_Z : XEiJ.regCCR & XEiJ.REG_CCR_X);  //ccr_tst
  7121:   }  //irpMoveToZWLong
  7122: 
  7123:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  7124:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  7125:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  7126:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  7127:   //MOVE.L <ea>,(xxx).L                             |-|012346|-|-UUUU|-**00|DAM+-WXZPI|0010_001_111_mmm_rrr
  7128:   public static void irpMoveToZLLong () throws M68kException {
  7129:     XEiJ.mpuCycleCount++;
  7130:     int ea = XEiJ.regOC & 63;
  7131:     int z = ea < XEiJ.EA_MM ? XEiJ.regRn[ea] : ea == XEiJ.EA_IM ? mmuReadLongExword ((XEiJ.regPC += 4) - 4, XEiJ.regSRS) : mmuReadLongData (efaAnyLong (ea), XEiJ.regSRS);  //pcls。イミディエイトを分離。このr[ea]はデータレジスタまたはアドレスレジスタ
  7132:     mmuWriteLongData (mmuReadLongExword ((XEiJ.regPC += 4) - 4, XEiJ.regSRS),  //pcls
  7133:            z, XEiJ.regSRS);
  7134:     XEiJ.regCCR = z >> 28 & XEiJ.REG_CCR_N | (z == 0 ? XEiJ.regCCR & XEiJ.REG_CCR_X | XEiJ.REG_CCR_Z : XEiJ.regCCR & XEiJ.REG_CCR_X);  //ccr_tst
  7135:   }  //irpMoveToZLLong
  7136: 
  7137:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  7138:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  7139:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  7140:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  7141:   //MOVE.W <ea>,Dq                                  |-|012346|-|-UUUU|-**00|DAM+-WXZPI|0011_qqq_000_mmm_rrr
  7142:   public static void irpMoveToDRWord () throws M68kException {
  7143:     XEiJ.mpuCycleCount++;
  7144:     int ea = XEiJ.regOC & 63;
  7145:     int qqq = XEiJ.regOC >> 9 & 7;
  7146:     int z = ea < XEiJ.EA_MM ? XEiJ.regRn[ea] : ea == XEiJ.EA_IM ? mmuReadWordSignExword ((XEiJ.regPC += 2) - 2, XEiJ.regSRS) : mmuReadWordSignData (efaAnyWord (ea), XEiJ.regSRS);  //pcws。イミディエイトを分離。このr[ea]はデータレジスタまたはアドレスレジスタ
  7147:     XEiJ.regRn[qqq] = ~65535 & XEiJ.regRn[qqq] | (char) z;
  7148:     XEiJ.regCCR = XEiJ.regCCR & XEiJ.REG_CCR_X | (char) z - 1 >> 31 & XEiJ.REG_CCR_Z | ((short) z < 0 ? XEiJ.REG_CCR_N : 0);  //ccr_tst_word
  7149:   }  //irpMoveToDRWord
  7150: 
  7151:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  7152:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  7153:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  7154:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  7155:   //MOVEA.W <ea>,Aq                                 |-|012346|-|-----|-----|DAM+-WXZPI|0011_qqq_001_mmm_rrr
  7156:   //MOVE.W <ea>,Aq                                  |A|012346|-|-----|-----|DAM+-WXZPI|0011_qqq_001_mmm_rrr [MOVEA.W <ea>,Aq]
  7157:   //
  7158:   //MOVEA.W <ea>,Aq
  7159:   //  ワードデータをロングに符号拡張してAqの全体を更新する
  7160:   public static void irpMoveaWord () throws M68kException {
  7161:     XEiJ.mpuCycleCount++;
  7162:     int ea = XEiJ.regOC & 63;
  7163:     XEiJ.regRn[XEiJ.regOC >> 9 & 15] = ea < XEiJ.EA_MM ? (short) XEiJ.regRn[ea] : ea == XEiJ.EA_IM ? mmuReadWordSignExword ((XEiJ.regPC += 2) - 2, XEiJ.regSRS) : mmuReadWordSignData (efaAnyWord (ea), XEiJ.regSRS);  //符号拡張して32bit全部書き換える。pcws。イミディエイトを分離。このr[ea]はデータレジスタまたはアドレスレジスタ。右辺でAqが変化する可能性があることに注意
  7164:   }  //irpMoveaWord
  7165: 
  7166:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  7167:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  7168:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  7169:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  7170:   //MOVE.W <ea>,(Aq)                                |-|012346|-|-UUUU|-**00|DAM+-WXZPI|0011_qqq_010_mmm_rrr
  7171:   public static void irpMoveToMMWord () throws M68kException {
  7172:     XEiJ.mpuCycleCount++;
  7173:     int ea = XEiJ.regOC & 63;
  7174:     int z = ea < XEiJ.EA_MM ? XEiJ.regRn[ea] : ea == XEiJ.EA_IM ? mmuReadWordSignExword ((XEiJ.regPC += 2) - 2, XEiJ.regSRS) : mmuReadWordSignData (efaAnyWord (ea), XEiJ.regSRS);  //pcws。イミディエイトを分離。このr[ea]はデータレジスタまたはアドレスレジスタ。ここでAqが変化する可能性があることに注意
  7175:     mmuWriteWordData (XEiJ.regRn[XEiJ.regOC >> 9 & 15], z, XEiJ.regSRS);
  7176:     XEiJ.regCCR = XEiJ.regCCR & XEiJ.REG_CCR_X | (char) z - 1 >> 31 & XEiJ.REG_CCR_Z | ((short) z < 0 ? XEiJ.REG_CCR_N : 0);  //ccr_tst_word
  7177:   }  //irpMoveToMMWord
  7178: 
  7179:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  7180:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  7181:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  7182:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  7183:   //MOVE.W <ea>,(Aq)+                               |-|012346|-|-UUUU|-**00|DAM+-WXZPI|0011_qqq_011_mmm_rrr
  7184:   public static void irpMoveToMPWord () throws M68kException {
  7185:     XEiJ.mpuCycleCount++;
  7186:     int ea = XEiJ.regOC & 63;
  7187:     int z = ea < XEiJ.EA_MM ? XEiJ.regRn[ea] : ea == XEiJ.EA_IM ? mmuReadWordSignExword ((XEiJ.regPC += 2) - 2, XEiJ.regSRS) : mmuReadWordSignData (efaAnyWord (ea), XEiJ.regSRS);  //このr[ea]はデータレジスタまたはアドレスレジスタ。pcws。イミディエイトを分離。ここでAqが変化する可能性があることに注意
  7188:     int aqq = XEiJ.regOC >> 9 & 15;
  7189:     M68kException.m6eIncremented += 2L << (aqq << 3);  //longのシフトカウントは6bitでマスクされる
  7190:     mmuWriteWordData ((XEiJ.regRn[aqq] += 2) - 2, z, XEiJ.regSRS);
  7191:     XEiJ.regCCR = XEiJ.regCCR & XEiJ.REG_CCR_X | (char) z - 1 >> 31 & XEiJ.REG_CCR_Z | ((short) z < 0 ? XEiJ.REG_CCR_N : 0);  //ccr_tst_word
  7192:   }  //irpMoveToMPWord
  7193: 
  7194:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  7195:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  7196:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  7197:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  7198:   //MOVE.W <ea>,-(Aq)                               |-|012346|-|-UUUU|-**00|DAM+-WXZPI|0011_qqq_100_mmm_rrr
  7199:   public static void irpMoveToMNWord () throws M68kException {
  7200:     XEiJ.mpuCycleCount++;
  7201:     int ea = XEiJ.regOC & 63;
  7202:     int z = ea < XEiJ.EA_MM ? XEiJ.regRn[ea] : ea == XEiJ.EA_IM ? mmuReadWordSignExword ((XEiJ.regPC += 2) - 2, XEiJ.regSRS) : mmuReadWordSignData (efaAnyWord (ea), XEiJ.regSRS);  //このr[ea]はデータレジスタまたはアドレスレジスタ。pcws。イミディエイトを分離。ここでAqが変化する可能性があることに注意
  7203:     int aqq = XEiJ.regOC >> 9 & 15;
  7204:     M68kException.m6eIncremented -= 2L << (aqq << 3);  //longのシフトカウントは6bitでマスクされる
  7205:     mmuWriteWordData ((XEiJ.regRn[aqq] -= 2), z, XEiJ.regSRS);
  7206:     XEiJ.regCCR = XEiJ.regCCR & XEiJ.REG_CCR_X | (char) z - 1 >> 31 & XEiJ.REG_CCR_Z | ((short) z < 0 ? XEiJ.REG_CCR_N : 0);  //ccr_tst_word
  7207:   }  //irpMoveToMNWord
  7208: 
  7209:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  7210:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  7211:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  7212:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  7213:   //MOVE.W <ea>,(d16,Aq)                            |-|012346|-|-UUUU|-**00|DAM+-WXZPI|0011_qqq_101_mmm_rrr
  7214:   public static void irpMoveToMWWord () throws M68kException {
  7215:     XEiJ.mpuCycleCount++;
  7216:     int ea = XEiJ.regOC & 63;
  7217:     int aqq = XEiJ.regOC >> 9 & 15;
  7218:     int z = ea < XEiJ.EA_MM ? XEiJ.regRn[ea] : ea == XEiJ.EA_IM ? mmuReadWordSignExword ((XEiJ.regPC += 2) - 2, XEiJ.regSRS) : mmuReadWordSignData (efaAnyWord (ea), XEiJ.regSRS);  //このr[ea]はデータレジスタまたはアドレスレジスタ。pcws。イミディエイトを分離。ここでAqが変化する可能性があることに注意
  7219:     mmuWriteWordData (XEiJ.regRn[aqq]  //ベースレジスタ
  7220:            + mmuReadWordSignExword ((XEiJ.regPC += 2) - 2, XEiJ.regSRS),  //pcws。ワードディスプレースメント
  7221:            z, XEiJ.regSRS);
  7222:     XEiJ.regCCR = XEiJ.regCCR & XEiJ.REG_CCR_X | (char) z - 1 >> 31 & XEiJ.REG_CCR_Z | ((short) z < 0 ? XEiJ.REG_CCR_N : 0);  //ccr_tst_word
  7223:   }  //irpMoveToMWWord
  7224: 
  7225:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  7226:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  7227:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  7228:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  7229:   //MOVE.W <ea>,(d8,Aq,Rn.wl)                       |-|012346|-|-UUUU|-**00|DAM+-WXZPI|0011_qqq_110_mmm_rrr
  7230:   public static void irpMoveToMXWord () throws M68kException {
  7231:     XEiJ.mpuCycleCount++;
  7232:     int ea = XEiJ.regOC & 63;
  7233:     int aqq = XEiJ.regOC >> 9 & 15;
  7234:     int z = ea < XEiJ.EA_MM ? XEiJ.regRn[ea] : ea == XEiJ.EA_IM ? mmuReadWordSignExword ((XEiJ.regPC += 2) - 2, XEiJ.regSRS) : mmuReadWordSignData (efaAnyWord (ea), XEiJ.regSRS);  //このr[ea]はデータレジスタまたはアドレスレジスタ。pcws。イミディエイトを分離。ここでAqが変化する可能性があることに注意
  7235:     int w = mmuReadWordZeroExword ((XEiJ.regPC += 2) - 2, XEiJ.regSRS);  //pcwz。拡張ワード
  7236:     int t = (((~w & 0x0180) == 0 ? 0 :  //ベースレジスタサプレス
  7237:               XEiJ.regRn[aqq])  //ベースレジスタ
  7238:              + (w << 31 - 8 >= 0 ? (byte) w :  //バイトディスプレースメント
  7239:                 w << 31 - 5 >= 0 ? 0 :  //ヌルベースディスプレースメント
  7240:                 w << 31 - 4 >= 0 ? mmuReadWordSignExword ((XEiJ.regPC += 2) - 2, XEiJ.regSRS) :  //pcws。ワードベースディスプレースメント
  7241:                 mmuReadLongExword ((XEiJ.regPC += 4) - 4, XEiJ.regSRS)));  //pcls。ロングベースディスプレースメント
  7242:     int x = ((~w & 0x0140) == 0 ? 0 :  //インデックスサプレス
  7243:              (w << 31 - 11 >= 0 ? (short) XEiJ.regRn[w >> 12] :  //ワードインデックス
  7244:               XEiJ.regRn[w >> 12])  //ロングインデックス
  7245:              << (w >> 9 & 3));  //スケールファクタ。ワードインデックスのときは符号拡張してから掛ける
  7246:     mmuWriteWordData ((w & 0x0103) <= 0x0100 ? t + x :  //メモリ間接なし
  7247:            ((XEiJ.TEST_BIT_2_SHIFT ? w << 31 - 2 >= 0 : (w & 4) == 0) ? mmuReadLongData (t + x, XEiJ.regSRS) :  //プリインデックス
  7248:             mmuReadLongData (t, XEiJ.regSRS) + x)  //ポストインデックス
  7249:            + ((XEiJ.TEST_BIT_1_SHIFT ? w << 31 - 1 >= 0 : (w & 2) == 0) ? 0 :  //ヌルアウタディスプレースメント
  7250:               (XEiJ.TEST_BIT_0_SHIFT ? w << 31 - 0 >= 0 : (w & 1) == 0) ? mmuReadWordSignExword ((XEiJ.regPC += 2) - 2, XEiJ.regSRS) :  //pcws。ワードアウタディスプレースメント
  7251:               mmuReadLongExword ((XEiJ.regPC += 4) - 4, XEiJ.regSRS)),  //pcls。ロングアウタディスプレースメント
  7252:            z, XEiJ.regSRS);
  7253:     XEiJ.regCCR = XEiJ.regCCR & XEiJ.REG_CCR_X | (char) z - 1 >> 31 & XEiJ.REG_CCR_Z | ((short) z < 0 ? XEiJ.REG_CCR_N : 0);  //ccr_tst_word
  7254:   }  //irpMoveToMXWord
  7255: 
  7256:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  7257:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  7258:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  7259:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  7260:   //MOVE.W <ea>,(xxx).W                             |-|012346|-|-UUUU|-**00|DAM+-WXZPI|0011_000_111_mmm_rrr
  7261:   public static void irpMoveToZWWord () throws M68kException {
  7262:     XEiJ.mpuCycleCount++;
  7263:     int ea = XEiJ.regOC & 63;
  7264:     int z = ea < XEiJ.EA_MM ? XEiJ.regRn[ea] : ea == XEiJ.EA_IM ? mmuReadWordSignExword ((XEiJ.regPC += 2) - 2, XEiJ.regSRS) : mmuReadWordSignData (efaAnyWord (ea), XEiJ.regSRS);  //このr[ea]はデータレジスタまたはアドレスレジスタ。pcws。イミディエイトを分離
  7265:     mmuWriteWordData (mmuReadWordSignExword ((XEiJ.regPC += 2) - 2, XEiJ.regSRS),  //pcws
  7266:            z, XEiJ.regSRS);
  7267:     XEiJ.regCCR = XEiJ.regCCR & XEiJ.REG_CCR_X | (char) z - 1 >> 31 & XEiJ.REG_CCR_Z | ((short) z < 0 ? XEiJ.REG_CCR_N : 0);  //ccr_tst_word
  7268:   }  //irpMoveToZWWord
  7269: 
  7270:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  7271:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  7272:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  7273:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  7274:   //MOVE.W <ea>,(xxx).L                             |-|012346|-|-UUUU|-**00|DAM+-WXZPI|0011_001_111_mmm_rrr
  7275:   public static void irpMoveToZLWord () throws M68kException {
  7276:     XEiJ.mpuCycleCount++;
  7277:     int ea = XEiJ.regOC & 63;
  7278:     int z = ea < XEiJ.EA_MM ? XEiJ.regRn[ea] : ea == XEiJ.EA_IM ? mmuReadWordSignExword ((XEiJ.regPC += 2) - 2, XEiJ.regSRS) : mmuReadWordSignData (efaAnyWord (ea), XEiJ.regSRS);  //このr[ea]はデータレジスタまたはアドレスレジスタ。pcws。イミディエイトを分離
  7279:     mmuWriteWordData (mmuReadLongExword ((XEiJ.regPC += 4) - 4, XEiJ.regSRS),  //pcls
  7280:            z, XEiJ.regSRS);
  7281:     XEiJ.regCCR = XEiJ.regCCR & XEiJ.REG_CCR_X | (char) z - 1 >> 31 & XEiJ.REG_CCR_Z | ((short) z < 0 ? XEiJ.REG_CCR_N : 0);  //ccr_tst_word
  7282:   }  //irpMoveToZLWord
  7283: 
  7284:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  7285:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  7286:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  7287:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  7288:   //NEGX.B <ea>                                     |-|012346|-|*UUUU|*****|D M+-WXZ  |0100_000_000_mmm_rrr
  7289:   public static void irpNegxByte () throws M68kException {
  7290:     int ea = XEiJ.regOC & 63;
  7291:     int y;
  7292:     int z;
  7293:     if (ea < XEiJ.EA_AR) {  //NEGX.B Dr
  7294:       XEiJ.mpuCycleCount++;
  7295:       z = (byte) (XEiJ.regRn[ea] = ~0xff & (y = XEiJ.regRn[ea]) | 0xff & -(y = (byte) y) - (XEiJ.regCCR >> 4));  //Xの左側はすべて0なのでCCR_X&を省略
  7296:     } else {  //NEGX.B <mem>
  7297:       XEiJ.mpuCycleCount++;
  7298:       int a = efaMltByte (ea);
  7299:       mmuWriteByteData (a, z = (byte) (-(y = mmuModifyByteSignData (a, XEiJ.regSRS)) - (XEiJ.regCCR >> 4)), XEiJ.regSRS);  //Xの左側はすべて0なのでCCR_X&を省略
  7300:     }
  7301:     XEiJ.regCCR = (z >> 28 & XEiJ.REG_CCR_N | (z == 0 ? XEiJ.regCCR & XEiJ.REG_CCR_Z : 0) |
  7302:            (y & z) >>> 31 << 1 |
  7303:            (y | z) >> 31 & (XEiJ.REG_CCR_X | XEiJ.REG_CCR_C));  //ccr_negx
  7304:   }  //irpNegxByte
  7305: 
  7306:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  7307:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  7308:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  7309:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  7310:   //NEGX.W <ea>                                     |-|012346|-|*UUUU|*****|D M+-WXZ  |0100_000_001_mmm_rrr
  7311:   public static void irpNegxWord () throws M68kException {
  7312:     int ea = XEiJ.regOC & 63;
  7313:     int y;
  7314:     int z;
  7315:     if (ea < XEiJ.EA_AR) {  //NEGX.W Dr
  7316:       XEiJ.mpuCycleCount++;
  7317:       z = (short) (XEiJ.regRn[ea] = ~0xffff & (y = XEiJ.regRn[ea]) | (char) (-(y = (short) y) - (XEiJ.regCCR >> 4)));  //Xの左側はすべて0なのでCCR_X&を省略
  7318:     } else {  //NEGX.W <mem>
  7319:       XEiJ.mpuCycleCount++;
  7320:       int a = efaMltWord (ea);
  7321:       mmuWriteWordData (a, z = (short) (-(y = mmuModifyWordSignData (a, XEiJ.regSRS)) - (XEiJ.regCCR >> 4)), XEiJ.regSRS);  //Xの左側はすべて0なのでCCR_X&を省略
  7322:     }
  7323:     XEiJ.regCCR = (z >> 28 & XEiJ.REG_CCR_N | (z == 0 ? XEiJ.regCCR & XEiJ.REG_CCR_Z : 0) |
  7324:            (y & z) >>> 31 << 1 |
  7325:            (y | z) >> 31 & (XEiJ.REG_CCR_X | XEiJ.REG_CCR_C));  //ccr_negx
  7326:   }  //irpNegxWord
  7327: 
  7328:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  7329:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  7330:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  7331:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  7332:   //NEGX.L <ea>                                     |-|012346|-|*UUUU|*****|D M+-WXZ  |0100_000_010_mmm_rrr
  7333:   public static void irpNegxLong () throws M68kException {
  7334:     int ea = XEiJ.regOC & 63;
  7335:     int y;
  7336:     int z;
  7337:     if (ea < XEiJ.EA_AR) {  //NEGX.L Dr
  7338:       XEiJ.mpuCycleCount++;
  7339:       XEiJ.regRn[ea] = z = -(y = XEiJ.regRn[ea]) - (XEiJ.regCCR >> 4);  //Xの左側はすべて0なのでCCR_X&を省略
  7340:     } else {  //NEGX.L <mem>
  7341:       XEiJ.mpuCycleCount++;
  7342:       int a = efaMltLong (ea);
  7343:       mmuWriteLongData (a, z = -(y = mmuModifyLongData (a, XEiJ.regSRS)) - (XEiJ.regCCR >> 4), XEiJ.regSRS);  //Xの左側はすべて0なのでCCR_X&を省略
  7344:     }
  7345:     XEiJ.regCCR = (z >> 28 & XEiJ.REG_CCR_N | (z == 0 ? XEiJ.regCCR & XEiJ.REG_CCR_Z : 0) |
  7346:            (y & z) >>> 31 << 1 |
  7347:            (y | z) >> 31 & (XEiJ.REG_CCR_X | XEiJ.REG_CCR_C));  //ccr_negx
  7348:   }  //irpNegxLong
  7349: 
  7350:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  7351:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  7352:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  7353:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  7354:   //MOVE.W SR,<ea>                                  |-|-12346|P|*****|-----|D M+-WXZ  |0100_000_011_mmm_rrr
  7355:   public static void irpMoveFromSR () throws M68kException {
  7356:     //MC68010以上では特権命令
  7357:     if (XEiJ.regSRS == 0) {  //ユーザモードのとき
  7358:       M68kException.m6eNumber = M68kException.M6E_PRIVILEGE_VIOLATION;
  7359:       throw M68kException.m6eSignal;
  7360:     }
  7361:     //以下はスーパーバイザモード
  7362:     int ea = XEiJ.regOC & 63;
  7363:     if (ea < XEiJ.EA_AR) {  //MOVE.W SR,Dr
  7364:       XEiJ.mpuCycleCount++;
  7365:       XEiJ.regRn[ea] = ~0xffff & XEiJ.regRn[ea] | XEiJ.regSRT1 | XEiJ.regSRS | XEiJ.regSRM | XEiJ.regSRI | XEiJ.regCCR;
  7366:     } else {  //MOVE.W SR,<mem>
  7367:       XEiJ.mpuCycleCount++;
  7368:       mmuWriteWordData (efaMltWord (ea), XEiJ.regSRT1 | XEiJ.regSRS | XEiJ.regSRM | XEiJ.regSRI | XEiJ.regCCR, 1);
  7369:     }
  7370:   }  //irpMoveFromSR
  7371: 
  7372:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  7373:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  7374:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  7375:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  7376:   //CHK.L <ea>,Dq                                   |-|--2346|-|-UUUU|-*UUU|D M+-WXZPI|0100_qqq_100_mmm_rrr
  7377:   public static void irpChkLong () throws M68kException {
  7378:     XEiJ.mpuCycleCount += 2;
  7379:     int ea = XEiJ.regOC & 63;
  7380:     int x = ea < XEiJ.EA_AR ? XEiJ.regRn[ea] : ea == XEiJ.EA_IM ? mmuReadLongExword ((XEiJ.regPC += 4) - 4, XEiJ.regSRS) : mmuReadLongData (efaAnyLong (ea), XEiJ.regSRS);  //pcls。イミディエイトを分離
  7381:     int y = XEiJ.regRn[XEiJ.regOC >> 9 & 7];
  7382:     int z = x - y;
  7383:     XEiJ.regCCR = (XEiJ.regCCR & (XEiJ.REG_CCR_X | XEiJ.REG_CCR_Z | XEiJ.REG_CCR_V | XEiJ.REG_CCR_C) |
  7384:                    (y < 0 ? XEiJ.REG_CCR_N : 0));
  7385:     if (y < 0 || x < y) {
  7386:       XEiJ.mpuCycleCount += 20 - 19;
  7387:       M68kException.m6eAddress = XEiJ.regPC0;  //アドレスは命令の先頭
  7388:       M68kException.m6eNumber = M68kException.M6E_CHK_INSTRUCTION;
  7389:       throw M68kException.m6eSignal;
  7390:     }
  7391:   }  //irpChkLong
  7392: 
  7393:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  7394:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  7395:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  7396:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  7397:   //CHK.W <ea>,Dq                                   |-|012346|-|-UUUU|-*UUU|D M+-WXZPI|0100_qqq_110_mmm_rrr
  7398:   public static void irpChkWord () throws M68kException {
  7399:     XEiJ.mpuCycleCount += 2;
  7400:     int ea = XEiJ.regOC & 63;
  7401:     int x = ea < XEiJ.EA_AR ? (short) XEiJ.regRn[ea] : ea == XEiJ.EA_IM ? mmuReadWordSignExword ((XEiJ.regPC += 2) - 2, XEiJ.regSRS) : mmuReadWordSignData (efaAnyWord (ea), XEiJ.regSRS);  //pcws。イミディエイトを分離
  7402:     int y = (short) XEiJ.regRn[XEiJ.regOC >> 9 & 7];
  7403:     int z = (short) (x - y);
  7404:     XEiJ.regCCR = (XEiJ.regCCR & (XEiJ.REG_CCR_X | XEiJ.REG_CCR_Z | XEiJ.REG_CCR_V | XEiJ.REG_CCR_C) |
  7405:                    (y < 0 ? XEiJ.REG_CCR_N : 0));
  7406:     if (y < 0 || x < y) {
  7407:       XEiJ.mpuCycleCount += 20 - 19;
  7408:       M68kException.m6eAddress = XEiJ.regPC0;  //アドレスは命令の先頭
  7409:       M68kException.m6eNumber = M68kException.M6E_CHK_INSTRUCTION;
  7410:       throw M68kException.m6eSignal;
  7411:     }
  7412:   }  //irpChkWord
  7413: 
  7414:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  7415:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  7416:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  7417:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  7418:   //LEA.L <ea>,Aq                                   |-|012346|-|-----|-----|  M  WXZP |0100_qqq_111_mmm_rrr
  7419:   //EXTB.L Dr                                       |-|--2346|-|-UUUU|-**00|D         |0100_100_111_000_rrr
  7420:   public static void irpLea () throws M68kException {
  7421:     int ea = XEiJ.regOC & 63;
  7422:     if (ea < XEiJ.EA_AR) {  //EXTB.L Dr
  7423:       XEiJ.mpuCycleCount++;
  7424:       int z;
  7425:       XEiJ.regRn[ea] = z = (byte) XEiJ.regRn[ea];
  7426:       XEiJ.regCCR = z >> 28 & XEiJ.REG_CCR_N | (z == 0 ? XEiJ.regCCR & XEiJ.REG_CCR_X | XEiJ.REG_CCR_Z : XEiJ.regCCR & XEiJ.REG_CCR_X);  //ccr_tst
  7427:     } else {  //LEA.L <ea>,Aq
  7428:       XEiJ.mpuCycleCount++;
  7429:       XEiJ.regRn[(XEiJ.regOC >> 9) - (32 - 8)] = efaLeaPea (ea);
  7430:     }
  7431:   }  //irpLea
  7432: 
  7433:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  7434:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  7435:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  7436:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  7437:   //CLR.B <ea>                                      |-|012346|-|-UUUU|-0100|D M+-WXZ  |0100_001_000_mmm_rrr (68000 and 68008 read before clear)
  7438:   public static void irpClrByte () throws M68kException {
  7439:     int ea = XEiJ.regOC & 63;
  7440:     if (ea < XEiJ.EA_AR) {  //CLR.B Dr
  7441:       XEiJ.mpuCycleCount++;
  7442:       XEiJ.regRn[ea] &= ~0xff;
  7443:     } else {  //CLR.B <mem>
  7444:       XEiJ.mpuCycleCount++;
  7445:       mmuWriteByteData (efaMltByte (ea), 0, XEiJ.regSRS);
  7446:     }
  7447:     XEiJ.regCCR = XEiJ.regCCR & XEiJ.REG_CCR_X | XEiJ.REG_CCR_Z;  //ccr_clr
  7448:   }  //irpClrByte
  7449: 
  7450:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  7451:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  7452:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  7453:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  7454:   //CLR.W <ea>                                      |-|012346|-|-UUUU|-0100|D M+-WXZ  |0100_001_001_mmm_rrr (68000 and 68008 read before clear)
  7455:   public static void irpClrWord () throws M68kException {
  7456:     int ea = XEiJ.regOC & 63;
  7457:     if (ea < XEiJ.EA_AR) {  //CLR.W Dr
  7458:       XEiJ.mpuCycleCount++;
  7459:       XEiJ.regRn[ea] &= ~0xffff;
  7460:     } else {  //CLR.W <mem>
  7461:       XEiJ.mpuCycleCount++;
  7462:       mmuWriteWordData (efaMltWord (ea), 0, XEiJ.regSRS);
  7463:     }
  7464:     XEiJ.regCCR = XEiJ.regCCR & XEiJ.REG_CCR_X | XEiJ.REG_CCR_Z;  //ccr_clr
  7465:   }  //irpClrWord
  7466: 
  7467:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  7468:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  7469:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  7470:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  7471:   //CLR.L <ea>                                      |-|012346|-|-UUUU|-0100|D M+-WXZ  |0100_001_010_mmm_rrr (68000 and 68008 read before clear)
  7472:   public static void irpClrLong () throws M68kException {
  7473:     int ea = XEiJ.regOC & 63;
  7474:     if (ea < XEiJ.EA_AR) {  //CLR.L Dr
  7475:       XEiJ.mpuCycleCount++;
  7476:       XEiJ.regRn[ea] = 0;
  7477:     } else {  //CLR.L <mem>
  7478:       XEiJ.mpuCycleCount++;
  7479:       mmuWriteLongData (efaMltLong (ea), 0, XEiJ.regSRS);
  7480:     }
  7481:     XEiJ.regCCR = XEiJ.regCCR & XEiJ.REG_CCR_X | XEiJ.REG_CCR_Z;  //ccr_clr
  7482:   }  //irpClrLong
  7483: 
  7484:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  7485:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  7486:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  7487:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  7488:   //MOVE.W CCR,<ea>                                 |-|-12346|-|*****|-----|D M+-WXZ  |0100_001_011_mmm_rrr
  7489:   public static void irpMoveFromCCR () throws M68kException {
  7490:     int ea = XEiJ.regOC & 63;
  7491:     if (ea < XEiJ.EA_AR) {  //MOVE.W CCR,Dr
  7492:       XEiJ.mpuCycleCount++;
  7493:       XEiJ.regRn[ea] = ~0xffff & XEiJ.regRn[ea] | XEiJ.regCCR;
  7494:     } else {  //MOVE.W CCR,<mem>
  7495:       XEiJ.mpuCycleCount++;
  7496:       mmuWriteWordData (efaMltWord (ea), XEiJ.regCCR, XEiJ.regSRS);
  7497:     }
  7498:   }  //irpMoveFromCCR
  7499: 
  7500:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  7501:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  7502:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  7503:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  7504:   //NEG.B <ea>                                      |-|012346|-|UUUUU|*****|D M+-WXZ  |0100_010_000_mmm_rrr
  7505:   public static void irpNegByte () throws M68kException {
  7506:     int ea = XEiJ.regOC & 63;
  7507:     int y;
  7508:     int z;
  7509:     if (ea < XEiJ.EA_AR) {  //NEG.B Dr
  7510:       XEiJ.mpuCycleCount++;
  7511:       z = (byte) (XEiJ.regRn[ea] = ~0xff & (y = XEiJ.regRn[ea]) | 0xff & -(y = (byte) y));
  7512:     } else {  //NEG.B <mem>
  7513:       XEiJ.mpuCycleCount++;
  7514:       int a = efaMltByte (ea);
  7515:       mmuWriteByteData (a, z = (byte) -(y = mmuModifyByteSignData (a, XEiJ.regSRS)), XEiJ.regSRS);
  7516:     }
  7517:     XEiJ.regCCR = (z >> 28 & XEiJ.REG_CCR_N | (z == 0 ? XEiJ.REG_CCR_Z : 0) |
  7518:            (y & z) >>> 31 << 1 |
  7519:            (y | z) >> 31 & (XEiJ.REG_CCR_X | XEiJ.REG_CCR_C));  //ccr_neg
  7520:   }  //irpNegByte
  7521: 
  7522:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  7523:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  7524:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  7525:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  7526:   //NEG.W <ea>                                      |-|012346|-|UUUUU|*****|D M+-WXZ  |0100_010_001_mmm_rrr
  7527:   public static void irpNegWord () throws M68kException {
  7528:     int ea = XEiJ.regOC & 63;
  7529:     int y;
  7530:     int z;
  7531:     if (ea < XEiJ.EA_AR) {  //NEG.W Dr
  7532:       XEiJ.mpuCycleCount++;
  7533:       z = (short) (XEiJ.regRn[ea] = ~0xffff & (y = XEiJ.regRn[ea]) | (char) -(y = (short) y));
  7534:     } else {  //NEG.W <mem>
  7535:       XEiJ.mpuCycleCount++;
  7536:       int a = efaMltWord (ea);
  7537:       mmuWriteWordData (a, z = (short) -(y = mmuModifyWordSignData (a, XEiJ.regSRS)), XEiJ.regSRS);
  7538:     }
  7539:     XEiJ.regCCR = (z >> 28 & XEiJ.REG_CCR_N | (z == 0 ? XEiJ.REG_CCR_Z : 0) |
  7540:            (y & z) >>> 31 << 1 |
  7541:            (y | z) >> 31 & (XEiJ.REG_CCR_X | XEiJ.REG_CCR_C));  //ccr_neg
  7542:   }  //irpNegWord
  7543: 
  7544:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  7545:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  7546:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  7547:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  7548:   //NEG.L <ea>                                      |-|012346|-|UUUUU|*****|D M+-WXZ  |0100_010_010_mmm_rrr
  7549:   public static void irpNegLong () throws M68kException {
  7550:     int ea = XEiJ.regOC & 63;
  7551:     int y;
  7552:     int z;
  7553:     if (ea < XEiJ.EA_AR) {  //NEG.L Dr
  7554:       XEiJ.mpuCycleCount++;
  7555:       XEiJ.regRn[ea] = z = -(y = XEiJ.regRn[ea]);
  7556:     } else {  //NEG.L <mem>
  7557:       XEiJ.mpuCycleCount++;
  7558:       int a = efaMltLong (ea);
  7559:       mmuWriteLongData (a, z = -(y = mmuModifyLongData (a, XEiJ.regSRS)), XEiJ.regSRS);
  7560:     }
  7561:     XEiJ.regCCR = (z >> 28 & XEiJ.REG_CCR_N | (z == 0 ? XEiJ.REG_CCR_Z : 0) |
  7562:            (y & z) >>> 31 << 1 |
  7563:            (y | z) >> 31 & (XEiJ.REG_CCR_X | XEiJ.REG_CCR_C));  //ccr_neg
  7564:   }  //irpNegLong
  7565: 
  7566:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  7567:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  7568:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  7569:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  7570:   //MOVE.W <ea>,CCR                                 |-|012346|-|UUUUU|*****|D M+-WXZPI|0100_010_011_mmm_rrr
  7571:   public static void irpMoveToCCR () throws M68kException {
  7572:     XEiJ.mpuCycleCount++;
  7573:     int ea = XEiJ.regOC & 63;
  7574:     XEiJ.regCCR = XEiJ.REG_CCR_MASK & (ea < XEiJ.EA_AR ? XEiJ.regRn[ea] : ea == XEiJ.EA_IM ? mmuReadWordSignExword ((XEiJ.regPC += 2) - 2, XEiJ.regSRS) : mmuReadWordSignData (efaAnyWord (ea), XEiJ.regSRS));  //pcws。イミディエイトを分離
  7575:   }  //irpMoveToCCR
  7576: 
  7577:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  7578:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  7579:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  7580:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  7581:   //NOT.B <ea>                                      |-|012346|-|-UUUU|-**00|D M+-WXZ  |0100_011_000_mmm_rrr
  7582:   public static void irpNotByte () throws M68kException {
  7583:     int ea = XEiJ.regOC & 63;
  7584:     int z;
  7585:     if (ea < XEiJ.EA_AR) {  //NOT.B Dr
  7586:       XEiJ.mpuCycleCount++;
  7587:       z = XEiJ.regRn[ea] ^= 255;  //0拡張してからEOR
  7588:     } else {  //NOT.B <mem>
  7589:       XEiJ.mpuCycleCount++;
  7590:       int a = efaMltByte (ea);
  7591:       mmuWriteByteData (a, z = ~mmuModifyByteSignData (a, XEiJ.regSRS), XEiJ.regSRS);
  7592:     }
  7593:     XEiJ.regCCR = XEiJ.regCCR & XEiJ.REG_CCR_X | XEiJ.MPU_TSTB_TABLE[255 & z];  //ccr_tst_byte
  7594:   }  //irpNotByte
  7595: 
  7596:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  7597:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  7598:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  7599:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  7600:   //NOT.W <ea>                                      |-|012346|-|-UUUU|-**00|D M+-WXZ  |0100_011_001_mmm_rrr
  7601:   public static void irpNotWord () throws M68kException {
  7602:     int ea = XEiJ.regOC & 63;
  7603:     int z;
  7604:     if (ea < XEiJ.EA_AR) {  //NOT.W Dr
  7605:       XEiJ.mpuCycleCount++;
  7606:       z = XEiJ.regRn[ea] ^= 65535;  //0拡張してからEOR
  7607:     } else {  //NOT.W <mem>
  7608:       XEiJ.mpuCycleCount++;
  7609:       int a = efaMltWord (ea);
  7610:       mmuWriteWordData (a, z = ~mmuModifyWordSignData (a, XEiJ.regSRS), XEiJ.regSRS);
  7611:     }
  7612:     XEiJ.regCCR = XEiJ.regCCR & XEiJ.REG_CCR_X | (char) z - 1 >> 31 & XEiJ.REG_CCR_Z | ((short) z < 0 ? XEiJ.REG_CCR_N : 0);  //ccr_tst_word
  7613:   }  //irpNotWord
  7614: 
  7615:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  7616:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  7617:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  7618:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  7619:   //NOT.L <ea>                                      |-|012346|-|-UUUU|-**00|D M+-WXZ  |0100_011_010_mmm_rrr
  7620:   public static void irpNotLong () throws M68kException {
  7621:     int ea = XEiJ.regOC & 63;
  7622:     int z;
  7623:     if (ea < XEiJ.EA_AR) {  //NOT.L Dr
  7624:       XEiJ.mpuCycleCount++;
  7625:       z = XEiJ.regRn[ea] ^= 0xffffffff;
  7626:     } else {  //NOT.L <mem>
  7627:       XEiJ.mpuCycleCount++;
  7628:       int a = efaMltLong (ea);
  7629:       mmuWriteLongData (a, z = ~mmuModifyLongData (a, XEiJ.regSRS), XEiJ.regSRS);
  7630:     }
  7631:     XEiJ.regCCR = z >> 28 & XEiJ.REG_CCR_N | (z == 0 ? XEiJ.regCCR & XEiJ.REG_CCR_X | XEiJ.REG_CCR_Z : XEiJ.regCCR & XEiJ.REG_CCR_X);  //ccr_tst
  7632:   }  //irpNotLong
  7633: 
  7634:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  7635:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  7636:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  7637:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  7638:   //MOVE.W <ea>,SR                                  |-|012346|P|UUUUU|*****|D M+-WXZPI|0100_011_011_mmm_rrr
  7639:   public static void irpMoveToSR () throws M68kException {
  7640:     if (XEiJ.regSRS == 0) {  //ユーザモードのとき
  7641:       M68kException.m6eNumber = M68kException.M6E_PRIVILEGE_VIOLATION;
  7642:       throw M68kException.m6eSignal;
  7643:     }
  7644:     //以下はスーパーバイザモード
  7645:     XEiJ.mpuCycleCount += 12;
  7646:     int ea = XEiJ.regOC & 63;
  7647:     irpSetSR (ea < XEiJ.EA_AR ? XEiJ.regRn[ea] : ea == XEiJ.EA_IM ? mmuReadWordZeroExword ((XEiJ.regPC += 2) - 2, 1) : mmuReadWordZeroData (efaAnyWord (ea), 1));  //特権違反チェックが先。pcwz。イミディエイトを分離
  7648:   }  //irpMoveToSR
  7649: 
  7650:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  7651:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  7652:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  7653:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  7654:   //NBCD.B <ea>                                     |-|012346|-|UUUUU|*U*U*|D M+-WXZ  |0100_100_000_mmm_rrr
  7655:   //LINK.L Ar,#<data>                               |-|--2346|-|-----|-----|          |0100_100_000_001_rrr-{data}
  7656:   //
  7657:   //LINK.L Ar,#<data>
  7658:   //  PEA.L (Ar);MOVEA.L A7,Ar;ADDA.L #<data>,A7と同じ
  7659:   //  LINK.L A7,#<data>はA7をデクリメントする前の値がプッシュされ、A7に#<data>が加算される
  7660:   public static void irpNbcd () throws M68kException {
  7661:     int ea = XEiJ.regOC & 63;
  7662:     if (ea < XEiJ.EA_AR) {  //NBCD.B Dr
  7663:       XEiJ.mpuCycleCount++;
  7664:       XEiJ.regRn[ea] = ~0xff & XEiJ.regRn[ea] | irpSbcd (0, XEiJ.regRn[ea]);
  7665:     } else if (ea < XEiJ.EA_MM) {  //LINK.L Ar,#<data>
  7666:       XEiJ.mpuCycleCount += 2;
  7667:       int o = mmuReadLongExword ((XEiJ.regPC += 4) - 4, XEiJ.regSRS);  //pcls
  7668:       int arr = XEiJ.regOC - (0b0100_100_000_001_000 - 8);
  7669:       //評価順序に注意。LINK.L A7,#<data>のときプッシュするのはA7をデクリメントする前の値。wl(r[15]-=4,r[8+rrr])は不可
  7670:       int a = XEiJ.regRn[arr];
  7671:       M68kException.m6eIncremented -= 4L << (7 << 3);
  7672:       int sp = XEiJ.regRn[15] -= 4;
  7673:       mmuWriteLongData (sp, a, XEiJ.regSRS);  //pushl
  7674:       XEiJ.regRn[arr] = sp;
  7675:       XEiJ.regRn[15] = sp + o;
  7676:     } else {  //NBCD.B <mem>
  7677:       XEiJ.mpuCycleCount++;
  7678:       int a = efaMltByte (ea);
  7679:       mmuWriteByteData (a, irpSbcd (0, mmuModifyByteSignData (a, XEiJ.regSRS)), XEiJ.regSRS);
  7680:     }
  7681:   }  //irpNbcd
  7682: 
  7683:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  7684:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  7685:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  7686:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  7687:   //SWAP.W Dr                                       |-|012346|-|-UUUU|-**00|D         |0100_100_001_000_rrr
  7688:   //BKPT #<data>                                    |-|-12346|-|-----|-----|          |0100_100_001_001_ddd
  7689:   //PEA.L <ea>                                      |-|012346|-|-----|-----|  M  WXZP |0100_100_001_mmm_rrr
  7690:   public static void irpPea () throws M68kException {
  7691:     int ea = XEiJ.regOC & 63;
  7692:     if (ea < XEiJ.EA_AR) {  //SWAP.W Dr
  7693:       XEiJ.mpuCycleCount++;
  7694:       int x;
  7695:       int z;
  7696:       XEiJ.regRn[ea] = z = (x = XEiJ.regRn[ea]) << 16 | x >>> 16;
  7697:       //上位ワードと下位ワードを入れ替えた後のDrをロングでテストする
  7698:       XEiJ.regCCR = z >> 28 & XEiJ.REG_CCR_N | (z == 0 ? XEiJ.regCCR & XEiJ.REG_CCR_X | XEiJ.REG_CCR_Z : XEiJ.regCCR & XEiJ.REG_CCR_X);  //ccr_tst
  7699:     } else {  //PEA.L <ea>
  7700:       XEiJ.mpuCycleCount++;
  7701:       //評価順序に注意。実効アドレスを求めてからspをデクリメントすること
  7702:       int a = efaLeaPea (ea);  //BKPT #<data>はここでillegal instructionになる
  7703:       M68kException.m6eIncremented -= 4L << (7 << 3);
  7704:       mmuWriteLongData (XEiJ.regRn[15] -= 4, a, XEiJ.regSRS);
  7705:     }
  7706:   }  //irpPea
  7707: 
  7708:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  7709:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  7710:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  7711:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  7712:   //EXT.W Dr                                        |-|012346|-|-UUUU|-**00|D         |0100_100_010_000_rrr
  7713:   //MOVEM.W <list>,<ea>                             |-|012346|-|-----|-----|  M -WXZ  |0100_100_010_mmm_rrr-llllllllllllllll
  7714:   public static void irpMovemToMemWord () throws M68kException {
  7715:     int ea = XEiJ.regOC & 63;
  7716:     if (ea < XEiJ.EA_AR) {  //EXT.W Dr
  7717:       XEiJ.mpuCycleCount++;
  7718:       int z;
  7719:       XEiJ.regRn[ea] = ~0xffff & (z = XEiJ.regRn[ea]) | (char) (z = (byte) z);
  7720:       XEiJ.regCCR = z >> 28 & XEiJ.REG_CCR_N | (z == 0 ? XEiJ.regCCR & XEiJ.REG_CCR_X | XEiJ.REG_CCR_Z : XEiJ.regCCR & XEiJ.REG_CCR_X);  //ccr_tst
  7721:     } else {  //MOVEM.W <list>,<ea>
  7722:       int l = mmuReadWordZeroExword (XEiJ.regPC, XEiJ.regSRS);  //pcwze。レジスタリスト。ゼロ拡張
  7723:       XEiJ.regPC += 2;
  7724:       if (ea >> 3 == XEiJ.MMM_MN) {  //-(Ar)
  7725:         //MOVEM.wl <list>,-(Ar)で<list>にArが含まれているとき、000/010は命令開始時のArを、020/030/040/060は命令開始時のAr-オペレーションサイズをメモリに書き込む
  7726:         //転送するレジスタが0個のときArは変化しない
  7727:         int arr = ea - (XEiJ.EA_MN - 8);
  7728:         M68kException.m6eIncremented -= 2L << (arr << 3);  //longのシフトカウントは6bitでマスクされる
  7729:         int a = XEiJ.regRn[arr];
  7730:         XEiJ.regRn[arr] = a - 2;
  7731:         int t = a;
  7732:         if (XEiJ.IRP_MOVEM_EXPAND) {  //16回展開する
  7733:           if ((l & 0x0001) != 0) {
  7734:             mmuWriteWordData (a -= 2, XEiJ.regRn[15], XEiJ.regSRS);
  7735:           }
  7736:           if ((l & 0x0002) != 0) {
  7737:             mmuWriteWordData (a -= 2, XEiJ.regRn[14], XEiJ.regSRS);
  7738:           }
  7739:           if ((l & 0x0004) != 0) {
  7740:             mmuWriteWordData (a -= 2, XEiJ.regRn[13], XEiJ.regSRS);
  7741:           }
  7742:           if ((l & 0x0008) != 0) {
  7743:             mmuWriteWordData (a -= 2, XEiJ.regRn[12], XEiJ.regSRS);
  7744:           }
  7745:           if ((l & 0x0010) != 0) {
  7746:             mmuWriteWordData (a -= 2, XEiJ.regRn[11], XEiJ.regSRS);
  7747:           }
  7748:           if ((l & 0x0020) != 0) {
  7749:             mmuWriteWordData (a -= 2, XEiJ.regRn[10], XEiJ.regSRS);
  7750:           }
  7751:           if ((l & 0x0040) != 0) {
  7752:             mmuWriteWordData (a -= 2, XEiJ.regRn[ 9], XEiJ.regSRS);
  7753:           }
  7754:           if ((byte) l < 0) {  //(l & 0x0080) != 0
  7755:             mmuWriteWordData (a -= 2, XEiJ.regRn[ 8], XEiJ.regSRS);
  7756:           }
  7757:           if ((l & 0x0100) != 0) {
  7758:             mmuWriteWordData (a -= 2, XEiJ.regRn[ 7], XEiJ.regSRS);
  7759:           }
  7760:           if ((l & 0x0200) != 0) {
  7761:             mmuWriteWordData (a -= 2, XEiJ.regRn[ 6], XEiJ.regSRS);
  7762:           }
  7763:           if ((l & 0x0400) != 0) {
  7764:             mmuWriteWordData (a -= 2, XEiJ.regRn[ 5], XEiJ.regSRS);
  7765:           }
  7766:           if ((l & 0x0800) != 0) {
  7767:             mmuWriteWordData (a -= 2, XEiJ.regRn[ 4], XEiJ.regSRS);
  7768:           }
  7769:           if ((l & 0x1000) != 0) {
  7770:             mmuWriteWordData (a -= 2, XEiJ.regRn[ 3], XEiJ.regSRS);
  7771:           }
  7772:           if ((l & 0x2000) != 0) {
  7773:             mmuWriteWordData (a -= 2, XEiJ.regRn[ 2], XEiJ.regSRS);
  7774:           }
  7775:           if ((l & 0x4000) != 0) {
  7776:             mmuWriteWordData (a -= 2, XEiJ.regRn[ 1], XEiJ.regSRS);
  7777:           }
  7778:           if ((short) l < 0) {  //(l & 0x8000) != 0
  7779:             mmuWriteWordData (a -= 2, XEiJ.regRn[ 0], XEiJ.regSRS);
  7780:           }
  7781:         } else if (XEiJ.IRP_MOVEM_LOOP) {  //16回ループする。コンパイラが展開する
  7782:           for (int i = 15; i >= 0; i--) {
  7783:             if ((l & 0x8000 >>> i) != 0) {
  7784:               mmuWriteWordData (a -= 2, XEiJ.regRn[i], XEiJ.regSRS);
  7785:             }
  7786:           }
  7787:         } else if (XEiJ.IRP_MOVEM_SHIFT_LEFT) {  //0になるまで左にシフトする
  7788:           l = XEiJ.MPU_BITREV_TABLE_0[l & 2047] | XEiJ.MPU_BITREV_TABLE_1[l << 10 >>> 21];  //Integer.reverse(l)
  7789:           for (int i = 15; l != 0; i--, l <<= 1) {
  7790:             if (l < 0) {
  7791:               mmuWriteWordData (a -= 2, XEiJ.regRn[i], XEiJ.regSRS);
  7792:             }
  7793:           }
  7794:         } else if (XEiJ.IRP_MOVEM_SHIFT_RIGHT) {  //0になるまで右にシフトする
  7795:           for (int i = 15; l != 0; i--, l >>>= 1) {
  7796:             if ((l & 1) != 0) {
  7797:               mmuWriteWordData (a -= 2, XEiJ.regRn[i], XEiJ.regSRS);
  7798:             }
  7799:           }
  7800:         } else if (XEiJ.IRP_MOVEM_ZEROS) {  //Integer.numberOfTrailingZerosを使う
  7801:           for (int i = 15; l != 0; ) {
  7802:             int k = Integer.numberOfTrailingZeros (l);
  7803:             mmuWriteWordData (a -= 2, XEiJ.regRn[i -= k], XEiJ.regSRS);
  7804:             l = l >>> k & ~1;
  7805:           }
  7806:         }
  7807:         M68kException.m6eIncremented += 2L << (arr << 3);  //元に戻しておく。longのシフトカウントは6bitでマスクされる
  7808:         XEiJ.regRn[arr] = a;
  7809:         XEiJ.mpuCycleCount += t - a >> 1;  //2バイト/個→1サイクル/個
  7810:       } else {  //-(Ar)以外
  7811:         int a = efaCltWord (ea);
  7812:         int t = a;
  7813:         if (XEiJ.IRP_MOVEM_EXPAND) {  //16回展開する
  7814:           if ((l & 0x0001) != 0) {
  7815:             mmuWriteWordData (a, XEiJ.regRn[ 0], XEiJ.regSRS);
  7816:             a += 2;
  7817:           }
  7818:           if ((l & 0x0002) != 0) {
  7819:             mmuWriteWordData (a, XEiJ.regRn[ 1], XEiJ.regSRS);
  7820:             a += 2;
  7821:           }
  7822:           if ((l & 0x0004) != 0) {
  7823:             mmuWriteWordData (a, XEiJ.regRn[ 2], XEiJ.regSRS);
  7824:             a += 2;
  7825:           }
  7826:           if ((l & 0x0008) != 0) {
  7827:             mmuWriteWordData (a, XEiJ.regRn[ 3], XEiJ.regSRS);
  7828:             a += 2;
  7829:           }
  7830:           if ((l & 0x0010) != 0) {
  7831:             mmuWriteWordData (a, XEiJ.regRn[ 4], XEiJ.regSRS);
  7832:             a += 2;
  7833:           }
  7834:           if ((l & 0x0020) != 0) {
  7835:             mmuWriteWordData (a, XEiJ.regRn[ 5], XEiJ.regSRS);
  7836:             a += 2;
  7837:           }
  7838:           if ((l & 0x0040) != 0) {
  7839:             mmuWriteWordData (a, XEiJ.regRn[ 6], XEiJ.regSRS);
  7840:             a += 2;
  7841:           }
  7842:           if ((byte) l < 0) {  //(l & 0x0080) != 0
  7843:             mmuWriteWordData (a, XEiJ.regRn[ 7], XEiJ.regSRS);
  7844:             a += 2;
  7845:           }
  7846:           if ((l & 0x0100) != 0) {
  7847:             mmuWriteWordData (a, XEiJ.regRn[ 8], XEiJ.regSRS);
  7848:             a += 2;
  7849:           }
  7850:           if ((l & 0x0200) != 0) {
  7851:             mmuWriteWordData (a, XEiJ.regRn[ 9], XEiJ.regSRS);
  7852:             a += 2;
  7853:           }
  7854:           if ((l & 0x0400) != 0) {
  7855:             mmuWriteWordData (a, XEiJ.regRn[10], XEiJ.regSRS);
  7856:             a += 2;
  7857:           }
  7858:           if ((l & 0x0800) != 0) {
  7859:             mmuWriteWordData (a, XEiJ.regRn[11], XEiJ.regSRS);
  7860:             a += 2;
  7861:           }
  7862:           if ((l & 0x1000) != 0) {
  7863:             mmuWriteWordData (a, XEiJ.regRn[12], XEiJ.regSRS);
  7864:             a += 2;
  7865:           }
  7866:           if ((l & 0x2000) != 0) {
  7867:             mmuWriteWordData (a, XEiJ.regRn[13], XEiJ.regSRS);
  7868:             a += 2;
  7869:           }
  7870:           if ((l & 0x4000) != 0) {
  7871:             mmuWriteWordData (a, XEiJ.regRn[14], XEiJ.regSRS);
  7872:             a += 2;
  7873:           }
  7874:           if ((short) l < 0) {  //(l & 0x8000) != 0
  7875:             mmuWriteWordData (a, XEiJ.regRn[15], XEiJ.regSRS);
  7876:             a += 2;
  7877:           }
  7878:         } else if (XEiJ.IRP_MOVEM_LOOP) {  //16回ループする。コンパイラが展開する
  7879:           for (int i = 0; i <= 15; i++) {
  7880:             if ((l & 0x0001 << i) != 0) {
  7881:               mmuWriteWordData (a, XEiJ.regRn[i], XEiJ.regSRS);
  7882:               a += 2;
  7883:             }
  7884:           }
  7885:         } else if (XEiJ.IRP_MOVEM_SHIFT_LEFT) {  //0になるまで左にシフトする
  7886:           l = XEiJ.MPU_BITREV_TABLE_0[l & 2047] | XEiJ.MPU_BITREV_TABLE_1[l << 10 >>> 21];  //Integer.reverse(l)
  7887:           for (int i = 0; l != 0; i++, l <<= 1) {
  7888:             if (l < 0) {
  7889:               mmuWriteWordData (a, XEiJ.regRn[i], XEiJ.regSRS);
  7890:               a += 2;
  7891:             }
  7892:           }
  7893:         } else if (XEiJ.IRP_MOVEM_SHIFT_RIGHT) {  //0になるまで右にシフトする
  7894:           for (int i = 0; l != 0; i++, l >>>= 1) {
  7895:             if ((l & 1) != 0) {
  7896:               mmuWriteWordData (a, XEiJ.regRn[i], XEiJ.regSRS);
  7897:               a += 2;
  7898:             }
  7899:           }
  7900:         } else if (XEiJ.IRP_MOVEM_ZEROS) {  //Integer.numberOfTrailingZerosを使う
  7901:           for (int i = 0; l != 0; ) {
  7902:             int k = Integer.numberOfTrailingZeros (l);
  7903:             mmuWriteWordData (a, XEiJ.regRn[i += k], XEiJ.regSRS);
  7904:             a += 2;
  7905:             l = l >>> k & ~1;
  7906:           }
  7907:         }
  7908:         XEiJ.mpuCycleCount += a - t >> 1;  //2バイト/個→1サイクル/個
  7909:       }
  7910:     }
  7911:   }  //irpMovemToMemWord
  7912: 
  7913:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  7914:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  7915:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  7916:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  7917:   //EXT.L Dr                                        |-|012346|-|-UUUU|-**00|D         |0100_100_011_000_rrr
  7918:   //MOVEM.L <list>,<ea>                             |-|012346|-|-----|-----|  M -WXZ  |0100_100_011_mmm_rrr-llllllllllllllll
  7919:   public static void irpMovemToMemLong () throws M68kException {
  7920:     int ea = XEiJ.regOC & 63;
  7921:     if (ea < XEiJ.EA_AR) {  //EXT.L Dr
  7922:       XEiJ.mpuCycleCount++;
  7923:       int z;
  7924:       XEiJ.regRn[ea] = z = (short) XEiJ.regRn[ea];
  7925:       XEiJ.regCCR = z >> 28 & XEiJ.REG_CCR_N | (z == 0 ? XEiJ.regCCR & XEiJ.REG_CCR_X | XEiJ.REG_CCR_Z : XEiJ.regCCR & XEiJ.REG_CCR_X);  //ccr_tst
  7926:     } else {  //MOVEM.L <list>,<ea>
  7927:       int l = mmuReadWordZeroExword (XEiJ.regPC, XEiJ.regSRS);  //pcwze。レジスタリスト。ゼロ拡張
  7928:       XEiJ.regPC += 2;
  7929:       if (ea >> 3 == XEiJ.MMM_MN) {  //-(Ar)
  7930:         //MOVEM.wl <list>,-(Ar)で<list>にArが含まれているとき、000/010は命令開始時のArを、020/030/040/060は命令開始時のAr-オペレーションサイズをメモリに書き込む
  7931:         //転送するレジスタが0個のときArは変化しない
  7932:         int arr = ea - (XEiJ.EA_MN - 8);
  7933:         M68kException.m6eIncremented -= 4L << (arr << 3);  //longのシフトカウントは6bitでマスクされる
  7934:         int a = XEiJ.regRn[arr];
  7935:         XEiJ.regRn[arr] = a - 4;
  7936:         int t = a;
  7937:         if (XEiJ.IRP_MOVEM_EXPAND) {  //16回展開する
  7938:           if ((l & 0x0001) != 0) {
  7939:             mmuWriteLongData (a -= 4, XEiJ.regRn[15], XEiJ.regSRS);
  7940:           }
  7941:           if ((l & 0x0002) != 0) {
  7942:             mmuWriteLongData (a -= 4, XEiJ.regRn[14], XEiJ.regSRS);
  7943:           }
  7944:           if ((l & 0x0004) != 0) {
  7945:             mmuWriteLongData (a -= 4, XEiJ.regRn[13], XEiJ.regSRS);
  7946:           }
  7947:           if ((l & 0x0008) != 0) {
  7948:             mmuWriteLongData (a -= 4, XEiJ.regRn[12], XEiJ.regSRS);
  7949:           }
  7950:           if ((l & 0x0010) != 0) {
  7951:             mmuWriteLongData (a -= 4, XEiJ.regRn[11], XEiJ.regSRS);
  7952:           }
  7953:           if ((l & 0x0020) != 0) {
  7954:             mmuWriteLongData (a -= 4, XEiJ.regRn[10], XEiJ.regSRS);
  7955:           }
  7956:           if ((l & 0x0040) != 0) {
  7957:             mmuWriteLongData (a -= 4, XEiJ.regRn[ 9], XEiJ.regSRS);
  7958:           }
  7959:           if ((byte) l < 0) {  //(l & 0x0080) != 0
  7960:             mmuWriteLongData (a -= 4, XEiJ.regRn[ 8], XEiJ.regSRS);
  7961:           }
  7962:           if ((l & 0x0100) != 0) {
  7963:             mmuWriteLongData (a -= 4, XEiJ.regRn[ 7], XEiJ.regSRS);
  7964:           }
  7965:           if ((l & 0x0200) != 0) {
  7966:             mmuWriteLongData (a -= 4, XEiJ.regRn[ 6], XEiJ.regSRS);
  7967:           }
  7968:           if ((l & 0x0400) != 0) {
  7969:             mmuWriteLongData (a -= 4, XEiJ.regRn[ 5], XEiJ.regSRS);
  7970:           }
  7971:           if ((l & 0x0800) != 0) {
  7972:             mmuWriteLongData (a -= 4, XEiJ.regRn[ 4], XEiJ.regSRS);
  7973:           }
  7974:           if ((l & 0x1000) != 0) {
  7975:             mmuWriteLongData (a -= 4, XEiJ.regRn[ 3], XEiJ.regSRS);
  7976:           }
  7977:           if ((l & 0x2000) != 0) {
  7978:             mmuWriteLongData (a -= 4, XEiJ.regRn[ 2], XEiJ.regSRS);
  7979:           }
  7980:           if ((l & 0x4000) != 0) {
  7981:             mmuWriteLongData (a -= 4, XEiJ.regRn[ 1], XEiJ.regSRS);
  7982:           }
  7983:           if ((short) l < 0) {  //(l & 0x8000) != 0
  7984:             mmuWriteLongData (a -= 4, XEiJ.regRn[ 0], XEiJ.regSRS);
  7985:           }
  7986:         } else if (XEiJ.IRP_MOVEM_LOOP) {  //16回ループする。コンパイラが展開する
  7987:           for (int i = 15; i >= 0; i--) {
  7988:             if ((l & 0x8000 >>> i) != 0) {
  7989:               mmuWriteLongData (a -= 4, XEiJ.regRn[i], XEiJ.regSRS);
  7990:             }
  7991:           }
  7992:         } else if (XEiJ.IRP_MOVEM_SHIFT_LEFT) {  //0になるまで左にシフトする
  7993:           l = XEiJ.MPU_BITREV_TABLE_0[l & 2047] | XEiJ.MPU_BITREV_TABLE_1[l << 10 >>> 21];  //Integer.reverse(l)
  7994:           for (int i = 15; l != 0; i--, l <<= 1) {
  7995:             if (l < 0) {
  7996:               mmuWriteLongData (a -= 4, XEiJ.regRn[i], XEiJ.regSRS);
  7997:             }
  7998:           }
  7999:         } else if (XEiJ.IRP_MOVEM_SHIFT_RIGHT) {  //0になるまで右にシフトする
  8000:           for (int i = 15; l != 0; i--, l >>>= 1) {
  8001:             if ((l & 1) != 0) {
  8002:               mmuWriteLongData (a -= 4, XEiJ.regRn[i], XEiJ.regSRS);
  8003:             }
  8004:           }
  8005:         } else if (XEiJ.IRP_MOVEM_ZEROS) {  //Integer.numberOfTrailingZerosを使う
  8006:           for (int i = 15; l != 0; ) {
  8007:             int k = Integer.numberOfTrailingZeros (l);
  8008:             mmuWriteLongData (a -= 4, XEiJ.regRn[i -= k], XEiJ.regSRS);
  8009:             l = l >>> k & ~1;
  8010:           }
  8011:         }
  8012:         M68kException.m6eIncremented += 4L << (arr << 3);  //元に戻しておく。longのシフトカウントは6bitでマスクされる
  8013:         XEiJ.regRn[arr] = a;
  8014:         XEiJ.mpuCycleCount += t - a >> 2;  //4バイト/個→1サイクル/個
  8015:       } else {  //-(Ar)以外
  8016:         int a = efaCltLong (ea);
  8017:         int t = a;
  8018:         if (XEiJ.IRP_MOVEM_EXPAND) {  //16回展開する
  8019:           if ((l & 0x0001) != 0) {
  8020:             mmuWriteLongData (a, XEiJ.regRn[ 0], XEiJ.regSRS);
  8021:             a += 4;
  8022:           }
  8023:           if ((l & 0x0002) != 0) {
  8024:             mmuWriteLongData (a, XEiJ.regRn[ 1], XEiJ.regSRS);
  8025:             a += 4;
  8026:           }
  8027:           if ((l & 0x0004) != 0) {
  8028:             mmuWriteLongData (a, XEiJ.regRn[ 2], XEiJ.regSRS);
  8029:             a += 4;
  8030:           }
  8031:           if ((l & 0x0008) != 0) {
  8032:             mmuWriteLongData (a, XEiJ.regRn[ 3], XEiJ.regSRS);
  8033:             a += 4;
  8034:           }
  8035:           if ((l & 0x0010) != 0) {
  8036:             mmuWriteLongData (a, XEiJ.regRn[ 4], XEiJ.regSRS);
  8037:             a += 4;
  8038:           }
  8039:           if ((l & 0x0020) != 0) {
  8040:             mmuWriteLongData (a, XEiJ.regRn[ 5], XEiJ.regSRS);
  8041:             a += 4;
  8042:           }
  8043:           if ((l & 0x0040) != 0) {
  8044:             mmuWriteLongData (a, XEiJ.regRn[ 6], XEiJ.regSRS);
  8045:             a += 4;
  8046:           }
  8047:           if ((byte) l < 0) {  //(l & 0x0080) != 0
  8048:             mmuWriteLongData (a, XEiJ.regRn[ 7], XEiJ.regSRS);
  8049:             a += 4;
  8050:           }
  8051:           if ((l & 0x0100) != 0) {
  8052:             mmuWriteLongData (a, XEiJ.regRn[ 8], XEiJ.regSRS);
  8053:             a += 4;
  8054:           }
  8055:           if ((l & 0x0200) != 0) {
  8056:             mmuWriteLongData (a, XEiJ.regRn[ 9], XEiJ.regSRS);
  8057:             a += 4;
  8058:           }
  8059:           if ((l & 0x0400) != 0) {
  8060:             mmuWriteLongData (a, XEiJ.regRn[10], XEiJ.regSRS);
  8061:             a += 4;
  8062:           }
  8063:           if ((l & 0x0800) != 0) {
  8064:             mmuWriteLongData (a, XEiJ.regRn[11], XEiJ.regSRS);
  8065:             a += 4;
  8066:           }
  8067:           if ((l & 0x1000) != 0) {
  8068:             mmuWriteLongData (a, XEiJ.regRn[12], XEiJ.regSRS);
  8069:             a += 4;
  8070:           }
  8071:           if ((l & 0x2000) != 0) {
  8072:             mmuWriteLongData (a, XEiJ.regRn[13], XEiJ.regSRS);
  8073:             a += 4;
  8074:           }
  8075:           if ((l & 0x4000) != 0) {
  8076:             mmuWriteLongData (a, XEiJ.regRn[14], XEiJ.regSRS);
  8077:             a += 4;
  8078:           }
  8079:           if ((short) l < 0) {  //(l & 0x8000) != 0
  8080:             mmuWriteLongData (a, XEiJ.regRn[15], XEiJ.regSRS);
  8081:             a += 4;
  8082:           }
  8083:         } else if (XEiJ.IRP_MOVEM_LOOP) {  //16回ループする。コンパイラが展開する
  8084:           for (int i = 0; i <= 15; i++) {
  8085:             if ((l & 0x0001 << i) != 0) {
  8086:               mmuWriteLongData (a, XEiJ.regRn[i], XEiJ.regSRS);
  8087:               a += 4;
  8088:             }
  8089:           }
  8090:         } else if (XEiJ.IRP_MOVEM_SHIFT_LEFT) {  //0になるまで左にシフトする
  8091:           l = XEiJ.MPU_BITREV_TABLE_0[l & 2047] | XEiJ.MPU_BITREV_TABLE_1[l << 10 >>> 21];  //Integer.reverse(l)
  8092:           for (int i = 0; l != 0; i++, l <<= 1) {
  8093:             if (l < 0) {
  8094:               mmuWriteLongData (a, XEiJ.regRn[i], XEiJ.regSRS);
  8095:               a += 4;
  8096:             }
  8097:           }
  8098:         } else if (XEiJ.IRP_MOVEM_SHIFT_RIGHT) {  //0になるまで右にシフトする
  8099:           for (int i = 0; l != 0; i++, l >>>= 1) {
  8100:             if ((l & 1) != 0) {
  8101:               mmuWriteLongData (a, XEiJ.regRn[i], XEiJ.regSRS);
  8102:               a += 4;
  8103:             }
  8104:           }
  8105:         } else if (XEiJ.IRP_MOVEM_ZEROS) {  //Integer.numberOfTrailingZerosを使う
  8106:           for (int i = 0; l != 0; ) {
  8107:             int k = Integer.numberOfTrailingZeros (l);
  8108:             mmuWriteLongData (a, XEiJ.regRn[i += k], XEiJ.regSRS);
  8109:             a += 4;
  8110:             l = l >>> k & ~1;
  8111:           }
  8112:         }
  8113:         XEiJ.mpuCycleCount += a - t >> 2;  //4バイト/個→1サイクル/個
  8114:       }
  8115:     }
  8116:   }  //irpMovemToMemLong
  8117: 
  8118:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  8119:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  8120:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  8121:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  8122:   //TST.B <ea>                                      |-|012346|-|-UUUU|-**00|D M+-WXZ  |0100_101_000_mmm_rrr
  8123:   //TST.B <ea>                                      |-|--2346|-|-UUUU|-**00|        PI|0100_101_000_mmm_rrr
  8124:   public static void irpTstByte () throws M68kException {
  8125:     XEiJ.mpuCycleCount++;
  8126:     int ea = XEiJ.regOC & 63;
  8127:     XEiJ.regCCR = XEiJ.regCCR & XEiJ.REG_CCR_X | XEiJ.MPU_TSTB_TABLE[255 & (ea < XEiJ.EA_AR ? XEiJ.regRn[ea] : ea == XEiJ.EA_IM ? mmuReadByteSignExword ((XEiJ.regPC += 2) - 1, XEiJ.regSRS) : mmuReadByteSignData (efaAnyByte (ea), XEiJ.regSRS))];  //ccr_tst_byte。pcbs。イミディエイトを分離。アドレッシングモードに注意
  8128:   }  //irpTstByte
  8129: 
  8130:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  8131:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  8132:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  8133:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  8134:   //TST.W <ea>                                      |-|012346|-|-UUUU|-**00|D M+-WXZ  |0100_101_001_mmm_rrr
  8135:   //TST.W <ea>                                      |-|--2346|-|-UUUU|-**00| A      PI|0100_101_001_mmm_rrr
  8136:   public static void irpTstWord () throws M68kException {
  8137:     XEiJ.mpuCycleCount++;
  8138:     int ea = XEiJ.regOC & 63;
  8139:     int z = ea < XEiJ.EA_MM ? XEiJ.regRn[ea] : ea == XEiJ.EA_IM ? mmuReadWordSignExword ((XEiJ.regPC += 2) - 2, XEiJ.regSRS) : mmuReadWordSignData (efaAnyWord (ea), XEiJ.regSRS);  //pcws。イミディエイトを分離。アドレッシングモードに注意。このr[ea]はデータレジスタまたはアドレスレジスタ
  8140:     XEiJ.regCCR = XEiJ.regCCR & XEiJ.REG_CCR_X | (char) z - 1 >> 31 & XEiJ.REG_CCR_Z | ((short) z < 0 ? XEiJ.REG_CCR_N : 0);  //ccr_tst_word
  8141:   }  //irpTstWord
  8142: 
  8143:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  8144:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  8145:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  8146:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  8147:   //TST.L <ea>                                      |-|012346|-|-UUUU|-**00|D M+-WXZ  |0100_101_010_mmm_rrr
  8148:   //TST.L <ea>                                      |-|--2346|-|-UUUU|-**00| A      PI|0100_101_010_mmm_rrr
  8149:   public static void irpTstLong () throws M68kException {
  8150:     XEiJ.mpuCycleCount++;
  8151:     int ea = XEiJ.regOC & 63;
  8152:     int z = ea < XEiJ.EA_MM ? XEiJ.regRn[ea] : ea == XEiJ.EA_IM ? mmuReadLongExword ((XEiJ.regPC += 4) - 4, XEiJ.regSRS) : mmuReadLongData (efaAnyLong (ea), XEiJ.regSRS);  //pcls。イミディエイトを分離。アドレッシングモードに注意。このr[ea]はデータレジスタまたはアドレスレジスタ
  8153:     XEiJ.regCCR = z >> 28 & XEiJ.REG_CCR_N | (z == 0 ? XEiJ.regCCR & XEiJ.REG_CCR_X | XEiJ.REG_CCR_Z : XEiJ.regCCR & XEiJ.REG_CCR_X);  //ccr_tst
  8154:   }  //irpTstLong
  8155: 
  8156:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  8157:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  8158:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  8159:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  8160:   //TAS.B <ea>                                      |-|012346|-|-UUUU|-**00|D M+-WXZ  |0100_101_011_mmm_rrr
  8161:   //ILLEGAL                                         |-|012346|-|-----|-----|          |0100_101_011_111_100
  8162:   public static void irpTas () throws M68kException {
  8163:     int ea = XEiJ.regOC & 63;
  8164:     int z;
  8165:     if (ea < XEiJ.EA_AR) {  //TAS.B Dr
  8166:       XEiJ.mpuCycleCount++;
  8167:       XEiJ.regRn[ea] = 0x80 | (z = XEiJ.regRn[ea]);
  8168:     } else {  //TAS.B <mem>
  8169:       XEiJ.mpuCycleCount += 17;
  8170:       int a = efaMltByte (ea);
  8171:       mmuWriteByteData (a, 0x80 | (z = mmuModifyByteSignData (a, XEiJ.regSRS)), XEiJ.regSRS);
  8172:     }
  8173:     XEiJ.regCCR = XEiJ.regCCR & XEiJ.REG_CCR_X | XEiJ.MPU_TSTB_TABLE[255 & z];  //ccr_tst_byte
  8174:   }  //irpTas
  8175: 
  8176:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  8177:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  8178:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  8179:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  8180:   //MULU.L <ea>,Dl                                  |-|--2346|-|-UUUU|-***0|D M+-WXZPI|0100_110_000_mmm_rrr-0lll000000000hhh        (h is not used)
  8181:   //MULU.L <ea>,Dh:Dl                               |-|--234S|-|-UUUU|-***0|D M+-WXZPI|0100_110_000_mmm_rrr-0lll010000000hhh        (if h=l then result is not defined)
  8182:   //MULS.L <ea>,Dl                                  |-|--2346|-|-UUUU|-***0|D M+-WXZPI|0100_110_000_mmm_rrr-0lll100000000hhh        (h is not used)
  8183:   //MULS.L <ea>,Dh:Dl                               |-|--234S|-|-UUUU|-***0|D M+-WXZPI|0100_110_000_mmm_rrr-0lll110000000hhh        (if h=l then result is not defined)
  8184:   public static void irpMuluMulsLong () throws M68kException {
  8185:     int w = mmuReadWordZeroExword ((XEiJ.regPC += 2) - 2, XEiJ.regSRS);  //pcwz。拡張ワード
  8186:     if ((w & ~0b0111_110_000_000_111) != 0) {
  8187:       M68kException.m6eNumber = M68kException.M6E_ILLEGAL_INSTRUCTION;
  8188:       throw M68kException.m6eSignal;
  8189:     }
  8190:     if ((w & 0b0000_010_000_000_000) != 0) {  //64bit積
  8191:       M68kException.m6eNumber = M68kException.M6E_UNIMPLEMENTED_INSTRUCTION;
  8192:       throw M68kException.m6eSignal;
  8193:     }
  8194:     //32bit積
  8195:     int s = w & 0b0000_100_000_000_000;  //0=MULU,1=MULS
  8196:     int l = w >> 12;  //被乗数,積
  8197:     XEiJ.mpuCycleCount += 2;
  8198:     int ea = XEiJ.regOC & 63;
  8199:     long yy = (long) (ea < XEiJ.EA_AR ? XEiJ.regRn[ea] : ea == XEiJ.EA_IM ? mmuReadLongExword ((XEiJ.regPC += 4) - 4, XEiJ.regSRS) : mmuReadLongData (efaAnyLong (ea), XEiJ.regSRS));  //pcls。イミディエイトを分離
  8200:     long xx = (long) XEiJ.regRn[l];
  8201:     if (s == 0) {  //MULU
  8202:       long zz = (0xffffffffL & xx) * (0xffffffffL & yy);
  8203:       int z = XEiJ.regRn[l] = (int) zz;
  8204:       XEiJ.regCCR = z >> 28 & XEiJ.REG_CCR_N | (z == 0 ? XEiJ.regCCR & XEiJ.REG_CCR_X | XEiJ.REG_CCR_Z : XEiJ.regCCR & XEiJ.REG_CCR_X) | (zz >>> 32 != 0L ? XEiJ.REG_CCR_V : 0);
  8205:     } else {  //MULS
  8206:       long zz = xx * yy;
  8207:       int z = XEiJ.regRn[l] = (int) zz;
  8208:       XEiJ.regCCR = z >> 28 & XEiJ.REG_CCR_N | (z == 0 ? XEiJ.regCCR & XEiJ.REG_CCR_X | XEiJ.REG_CCR_Z : XEiJ.regCCR & XEiJ.REG_CCR_X) | (z != zz ? XEiJ.REG_CCR_V : 0);
  8209:     }
  8210:   }  //irpMuluMulsLong
  8211: 
  8212:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  8213:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  8214:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  8215:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  8216:   //DIVU.L <ea>,Dq                                  |-|--2346|-|-UUUU|-***0|D M+-WXZPI|0100_110_001_mmm_rrr-0qqq000000000qqq
  8217:   //DIVUL.L <ea>,Dr:Dq                              |-|--2346|-|-UUUU|-***0|D M+-WXZPI|0100_110_001_mmm_rrr-0qqq000000000rrr        (q is not equal to r)
  8218:   //DIVU.L <ea>,Dr:Dq                               |-|--234S|-|-UUUU|-***0|D M+-WXZPI|0100_110_001_mmm_rrr-0qqq010000000rrr        (q is not equal to r)
  8219:   //DIVS.L <ea>,Dq                                  |-|--2346|-|-UUUU|-***0|D M+-WXZPI|0100_110_001_mmm_rrr-0qqq100000000qqq
  8220:   //DIVSL.L <ea>,Dr:Dq                              |-|--2346|-|-UUUU|-***0|D M+-WXZPI|0100_110_001_mmm_rrr-0qqq100000000rrr        (q is not equal to r)
  8221:   //DIVS.L <ea>,Dr:Dq                               |-|--234S|-|-UUUU|-***0|D M+-WXZPI|0100_110_001_mmm_rrr-0qqq110000000rrr        (q is not equal to r)
  8222:   //
  8223:   //DIVS.L <ea>,Dq
  8224:   //  32bit被除数Dq/32bit除数<ea>→32bit商Dq
  8225:   //
  8226:   //DIVS.L <ea>,Dr:Dq
  8227:   //  64bit被除数Dr:Dq/32bit除数<ea>→32bit余りDr:32bit商Dq
  8228:   //  M68000PRMでDIVS.Lのアドレッシングモードがデータ可変と書かれているのはデータの間違い
  8229:   //
  8230:   //DIVSL.L <ea>,Dr:Dq
  8231:   //  32bit被除数Dq/32bit除数<ea>→32bit余りDr:32bit商Dq
  8232:   //
  8233:   //DIVU.L <ea>,Dq
  8234:   //  32bit被除数Dq/32bit除数<ea>→32bit商Dq
  8235:   //
  8236:   //DIVU.L <ea>,Dr:Dq
  8237:   //  64bit被除数Dr:Dq/32bit除数<ea>→32bit余りDr:32bit商Dq
  8238:   //
  8239:   //DIVUL.L <ea>,Dr:Dq
  8240:   //  32bit被除数Dq/32bit除数<ea>→32bit余りDr:32bit商Dq
  8241:   public static void irpDivuDivsLong () throws M68kException {
  8242:     int w = mmuReadWordZeroExword ((XEiJ.regPC += 2) - 2, XEiJ.regSRS);  //pcwz。拡張ワード
  8243:     if ((w & ~0b0111_110_000_000_111) != 0) {
  8244:       M68kException.m6eNumber = M68kException.M6E_ILLEGAL_INSTRUCTION;
  8245:       throw M68kException.m6eSignal;
  8246:     }
  8247:     if ((w & 0b0000_010_000_000_000) != 0) {  //64bit被除数
  8248:       M68kException.m6eNumber = M68kException.M6E_UNIMPLEMENTED_INSTRUCTION;
  8249:       throw M68kException.m6eSignal;
  8250:     }
  8251:     //32bit被除数
  8252:     int s = w & 0b0000_100_000_000_000;  //0=DIVU,1=DIVS
  8253:     int h = w & 7;  //余り
  8254:     int l = w >> 12;  //被除数,商
  8255:     int ea = XEiJ.regOC & 63;
  8256:     int y = ea < XEiJ.EA_AR ? XEiJ.regRn[ea] : ea == XEiJ.EA_IM ? mmuReadLongExword ((XEiJ.regPC += 4) - 4, XEiJ.regSRS) : mmuReadLongData (efaAnyLong (ea), XEiJ.regSRS);  //除数。pcls。イミディエイトを分離
  8257:     if (s == 0) {  //符号なし。DIVU.L <ea>,*
  8258:       XEiJ.mpuCycleCount += 38;  //最大
  8259:       long yy = (long) y & 0xffffffffL;  //除数
  8260:       if (y == 0) {  //ゼロ除算
  8261:         XEiJ.regCCR = (XEiJ.regCCR & (XEiJ.REG_CCR_X | XEiJ.REG_CCR_N | XEiJ.REG_CCR_Z | XEiJ.REG_CCR_V)  //XとNとZとVは変化しない
  8262:                        );  //Cは常にクリア
  8263:         XEiJ.mpuCycleCount += 38 - 34;
  8264:         M68kException.m6eAddress = XEiJ.regPC0;  //アドレスは命令の先頭
  8265:         M68kException.m6eNumber = M68kException.M6E_DIVIDE_BY_ZERO;
  8266:         throw M68kException.m6eSignal;
  8267:       }  //if ゼロ除算
  8268:       long xx = (long) XEiJ.regRn[l] & 0xffffffffL;  //被除数
  8269:       long zz = (long) ((double) xx / (double) yy);  //double→intのキャストは飽和変換で0xffffffff/0x00000001が0x7fffffffになってしまうのでdouble→longとする
  8270:       int z = XEiJ.regRn[l] = (int) zz;  //商
  8271:       if (h != l) {
  8272:         XEiJ.regRn[h] = (int) (xx - yy * zz);  //余り
  8273:       }
  8274:       XEiJ.regCCR = (XEiJ.regCCR & XEiJ.REG_CCR_X |  //Xは変化しない
  8275:                      (z < 0 ? XEiJ.REG_CCR_N : 0) |  //Nは商が負のときセット、さもなくばクリア
  8276:                      (z == 0 ? XEiJ.REG_CCR_Z : 0)  //Zは商が0のときセット、さもなくばクリア
  8277:                      );  //VとCは常にクリア
  8278:     } else {  //符号あり。DIVS.L <ea>,*
  8279:       XEiJ.mpuCycleCount += 38;  //最大
  8280:       long yy = (long) y;  //除数
  8281:       if (y == 0) {  //ゼロ除算
  8282:         XEiJ.regCCR = (XEiJ.regCCR & (XEiJ.REG_CCR_X | XEiJ.REG_CCR_N | XEiJ.REG_CCR_Z | XEiJ.REG_CCR_V)  //XとNとZとVは変化しない
  8283:                        );  //Cは常にクリア
  8284:         XEiJ.mpuCycleCount += 38 - 34;
  8285:         M68kException.m6eAddress = XEiJ.regPC0;  //アドレスは命令の先頭
  8286:         M68kException.m6eNumber = M68kException.M6E_DIVIDE_BY_ZERO;
  8287:         throw M68kException.m6eSignal;
  8288:       }  //if ゼロ除算
  8289:       long xx = (long) XEiJ.regRn[l];  //被除数
  8290:       long zz = xx / yy;  //商
  8291:       if ((int) zz != zz) {  //オーバーフローあり
  8292:         //Dqは変化しない
  8293:         XEiJ.regCCR = (XEiJ.regCCR & (XEiJ.REG_CCR_X | XEiJ.REG_CCR_N | XEiJ.REG_CCR_Z) |  //XとNとZは変化しない
  8294:                        XEiJ.REG_CCR_V  //Vは常にセット
  8295:                        );  //Cは常にクリア
  8296:       } else {  //オーバーフローなし
  8297:         int z = XEiJ.regRn[l] = (int) zz;  //商
  8298:         if (h != l) {  //DIVSL.L <ea>,Dr:Dq
  8299:           XEiJ.regRn[h] = (int) (xx - yy * zz);  //余り
  8300:         }
  8301:         XEiJ.regCCR = (XEiJ.regCCR & XEiJ.REG_CCR_X |  //Xは変化しない
  8302:                        (z < 0 ? XEiJ.REG_CCR_N : 0) |  //Nは商が負のときセット、さもなくばクリア
  8303:                        (z == 0 ? XEiJ.REG_CCR_Z : 0)  //Zは商が0のときセット、さもなくばクリア
  8304:                        );  //VとCは常にクリア
  8305:       }  //if オーバーフローあり/オーバーフローなし
  8306:     }  //if 符号なし/符号あり
  8307:   }  //irpDivuDivsLong
  8308: 
  8309:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  8310:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  8311:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  8312:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  8313:   //SATS.L Dr                                       |-|------|-|-UUUU|-**00|D         |0100_110_010_000_rrr (ISA_B)
  8314:   //MOVEM.W <ea>,<list>                             |-|012346|-|-----|-----|  M+ WXZP |0100_110_010_mmm_rrr-llllllllllllllll
  8315:   //
  8316:   //SATS.L Dr
  8317:   //  VがセットされていたらDrを符号が逆で絶対値が最大の値にする(直前のDrに対する演算を飽和演算にする)
  8318:   public static void irpMovemToRegWord () throws M68kException {
  8319:     int ea = XEiJ.regOC & 63;
  8320:     if (ea < XEiJ.EA_AR) {  //SATS.L Dr
  8321:       XEiJ.mpuCycleCount++;
  8322:       int z = XEiJ.regRn[ea];
  8323:       if (XEiJ.TEST_BIT_1_SHIFT ? XEiJ.regCCR << 31 - 1 < 0 : (XEiJ.regCCR & XEiJ.REG_CCR_V) != 0) {  //Vがセットされているとき
  8324:         XEiJ.regRn[ea] = z = z >> 31 ^ 0x80000000;  //符号が逆で絶対値が最大の値にする
  8325:       }
  8326:       XEiJ.regCCR = z >> 28 & XEiJ.REG_CCR_N | (z == 0 ? XEiJ.regCCR & XEiJ.REG_CCR_X | XEiJ.REG_CCR_Z : XEiJ.regCCR & XEiJ.REG_CCR_X);  //ccr_tst
  8327:     } else {  //MOVEM.W <ea>,<list>
  8328:       int l = mmuReadWordZeroExword (XEiJ.regPC, XEiJ.regSRS);  //pcwze。レジスタリスト。ゼロ拡張
  8329:       XEiJ.regPC += 2;
  8330:       int arr, a;
  8331:       if (ea >> 3 == XEiJ.MMM_MP) {  //(Ar)+
  8332:         arr = ea - (XEiJ.EA_MP - 8);
  8333:         a = XEiJ.regRn[arr];
  8334:       } else {  //(Ar)+以外
  8335:         arr = 16;
  8336:         a = efaCntWord (ea);
  8337:       }
  8338:       int t = a;
  8339:       if (XEiJ.IRP_MOVEM_EXPAND) {  //16回展開する
  8340:         if ((l & 0x0001) != 0) {
  8341:           XEiJ.regRn[ 0] = mmuReadWordSignData (a, XEiJ.regSRS);  //データレジスタも符号拡張して32bit全部書き換える
  8342:           a += 2;
  8343:         }
  8344:         if ((l & 0x0002) != 0) {
  8345:           XEiJ.regRn[ 1] = mmuReadWordSignData (a, XEiJ.regSRS);  //データレジスタも符号拡張して32bit全部書き換える
  8346:           a += 2;
  8347:         }
  8348:         if ((l & 0x0004) != 0) {
  8349:           XEiJ.regRn[ 2] = mmuReadWordSignData (a, XEiJ.regSRS);  //データレジスタも符号拡張して32bit全部書き換える
  8350:           a += 2;
  8351:         }
  8352:         if ((l & 0x0008) != 0) {
  8353:           XEiJ.regRn[ 3] = mmuReadWordSignData (a, XEiJ.regSRS);  //データレジスタも符号拡張して32bit全部書き換える
  8354:           a += 2;
  8355:         }
  8356:         if ((l & 0x0010) != 0) {
  8357:           XEiJ.regRn[ 4] = mmuReadWordSignData (a, XEiJ.regSRS);  //データレジスタも符号拡張して32bit全部書き換える
  8358:           a += 2;
  8359:         }
  8360:         if ((l & 0x0020) != 0) {
  8361:           XEiJ.regRn[ 5] = mmuReadWordSignData (a, XEiJ.regSRS);  //データレジスタも符号拡張して32bit全部書き換える
  8362:           a += 2;
  8363:         }
  8364:         if ((l & 0x0040) != 0) {
  8365:           XEiJ.regRn[ 6] = mmuReadWordSignData (a, XEiJ.regSRS);  //データレジスタも符号拡張して32bit全部書き換える
  8366:           a += 2;
  8367:         }
  8368:         if ((byte) l < 0) {  //(l & 0x0080) != 0
  8369:           XEiJ.regRn[ 7] = mmuReadWordSignData (a, XEiJ.regSRS);  //データレジスタも符号拡張して32bit全部書き換える
  8370:           a += 2;
  8371:         }
  8372:         if ((l & 0x0100) != 0) {
  8373:           XEiJ.regRn[ 8] = mmuReadWordSignData (a, XEiJ.regSRS);  //符号拡張して32bit全部書き換える
  8374:           a += 2;
  8375:         }
  8376:         if ((l & 0x0200) != 0) {
  8377:           XEiJ.regRn[ 9] = mmuReadWordSignData (a, XEiJ.regSRS);  //符号拡張して32bit全部書き換える
  8378:           a += 2;
  8379:         }
  8380:         if ((l & 0x0400) != 0) {
  8381:           XEiJ.regRn[10] = mmuReadWordSignData (a, XEiJ.regSRS);  //符号拡張して32bit全部書き換える
  8382:           a += 2;
  8383:         }
  8384:         if ((l & 0x0800) != 0) {
  8385:           XEiJ.regRn[11] = mmuReadWordSignData (a, XEiJ.regSRS);  //符号拡張して32bit全部書き換える
  8386:           a += 2;
  8387:         }
  8388:         if ((l & 0x1000) != 0) {
  8389:           XEiJ.regRn[12] = mmuReadWordSignData (a, XEiJ.regSRS);  //符号拡張して32bit全部書き換える
  8390:           a += 2;
  8391:         }
  8392:         if ((l & 0x2000) != 0) {
  8393:           XEiJ.regRn[13] = mmuReadWordSignData (a, XEiJ.regSRS);  //符号拡張して32bit全部書き換える
  8394:           a += 2;
  8395:         }
  8396:         if ((l & 0x4000) != 0) {
  8397:           XEiJ.regRn[14] = mmuReadWordSignData (a, XEiJ.regSRS);  //符号拡張して32bit全部書き換える
  8398:           a += 2;
  8399:         }
  8400:         if ((short) l < 0) {  //(l & 0x8000) != 0
  8401:           XEiJ.regRn[15] = mmuReadWordSignData (a, XEiJ.regSRS);  //符号拡張して32bit全部書き換える
  8402:           a += 2;
  8403:         }
  8404:       } else if (XEiJ.IRP_MOVEM_LOOP) {  //16回ループする。コンパイラが展開する
  8405:         for (int i = 0; i <= 15; i++) {
  8406:           if ((l & 0x0001 << i) != 0) {
  8407:             XEiJ.regRn[i] = mmuReadWordSignData (a, XEiJ.regSRS);  //(データレジスタも)符号拡張して32bit全部書き換える
  8408:             a += 2;
  8409:           }
  8410:         }
  8411:       } else if (XEiJ.IRP_MOVEM_SHIFT_LEFT) {  //0になるまで左にシフトする
  8412:         l = XEiJ.MPU_BITREV_TABLE_0[l & 2047] | XEiJ.MPU_BITREV_TABLE_1[l << 10 >>> 21];  //Integer.reverse(l)
  8413:         for (int i = 0; l != 0; i++, l <<= 1) {
  8414:           if (l < 0) {
  8415:             XEiJ.regRn[i] = mmuReadWordSignData (a, XEiJ.regSRS);  //(データレジスタも)符号拡張して32bit全部書き換える
  8416:             a += 2;
  8417:           }
  8418:         }
  8419:       } else if (XEiJ.IRP_MOVEM_SHIFT_RIGHT) {  //0になるまで右にシフトする
  8420:         for (int i = 0; l != 0; i++, l >>>= 1) {
  8421:           if ((l & 1) != 0) {
  8422:             XEiJ.regRn[i] = mmuReadWordSignData (a, XEiJ.regSRS);  //(データレジスタも)符号拡張して32bit全部書き換える
  8423:             a += 2;
  8424:           }
  8425:         }
  8426:       } else if (XEiJ.IRP_MOVEM_ZEROS) {  //Integer.numberOfTrailingZerosを使う
  8427:         for (int i = 0; l != 0; ) {
  8428:           int k = Integer.numberOfTrailingZeros (l);
  8429:           XEiJ.regRn[i += k] = mmuReadWordSignData (a, XEiJ.regSRS);  //(データレジスタも)符号拡張して32bit全部書き換える
  8430:           a += 2;
  8431:           l = l >>> k & ~1;
  8432:         }
  8433:       }
  8434:       //MOVEM.W (Ar)+,<list>で<list>にArが含まれているとき、メモリから読み出したデータを捨ててArをインクリメントする
  8435:       XEiJ.regRn[arr] = a;
  8436:       XEiJ.mpuCycleCount += a - t >> 1;  //2バイト/個→1サイクル/個
  8437:     }
  8438:   }  //irpMovemToRegWord
  8439: 
  8440:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  8441:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  8442:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  8443:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  8444:   //MOVEM.L <ea>,<list>                             |-|012346|-|-----|-----|  M+ WXZP |0100_110_011_mmm_rrr-llllllllllllllll
  8445:   public static void irpMovemToRegLong () throws M68kException {
  8446:     int ea = XEiJ.regOC & 63;
  8447:     {
  8448:       int l = mmuReadWordZeroExword (XEiJ.regPC, XEiJ.regSRS);  //pcwze。レジスタリスト。ゼロ拡張
  8449:       XEiJ.regPC += 2;
  8450:       int arr, a;
  8451:       if (ea >> 3 == XEiJ.MMM_MP) {  //(Ar)+
  8452:         arr = ea - (XEiJ.EA_MP - 8);
  8453:         a = XEiJ.regRn[arr];
  8454:       } else {  //(Ar)+以外
  8455:         arr = 16;
  8456:         a = efaCntLong (ea);
  8457:       }
  8458:       int t = a;
  8459:       if (XEiJ.IRP_MOVEM_EXPAND) {  //16回展開する
  8460:         if ((l & 0x0001) != 0) {
  8461:           XEiJ.regRn[ 0] = mmuReadLongData (a, XEiJ.regSRS);
  8462:           a += 4;
  8463:         }
  8464:         if ((l & 0x0002) != 0) {
  8465:           XEiJ.regRn[ 1] = mmuReadLongData (a, XEiJ.regSRS);
  8466:           a += 4;
  8467:         }
  8468:         if ((l & 0x0004) != 0) {
  8469:           XEiJ.regRn[ 2] = mmuReadLongData (a, XEiJ.regSRS);
  8470:           a += 4;
  8471:         }
  8472:         if ((l & 0x0008) != 0) {
  8473:           XEiJ.regRn[ 3] = mmuReadLongData (a, XEiJ.regSRS);
  8474:           a += 4;
  8475:         }
  8476:         if ((l & 0x0010) != 0) {
  8477:           XEiJ.regRn[ 4] = mmuReadLongData (a, XEiJ.regSRS);
  8478:           a += 4;
  8479:         }
  8480:         if ((l & 0x0020) != 0) {
  8481:           XEiJ.regRn[ 5] = mmuReadLongData (a, XEiJ.regSRS);
  8482:           a += 4;
  8483:         }
  8484:         if ((l & 0x0040) != 0) {
  8485:           XEiJ.regRn[ 6] = mmuReadLongData (a, XEiJ.regSRS);
  8486:           a += 4;
  8487:         }
  8488:         if ((byte) l < 0) {  //(l & 0x0080) != 0
  8489:           XEiJ.regRn[ 7] = mmuReadLongData (a, XEiJ.regSRS);
  8490:           a += 4;
  8491:         }
  8492:         if ((l & 0x0100) != 0) {
  8493:           XEiJ.regRn[ 8] = mmuReadLongData (a, XEiJ.regSRS);
  8494:           a += 4;
  8495:         }
  8496:         if ((l & 0x0200) != 0) {
  8497:           XEiJ.regRn[ 9] = mmuReadLongData (a, XEiJ.regSRS);
  8498:           a += 4;
  8499:         }
  8500:         if ((l & 0x0400) != 0) {
  8501:           XEiJ.regRn[10] = mmuReadLongData (a, XEiJ.regSRS);
  8502:           a += 4;
  8503:         }
  8504:         if ((l & 0x0800) != 0) {
  8505:           XEiJ.regRn[11] = mmuReadLongData (a, XEiJ.regSRS);
  8506:           a += 4;
  8507:         }
  8508:         if ((l & 0x1000) != 0) {
  8509:           XEiJ.regRn[12] = mmuReadLongData (a, XEiJ.regSRS);
  8510:           a += 4;
  8511:         }
  8512:         if ((l & 0x2000) != 0) {
  8513:           XEiJ.regRn[13] = mmuReadLongData (a, XEiJ.regSRS);
  8514:           a += 4;
  8515:         }
  8516:         if ((l & 0x4000) != 0) {
  8517:           XEiJ.regRn[14] = mmuReadLongData (a, XEiJ.regSRS);
  8518:           a += 4;
  8519:         }
  8520:         if ((short) l < 0) {  //(l & 0x8000) != 0
  8521:           XEiJ.regRn[15] = mmuReadLongData (a, XEiJ.regSRS);
  8522:           a += 4;
  8523:         }
  8524:       } else if (XEiJ.IRP_MOVEM_LOOP) {  //16回ループする。コンパイラが展開する
  8525:         for (int i = 0; i <= 15; i++) {
  8526:           if ((l & 0x0001 << i) != 0) {
  8527:             XEiJ.regRn[i] = mmuReadLongData (a, XEiJ.regSRS);
  8528:             a += 4;
  8529:           }
  8530:         }
  8531:       } else if (XEiJ.IRP_MOVEM_SHIFT_LEFT) {  //0になるまで左にシフトする
  8532:         l = XEiJ.MPU_BITREV_TABLE_0[l & 2047] | XEiJ.MPU_BITREV_TABLE_1[l << 10 >>> 21];  //Integer.reverse(l)
  8533:         for (int i = 0; l != 0; i++, l <<= 1) {
  8534:           if (l < 0) {
  8535:             XEiJ.regRn[i] = mmuReadLongData (a, XEiJ.regSRS);
  8536:             a += 4;
  8537:           }
  8538:         }
  8539:       } else if (XEiJ.IRP_MOVEM_SHIFT_RIGHT) {  //0になるまで右にシフトする
  8540:         for (int i = 0; l != 0; i++, l >>>= 1) {
  8541:           if ((l & 1) != 0) {
  8542:             XEiJ.regRn[i] = mmuReadLongData (a, XEiJ.regSRS);
  8543:             a += 4;
  8544:           }
  8545:         }
  8546:       } else if (XEiJ.IRP_MOVEM_ZEROS) {  //Integer.numberOfTrailingZerosを使う
  8547:         for (int i = 0; l != 0; ) {
  8548:           int k = Integer.numberOfTrailingZeros (l);
  8549:           XEiJ.regRn[i += k] = mmuReadLongData (a, XEiJ.regSRS);
  8550:           a += 4;
  8551:           l = l >>> k & ~1;
  8552:         }
  8553:       }
  8554:       //MOVEM.L (Ar)+,<list>で<list>にArが含まれているとき、メモリから読み出したデータを捨ててArをインクリメントする
  8555:       XEiJ.regRn[arr] = a;
  8556:       XEiJ.mpuCycleCount += a - t >> 2;  //4バイト/個→1サイクル/個
  8557:     }
  8558:   }  //irpMovemToRegLong
  8559: 
  8560:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  8561:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  8562:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  8563:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  8564:   //TRAP #<vector>                                  |-|012346|-|-----|-----|          |0100_111_001_00v_vvv
  8565:   public static void irpTrap () throws M68kException {
  8566:     irpExceptionFormat0 (XEiJ.regOC - (0b0100_111_001_000_000 - M68kException.M6E_TRAP_0_INSTRUCTION_VECTOR) << 2, XEiJ.regPC);  //pcは次の命令
  8567:   }  //irpTrap
  8568:   public static void irpTrap15 () throws M68kException {
  8569:     if ((XEiJ.regRn[0] & 255) == 0x8e) {  //IOCS _BOOTINF
  8570:       MainMemory.mmrCheckHuman ();
  8571:     }
  8572:     irpExceptionFormat0 (M68kException.M6E_TRAP_15_INSTRUCTION_VECTOR << 2, XEiJ.regPC);  //pcは次の命令
  8573:   }  //irpTrap15
  8574: 
  8575:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  8576:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  8577:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  8578:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  8579:   //LINK.W Ar,#<data>                               |-|012346|-|-----|-----|          |0100_111_001_010_rrr-{data}
  8580:   //
  8581:   //LINK.W Ar,#<data>
  8582:   //  PEA.L (Ar);MOVEA.L A7,Ar;ADDA.W #<data>,A7と同じ
  8583:   //  LINK.W A7,#<data>はA7をデクリメントする前の値がプッシュされ、A7に#<data>が加算される
  8584:   public static void irpLinkWord () throws M68kException {
  8585:     XEiJ.mpuCycleCount++;
  8586:     int o = mmuReadWordSignExword ((XEiJ.regPC += 2) - 2, XEiJ.regSRS);  //pcws
  8587:     int arr = XEiJ.regOC - (0b0100_111_001_010_000 - 8);
  8588:     //評価順序に注意。LINK.W A7,#<data>のときプッシュするのはA7をデクリメントする前の値。wl(r[15]-=4,r[8+rrr])は不可
  8589:     int a = XEiJ.regRn[arr];
  8590:     M68kException.m6eIncremented -= 4L << (7 << 3);
  8591:     int sp = XEiJ.regRn[15] -= 4;
  8592:     mmuWriteLongData (sp, a, XEiJ.regSRS);  //pushl
  8593:     XEiJ.regRn[arr] = sp;
  8594:     XEiJ.regRn[15] = sp + o;
  8595:   }  //irpLinkWord
  8596: 
  8597:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  8598:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  8599:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  8600:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  8601:   //UNLK Ar                                         |-|012346|-|-----|-----|          |0100_111_001_011_rrr
  8602:   //
  8603:   //UNLK Ar
  8604:   //  MOVEA.L Ar,A7;MOVEA.L (A7)+,Arと同じ
  8605:   //  UNLK A7はMOVEA.L A7,A7;MOVEA.L (A7)+,A7すなわちMOVEA.L (A7),A7と同じ
  8606:   //  ソースオペランドのポストインクリメントはデスティネーションオペランドが評価される前に完了しているとみなされる
  8607:   //    例えばMOVE.L (A0)+,(A0)+はMOVE.L (A0),(4,A0);ADDQ.L #8,A0と同じ
  8608:   //    MOVEA.L (A0)+,A0はポストインクリメントされたA0が(A0)から読み出された値で上書きされるのでMOVEA.L (A0),A0と同じ
  8609:   //  M68000PRMにUNLK Anの動作はAn→SP;(SP)→An;SP+4→SPだと書かれているがこれはn=7の場合に当てはまらない
  8610:   //  余談だが68040の初期のマスクセットはUNLK A7を実行すると固まるらしい
  8611:   public static void irpUnlk () throws M68kException {
  8612:     XEiJ.mpuCycleCount += 2;
  8613:     int arr = XEiJ.regOC - (0b0100_111_001_011_000 - 8);
  8614:     //評価順序に注意
  8615:     int sp = XEiJ.regRn[arr];
  8616:     //  UNLK ArはMOVEA.L Ar,A7;MOVEA.L (A7)+,Arと同じ
  8617:     //  (A7)+がページフォルトになってリトライするとき
  8618:     //    Arはまだ更新されておらず、リトライでMOVEA.L Ar,A7が再実行されるので、A7を巻き戻す必要はない
  8619:     M68kException.m6eIncremented += 4L << (7 << 3);  //UNLK A7でページフォルトが発生したときA7が増えすぎないようにする
  8620:     XEiJ.regRn[15] = sp + 4;
  8621:     XEiJ.regRn[arr] = mmuReadLongData (sp, XEiJ.regSRS);  //popls
  8622:   }  //irpUnlk
  8623: 
  8624:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  8625:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  8626:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  8627:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  8628:   //MOVE.L Ar,USP                                   |-|012346|P|-----|-----|          |0100_111_001_100_rrr
  8629:   public static void irpMoveToUsp () throws M68kException {
  8630:     if (XEiJ.regSRS == 0) {  //ユーザモードのとき
  8631:       M68kException.m6eNumber = M68kException.M6E_PRIVILEGE_VIOLATION;
  8632:       throw M68kException.m6eSignal;
  8633:     }
  8634:     //以下はスーパーバイザモード
  8635:     XEiJ.mpuCycleCount += 2;
  8636:     XEiJ.mpuUSP = XEiJ.regRn[XEiJ.regOC - (0b0100_111_001_100_000 - 8)];
  8637:   }  //irpMoveToUsp
  8638: 
  8639:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  8640:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  8641:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  8642:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  8643:   //MOVE.L USP,Ar                                   |-|012346|P|-----|-----|          |0100_111_001_101_rrr
  8644:   public static void irpMoveFromUsp () throws M68kException {
  8645:     if (XEiJ.regSRS == 0) {  //ユーザモードのとき
  8646:       M68kException.m6eNumber = M68kException.M6E_PRIVILEGE_VIOLATION;
  8647:       throw M68kException.m6eSignal;
  8648:     }
  8649:     //以下はスーパーバイザモード
  8650:     XEiJ.mpuCycleCount++;
  8651:     XEiJ.regRn[XEiJ.regOC - (0b0100_111_001_101_000 - 8)] = XEiJ.mpuUSP;
  8652:   }  //irpMoveFromUsp
  8653: 
  8654:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  8655:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  8656:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  8657:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  8658:   //RESET                                           |-|012346|P|-----|-----|          |0100_111_001_110_000
  8659:   public static void irpReset () throws M68kException {
  8660:     if (XEiJ.regSRS == 0) {  //ユーザモードのとき
  8661:       M68kException.m6eNumber = M68kException.M6E_PRIVILEGE_VIOLATION;
  8662:       throw M68kException.m6eSignal;
  8663:     }
  8664:     //以下はスーパーバイザモード
  8665:     XEiJ.mpuCycleCount += 45;
  8666:     XEiJ.irpReset ();
  8667:   }  //irpReset
  8668: 
  8669:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  8670:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  8671:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  8672:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  8673:   //NOP                                             |-|012346|-|-----|-----|          |0100_111_001_110_001
  8674:   public static void irpNop () throws M68kException {
  8675:     XEiJ.mpuCycleCount += 9;
  8676:     //何もしない
  8677:   }  //irpNop
  8678: 
  8679:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  8680:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  8681:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  8682:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  8683:   //STOP #<data>                                    |-|012346|P|UUUUU|*****|          |0100_111_001_110_010-{data}
  8684:   //
  8685:   //STOP #<data>
  8686:   //    1. #<data>をsrに設定する
  8687:   //    2. pcを進める
  8688:   //    3. 以下のいずれかの条件が成立するまで停止する
  8689:   //      3a. トレース
  8690:   //      3b. マスクされているレベルよりも高い割り込み要求
  8691:   //      3c. リセット
  8692:   //  コアと一緒にデバイスを止めるわけにいかないので、ここでは条件が成立するまで同じ命令を繰り返すループ命令として実装する
  8693:   public static void irpStop () throws M68kException {
  8694:     if (XEiJ.regSRS == 0) {  //ユーザモードのとき
  8695:       M68kException.m6eNumber = M68kException.M6E_PRIVILEGE_VIOLATION;
  8696:       throw M68kException.m6eSignal;
  8697:     }
  8698:     //以下はスーパーバイザモード
  8699:     XEiJ.mpuCycleCount++;
  8700:     irpSetSR (mmuReadWordSignExword ((XEiJ.regPC += 2) - 2, 1));  //pcws。特権違反チェックが先
  8701:     if (XEiJ.mpuTraceFlag == 0) {  //トレースまたはマスクされているレベルよりも高い割り込み要求がない
  8702:       XEiJ.regPC = XEiJ.regPC0;  //ループ
  8703:       //任意の負荷率を100%に設定しているときSTOP命令が軽すぎると動作周波数が大きくなりすぎて割り込みがかかったとき次に進めなくなる
  8704:       //負荷率の計算にSTOP命令で止まっていた時間を含めないことにする
  8705:       XEiJ.mpuClockTime += XEiJ.TMR_FREQ * 4 / 1000000;  //4μs。50MHzのとき200clk
  8706:       XEiJ.mpuLastNano += 4000L;
  8707:     }
  8708:   }  //irpStop
  8709: 
  8710:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  8711:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  8712:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  8713:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  8714:   //RTE                                             |-|012346|P|UUUUU|*****|          |0100_111_001_110_011
  8715:   public static void irpRte () throws M68kException {
  8716:     if (XEiJ.regSRS == 0) {  //ユーザモードのとき
  8717:       M68kException.m6eNumber = M68kException.M6E_PRIVILEGE_VIOLATION;
  8718:       throw M68kException.m6eSignal;
  8719:     }
  8720:     //以下はスーパーバイザモード
  8721:     XEiJ.mpuCycleCount += 17;
  8722:     int sp = XEiJ.regRn[15];
  8723:     int newSR = mmuReadWordZeroData (sp, 1);  //popwz
  8724:     int newPC = mmuReadLongData (sp + 2, 1);  //popls
  8725:     int format = mmuReadWordZeroData (sp + 6, 1) >> 12;
  8726:     if (format == 0) {  //010,020,030,040,060
  8727:       XEiJ.regRn[15] = sp + 8;
  8728:     } else if (format == 2 ||  //020,030,040,060
  8729:                format == 3) {  //040,060
  8730:       XEiJ.regRn[15] = sp + 12;
  8731:     } else if (format == 4) {  //060
  8732:       XEiJ.regRn[15] = sp + 16;
  8733:     } else {
  8734:       M68kException.m6eNumber = M68kException.M6E_FORMAT_ERROR;
  8735:       throw M68kException.m6eSignal;
  8736:     }
  8737:     //irpSetSRでモードが切り替わる場合があるのでその前にr[15]を更新しておくこと
  8738:     irpSetSR (newSR);  //ここでユーザモードに戻る場合がある。特権違反チェックが先
  8739:     irpSetPC (newPC);  //分岐ログが新しいsrを使う。順序に注意。ここでアドレスエラーが発生する場合がある
  8740:   }  //irpRte
  8741: 
  8742:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  8743:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  8744:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  8745:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  8746:   //RTD #<data>                                     |-|-12346|-|-----|-----|          |0100_111_001_110_100-{data}
  8747:   public static void irpRtd () throws M68kException {
  8748:     XEiJ.mpuCycleCount += 7;
  8749:     int sp = XEiJ.regRn[15];
  8750:     int o = mmuReadWordSignExword ((XEiJ.regPC += 2) - 2, XEiJ.regSRS);  //pcws
  8751:     irpSetPC (mmuReadLongData (sp, XEiJ.regSRS));  //popls
  8752:     XEiJ.regRn[15] = sp + 4 + o;
  8753:   }  //irpRtd
  8754: 
  8755:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  8756:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  8757:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  8758:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  8759:   //RTS                                             |-|012346|-|-----|-----|          |0100_111_001_110_101
  8760:   public static void irpRts () throws M68kException {
  8761:     XEiJ.mpuCycleCount += 7;
  8762:     int sp = XEiJ.regRn[15];
  8763:     irpSetPC (mmuReadLongData (sp, XEiJ.regSRS));  //popls
  8764:     XEiJ.regRn[15] = sp + 4;
  8765:   }  //irpRts
  8766: 
  8767:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  8768:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  8769:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  8770:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  8771:   //TRAPV                                           |-|012346|-|---*-|-----|          |0100_111_001_110_110
  8772:   public static void irpTrapv () throws M68kException {
  8773:     if (XEiJ.TEST_BIT_1_SHIFT ? XEiJ.regCCR << 31 - 1 >= 0 : (XEiJ.regCCR & XEiJ.REG_CCR_V) == 0) {  //通過
  8774:       XEiJ.mpuCycleCount++;
  8775:     } else {
  8776:       M68kException.m6eAddress = XEiJ.regPC0;  //アドレスは命令の先頭
  8777:       M68kException.m6eNumber = M68kException.M6E_TRAPV_INSTRUCTION;
  8778:       throw M68kException.m6eSignal;
  8779:     }
  8780:   }  //irpTrapv
  8781: 
  8782:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  8783:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  8784:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  8785:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  8786:   //RTR                                             |-|012346|-|UUUUU|*****|          |0100_111_001_110_111
  8787:   public static void irpRtr () throws M68kException {
  8788:     XEiJ.mpuCycleCount += 8;
  8789:     int sp = XEiJ.regRn[15];
  8790:     int w = mmuReadWordZeroData (sp, XEiJ.regSRS);  //popwz
  8791:     irpSetPC (mmuReadLongData (sp + 2, XEiJ.regSRS));  //popls
  8792:     XEiJ.regCCR = XEiJ.REG_CCR_MASK & w;
  8793:     XEiJ.regRn[15] = sp + 6;
  8794:   }  //irpRtr
  8795: 
  8796:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  8797:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  8798:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  8799:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  8800:   //MOVEC.L Rc,Rn                                   |-|-12346|P|-----|-----|          |0100_111_001_111_010-rnnncccccccccccc
  8801:   public static void irpMovecFromControl () throws M68kException {
  8802:     if (XEiJ.regSRS == 0) {  //ユーザモードのとき
  8803:       M68kException.m6eNumber = M68kException.M6E_PRIVILEGE_VIOLATION;
  8804:       throw M68kException.m6eSignal;
  8805:     }
  8806:     //以下はスーパーバイザモード
  8807:     int w = mmuReadWordZeroExword ((XEiJ.regPC += 2) - 2, 1);  //pcwz。拡張ワード
  8808:     switch (w & 0x0fff) {
  8809:     case 0x000:  //SFC
  8810:       XEiJ.mpuCycleCount += 12;
  8811:       XEiJ.regRn[w >> 12] = XEiJ.mpuSFC;
  8812:       break;
  8813:     case 0x001:  //DFC
  8814:       XEiJ.mpuCycleCount += 12;
  8815:       XEiJ.regRn[w >> 12] = XEiJ.mpuDFC;
  8816:       break;
  8817:     case 0x002:  //CACR
  8818:       XEiJ.mpuCycleCount += 15;
  8819:       XEiJ.regRn[w >> 12] = XEiJ.mpuCACR & 0xf880e000;  //CABCとCUBCのリードは常に0
  8820:       break;
  8821:     case 0x003:  //TCR
  8822:       XEiJ.mpuCycleCount += 15;
  8823:       XEiJ.regRn[w >> 12] = mmuGetTCR ();
  8824:       break;
  8825:     case 0x004:  //ITT0
  8826:       XEiJ.mpuCycleCount += 15;
  8827:       XEiJ.regRn[w >> 12] = mmuGetITT0 ();
  8828:       break;
  8829:     case 0x005:  //ITT1
  8830:       XEiJ.mpuCycleCount += 15;
  8831:       XEiJ.regRn[w >> 12] = mmuGetITT1 ();
  8832:       break;
  8833:     case 0x006:  //DTT0
  8834:       XEiJ.mpuCycleCount += 15;
  8835:       XEiJ.regRn[w >> 12] = mmuGetDTT0 ();
  8836:       break;
  8837:     case 0x007:  //DTT1
  8838:       XEiJ.mpuCycleCount += 15;
  8839:       XEiJ.regRn[w >> 12] = mmuGetDTT1 ();
  8840:       break;
  8841:     case 0x008:  //BUSCR
  8842:       XEiJ.mpuCycleCount += 15;
  8843:       XEiJ.regRn[w >> 12] = XEiJ.mpuBUSCR;
  8844:       break;
  8845:     case 0x800:  //USP
  8846:       XEiJ.mpuCycleCount += 12;
  8847:       XEiJ.regRn[w >> 12] = XEiJ.mpuUSP;
  8848:       break;
  8849:     case 0x801:  //VBR
  8850:       XEiJ.mpuCycleCount += 12;
  8851:       XEiJ.regRn[w >> 12] = XEiJ.mpuVBR;
  8852:       break;
  8853:     case 0x806:  //URP
  8854:       XEiJ.mpuCycleCount += 15;
  8855:       XEiJ.regRn[w >> 12] = mmuGetURP ();;
  8856:       break;
  8857:     case 0x807:  //SRP
  8858:       XEiJ.mpuCycleCount += 15;
  8859:       XEiJ.regRn[w >> 12] = mmuGetSRP ();;
  8860:       break;
  8861:     case 0x808:  //PCR
  8862:       XEiJ.mpuCycleCount += 12;
  8863:       XEiJ.regRn[w >> 12] = XEiJ.mpuPCR;
  8864:       break;
  8865:     default:
  8866:       M68kException.m6eNumber = M68kException.M6E_ILLEGAL_INSTRUCTION;
  8867:       throw M68kException.m6eSignal;
  8868:     }
  8869:   }  //irpMovecFromControl
  8870: 
  8871:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  8872:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  8873:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  8874:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  8875:   //MOVEC.L Rn,Rc                                   |-|-12346|P|-----|-----|          |0100_111_001_111_011-rnnncccccccccccc
  8876:   public static void irpMovecToControl () throws M68kException {
  8877:     if (XEiJ.regSRS == 0) {  //ユーザモードのとき
  8878:       M68kException.m6eNumber = M68kException.M6E_PRIVILEGE_VIOLATION;
  8879:       throw M68kException.m6eSignal;
  8880:     }
  8881:     //以下はスーパーバイザモード
  8882:     int w = mmuReadWordZeroExword ((XEiJ.regPC += 2) - 2, 1);  //pcwz。拡張ワード
  8883:     int d = XEiJ.regRn[w >> 12];
  8884:     switch (w & 0x0fff) {
  8885:     case 0x000:  //SFC
  8886:       XEiJ.mpuCycleCount += 11;
  8887:       XEiJ.mpuSFC = d & 0x00000007;
  8888:       break;
  8889:     case 0x001:  //DFC
  8890:       XEiJ.mpuCycleCount += 11;
  8891:       XEiJ.mpuDFC = d & 0x00000007;
  8892:       break;
  8893:     case 0x002:  //CACR
  8894:       //  CACR
  8895:       //   31  30  29  28  27 26 25 24   23   22   21 20 19 18 17 16   15  14  13 12 11 10 9 8  7 6 5 4 3 2 1 0
  8896:       //  EDC NAD ESB DPI FOC  0  0  0  EBC CABC CUBC  0  0  0  0  0  EIC NAI FIC  0  0  0 0 0  0 0 0 0 0 0 0 0
  8897:       //    bit31  EDC   Enable Data Cache
  8898:       //                 データキャッシュ有効
  8899:       //                 4ウェイセットアソシアティブ。16バイト/ライン*128ライン/セット*4セット=8KB
  8900:       //    bit30  NAD   No Allocate Mode (Data Cache)
  8901:       //                 データキャッシュでミスしても新しいキャッシュラインをアロケートしない
  8902:       //    bit29  ESB   Enable Store Buffer
  8903:       //                 ストアバッファ有効
  8904:       //                 ライトスルーおよびキャッシュ禁止インプリサイスのページの書き込みを4エントリ(16バイト)のFIFOバッファで遅延させる
  8905:       //                 例えば4の倍数のアドレスから始まる4バイトに連続して書き込むと1回のロングの書き込みにまとめられる
  8906:       //    bit28  DPI   Disable CPUSH Invalidation
  8907:       //                 CPUSHでプッシュされたキャッシュラインを無効化しない
  8908:       //    bit27  FOC   1/2 Cache Operation Mode Enable (Data Cache)
  8909:       //                 データキャッシュを1/2キャッシュモードにする
  8910:       //    bit23  EBC   Enable Branch Cache
  8911:       //                 分岐キャッシュ有効
  8912:       //                 256エントリの分岐キャッシュを用いて分岐予測を行う
  8913:       //                 正しく予測された分岐は前後の命令に隠れて実質0サイクルで実行される
  8914:       //                   MC68060は最大3個の命令(1個の分岐命令と2個の整数命令)を1サイクルで実行できる
  8915:       //                   MC68000(10MHz)とMC68060(50MHz)の処理速度の比は局所的に100倍を超えることがある
  8916:       //    bit22  CABC  Clear All Entries in the Branch Cache
  8917:       //                 分岐キャッシュのすべてのエントリをクリアする
  8918:       //                 分岐命令以外の場所で分岐キャッシュがヒットしてしまったときに発生する分岐予測エラーから復帰するときに使う
  8919:       //                 CABCはライトオンリーでリードは常に0
  8920:       //    bit21  CUBC  Clear All User Entries in the Branch Cache
  8921:       //                 分岐キャッシュのすべてのユーザエントリをクリアする
  8922:       //                 CUBCはライトオンリーでリードは常に0
  8923:       //    bit15  EIC   Enable Instruction Cache
  8924:       //                 命令キャッシュ有効
  8925:       //                 4ウェイセットアソシアティブ。16バイト/ライン*128ライン/セット*4セット=8KB
  8926:       //    bit14  NAI   No Allocate Mode (Instruction Cache)
  8927:       //                 命令キャッシュでミスしても新しいキャッシュラインをアロケートしない
  8928:       //    bit13  FIC   1/2 Cache Operation Mode Enable (Instruction Cache)
  8929:       //                 命令キャッシュを1/2キャッシュモードにする
  8930:       //! 非対応
  8931:       XEiJ.mpuCycleCount += 14;
  8932:       XEiJ.mpuCACR = d & 0xf8e0e000;  //CABCとCUBCは保存しておいてリードするときにマスクする
  8933:       {
  8934:         boolean cacheOn = (XEiJ.mpuCACR & 0x80008000) != 0;
  8935:         if (XEiJ.mpuCacheOn != cacheOn) {
  8936:           XEiJ.mpuCacheOn = cacheOn;
  8937:           XEiJ.mpuSetWait ();
  8938:         }
  8939:       }
  8940:       break;
  8941:     case 0x003:  //TCR
  8942:       //  TCR
  8943:       //  31 30 29 28 27 26 25 24  23 22 21 20 19 18 17 16  15 14  13  12   11   10 9 8  7 6   5 4 3 2 1 0
  8944:       //   0  0  0  0  0  0  0  0   0  0  0  0  0  0  0  0   E  P NAD NAI FOTC FITC DCO  DUO DWO DCI DUI 0
  8945:       //  bit15   E     Enable
  8946:       //  bit14   P     Page Size
  8947:       //  bit13   NAD   No Allocate Mode (Data ATC)
  8948:       //  bit12   NAI   No Allocate Mode (Instruction ATC)
  8949:       //  bit11   FOTC  1/2-Cache Mode (Data ATC)
  8950:       //  bit10   FITC  1/2-Cache Mode (Instruction ATC)
  8951:       //  bit9-8  DCO   Default Cache Mode (Data Cache)
  8952:       //  bit7-6  DUO   Default UPA bits (Data Cache)
  8953:       //  bit5    DWO   Default Write Protect (Data Cache)
  8954:       //  bit4-3  DCI   Default Cache Mode (Instruction Cache)
  8955:       //  bit2-1  DUI   Default UPA bits (Instruction Cache)
  8956:       //MMUを参照
  8957:       XEiJ.mpuCycleCount += 14;
  8958:       mmuSetTCR (d);
  8959:       break;
  8960:     case 0x004:  //ITT0
  8961:       XEiJ.mpuCycleCount += 14;
  8962:       mmuSetITT0 (d);
  8963:       break;
  8964:     case 0x005:  //ITT1
  8965:       XEiJ.mpuCycleCount += 14;
  8966:       mmuSetITT1 (d);
  8967:       break;
  8968:     case 0x006:  //DTT0
  8969:       XEiJ.mpuCycleCount += 14;
  8970:       mmuSetDTT0 (d);
  8971:       break;
  8972:     case 0x007:  //DTT1
  8973:       XEiJ.mpuCycleCount += 14;
  8974:       mmuSetDTT1 (d);
  8975:       break;
  8976:     case 0x008:  //BUSCR
  8977:       XEiJ.mpuCycleCount += 14;
  8978:       XEiJ.mpuBUSCR = d & 0xf0000000;
  8979:       break;
  8980:     case 0x800:  //USP
  8981:       XEiJ.mpuCycleCount += 11;
  8982:       XEiJ.mpuUSP = d;
  8983:       break;
  8984:     case 0x801:  //VBR
  8985:       XEiJ.mpuCycleCount += 11;
  8986:       XEiJ.mpuVBR = d & -4;  //4の倍数でないと困る
  8987:       break;
  8988:     case 0x806:  //URP
  8989:       XEiJ.mpuCycleCount += 14;
  8990:       mmuSetURP (d);
  8991:       break;
  8992:     case 0x807:  //SRP
  8993:       XEiJ.mpuCycleCount += 14;
  8994:       mmuSetSRP (d);
  8995:       break;
  8996:     case 0x808:  //PCR
  8997:       //  PCR
  8998:       //  31 30 29 28 27 26 25 24  23 22 21 20 19 18 17 16  15 14 13 12 11 10 9 8       7 6 5 4 3 2   1   0
  8999:       //   0  0  0  0  0  1  0  0   0  0  1  1  0  0  0  0     Revision Number     EDEBUG  Reserved DFP ESS
  9000:       //  bit31-16  Identification   0x0430
  9001:       //  bit15-8   Revision Number  1=F43G,5=G65V,6=E41J。偽物もあるらしい
  9002:       //  bit7      EDEBUG           Enable Debug Features
  9003:       //  bit6-2    Reserved
  9004:       //  bit1      DFP              Disable Floating-Point Unit。浮動小数点ユニット無効
  9005:       //  bit0      ESS              Enable Superscalar Dispatch。スーパースカラ有効
  9006:       XEiJ.mpuCycleCount += 11;
  9007:       XEiJ.mpuPCR = 0x04300000 | XEiJ.MPU_060_REV << 8 | d & 0x00000083;
  9008:       break;
  9009:     default:
  9010:       M68kException.m6eNumber = M68kException.M6E_ILLEGAL_INSTRUCTION;
  9011:       throw M68kException.m6eSignal;
  9012:     }
  9013:   }  //irpMovecToControl
  9014: 
  9015:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  9016:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  9017:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  9018:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  9019:   //JSR <ea>                                        |-|012346|-|-----|-----|  M  WXZP |0100_111_010_mmm_rrr
  9020:   //JBSR.L <label>                                  |A|012346|-|-----|-----|          |0100_111_010_111_001-{address}       [JSR <label>]
  9021:   public static void irpJsr () throws M68kException {
  9022:     XEiJ.mpuCycleCount++;
  9023:     //評価順序に注意。実効アドレスを求めてからspをデクリメントすること
  9024:     int a = efaJmpJsr (XEiJ.regOC & 63);
  9025:     M68kException.m6eIncremented -= 4L << (7 << 3);
  9026:     mmuWriteLongData (XEiJ.regRn[15] -= 4, XEiJ.regPC, XEiJ.regSRS);  //pushl
  9027:     irpSetPC (a);
  9028:   }  //irpJsr
  9029: 
  9030:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  9031:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  9032:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  9033:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  9034:   //JMP <ea>                                        |-|012346|-|-----|-----|  M  WXZP |0100_111_011_mmm_rrr
  9035:   //JBRA.L <label>                                  |A|012346|-|-----|-----|          |0100_111_011_111_001-{address}       [JMP <label>]
  9036:   public static void irpJmp () throws M68kException {
  9037:     XEiJ.mpuCycleCount++;  //0clkにしない
  9038:     irpSetPC (efaJmpJsr (XEiJ.regOC & 63));
  9039:   }  //irpJmp
  9040: 
  9041:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  9042:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  9043:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  9044:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  9045:   //ADDQ.B #<data>,<ea>                             |-|012346|-|UUUUU|*****|D M+-WXZ  |0101_qqq_000_mmm_rrr
  9046:   //INC.B <ea>                                      |A|012346|-|UUUUU|*****|D M+-WXZ  |0101_001_000_mmm_rrr [ADDQ.B #1,<ea>]
  9047:   public static void irpAddqByte () throws M68kException {
  9048:     int ea = XEiJ.regOC & 63;
  9049:     int x;
  9050:     int y = ((XEiJ.regOC >> 9) - 1 & 7) + 1;  //qqq==0?8:qqq
  9051:     int z;
  9052:     if (ea < XEiJ.EA_AR) {  //ADDQ.B #<data>,Dr
  9053:       XEiJ.mpuCycleCount++;
  9054:       z = (byte) (XEiJ.regRn[ea] = ~0xff & (x = XEiJ.regRn[ea]) | 0xff & (x = (byte) x) + y);
  9055:     } else {  //ADDQ.B #<data>,<mem>
  9056:       XEiJ.mpuCycleCount++;
  9057:       int a = efaMltByte (ea);
  9058:       mmuWriteByteData (a, z = (byte) ((x = mmuModifyByteSignData (a, XEiJ.regSRS)) + y), XEiJ.regSRS);
  9059:     }
  9060:     XEiJ.regCCR = (z >> 28 & XEiJ.REG_CCR_N | (z == 0 ? XEiJ.REG_CCR_Z : 0) |
  9061:            (~x & z) >>> 31 << 1 |
  9062:            (x & ~z) >> 31 & (XEiJ.REG_CCR_X | XEiJ.REG_CCR_C));  //ccr_addq
  9063:   }  //irpAddqByte
  9064: 
  9065:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  9066:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  9067:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  9068:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  9069:   //ADDQ.W #<data>,<ea>                             |-|012346|-|UUUUU|*****|D M+-WXZ  |0101_qqq_001_mmm_rrr
  9070:   //ADDQ.W #<data>,Ar                               |-|012346|-|-----|-----| A        |0101_qqq_001_001_rrr
  9071:   //INC.W <ea>                                      |A|012346|-|UUUUU|*****|D M+-WXZ  |0101_001_001_mmm_rrr [ADDQ.W #1,<ea>]
  9072:   //INC.W Ar                                        |A|012346|-|-----|-----| A        |0101_001_001_001_rrr [ADDQ.W #1,Ar]
  9073:   //
  9074:   //ADDQ.W #<data>,Ar
  9075:   //  ソースを符号拡張してロングで加算する
  9076:   public static void irpAddqWord () throws M68kException {
  9077:     int ea = XEiJ.regOC & 63;
  9078:     int y = ((XEiJ.regOC >> 9) - 1 & 7) + 1;  //qqq==0?8:qqq
  9079:     if (ea >> 3 == XEiJ.MMM_AR) {  //ADDQ.W #<data>,Ar
  9080:       XEiJ.mpuCycleCount++;
  9081:       XEiJ.regRn[ea] += y;  //ロングで計算する。このr[ea]はアドレスレジスタ
  9082:       //ccrは操作しない
  9083:     } else {
  9084:       int x;
  9085:       int z;
  9086:       if (ea < XEiJ.EA_AR) {  //ADDQ.W #<data>,Dr
  9087:         XEiJ.mpuCycleCount++;
  9088:         z = (short) (XEiJ.regRn[ea] = ~0xffff & (x = XEiJ.regRn[ea]) | (char) ((x = (short) x) + y));
  9089:       } else {  //ADDQ.W #<data>,<mem>
  9090:         XEiJ.mpuCycleCount++;
  9091:         int a = efaMltWord (ea);
  9092:         mmuWriteWordData (a, z = (short) ((x = mmuModifyWordSignData (a, XEiJ.regSRS)) + y), XEiJ.regSRS);
  9093:       }
  9094:       XEiJ.regCCR = (z >> 28 & XEiJ.REG_CCR_N | (z == 0 ? XEiJ.REG_CCR_Z : 0) |
  9095:              (~x & z) >>> 31 << 1 |
  9096:              (x & ~z) >> 31 & (XEiJ.REG_CCR_X | XEiJ.REG_CCR_C));  //ccr_addq
  9097:     }
  9098:   }  //irpAddqWord
  9099: 
  9100:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  9101:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  9102:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  9103:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  9104:   //ADDQ.L #<data>,<ea>                             |-|012346|-|UUUUU|*****|D M+-WXZ  |0101_qqq_010_mmm_rrr
  9105:   //ADDQ.L #<data>,Ar                               |-|012346|-|-----|-----| A        |0101_qqq_010_001_rrr
  9106:   //INC.L <ea>                                      |A|012346|-|UUUUU|*****|D M+-WXZ  |0101_001_010_mmm_rrr [ADDQ.L #1,<ea>]
  9107:   //INC.L Ar                                        |A|012346|-|-----|-----| A        |0101_001_010_001_rrr [ADDQ.L #1,Ar]
  9108:   public static void irpAddqLong () throws M68kException {
  9109:     int ea = XEiJ.regOC & 63;
  9110:     int y = ((XEiJ.regOC >> 9) - 1 & 7) + 1;  //qqq==0?8:qqq
  9111:     if (ea >> 3 == XEiJ.MMM_AR) {  //ADDQ.L #<data>,Ar
  9112:       XEiJ.mpuCycleCount++;
  9113:       XEiJ.regRn[ea] += y;  //このr[ea]はアドレスレジスタ
  9114:       //ccrは操作しない
  9115:     } else {
  9116:       int x;
  9117:       int z;
  9118:       if (ea < XEiJ.EA_AR) {  //ADDQ.L #<data>,Dr
  9119:         XEiJ.mpuCycleCount++;
  9120:         XEiJ.regRn[ea] = z = (x = XEiJ.regRn[ea]) + y;
  9121:       } else {  //ADDQ.L #<data>,<mem>
  9122:         XEiJ.mpuCycleCount++;
  9123:         int a = efaMltLong (ea);
  9124:         mmuWriteLongData (a, z = (x = mmuModifyLongData (a, XEiJ.regSRS)) + y, XEiJ.regSRS);
  9125:       }
  9126:       XEiJ.regCCR = (z >> 28 & XEiJ.REG_CCR_N | (z == 0 ? XEiJ.REG_CCR_Z : 0) |
  9127:              (~x & z) >>> 31 << 1 |
  9128:              (x & ~z) >> 31 & (XEiJ.REG_CCR_X | XEiJ.REG_CCR_C));  //ccr_addq
  9129:     }
  9130:   }  //irpAddqLong
  9131: 
  9132:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  9133:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  9134:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  9135:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  9136:   //ST.B <ea>                                       |-|012346|-|-----|-----|D M+-WXZ  |0101_000_011_mmm_rrr
  9137:   //SNF.B <ea>                                      |A|012346|-|-----|-----|D M+-WXZ  |0101_000_011_mmm_rrr [ST.B <ea>]
  9138:   //DBT.W Dr,<label>                                |-|012346|-|-----|-----|          |0101_000_011_001_rrr-{offset}
  9139:   //DBNF.W Dr,<label>                               |A|012346|-|-----|-----|          |0101_000_011_001_rrr-{offset}        [DBT.W Dr,<label>]
  9140:   //TRAPT.W #<data>                                 |-|--2346|-|-----|-----|          |0101_000_011_111_010-{data}
  9141:   //TPNF.W #<data>                                  |A|--2346|-|-----|-----|          |0101_000_011_111_010-{data}  [TRAPT.W #<data>]
  9142:   //TPT.W #<data>                                   |A|--2346|-|-----|-----|          |0101_000_011_111_010-{data}  [TRAPT.W #<data>]
  9143:   //TRAPNF.W #<data>                                |A|--2346|-|-----|-----|          |0101_000_011_111_010-{data}  [TRAPT.W #<data>]
  9144:   //TRAPT.L #<data>                                 |-|--2346|-|-----|-----|          |0101_000_011_111_011-{data}
  9145:   //TPNF.L #<data>                                  |A|--2346|-|-----|-----|          |0101_000_011_111_011-{data}  [TRAPT.L #<data>]
  9146:   //TPT.L #<data>                                   |A|--2346|-|-----|-----|          |0101_000_011_111_011-{data}  [TRAPT.L #<data>]
  9147:   //TRAPNF.L #<data>                                |A|--2346|-|-----|-----|          |0101_000_011_111_011-{data}  [TRAPT.L #<data>]
  9148:   //TRAPT                                           |-|--2346|-|-----|-----|          |0101_000_011_111_100
  9149:   //TPNF                                            |A|--2346|-|-----|-----|          |0101_000_011_111_100 [TRAPT]
  9150:   //TPT                                             |A|--2346|-|-----|-----|          |0101_000_011_111_100 [TRAPT]
  9151:   //TRAPNF                                          |A|--2346|-|-----|-----|          |0101_000_011_111_100 [TRAPT]
  9152:   public static void irpSt () throws M68kException {
  9153:     int ea = XEiJ.regOC & 63;
  9154:     //DBT.W Dr,<label>よりもST.B Drを優先する
  9155:     if (ea < XEiJ.EA_AR) {  //ST.B Dr
  9156:       XEiJ.mpuCycleCount++;
  9157:       XEiJ.regRn[ea] |= 0xff;
  9158:     } else if (ea < XEiJ.EA_MM) {  //DBT.W Dr,<label>
  9159:       int t = XEiJ.regPC;  //pc0+2
  9160:       XEiJ.regPC = t + 2;  //pc0+4
  9161:       t += mmuReadWordSignExword (t, XEiJ.regSRS);  //pc0+2+16bitディスプレースメント
  9162:       if ((t & 1) != 0) {  //分岐先のアドレスが奇数
  9163:         //MC68060のBcc/DBcc/FBccは分岐先のアドレスが奇数のとき分岐しなくてもアドレスエラーになる。FDBccは分岐するときだけ
  9164:         irpBccAddressError (t);
  9165:       }
  9166:       //条件が成立しているので通過
  9167:       XEiJ.mpuCycleCount += 2;
  9168:     } else if ((XEiJ.EAM_PW | XEiJ.EAM_PX | XEiJ.EAM_IM) << ea < 0L) {  //TRAPT.W/TRAPT.L/TRAPT
  9169:       XEiJ.regPC += (ea & 3) + (ea & 1);  //111_010→2,111_011→4,111_100→0
  9170:       //条件が成立しているのでTRAPする
  9171:       M68kException.m6eAddress = XEiJ.regPC0;  //アドレスは命令の先頭
  9172:       M68kException.m6eNumber = M68kException.M6E_TRAPV_INSTRUCTION;
  9173:       throw M68kException.m6eSignal;
  9174:     } else {  //ST.B <mem>
  9175:       XEiJ.mpuCycleCount++;
  9176:       mmuWriteByteData (efaMltByte (ea), 0xff, XEiJ.regSRS);
  9177:     }
  9178:   }  //irpSt
  9179: 
  9180:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  9181:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  9182:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  9183:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  9184:   //SUBQ.B #<data>,<ea>                             |-|012346|-|UUUUU|*****|D M+-WXZ  |0101_qqq_100_mmm_rrr
  9185:   //DEC.B <ea>                                      |A|012346|-|UUUUU|*****|D M+-WXZ  |0101_001_100_mmm_rrr [SUBQ.B #1,<ea>]
  9186:   public static void irpSubqByte () throws M68kException {
  9187:     int ea = XEiJ.regOC & 63;
  9188:     int x;
  9189:     int y = ((XEiJ.regOC >> 9) - 1 & 7) + 1;  //qqq==0?8:qqq
  9190:     int z;
  9191:     if (ea < XEiJ.EA_AR) {  //SUBQ.B #<data>,Dr
  9192:       XEiJ.mpuCycleCount++;
  9193:       z = (byte) (XEiJ.regRn[ea] = ~0xff & (x = XEiJ.regRn[ea]) | 0xff & (x = (byte) x) - y);
  9194:     } else {  //SUBQ.B #<data>,<mem>
  9195:       XEiJ.mpuCycleCount++;
  9196:       int a = efaMltByte (ea);
  9197:       mmuWriteByteData (a, z = (byte) ((x = mmuModifyByteSignData (a, XEiJ.regSRS)) - y), XEiJ.regSRS);
  9198:     }
  9199:     XEiJ.regCCR = (z >> 28 & XEiJ.REG_CCR_N | (z == 0 ? XEiJ.REG_CCR_Z : 0) |
  9200:            (x & ~z) >>> 31 << 1 |
  9201:            (~x & z) >> 31 & (XEiJ.REG_CCR_X | XEiJ.REG_CCR_C));  //ccr_subq
  9202:   }  //irpSubqByte
  9203: 
  9204:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  9205:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  9206:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  9207:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  9208:   //SUBQ.W #<data>,<ea>                             |-|012346|-|UUUUU|*****|D M+-WXZ  |0101_qqq_101_mmm_rrr
  9209:   //SUBQ.W #<data>,Ar                               |-|012346|-|-----|-----| A        |0101_qqq_101_001_rrr
  9210:   //DEC.W <ea>                                      |A|012346|-|UUUUU|*****|D M+-WXZ  |0101_001_101_mmm_rrr [SUBQ.W #1,<ea>]
  9211:   //DEC.W Ar                                        |A|012346|-|-----|-----| A        |0101_001_101_001_rrr [SUBQ.W #1,Ar]
  9212:   //
  9213:   //SUBQ.W #<data>,Ar
  9214:   //  ソースを符号拡張してロングで減算する
  9215:   public static void irpSubqWord () throws M68kException {
  9216:     int ea = XEiJ.regOC & 63;
  9217:     int y = ((XEiJ.regOC >> 9) - 1 & 7) + 1;  //qqq==0?8:qqq
  9218:     if (ea >> 3 == XEiJ.MMM_AR) {  //SUBQ.W #<data>,Ar
  9219:       XEiJ.mpuCycleCount++;
  9220:       XEiJ.regRn[ea] -= y;  //ロングで計算する。このr[ea]はアドレスレジスタ
  9221:       //ccrは操作しない
  9222:     } else {
  9223:       int x;
  9224:       int z;
  9225:       if (ea < XEiJ.EA_AR) {  //SUBQ.W #<data>,Dr
  9226:         XEiJ.mpuCycleCount++;
  9227:         z = (short) (XEiJ.regRn[ea] = ~0xffff & (x = XEiJ.regRn[ea]) | (char) ((x = (short) x) - y));
  9228:       } else {  //SUBQ.W #<data>,<mem>
  9229:         XEiJ.mpuCycleCount++;
  9230:         int a = efaMltWord (ea);
  9231:         mmuWriteWordData (a, z = (short) ((x = mmuModifyWordSignData (a, XEiJ.regSRS)) - y), XEiJ.regSRS);
  9232:       }
  9233:       XEiJ.regCCR = (z >> 28 & XEiJ.REG_CCR_N | (z == 0 ? XEiJ.REG_CCR_Z : 0) |
  9234:              (x & ~z) >>> 31 << 1 |
  9235:              (~x & z) >> 31 & (XEiJ.REG_CCR_X | XEiJ.REG_CCR_C));  //ccr_subq
  9236:     }
  9237:   }  //irpSubqWord
  9238: 
  9239:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  9240:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  9241:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  9242:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  9243:   //SUBQ.L #<data>,<ea>                             |-|012346|-|UUUUU|*****|D M+-WXZ  |0101_qqq_110_mmm_rrr
  9244:   //SUBQ.L #<data>,Ar                               |-|012346|-|-----|-----| A        |0101_qqq_110_001_rrr
  9245:   //DEC.L <ea>                                      |A|012346|-|UUUUU|*****|D M+-WXZ  |0101_001_110_mmm_rrr [SUBQ.L #1,<ea>]
  9246:   //DEC.L Ar                                        |A|012346|-|-----|-----| A        |0101_001_110_001_rrr [SUBQ.L #1,Ar]
  9247:   public static void irpSubqLong () throws M68kException {
  9248:     int ea = XEiJ.regOC & 63;
  9249:     int y = ((XEiJ.regOC >> 9) - 1 & 7) + 1;  //qqq==0?8:qqq
  9250:     if (ea >> 3 == XEiJ.MMM_AR) {  //SUBQ.L #<data>,Ar
  9251:       XEiJ.mpuCycleCount++;
  9252:       XEiJ.regRn[ea] -= y;  //このr[ea]はアドレスレジスタ
  9253:       //ccrは操作しない
  9254:     } else {
  9255:       int x;
  9256:       int z;
  9257:       if (ea < XEiJ.EA_AR) {  //SUBQ.L #<data>,Dr
  9258:         XEiJ.mpuCycleCount++;
  9259:         XEiJ.regRn[ea] = z = (x = XEiJ.regRn[ea]) - y;
  9260:       } else {  //SUBQ.L #<data>,<mem>
  9261:         XEiJ.mpuCycleCount++;
  9262:         int a = efaMltLong (ea);
  9263:         mmuWriteLongData (a, z = (x = mmuModifyLongData (a, XEiJ.regSRS)) - y, XEiJ.regSRS);
  9264:       }
  9265:       XEiJ.regCCR = (z >> 28 & XEiJ.REG_CCR_N | (z == 0 ? XEiJ.REG_CCR_Z : 0) |
  9266:              (x & ~z) >>> 31 << 1 |
  9267:              (~x & z) >> 31 & (XEiJ.REG_CCR_X | XEiJ.REG_CCR_C));  //ccr_subq
  9268:     }
  9269:   }  //irpSubqLong
  9270: 
  9271:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  9272:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  9273:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  9274:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  9275:   //SF.B <ea>                                       |-|012346|-|-----|-----|D M+-WXZ  |0101_000_111_mmm_rrr
  9276:   //SNT.B <ea>                                      |A|012346|-|-----|-----|D M+-WXZ  |0101_000_111_mmm_rrr [SF.B <ea>]
  9277:   //DBF.W Dr,<label>                                |-|012346|-|-----|-----|          |0101_000_111_001_rrr-{offset}
  9278:   //DBNT.W Dr,<label>                               |A|012346|-|-----|-----|          |0101_000_111_001_rrr-{offset}        [DBF.W Dr,<label>]
  9279:   //DBRA.W Dr,<label>                               |A|012346|-|-----|-----|          |0101_000_111_001_rrr-{offset}        [DBF.W Dr,<label>]
  9280:   //TRAPF.W #<data>                                 |-|--2346|-|-----|-----|          |0101_000_111_111_010-{data}
  9281:   //TPF.W #<data>                                   |A|--2346|-|-----|-----|          |0101_000_111_111_010-{data}  [TRAPF.W #<data>]
  9282:   //TPNT.W #<data>                                  |A|--2346|-|-----|-----|          |0101_000_111_111_010-{data}  [TRAPF.W #<data>]
  9283:   //TRAPNT.W #<data>                                |A|--2346|-|-----|-----|          |0101_000_111_111_010-{data}  [TRAPF.W #<data>]
  9284:   //TRAPF.L #<data>                                 |-|--2346|-|-----|-----|          |0101_000_111_111_011-{data}
  9285:   //TPF.L #<data>                                   |A|--2346|-|-----|-----|          |0101_000_111_111_011-{data}  [TRAPF.L #<data>]
  9286:   //TPNT.L #<data>                                  |A|--2346|-|-----|-----|          |0101_000_111_111_011-{data}  [TRAPF.L #<data>]
  9287:   //TRAPNT.L #<data>                                |A|--2346|-|-----|-----|          |0101_000_111_111_011-{data}  [TRAPF.L #<data>]
  9288:   //TRAPF                                           |-|--2346|-|-----|-----|          |0101_000_111_111_100
  9289:   //TPF                                             |A|--2346|-|-----|-----|          |0101_000_111_111_100 [TRAPF]
  9290:   //TPNT                                            |A|--2346|-|-----|-----|          |0101_000_111_111_100 [TRAPF]
  9291:   //TRAPNT                                          |A|--2346|-|-----|-----|          |0101_000_111_111_100 [TRAPF]
  9292:   public static void irpSf () throws M68kException {
  9293:     int ea = XEiJ.regOC & 63;
  9294:     //DBRA.W Dr,<label>よりもSF.B Drを優先する
  9295:     if (ea < XEiJ.EA_AR) {  //SF.B Dr
  9296:       XEiJ.mpuCycleCount++;
  9297:       XEiJ.regRn[ea] &= ~0xff;
  9298:     } else if (ea < XEiJ.EA_MM) {  //DBRA.W Dr,<label>
  9299:       int t = XEiJ.regPC;  //pc0+2
  9300:       XEiJ.regPC = t + 2;  //pc0+4
  9301:       t += mmuReadWordSignExword (t, XEiJ.regSRS);  //pc0+2+16bitディスプレースメント
  9302:       if ((t & 1) != 0) {  //分岐先のアドレスが奇数
  9303:         //MC68060のBcc/DBcc/FBccは分岐先のアドレスが奇数のとき分岐しなくてもアドレスエラーになる。FDBccは分岐するときだけ
  9304:         irpBccAddressError (t);
  9305:       }
  9306:       //条件が成立していないのでデクリメント
  9307:       int rrr = XEiJ.regOC & 7;
  9308:       int s = XEiJ.regRn[rrr];
  9309:       if ((short) s == 0) {  //Drの下位16bitが0なので通過
  9310:         XEiJ.mpuCycleCount += 2;
  9311:         XEiJ.regRn[rrr] = s + 65535;
  9312:       } else {  //Drの下位16bitが0でないので分岐
  9313:         XEiJ.mpuCycleCount++;
  9314:         XEiJ.regRn[rrr] = s - 1;  //下位16bitが0でないので上位16bitは変化しない
  9315:         irpSetPC (t);
  9316:       }
  9317:     } else if ((XEiJ.EAM_PW | XEiJ.EAM_PX | XEiJ.EAM_IM) << ea < 0L) {  //TRAPF.W/TRAPF.L/TRAPF
  9318:       XEiJ.regPC += (ea & 3) + (ea & 1);  //111_010→2,111_011→4,111_100→0
  9319:       //条件が成立していないのでTRAPしない
  9320:       XEiJ.mpuCycleCount++;
  9321:     } else {  //SF.B <mem>
  9322:       XEiJ.mpuCycleCount++;
  9323:       mmuWriteByteData (efaMltByte (ea), 0x00, XEiJ.regSRS);
  9324:     }
  9325:   }  //irpSf
  9326: 
  9327:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  9328:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  9329:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  9330:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  9331:   //SHI.B <ea>                                      |-|012346|-|--*-*|-----|D M+-WXZ  |0101_001_011_mmm_rrr
  9332:   //SNLS.B <ea>                                     |A|012346|-|--*-*|-----|D M+-WXZ  |0101_001_011_mmm_rrr [SHI.B <ea>]
  9333:   //DBHI.W Dr,<label>                               |-|012346|-|--*-*|-----|          |0101_001_011_001_rrr-{offset}
  9334:   //DBNLS.W Dr,<label>                              |A|012346|-|--*-*|-----|          |0101_001_011_001_rrr-{offset}        [DBHI.W Dr,<label>]
  9335:   //TRAPHI.W #<data>                                |-|--2346|-|--*-*|-----|          |0101_001_011_111_010-{data}
  9336:   //TPHI.W #<data>                                  |A|--2346|-|--*-*|-----|          |0101_001_011_111_010-{data}  [TRAPHI.W #<data>]
  9337:   //TPNLS.W #<data>                                 |A|--2346|-|--*-*|-----|          |0101_001_011_111_010-{data}  [TRAPHI.W #<data>]
  9338:   //TRAPNLS.W #<data>                               |A|--2346|-|--*-*|-----|          |0101_001_011_111_010-{data}  [TRAPHI.W #<data>]
  9339:   //TRAPHI.L #<data>                                |-|--2346|-|--*-*|-----|          |0101_001_011_111_011-{data}
  9340:   //TPHI.L #<data>                                  |A|--2346|-|--*-*|-----|          |0101_001_011_111_011-{data}  [TRAPHI.L #<data>]
  9341:   //TPNLS.L #<data>                                 |A|--2346|-|--*-*|-----|          |0101_001_011_111_011-{data}  [TRAPHI.L #<data>]
  9342:   //TRAPNLS.L #<data>                               |A|--2346|-|--*-*|-----|          |0101_001_011_111_011-{data}  [TRAPHI.L #<data>]
  9343:   //TRAPHI                                          |-|--2346|-|--*-*|-----|          |0101_001_011_111_100
  9344:   //TPHI                                            |A|--2346|-|--*-*|-----|          |0101_001_011_111_100 [TRAPHI]
  9345:   //TPNLS                                           |A|--2346|-|--*-*|-----|          |0101_001_011_111_100 [TRAPHI]
  9346:   //TRAPNLS                                         |A|--2346|-|--*-*|-----|          |0101_001_011_111_100 [TRAPHI]
  9347:   public static void irpShi () throws M68kException {
  9348:     int ea = XEiJ.regOC & 63;
  9349:     if (ea >> 3 == XEiJ.MMM_AR) {  //DBHI.W Dr,<label>
  9350:       int t = XEiJ.regPC;  //pc0+2
  9351:       XEiJ.regPC = t + 2;  //pc0+4
  9352:       t += mmuReadWordSignExword (t, XEiJ.regSRS);  //pc0+2+16bitディスプレースメント
  9353:       if ((t & 1) != 0) {  //分岐先のアドレスが奇数
  9354:         //MC68060のBcc/DBcc/FBccは分岐先のアドレスが奇数のとき分岐しなくてもアドレスエラーになる。FDBccは分岐するときだけ
  9355:         irpBccAddressError (t);
  9356:       }
  9357:       if (XEiJ.MPU_CC_HI << XEiJ.regCCR < 0) {  //条件が成立しているので通過
  9358:         XEiJ.mpuCycleCount += 2;
  9359:       } else {  //条件が成立していないのでデクリメント
  9360:         int rrr = XEiJ.regOC & 7;
  9361:         int s = XEiJ.regRn[rrr];
  9362:         if ((short) s == 0) {  //Drの下位16bitが0なので通過
  9363:           XEiJ.mpuCycleCount += 2;
  9364:           XEiJ.regRn[rrr] = s + 65535;
  9365:         } else {  //Drの下位16bitが0でないので分岐
  9366:           XEiJ.mpuCycleCount++;
  9367:           XEiJ.regRn[rrr] = s - 1;  //下位16bitが0でないので上位16bitは変化しない
  9368:           irpSetPC (t);
  9369:         }
  9370:       }
  9371:     } else if (ea < XEiJ.EA_AR) {  //SHI.B Dr
  9372:       if (XEiJ.MPU_CC_HI << XEiJ.regCCR < 0) {  //セット
  9373:         XEiJ.mpuCycleCount++;
  9374:         XEiJ.regRn[ea] |= 0xff;
  9375:       } else {  //クリア
  9376:         XEiJ.mpuCycleCount++;
  9377:         XEiJ.regRn[ea] &= ~0xff;
  9378:       }
  9379:     } else if ((XEiJ.EAM_PW | XEiJ.EAM_PX | XEiJ.EAM_IM) << ea < 0L) {  //TRAPHI.W/TRAPHI.L/TRAPHI
  9380:       XEiJ.regPC += (ea & 3) + (ea & 1);  //111_010→2,111_011→4,111_100→0
  9381:       if (XEiJ.MPU_CC_HI << XEiJ.regCCR < 0) {
  9382:         //条件が成立しているのでTRAPする
  9383:         M68kException.m6eAddress = XEiJ.regPC0;  //アドレスは命令の先頭
  9384:         M68kException.m6eNumber = M68kException.M6E_TRAPV_INSTRUCTION;
  9385:         throw M68kException.m6eSignal;
  9386:       } else {
  9387:         //条件が成立していないのでTRAPしない
  9388:         XEiJ.mpuCycleCount++;
  9389:       }
  9390:     } else {  //SHI.B <mem>
  9391:       XEiJ.mpuCycleCount++;
  9392:       mmuWriteByteData (efaMltByte (ea), XEiJ.MPU_CC_HI << XEiJ.regCCR >> 31, XEiJ.regSRS);
  9393:     }
  9394:   }  //irpShi
  9395: 
  9396:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  9397:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  9398:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  9399:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  9400:   //SLS.B <ea>                                      |-|012346|-|--*-*|-----|D M+-WXZ  |0101_001_111_mmm_rrr
  9401:   //SNHI.B <ea>                                     |A|012346|-|--*-*|-----|D M+-WXZ  |0101_001_111_mmm_rrr [SLS.B <ea>]
  9402:   //DBLS.W Dr,<label>                               |-|012346|-|--*-*|-----|          |0101_001_111_001_rrr-{offset}
  9403:   //DBNHI.W Dr,<label>                              |A|012346|-|--*-*|-----|          |0101_001_111_001_rrr-{offset}        [DBLS.W Dr,<label>]
  9404:   //TRAPLS.W #<data>                                |-|--2346|-|--*-*|-----|          |0101_001_111_111_010-{data}
  9405:   //TPLS.W #<data>                                  |A|--2346|-|--*-*|-----|          |0101_001_111_111_010-{data}  [TRAPLS.W #<data>]
  9406:   //TPNHI.W #<data>                                 |A|--2346|-|--*-*|-----|          |0101_001_111_111_010-{data}  [TRAPLS.W #<data>]
  9407:   //TRAPNHI.W #<data>                               |A|--2346|-|--*-*|-----|          |0101_001_111_111_010-{data}  [TRAPLS.W #<data>]
  9408:   //TRAPLS.L #<data>                                |-|--2346|-|--*-*|-----|          |0101_001_111_111_011-{data}
  9409:   //TPLS.L #<data>                                  |A|--2346|-|--*-*|-----|          |0101_001_111_111_011-{data}  [TRAPLS.L #<data>]
  9410:   //TPNHI.L #<data>                                 |A|--2346|-|--*-*|-----|          |0101_001_111_111_011-{data}  [TRAPLS.L #<data>]
  9411:   //TRAPNHI.L #<data>                               |A|--2346|-|--*-*|-----|          |0101_001_111_111_011-{data}  [TRAPLS.L #<data>]
  9412:   //TRAPLS                                          |-|--2346|-|--*-*|-----|          |0101_001_111_111_100
  9413:   //TPLS                                            |A|--2346|-|--*-*|-----|          |0101_001_111_111_100 [TRAPLS]
  9414:   //TPNHI                                           |A|--2346|-|--*-*|-----|          |0101_001_111_111_100 [TRAPLS]
  9415:   //TRAPNHI                                         |A|--2346|-|--*-*|-----|          |0101_001_111_111_100 [TRAPLS]
  9416:   public static void irpSls () throws M68kException {
  9417:     int ea = XEiJ.regOC & 63;
  9418:     if (ea >> 3 == XEiJ.MMM_AR) {  //DBLS.W Dr,<label>
  9419:       int t = XEiJ.regPC;  //pc0+2
  9420:       XEiJ.regPC = t + 2;  //pc0+4
  9421:       t += mmuReadWordSignExword (t, XEiJ.regSRS);  //pc0+2+16bitディスプレースメント
  9422:       if ((t & 1) != 0) {  //分岐先のアドレスが奇数
  9423:         //MC68060のBcc/DBcc/FBccは分岐先のアドレスが奇数のとき分岐しなくてもアドレスエラーになる。FDBccは分岐するときだけ
  9424:         irpBccAddressError (t);
  9425:       }
  9426:       if (XEiJ.MPU_CC_LS << XEiJ.regCCR < 0) {  //条件が成立しているので通過
  9427:         XEiJ.mpuCycleCount += 2;
  9428:       } else {  //条件が成立していないのでデクリメント
  9429:         int rrr = XEiJ.regOC & 7;
  9430:         int s = XEiJ.regRn[rrr];
  9431:         if ((short) s == 0) {  //Drの下位16bitが0なので通過
  9432:           XEiJ.mpuCycleCount += 2;
  9433:           XEiJ.regRn[rrr] = s + 65535;
  9434:         } else {  //Drの下位16bitが0でないので分岐
  9435:           XEiJ.mpuCycleCount++;
  9436:           XEiJ.regRn[rrr] = s - 1;  //下位16bitが0でないので上位16bitは変化しない
  9437:           irpSetPC (t);
  9438:         }
  9439:       }
  9440:     } else if (ea < XEiJ.EA_AR) {  //SLS.B Dr
  9441:       if (XEiJ.MPU_CC_LS << XEiJ.regCCR < 0) {  //セット
  9442:         XEiJ.mpuCycleCount++;
  9443:         XEiJ.regRn[ea] |= 0xff;
  9444:       } else {  //クリア
  9445:         XEiJ.mpuCycleCount++;
  9446:         XEiJ.regRn[ea] &= ~0xff;
  9447:       }
  9448:     } else if ((XEiJ.EAM_PW | XEiJ.EAM_PX | XEiJ.EAM_IM) << ea < 0L) {  //TRAPLS.W/TRAPLS.L/TRAPLS
  9449:       XEiJ.regPC += (ea & 3) + (ea & 1);  //111_010→2,111_011→4,111_100→0
  9450:       if (XEiJ.MPU_CC_LS << XEiJ.regCCR < 0) {
  9451:         //条件が成立しているのでTRAPする
  9452:         M68kException.m6eAddress = XEiJ.regPC0;  //アドレスは命令の先頭
  9453:         M68kException.m6eNumber = M68kException.M6E_TRAPV_INSTRUCTION;
  9454:         throw M68kException.m6eSignal;
  9455:       } else {
  9456:         //条件が成立していないのでTRAPしない
  9457:         XEiJ.mpuCycleCount++;
  9458:       }
  9459:     } else {  //SLS.B <mem>
  9460:       XEiJ.mpuCycleCount++;
  9461:       mmuWriteByteData (efaMltByte (ea), XEiJ.MPU_CC_LS << XEiJ.regCCR >> 31, XEiJ.regSRS);
  9462:     }
  9463:   }  //irpSls
  9464: 
  9465:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  9466:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  9467:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  9468:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  9469:   //SCC.B <ea>                                      |-|012346|-|----*|-----|D M+-WXZ  |0101_010_011_mmm_rrr
  9470:   //SHS.B <ea>                                      |A|012346|-|----*|-----|D M+-WXZ  |0101_010_011_mmm_rrr [SCC.B <ea>]
  9471:   //SNCS.B <ea>                                     |A|012346|-|----*|-----|D M+-WXZ  |0101_010_011_mmm_rrr [SCC.B <ea>]
  9472:   //SNLO.B <ea>                                     |A|012346|-|----*|-----|D M+-WXZ  |0101_010_011_mmm_rrr [SCC.B <ea>]
  9473:   //DBCC.W Dr,<label>                               |-|012346|-|----*|-----|          |0101_010_011_001_rrr-{offset}
  9474:   //DBHS.W Dr,<label>                               |A|012346|-|----*|-----|          |0101_010_011_001_rrr-{offset}        [DBCC.W Dr,<label>]
  9475:   //DBNCS.W Dr,<label>                              |A|012346|-|----*|-----|          |0101_010_011_001_rrr-{offset}        [DBCC.W Dr,<label>]
  9476:   //DBNLO.W Dr,<label>                              |A|012346|-|----*|-----|          |0101_010_011_001_rrr-{offset}        [DBCC.W Dr,<label>]
  9477:   //TRAPCC.W #<data>                                |-|--2346|-|----*|-----|          |0101_010_011_111_010-{data}
  9478:   //TPCC.W #<data>                                  |A|--2346|-|----*|-----|          |0101_010_011_111_010-{data}  [TRAPCC.W #<data>]
  9479:   //TPHS.W #<data>                                  |A|--2346|-|----*|-----|          |0101_010_011_111_010-{data}  [TRAPCC.W #<data>]
  9480:   //TPNCS.W #<data>                                 |A|--2346|-|----*|-----|          |0101_010_011_111_010-{data}  [TRAPCC.W #<data>]
  9481:   //TPNLO.W #<data>                                 |A|--2346|-|----*|-----|          |0101_010_011_111_010-{data}  [TRAPCC.W #<data>]
  9482:   //TRAPHS.W #<data>                                |A|--2346|-|----*|-----|          |0101_010_011_111_010-{data}  [TRAPCC.W #<data>]
  9483:   //TRAPNCS.W #<data>                               |A|--2346|-|----*|-----|          |0101_010_011_111_010-{data}  [TRAPCC.W #<data>]
  9484:   //TRAPNLO.W #<data>                               |A|--2346|-|----*|-----|          |0101_010_011_111_010-{data}  [TRAPCC.W #<data>]
  9485:   //TRAPCC.L #<data>                                |-|--2346|-|----*|-----|          |0101_010_011_111_011-{data}
  9486:   //TPCC.L #<data>                                  |A|--2346|-|----*|-----|          |0101_010_011_111_011-{data}  [TRAPCC.L #<data>]
  9487:   //TPHS.L #<data>                                  |A|--2346|-|----*|-----|          |0101_010_011_111_011-{data}  [TRAPCC.L #<data>]
  9488:   //TPNCS.L #<data>                                 |A|--2346|-|----*|-----|          |0101_010_011_111_011-{data}  [TRAPCC.L #<data>]
  9489:   //TPNLO.L #<data>                                 |A|--2346|-|----*|-----|          |0101_010_011_111_011-{data}  [TRAPCC.L #<data>]
  9490:   //TRAPHS.L #<data>                                |A|--2346|-|----*|-----|          |0101_010_011_111_011-{data}  [TRAPCC.L #<data>]
  9491:   //TRAPNCS.L #<data>                               |A|--2346|-|----*|-----|          |0101_010_011_111_011-{data}  [TRAPCC.L #<data>]
  9492:   //TRAPNLO.L #<data>                               |A|--2346|-|----*|-----|          |0101_010_011_111_011-{data}  [TRAPCC.L #<data>]
  9493:   //TRAPCC                                          |-|--2346|-|----*|-----|          |0101_010_011_111_100
  9494:   //TPCC                                            |A|--2346|-|----*|-----|          |0101_010_011_111_100 [TRAPCC]
  9495:   //TPHS                                            |A|--2346|-|----*|-----|          |0101_010_011_111_100 [TRAPCC]
  9496:   //TPNCS                                           |A|--2346|-|----*|-----|          |0101_010_011_111_100 [TRAPCC]
  9497:   //TPNLO                                           |A|--2346|-|----*|-----|          |0101_010_011_111_100 [TRAPCC]
  9498:   //TRAPHS                                          |A|--2346|-|----*|-----|          |0101_010_011_111_100 [TRAPCC]
  9499:   //TRAPNCS                                         |A|--2346|-|----*|-----|          |0101_010_011_111_100 [TRAPCC]
  9500:   //TRAPNLO                                         |A|--2346|-|----*|-----|          |0101_010_011_111_100 [TRAPCC]
  9501:   public static void irpShs () throws M68kException {
  9502:     int ea = XEiJ.regOC & 63;
  9503:     if (ea >> 3 == XEiJ.MMM_AR) {  //DBHS.W Dr,<label>
  9504:       int t = XEiJ.regPC;  //pc0+2
  9505:       XEiJ.regPC = t + 2;  //pc0+4
  9506:       t += mmuReadWordSignExword (t, XEiJ.regSRS);  //pc0+2+16bitディスプレースメント
  9507:       if ((t & 1) != 0) {  //分岐先のアドレスが奇数
  9508:         //MC68060のBcc/DBcc/FBccは分岐先のアドレスが奇数のとき分岐しなくてもアドレスエラーになる。FDBccは分岐するときだけ
  9509:         irpBccAddressError (t);
  9510:       }
  9511:       if (XEiJ.MPU_CC_HS << XEiJ.regCCR < 0) {  //条件が成立しているので通過
  9512:         XEiJ.mpuCycleCount += 2;
  9513:       } else {  //条件が成立していないのでデクリメント
  9514:         int rrr = XEiJ.regOC & 7;
  9515:         int s = XEiJ.regRn[rrr];
  9516:         if ((short) s == 0) {  //Drの下位16bitが0なので通過
  9517:           XEiJ.mpuCycleCount += 2;
  9518:           XEiJ.regRn[rrr] = s + 65535;
  9519:         } else {  //Drの下位16bitが0でないので分岐
  9520:           XEiJ.mpuCycleCount++;
  9521:           XEiJ.regRn[rrr] = s - 1;  //下位16bitが0でないので上位16bitは変化しない
  9522:           irpSetPC (t);
  9523:         }
  9524:       }
  9525:     } else if (ea < XEiJ.EA_AR) {  //SHS.B Dr
  9526:       if (XEiJ.MPU_CC_HS << XEiJ.regCCR < 0) {  //セット
  9527:         XEiJ.mpuCycleCount++;
  9528:         XEiJ.regRn[ea] |= 0xff;
  9529:       } else {  //クリア
  9530:         XEiJ.mpuCycleCount++;
  9531:         XEiJ.regRn[ea] &= ~0xff;
  9532:       }
  9533:     } else if ((XEiJ.EAM_PW | XEiJ.EAM_PX | XEiJ.EAM_IM) << ea < 0L) {  //TRAPHS.W/TRAPHS.L/TRAPHS
  9534:       XEiJ.regPC += (ea & 3) + (ea & 1);  //111_010→2,111_011→4,111_100→0
  9535:       if (XEiJ.MPU_CC_HS << XEiJ.regCCR < 0) {
  9536:         //条件が成立しているのでTRAPする
  9537:         M68kException.m6eAddress = XEiJ.regPC0;  //アドレスは命令の先頭
  9538:         M68kException.m6eNumber = M68kException.M6E_TRAPV_INSTRUCTION;
  9539:         throw M68kException.m6eSignal;
  9540:       } else {
  9541:         //条件が成立していないのでTRAPしない
  9542:         XEiJ.mpuCycleCount++;
  9543:       }
  9544:     } else {  //SHS.B <mem>
  9545:       XEiJ.mpuCycleCount++;
  9546:       mmuWriteByteData (efaMltByte (ea), XEiJ.MPU_CC_HS << XEiJ.regCCR >> 31, XEiJ.regSRS);
  9547:     }
  9548:   }  //irpShs
  9549: 
  9550:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  9551:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  9552:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  9553:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  9554:   //SCS.B <ea>                                      |-|012346|-|----*|-----|D M+-WXZ  |0101_010_111_mmm_rrr
  9555:   //SLO.B <ea>                                      |A|012346|-|----*|-----|D M+-WXZ  |0101_010_111_mmm_rrr [SCS.B <ea>]
  9556:   //SNCC.B <ea>                                     |A|012346|-|----*|-----|D M+-WXZ  |0101_010_111_mmm_rrr [SCS.B <ea>]
  9557:   //SNHS.B <ea>                                     |A|012346|-|----*|-----|D M+-WXZ  |0101_010_111_mmm_rrr [SCS.B <ea>]
  9558:   //DBCS.W Dr,<label>                               |-|012346|-|----*|-----|          |0101_010_111_001_rrr-{offset}
  9559:   //DBLO.W Dr,<label>                               |A|012346|-|----*|-----|          |0101_010_111_001_rrr-{offset}        [DBCS.W Dr,<label>]
  9560:   //DBNCC.W Dr,<label>                              |A|012346|-|----*|-----|          |0101_010_111_001_rrr-{offset}        [DBCS.W Dr,<label>]
  9561:   //DBNHS.W Dr,<label>                              |A|012346|-|----*|-----|          |0101_010_111_001_rrr-{offset}        [DBCS.W Dr,<label>]
  9562:   //TRAPCS.W #<data>                                |-|--2346|-|----*|-----|          |0101_010_111_111_010-{data}
  9563:   //TPCS.W #<data>                                  |A|--2346|-|----*|-----|          |0101_010_111_111_010-{data}  [TRAPCS.W #<data>]
  9564:   //TPLO.W #<data>                                  |A|--2346|-|----*|-----|          |0101_010_111_111_010-{data}  [TRAPCS.W #<data>]
  9565:   //TPNCC.W #<data>                                 |A|--2346|-|----*|-----|          |0101_010_111_111_010-{data}  [TRAPCS.W #<data>]
  9566:   //TPNHS.W #<data>                                 |A|--2346|-|----*|-----|          |0101_010_111_111_010-{data}  [TRAPCS.W #<data>]
  9567:   //TRAPLO.W #<data>                                |A|--2346|-|----*|-----|          |0101_010_111_111_010-{data}  [TRAPCS.W #<data>]
  9568:   //TRAPNCC.W #<data>                               |A|--2346|-|----*|-----|          |0101_010_111_111_010-{data}  [TRAPCS.W #<data>]
  9569:   //TRAPNHS.W #<data>                               |A|--2346|-|----*|-----|          |0101_010_111_111_010-{data}  [TRAPCS.W #<data>]
  9570:   //TRAPCS.L #<data>                                |-|--2346|-|----*|-----|          |0101_010_111_111_011-{data}
  9571:   //TPCS.L #<data>                                  |A|--2346|-|----*|-----|          |0101_010_111_111_011-{data}  [TRAPCS.L #<data>]
  9572:   //TPLO.L #<data>                                  |A|--2346|-|----*|-----|          |0101_010_111_111_011-{data}  [TRAPCS.L #<data>]
  9573:   //TPNCC.L #<data>                                 |A|--2346|-|----*|-----|          |0101_010_111_111_011-{data}  [TRAPCS.L #<data>]
  9574:   //TPNHS.L #<data>                                 |A|--2346|-|----*|-----|          |0101_010_111_111_011-{data}  [TRAPCS.L #<data>]
  9575:   //TRAPLO.L #<data>                                |A|--2346|-|----*|-----|          |0101_010_111_111_011-{data}  [TRAPCS.L #<data>]
  9576:   //TRAPNCC.L #<data>                               |A|--2346|-|----*|-----|          |0101_010_111_111_011-{data}  [TRAPCS.L #<data>]
  9577:   //TRAPNHS.L #<data>                               |A|--2346|-|----*|-----|          |0101_010_111_111_011-{data}  [TRAPCS.L #<data>]
  9578:   //TRAPCS                                          |-|--2346|-|----*|-----|          |0101_010_111_111_100
  9579:   //TPCS                                            |A|--2346|-|----*|-----|          |0101_010_111_111_100 [TRAPCS]
  9580:   //TPLO                                            |A|--2346|-|----*|-----|          |0101_010_111_111_100 [TRAPCS]
  9581:   //TPNCC                                           |A|--2346|-|----*|-----|          |0101_010_111_111_100 [TRAPCS]
  9582:   //TPNHS                                           |A|--2346|-|----*|-----|          |0101_010_111_111_100 [TRAPCS]
  9583:   //TRAPLO                                          |A|--2346|-|----*|-----|          |0101_010_111_111_100 [TRAPCS]
  9584:   //TRAPNCC                                         |A|--2346|-|----*|-----|          |0101_010_111_111_100 [TRAPCS]
  9585:   //TRAPNHS                                         |A|--2346|-|----*|-----|          |0101_010_111_111_100 [TRAPCS]
  9586:   public static void irpSlo () throws M68kException {
  9587:     int ea = XEiJ.regOC & 63;
  9588:     if (ea >> 3 == XEiJ.MMM_AR) {  //DBLO.W Dr,<label>
  9589:       int t = XEiJ.regPC;  //pc0+2
  9590:       XEiJ.regPC = t + 2;  //pc0+4
  9591:       t += mmuReadWordSignExword (t, XEiJ.regSRS);  //pc0+2+16bitディスプレースメント
  9592:       if ((t & 1) != 0) {  //分岐先のアドレスが奇数
  9593:         //MC68060のBcc/DBcc/FBccは分岐先のアドレスが奇数のとき分岐しなくてもアドレスエラーになる。FDBccは分岐するときだけ
  9594:         irpBccAddressError (t);
  9595:       }
  9596:       if (XEiJ.MPU_CC_LO << XEiJ.regCCR < 0) {  //条件が成立しているので通過
  9597:         XEiJ.mpuCycleCount += 2;
  9598:       } else {  //条件が成立していないのでデクリメント
  9599:         int rrr = XEiJ.regOC & 7;
  9600:         int s = XEiJ.regRn[rrr];
  9601:         if ((short) s == 0) {  //Drの下位16bitが0なので通過
  9602:           XEiJ.mpuCycleCount += 2;
  9603:           XEiJ.regRn[rrr] = s + 65535;
  9604:         } else {  //Drの下位16bitが0でないので分岐
  9605:           XEiJ.mpuCycleCount++;
  9606:           XEiJ.regRn[rrr] = s - 1;  //下位16bitが0でないので上位16bitは変化しない
  9607:           irpSetPC (t);
  9608:         }
  9609:       }
  9610:     } else if (ea < XEiJ.EA_AR) {  //SLO.B Dr
  9611:       if (XEiJ.MPU_CC_LO << XEiJ.regCCR < 0) {  //セット
  9612:         XEiJ.mpuCycleCount++;
  9613:         XEiJ.regRn[ea] |= 0xff;
  9614:       } else {  //クリア
  9615:         XEiJ.mpuCycleCount++;
  9616:         XEiJ.regRn[ea] &= ~0xff;
  9617:       }
  9618:     } else if ((XEiJ.EAM_PW | XEiJ.EAM_PX | XEiJ.EAM_IM) << ea < 0L) {  //TRAPLO.W/TRAPLO.L/TRAPLO
  9619:       XEiJ.regPC += (ea & 3) + (ea & 1);  //111_010→2,111_011→4,111_100→0
  9620:       if (XEiJ.MPU_CC_LO << XEiJ.regCCR < 0) {
  9621:         //条件が成立しているのでTRAPする
  9622:         M68kException.m6eAddress = XEiJ.regPC0;  //アドレスは命令の先頭
  9623:         M68kException.m6eNumber = M68kException.M6E_TRAPV_INSTRUCTION;
  9624:         throw M68kException.m6eSignal;
  9625:       } else {
  9626:         //条件が成立していないのでTRAPしない
  9627:         XEiJ.mpuCycleCount++;
  9628:       }
  9629:     } else {  //SLO.B <mem>
  9630:       XEiJ.mpuCycleCount++;
  9631:       mmuWriteByteData (efaMltByte (ea), XEiJ.MPU_CC_LO << XEiJ.regCCR >> 31, XEiJ.regSRS);
  9632:     }
  9633:   }  //irpSlo
  9634: 
  9635:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  9636:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  9637:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  9638:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  9639:   //SNE.B <ea>                                      |-|012346|-|--*--|-----|D M+-WXZ  |0101_011_011_mmm_rrr
  9640:   //SNEQ.B <ea>                                     |A|012346|-|--*--|-----|D M+-WXZ  |0101_011_011_mmm_rrr [SNE.B <ea>]
  9641:   //SNZ.B <ea>                                      |A|012346|-|--*--|-----|D M+-WXZ  |0101_011_011_mmm_rrr [SNE.B <ea>]
  9642:   //SNZE.B <ea>                                     |A|012346|-|--*--|-----|D M+-WXZ  |0101_011_011_mmm_rrr [SNE.B <ea>]
  9643:   //DBNE.W Dr,<label>                               |-|012346|-|--*--|-----|          |0101_011_011_001_rrr-{offset}
  9644:   //DBNEQ.W Dr,<label>                              |A|012346|-|--*--|-----|          |0101_011_011_001_rrr-{offset}        [DBNE.W Dr,<label>]
  9645:   //DBNZ.W Dr,<label>                               |A|012346|-|--*--|-----|          |0101_011_011_001_rrr-{offset}        [DBNE.W Dr,<label>]
  9646:   //DBNZE.W Dr,<label>                              |A|012346|-|--*--|-----|          |0101_011_011_001_rrr-{offset}        [DBNE.W Dr,<label>]
  9647:   //TRAPNE.W #<data>                                |-|--2346|-|--*--|-----|          |0101_011_011_111_010-{data}
  9648:   //TPNE.W #<data>                                  |A|--2346|-|--*--|-----|          |0101_011_011_111_010-{data}  [TRAPNE.W #<data>]
  9649:   //TPNEQ.W #<data>                                 |A|--2346|-|--*--|-----|          |0101_011_011_111_010-{data}  [TRAPNE.W #<data>]
  9650:   //TPNZ.W #<data>                                  |A|--2346|-|--*--|-----|          |0101_011_011_111_010-{data}  [TRAPNE.W #<data>]
  9651:   //TPNZE.W #<data>                                 |A|--2346|-|--*--|-----|          |0101_011_011_111_010-{data}  [TRAPNE.W #<data>]
  9652:   //TRAPNEQ.W #<data>                               |A|--2346|-|--*--|-----|          |0101_011_011_111_010-{data}  [TRAPNE.W #<data>]
  9653:   //TRAPNZ.W #<data>                                |A|--2346|-|--*--|-----|          |0101_011_011_111_010-{data}  [TRAPNE.W #<data>]
  9654:   //TRAPNZE.W #<data>                               |A|--2346|-|--*--|-----|          |0101_011_011_111_010-{data}  [TRAPNE.W #<data>]
  9655:   //TRAPNE.L #<data>                                |-|--2346|-|--*--|-----|          |0101_011_011_111_011-{data}
  9656:   //TPNE.L #<data>                                  |A|--2346|-|--*--|-----|          |0101_011_011_111_011-{data}  [TRAPNE.L #<data>]
  9657:   //TPNEQ.L #<data>                                 |A|--2346|-|--*--|-----|          |0101_011_011_111_011-{data}  [TRAPNE.L #<data>]
  9658:   //TPNZ.L #<data>                                  |A|--2346|-|--*--|-----|          |0101_011_011_111_011-{data}  [TRAPNE.L #<data>]
  9659:   //TPNZE.L #<data>                                 |A|--2346|-|--*--|-----|          |0101_011_011_111_011-{data}  [TRAPNE.L #<data>]
  9660:   //TRAPNEQ.L #<data>                               |A|--2346|-|--*--|-----|          |0101_011_011_111_011-{data}  [TRAPNE.L #<data>]
  9661:   //TRAPNZ.L #<data>                                |A|--2346|-|--*--|-----|          |0101_011_011_111_011-{data}  [TRAPNE.L #<data>]
  9662:   //TRAPNZE.L #<data>                               |A|--2346|-|--*--|-----|          |0101_011_011_111_011-{data}  [TRAPNE.L #<data>]
  9663:   //TRAPNE                                          |-|--2346|-|--*--|-----|          |0101_011_011_111_100
  9664:   //TPNE                                            |A|--2346|-|--*--|-----|          |0101_011_011_111_100 [TRAPNE]
  9665:   //TPNEQ                                           |A|--2346|-|--*--|-----|          |0101_011_011_111_100 [TRAPNE]
  9666:   //TPNZ                                            |A|--2346|-|--*--|-----|          |0101_011_011_111_100 [TRAPNE]
  9667:   //TPNZE                                           |A|--2346|-|--*--|-----|          |0101_011_011_111_100 [TRAPNE]
  9668:   //TRAPNEQ                                         |A|--2346|-|--*--|-----|          |0101_011_011_111_100 [TRAPNE]
  9669:   //TRAPNZ                                          |A|--2346|-|--*--|-----|          |0101_011_011_111_100 [TRAPNE]
  9670:   //TRAPNZE                                         |A|--2346|-|--*--|-----|          |0101_011_011_111_100 [TRAPNE]
  9671:   public static void irpSne () throws M68kException {
  9672:     int ea = XEiJ.regOC & 63;
  9673:     if (ea >> 3 == XEiJ.MMM_AR) {  //DBNE.W Dr,<label>
  9674:       int t = XEiJ.regPC;  //pc0+2
  9675:       XEiJ.regPC = t + 2;  //pc0+4
  9676:       t += mmuReadWordSignExword (t, XEiJ.regSRS);  //pc0+2+16bitディスプレースメント
  9677:       if ((t & 1) != 0) {  //分岐先のアドレスが奇数
  9678:         //MC68060のBcc/DBcc/FBccは分岐先のアドレスが奇数のとき分岐しなくてもアドレスエラーになる。FDBccは分岐するときだけ
  9679:         irpBccAddressError (t);
  9680:       }
  9681:       if (XEiJ.MPU_CC_NE << XEiJ.regCCR < 0) {  //条件が成立しているので通過
  9682:         XEiJ.mpuCycleCount += 2;
  9683:       } else {  //条件が成立していないのでデクリメント
  9684:         int rrr = XEiJ.regOC & 7;
  9685:         int s = XEiJ.regRn[rrr];
  9686:         if ((short) s == 0) {  //Drの下位16bitが0なので通過
  9687:           XEiJ.mpuCycleCount += 2;
  9688:           XEiJ.regRn[rrr] = s + 65535;
  9689:         } else {  //Drの下位16bitが0でないので分岐
  9690:           XEiJ.mpuCycleCount++;
  9691:           XEiJ.regRn[rrr] = s - 1;  //下位16bitが0でないので上位16bitは変化しない
  9692:           irpSetPC (t);
  9693:         }
  9694:       }
  9695:     } else if (ea < XEiJ.EA_AR) {  //SNE.B Dr
  9696:       if (XEiJ.MPU_CC_NE << XEiJ.regCCR < 0) {  //セット
  9697:         XEiJ.mpuCycleCount++;
  9698:         XEiJ.regRn[ea] |= 0xff;
  9699:       } else {  //クリア
  9700:         XEiJ.mpuCycleCount++;
  9701:         XEiJ.regRn[ea] &= ~0xff;
  9702:       }
  9703:     } else if ((XEiJ.EAM_PW | XEiJ.EAM_PX | XEiJ.EAM_IM) << ea < 0L) {  //TRAPNE.W/TRAPNE.L/TRAPNE
  9704:       XEiJ.regPC += (ea & 3) + (ea & 1);  //111_010→2,111_011→4,111_100→0
  9705:       if (XEiJ.MPU_CC_NE << XEiJ.regCCR < 0) {
  9706:         //条件が成立しているのでTRAPする
  9707:         M68kException.m6eAddress = XEiJ.regPC0;  //アドレスは命令の先頭
  9708:         M68kException.m6eNumber = M68kException.M6E_TRAPV_INSTRUCTION;
  9709:         throw M68kException.m6eSignal;
  9710:       } else {
  9711:         //条件が成立していないのでTRAPしない
  9712:         XEiJ.mpuCycleCount++;
  9713:       }
  9714:     } else {  //SNE.B <mem>
  9715:       XEiJ.mpuCycleCount++;
  9716:       mmuWriteByteData (efaMltByte (ea), XEiJ.MPU_CC_NE << XEiJ.regCCR >> 31, XEiJ.regSRS);
  9717:     }
  9718:   }  //irpSne
  9719: 
  9720:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  9721:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  9722:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  9723:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  9724:   //SEQ.B <ea>                                      |-|012346|-|--*--|-----|D M+-WXZ  |0101_011_111_mmm_rrr
  9725:   //SNNE.B <ea>                                     |A|012346|-|--*--|-----|D M+-WXZ  |0101_011_111_mmm_rrr [SEQ.B <ea>]
  9726:   //SNNZ.B <ea>                                     |A|012346|-|--*--|-----|D M+-WXZ  |0101_011_111_mmm_rrr [SEQ.B <ea>]
  9727:   //SZE.B <ea>                                      |A|012346|-|--*--|-----|D M+-WXZ  |0101_011_111_mmm_rrr [SEQ.B <ea>]
  9728:   //DBEQ.W Dr,<label>                               |-|012346|-|--*--|-----|          |0101_011_111_001_rrr-{offset}
  9729:   //DBNNE.W Dr,<label>                              |A|012346|-|--*--|-----|          |0101_011_111_001_rrr-{offset}        [DBEQ.W Dr,<label>]
  9730:   //DBNNZ.W Dr,<label>                              |A|012346|-|--*--|-----|          |0101_011_111_001_rrr-{offset}        [DBEQ.W Dr,<label>]
  9731:   //DBZE.W Dr,<label>                               |A|012346|-|--*--|-----|          |0101_011_111_001_rrr-{offset}        [DBEQ.W Dr,<label>]
  9732:   //TRAPEQ.W #<data>                                |-|--2346|-|--*--|-----|          |0101_011_111_111_010-{data}
  9733:   //TPEQ.W #<data>                                  |A|--2346|-|--*--|-----|          |0101_011_111_111_010-{data}  [TRAPEQ.W #<data>]
  9734:   //TPNNE.W #<data>                                 |A|--2346|-|--*--|-----|          |0101_011_111_111_010-{data}  [TRAPEQ.W #<data>]
  9735:   //TPNNZ.W #<data>                                 |A|--2346|-|--*--|-----|          |0101_011_111_111_010-{data}  [TRAPEQ.W #<data>]
  9736:   //TPZE.W #<data>                                  |A|--2346|-|--*--|-----|          |0101_011_111_111_010-{data}  [TRAPEQ.W #<data>]
  9737:   //TRAPNNE.W #<data>                               |A|--2346|-|--*--|-----|          |0101_011_111_111_010-{data}  [TRAPEQ.W #<data>]
  9738:   //TRAPNNZ.W #<data>                               |A|--2346|-|--*--|-----|          |0101_011_111_111_010-{data}  [TRAPEQ.W #<data>]
  9739:   //TRAPZE.W #<data>                                |A|--2346|-|--*--|-----|          |0101_011_111_111_010-{data}  [TRAPEQ.W #<data>]
  9740:   //TRAPEQ.L #<data>                                |-|--2346|-|--*--|-----|          |0101_011_111_111_011-{data}
  9741:   //TPEQ.L #<data>                                  |A|--2346|-|--*--|-----|          |0101_011_111_111_011-{data}  [TRAPEQ.L #<data>]
  9742:   //TPNNE.L #<data>                                 |A|--2346|-|--*--|-----|          |0101_011_111_111_011-{data}  [TRAPEQ.L #<data>]
  9743:   //TPNNZ.L #<data>                                 |A|--2346|-|--*--|-----|          |0101_011_111_111_011-{data}  [TRAPEQ.L #<data>]
  9744:   //TPZE.L #<data>                                  |A|--2346|-|--*--|-----|          |0101_011_111_111_011-{data}  [TRAPEQ.L #<data>]
  9745:   //TRAPNNE.L #<data>                               |A|--2346|-|--*--|-----|          |0101_011_111_111_011-{data}  [TRAPEQ.L #<data>]
  9746:   //TRAPNNZ.L #<data>                               |A|--2346|-|--*--|-----|          |0101_011_111_111_011-{data}  [TRAPEQ.L #<data>]
  9747:   //TRAPZE.L #<data>                                |A|--2346|-|--*--|-----|          |0101_011_111_111_011-{data}  [TRAPEQ.L #<data>]
  9748:   //TRAPEQ                                          |-|--2346|-|--*--|-----|          |0101_011_111_111_100
  9749:   //TPEQ                                            |A|--2346|-|--*--|-----|          |0101_011_111_111_100 [TRAPEQ]
  9750:   //TPNNE                                           |A|--2346|-|--*--|-----|          |0101_011_111_111_100 [TRAPEQ]
  9751:   //TPNNZ                                           |A|--2346|-|--*--|-----|          |0101_011_111_111_100 [TRAPEQ]
  9752:   //TPZE                                            |A|--2346|-|--*--|-----|          |0101_011_111_111_100 [TRAPEQ]
  9753:   //TRAPNNE                                         |A|--2346|-|--*--|-----|          |0101_011_111_111_100 [TRAPEQ]
  9754:   //TRAPNNZ                                         |A|--2346|-|--*--|-----|          |0101_011_111_111_100 [TRAPEQ]
  9755:   //TRAPZE                                          |A|--2346|-|--*--|-----|          |0101_011_111_111_100 [TRAPEQ]
  9756:   public static void irpSeq () throws M68kException {
  9757:     int ea = XEiJ.regOC & 63;
  9758:     if (ea >> 3 == XEiJ.MMM_AR) {  //DBEQ.W Dr,<label>
  9759:       int t = XEiJ.regPC;  //pc0+2
  9760:       XEiJ.regPC = t + 2;  //pc0+4
  9761:       t += mmuReadWordSignExword (t, XEiJ.regSRS);  //pc0+2+16bitディスプレースメント
  9762:       if ((t & 1) != 0) {  //分岐先のアドレスが奇数
  9763:         //MC68060のBcc/DBcc/FBccは分岐先のアドレスが奇数のとき分岐しなくてもアドレスエラーになる。FDBccは分岐するときだけ
  9764:         irpBccAddressError (t);
  9765:       }
  9766:       if (XEiJ.MPU_CC_EQ << XEiJ.regCCR < 0) {  //条件が成立しているので通過
  9767:         XEiJ.mpuCycleCount += 2;
  9768:       } else {  //条件が成立していないのでデクリメント
  9769:         int rrr = XEiJ.regOC & 7;
  9770:         int s = XEiJ.regRn[rrr];
  9771:         if ((short) s == 0) {  //Drの下位16bitが0なので通過
  9772:           XEiJ.mpuCycleCount += 2;
  9773:           XEiJ.regRn[rrr] = s + 65535;
  9774:         } else {  //Drの下位16bitが0でないので分岐
  9775:           XEiJ.mpuCycleCount++;
  9776:           XEiJ.regRn[rrr] = s - 1;  //下位16bitが0でないので上位16bitは変化しない
  9777:           irpSetPC (t);
  9778:         }
  9779:       }
  9780:     } else if (ea < XEiJ.EA_AR) {  //SEQ.B Dr
  9781:       if (XEiJ.MPU_CC_EQ << XEiJ.regCCR < 0) {  //セット
  9782:         XEiJ.mpuCycleCount++;
  9783:         XEiJ.regRn[ea] |= 0xff;
  9784:       } else {  //クリア
  9785:         XEiJ.mpuCycleCount++;
  9786:         XEiJ.regRn[ea] &= ~0xff;
  9787:       }
  9788:     } else if ((XEiJ.EAM_PW | XEiJ.EAM_PX | XEiJ.EAM_IM) << ea < 0L) {  //TRAPEQ.W/TRAPEQ.L/TRAPEQ
  9789:       XEiJ.regPC += (ea & 3) + (ea & 1);  //111_010→2,111_011→4,111_100→0
  9790:       if (XEiJ.MPU_CC_EQ << XEiJ.regCCR < 0) {
  9791:         //条件が成立しているのでTRAPする
  9792:         M68kException.m6eAddress = XEiJ.regPC0;  //アドレスは命令の先頭
  9793:         M68kException.m6eNumber = M68kException.M6E_TRAPV_INSTRUCTION;
  9794:         throw M68kException.m6eSignal;
  9795:       } else {
  9796:         //条件が成立していないのでTRAPしない
  9797:         XEiJ.mpuCycleCount++;
  9798:       }
  9799:     } else {  //SEQ.B <mem>
  9800:       XEiJ.mpuCycleCount++;
  9801:       mmuWriteByteData (efaMltByte (ea), XEiJ.MPU_CC_EQ << XEiJ.regCCR >> 31, XEiJ.regSRS);
  9802:     }
  9803:   }  //irpSeq
  9804: 
  9805:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  9806:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  9807:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  9808:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  9809:   //SVC.B <ea>                                      |-|012346|-|---*-|-----|D M+-WXZ  |0101_100_011_mmm_rrr
  9810:   //SNVS.B <ea>                                     |A|012346|-|---*-|-----|D M+-WXZ  |0101_100_011_mmm_rrr [SVC.B <ea>]
  9811:   //DBVC.W Dr,<label>                               |-|012346|-|---*-|-----|          |0101_100_011_001_rrr-{offset}
  9812:   //DBNVS.W Dr,<label>                              |A|012346|-|---*-|-----|          |0101_100_011_001_rrr-{offset}        [DBVC.W Dr,<label>]
  9813:   //TRAPVC.W #<data>                                |-|--2346|-|---*-|-----|          |0101_100_011_111_010-{data}
  9814:   //TPNVS.W #<data>                                 |A|--2346|-|---*-|-----|          |0101_100_011_111_010-{data}  [TRAPVC.W #<data>]
  9815:   //TPVC.W #<data>                                  |A|--2346|-|---*-|-----|          |0101_100_011_111_010-{data}  [TRAPVC.W #<data>]
  9816:   //TRAPNVS.W #<data>                               |A|--2346|-|---*-|-----|          |0101_100_011_111_010-{data}  [TRAPVC.W #<data>]
  9817:   //TRAPVC.L #<data>                                |-|--2346|-|---*-|-----|          |0101_100_011_111_011-{data}
  9818:   //TPNVS.L #<data>                                 |A|--2346|-|---*-|-----|          |0101_100_011_111_011-{data}  [TRAPVC.L #<data>]
  9819:   //TPVC.L #<data>                                  |A|--2346|-|---*-|-----|          |0101_100_011_111_011-{data}  [TRAPVC.L #<data>]
  9820:   //TRAPNVS.L #<data>                               |A|--2346|-|---*-|-----|          |0101_100_011_111_011-{data}  [TRAPVC.L #<data>]
  9821:   //TRAPVC                                          |-|--2346|-|---*-|-----|          |0101_100_011_111_100
  9822:   //TPNVS                                           |A|--2346|-|---*-|-----|          |0101_100_011_111_100 [TRAPVC]
  9823:   //TPVC                                            |A|--2346|-|---*-|-----|          |0101_100_011_111_100 [TRAPVC]
  9824:   //TRAPNVS                                         |A|--2346|-|---*-|-----|          |0101_100_011_111_100 [TRAPVC]
  9825:   public static void irpSvc () throws M68kException {
  9826:     int ea = XEiJ.regOC & 63;
  9827:     if (ea >> 3 == XEiJ.MMM_AR) {  //DBVC.W Dr,<label>
  9828:       int t = XEiJ.regPC;  //pc0+2
  9829:       XEiJ.regPC = t + 2;  //pc0+4
  9830:       t += mmuReadWordSignExword (t, XEiJ.regSRS);  //pc0+2+16bitディスプレースメント
  9831:       if ((t & 1) != 0) {  //分岐先のアドレスが奇数
  9832:         //MC68060のBcc/DBcc/FBccは分岐先のアドレスが奇数のとき分岐しなくてもアドレスエラーになる。FDBccは分岐するときだけ
  9833:         irpBccAddressError (t);
  9834:       }
  9835:       if (XEiJ.MPU_CC_VC << XEiJ.regCCR < 0) {  //条件が成立しているので通過
  9836:         XEiJ.mpuCycleCount += 2;
  9837:       } else {  //条件が成立していないのでデクリメント
  9838:         int rrr = XEiJ.regOC & 7;
  9839:         int s = XEiJ.regRn[rrr];
  9840:         if ((short) s == 0) {  //Drの下位16bitが0なので通過
  9841:           XEiJ.mpuCycleCount += 2;
  9842:           XEiJ.regRn[rrr] = s + 65535;
  9843:         } else {  //Drの下位16bitが0でないので分岐
  9844:           XEiJ.mpuCycleCount++;
  9845:           XEiJ.regRn[rrr] = s - 1;  //下位16bitが0でないので上位16bitは変化しない
  9846:           irpSetPC (t);
  9847:         }
  9848:       }
  9849:     } else if (ea < XEiJ.EA_AR) {  //SVC.B Dr
  9850:       if (XEiJ.MPU_CC_VC << XEiJ.regCCR < 0) {  //セット
  9851:         XEiJ.mpuCycleCount++;
  9852:         XEiJ.regRn[ea] |= 0xff;
  9853:       } else {  //クリア
  9854:         XEiJ.mpuCycleCount++;
  9855:         XEiJ.regRn[ea] &= ~0xff;
  9856:       }
  9857:     } else if ((XEiJ.EAM_PW | XEiJ.EAM_PX | XEiJ.EAM_IM) << ea < 0L) {  //TRAPVC.W/TRAPVC.L/TRAPVC
  9858:       XEiJ.regPC += (ea & 3) + (ea & 1);  //111_010→2,111_011→4,111_100→0
  9859:       if (XEiJ.MPU_CC_VC << XEiJ.regCCR < 0) {
  9860:         //条件が成立しているのでTRAPする
  9861:         M68kException.m6eAddress = XEiJ.regPC0;  //アドレスは命令の先頭
  9862:         M68kException.m6eNumber = M68kException.M6E_TRAPV_INSTRUCTION;
  9863:         throw M68kException.m6eSignal;
  9864:       } else {
  9865:         //条件が成立していないのでTRAPしない
  9866:         XEiJ.mpuCycleCount++;
  9867:       }
  9868:     } else {  //SVC.B <mem>
  9869:       XEiJ.mpuCycleCount++;
  9870:       mmuWriteByteData (efaMltByte (ea), XEiJ.MPU_CC_VC << XEiJ.regCCR >> 31, XEiJ.regSRS);
  9871:     }
  9872:   }  //irpSvc
  9873: 
  9874:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  9875:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  9876:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  9877:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  9878:   //SVS.B <ea>                                      |-|012346|-|---*-|-----|D M+-WXZ  |0101_100_111_mmm_rrr
  9879:   //SNVC.B <ea>                                     |A|012346|-|---*-|-----|D M+-WXZ  |0101_100_111_mmm_rrr [SVS.B <ea>]
  9880:   //DBVS.W Dr,<label>                               |-|012346|-|---*-|-----|          |0101_100_111_001_rrr-{offset}
  9881:   //DBNVC.W Dr,<label>                              |A|012346|-|---*-|-----|          |0101_100_111_001_rrr-{offset}        [DBVS.W Dr,<label>]
  9882:   //TRAPVS.W #<data>                                |-|--2346|-|---*-|-----|          |0101_100_111_111_010-{data}
  9883:   //TPNVC.W #<data>                                 |A|--2346|-|---*-|-----|          |0101_100_111_111_010-{data}  [TRAPVS.W #<data>]
  9884:   //TPVS.W #<data>                                  |A|--2346|-|---*-|-----|          |0101_100_111_111_010-{data}  [TRAPVS.W #<data>]
  9885:   //TRAPNVC.W #<data>                               |A|--2346|-|---*-|-----|          |0101_100_111_111_010-{data}  [TRAPVS.W #<data>]
  9886:   //TRAPVS.L #<data>                                |-|--2346|-|---*-|-----|          |0101_100_111_111_011-{data}
  9887:   //TPNVC.L #<data>                                 |A|--2346|-|---*-|-----|          |0101_100_111_111_011-{data}  [TRAPVS.L #<data>]
  9888:   //TPVS.L #<data>                                  |A|--2346|-|---*-|-----|          |0101_100_111_111_011-{data}  [TRAPVS.L #<data>]
  9889:   //TRAPNVC.L #<data>                               |A|--2346|-|---*-|-----|          |0101_100_111_111_011-{data}  [TRAPVS.L #<data>]
  9890:   //TRAPVS                                          |-|--2346|-|---*-|-----|          |0101_100_111_111_100
  9891:   //TPNVC                                           |A|--2346|-|---*-|-----|          |0101_100_111_111_100 [TRAPVS]
  9892:   //TPVS                                            |A|--2346|-|---*-|-----|          |0101_100_111_111_100 [TRAPVS]
  9893:   //TRAPNVC                                         |A|--2346|-|---*-|-----|          |0101_100_111_111_100 [TRAPVS]
  9894:   public static void irpSvs () throws M68kException {
  9895:     int ea = XEiJ.regOC & 63;
  9896:     if (ea >> 3 == XEiJ.MMM_AR) {  //DBVS.W Dr,<label>
  9897:       int t = XEiJ.regPC;  //pc0+2
  9898:       XEiJ.regPC = t + 2;  //pc0+4
  9899:       t += mmuReadWordSignExword (t, XEiJ.regSRS);  //pc0+2+16bitディスプレースメント
  9900:       if ((t & 1) != 0) {  //分岐先のアドレスが奇数
  9901:         //MC68060のBcc/DBcc/FBccは分岐先のアドレスが奇数のとき分岐しなくてもアドレスエラーになる。FDBccは分岐するときだけ
  9902:         irpBccAddressError (t);
  9903:       }
  9904:       if (XEiJ.MPU_CC_VS << XEiJ.regCCR < 0) {  //条件が成立しているので通過
  9905:         XEiJ.mpuCycleCount += 2;
  9906:       } else {  //条件が成立していないのでデクリメント
  9907:         int rrr = XEiJ.regOC & 7;
  9908:         int s = XEiJ.regRn[rrr];
  9909:         if ((short) s == 0) {  //Drの下位16bitが0なので通過
  9910:           XEiJ.mpuCycleCount += 2;
  9911:           XEiJ.regRn[rrr] = s + 65535;
  9912:         } else {  //Drの下位16bitが0でないので分岐
  9913:           XEiJ.mpuCycleCount++;
  9914:           XEiJ.regRn[rrr] = s - 1;  //下位16bitが0でないので上位16bitは変化しない
  9915:           irpSetPC (t);
  9916:         }
  9917:       }
  9918:     } else if (ea < XEiJ.EA_AR) {  //SVS.B Dr
  9919:       if (XEiJ.MPU_CC_VS << XEiJ.regCCR < 0) {  //セット
  9920:         XEiJ.mpuCycleCount++;
  9921:         XEiJ.regRn[ea] |= 0xff;
  9922:       } else {  //クリア
  9923:         XEiJ.mpuCycleCount++;
  9924:         XEiJ.regRn[ea] &= ~0xff;
  9925:       }
  9926:     } else if ((XEiJ.EAM_PW | XEiJ.EAM_PX | XEiJ.EAM_IM) << ea < 0L) {  //TRAPVS.W/TRAPVS.L/TRAPVS
  9927:       XEiJ.regPC += (ea & 3) + (ea & 1);  //111_010→2,111_011→4,111_100→0
  9928:       if (XEiJ.MPU_CC_VS << XEiJ.regCCR < 0) {
  9929:         //条件が成立しているのでTRAPする
  9930:         M68kException.m6eAddress = XEiJ.regPC0;  //アドレスは命令の先頭
  9931:         M68kException.m6eNumber = M68kException.M6E_TRAPV_INSTRUCTION;
  9932:         throw M68kException.m6eSignal;
  9933:       } else {
  9934:         //条件が成立していないのでTRAPしない
  9935:         XEiJ.mpuCycleCount++;
  9936:       }
  9937:     } else {  //SVS.B <mem>
  9938:       XEiJ.mpuCycleCount++;
  9939:       mmuWriteByteData (efaMltByte (ea), XEiJ.MPU_CC_VS << XEiJ.regCCR >> 31, XEiJ.regSRS);
  9940:     }
  9941:   }  //irpSvs
  9942: 
  9943:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  9944:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
  9945:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
  9946:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
  9947:   //SPL.B <ea>                                      |-|012346|-|-*---|-----|D M+-WXZ  |0101_101_011_mmm_rrr
  9948:   //SNMI.B <ea>                                     |A|012346|-|-*---|-----|D M+-WXZ  |0101_101_011_mmm_rrr [SPL.B <ea>]
  9949:   //DBPL.W Dr,<label>                               |-|012346|-|-*---|-----|          |0101_101_011_001_rrr-{offset}
  9950:   //DBNMI.W Dr,<label>                              |A|012346|-|-*---|-----|          |0101_101_011_001_rrr-{offset}        [DBPL.W Dr,<label>]
  9951:   //TRAPPL.W #<data>                                |-|--2346|-|-*---|-----|          |0101_101_011_111_010-{data}
  9952:   //TPNMI.W #<data>                                 |A|--2346|-|-*---|-----|          |0101_101_011_111_010-{data}  [TRAPPL.W #<data>]
  9953:   //TPPL.W #<data>                                  |A|--2346|-|-*---|-----|          |0101_101_011_111_010-{data}  [TRAPPL.W #<data>]
  9954:   //TRAPNMI.W #<data>                               |A|--2346|-|-*---|-----|          |0101_101_011_111_010-{data}  [TRAPPL.W #<data>]
  9955:   //TRAPPL.L #<data>                                |-|--2346|-|-*---|-----|          |0101_101_011_111_011-{data}
  9956:   //TPNMI.L #<data>                                 |A|--2346|-|-*---|-----|          |0101_101_011_111_011-{data}  [TRAPPL.L #<data>]
  9957:   //TPPL.L #<data>                                  |A|--2346|-|-*---|-----|          |0101_101_011_111_011-{data}  [TRAPPL.L #<data>]
  9958:   //TRAPNMI.L #<data>                               |A|--2346|-|-*---|-----|          |0101_101_011_111_011-{data}  [TRAPPL.L #<data>]
  9959:   //TRAPPL                                          |-|--2346|-|-*---|-----|          |0101_101_011_111_100
  9960:   //TPNMI                                           |A|--2346|-|-*---|-----|          |0101_101_011_111_100 [TRAPPL]
  9961:   //TPPL                                            |A|--2346|-|-*---|-----|          |0101_101_011_111_100 [TRAPPL]
  9962:   //TRAPNMI                                         |A|--2346|-|-*---|-----|          |0101_101_011_111_100 [TRAPPL]
  9963:   public static void irpSpl () throws M68kException {
  9964:     int ea = XEiJ.regOC & 63;
  9965:     if (ea >> 3 == XEiJ.MMM_AR) {  //DBPL.W Dr,<label>
  9966:       int t = XEiJ.regPC;  //pc0+2
  9967:       XEiJ.regPC = t + 2;  //pc0+4
  9968:       t += mmuReadWordSignExword (t, XEiJ.regSRS);  //pc0+2+16bitディスプレースメント
  9969:       if ((t & 1) != 0) {  //分岐先のアドレスが奇数
  9970:         //MC68060のBcc/DBcc/FBccは分岐先のアドレスが奇数のとき分岐しなくてもアドレスエラーになる。FDBccは分岐するときだけ
  9971:         irpBccAddressError (t);
  9972:       }
  9973:       if (XEiJ.MPU_CC_PL << XEiJ.regCCR < 0) {  //条件が成立しているので通過
  9974:         XEiJ.mpuCycleCount += 2;
  9975:       } else {  //条件が成立していないのでデクリメント
  9976:         int rrr = XEiJ.regOC & 7;
  9977:         int s = XEiJ.regRn[rrr];
  9978:         if ((short) s == 0) {  //Drの下位16bitが0なので通過
  9979:           XEiJ.mpuCycleCount += 2;
  9980:           XEiJ.regRn[rrr] = s + 65535;
  9981:         } else {  //Drの下位16bitが0でないので分岐
  9982:           XEiJ.mpuCycleCount++;
  9983:           XEiJ.regRn[rrr] = s - 1;  //下位16bitが0でないので上位16bitは変化しない
  9984:           irpSetPC (t);
  9985:         }
  9986:       }
  9987:     } else if (ea < XEiJ.EA_AR) {  //SPL.B Dr
  9988:       if (XEiJ.MPU_CC_PL << XEiJ.regCCR < 0) {  //セット
  9989:         XEiJ.mpuCycleCount++;
  9990:         XEiJ.regRn[ea] |= 0xff;
  9991:       } else {  //クリア
  9992:         XEiJ.mpuCycleCount++;
  9993:         XEiJ.regRn[ea] &= ~0xff;
  9994:       }
  9995:     } else if ((XEiJ.EAM_PW | XEiJ.EAM_PX | XEiJ.EAM_IM) << ea < 0L) {  //TRAPPL.W/TRAPPL.L/TRAPPL
  9996:       XEiJ.regPC += (ea & 3) + (ea & 1);  //111_010→2,111_011→4,111_100→0
  9997:       if (XEiJ.MPU_CC_PL << XEiJ.regCCR < 0) {
  9998:         //条件が成立しているのでTRAPする
  9999:         M68kException.m6eAddress = XEiJ.regPC0;  //アドレスは命令の先頭
 10000:         M68kException.m6eNumber = M68kException.M6E_TRAPV_INSTRUCTION;
 10001:         throw M68kException.m6eSignal;
 10002:       } else {
 10003:         //条件が成立していないのでTRAPしない
 10004:         XEiJ.mpuCycleCount++;
 10005:       }
 10006:     } else {  //SPL.B <mem>
 10007:       XEiJ.mpuCycleCount++;
 10008:       mmuWriteByteData (efaMltByte (ea), XEiJ.MPU_CC_PL << XEiJ.regCCR >> 31, XEiJ.regSRS);
 10009:     }
 10010:   }  //irpSpl
 10011: 
 10012:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 10013:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
 10014:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
 10015:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 10016:   //SMI.B <ea>                                      |-|012346|-|-*---|-----|D M+-WXZ  |0101_101_111_mmm_rrr
 10017:   //SNPL.B <ea>                                     |A|012346|-|-*---|-----|D M+-WXZ  |0101_101_111_mmm_rrr [SMI.B <ea>]
 10018:   //DBMI.W Dr,<label>                               |-|012346|-|-*---|-----|          |0101_101_111_001_rrr-{offset}
 10019:   //DBNPL.W Dr,<label>                              |A|012346|-|-*---|-----|          |0101_101_111_001_rrr-{offset}        [DBMI.W Dr,<label>]
 10020:   //TRAPMI.W #<data>                                |-|--2346|-|-*---|-----|          |0101_101_111_111_010-{data}
 10021:   //TPMI.W #<data>                                  |A|--2346|-|-*---|-----|          |0101_101_111_111_010-{data}  [TRAPMI.W #<data>]
 10022:   //TPNPL.W #<data>                                 |A|--2346|-|-*---|-----|          |0101_101_111_111_010-{data}  [TRAPMI.W #<data>]
 10023:   //TRAPNPL.W #<data>                               |A|--2346|-|-*---|-----|          |0101_101_111_111_010-{data}  [TRAPMI.W #<data>]
 10024:   //TRAPMI.L #<data>                                |-|--2346|-|-*---|-----|          |0101_101_111_111_011-{data}
 10025:   //TPMI.L #<data>                                  |A|--2346|-|-*---|-----|          |0101_101_111_111_011-{data}  [TRAPMI.L #<data>]
 10026:   //TPNPL.L #<data>                                 |A|--2346|-|-*---|-----|          |0101_101_111_111_011-{data}  [TRAPMI.L #<data>]
 10027:   //TRAPNPL.L #<data>                               |A|--2346|-|-*---|-----|          |0101_101_111_111_011-{data}  [TRAPMI.L #<data>]
 10028:   //TRAPMI                                          |-|--2346|-|-*---|-----|          |0101_101_111_111_100
 10029:   //TPMI                                            |A|--2346|-|-*---|-----|          |0101_101_111_111_100 [TRAPMI]
 10030:   //TPNPL                                           |A|--2346|-|-*---|-----|          |0101_101_111_111_100 [TRAPMI]
 10031:   //TRAPNPL                                         |A|--2346|-|-*---|-----|          |0101_101_111_111_100 [TRAPMI]
 10032:   public static void irpSmi () throws M68kException {
 10033:     int ea = XEiJ.regOC & 63;
 10034:     if (ea >> 3 == XEiJ.MMM_AR) {  //DBMI.W Dr,<label>
 10035:       int t = XEiJ.regPC;  //pc0+2
 10036:       XEiJ.regPC = t + 2;  //pc0+4
 10037:       t += mmuReadWordSignExword (t, XEiJ.regSRS);  //pc0+2+16bitディスプレースメント
 10038:       if ((t & 1) != 0) {  //分岐先のアドレスが奇数
 10039:         //MC68060のBcc/DBcc/FBccは分岐先のアドレスが奇数のとき分岐しなくてもアドレスエラーになる。FDBccは分岐するときだけ
 10040:         irpBccAddressError (t);
 10041:       }
 10042:       if (XEiJ.MPU_CC_MI << XEiJ.regCCR < 0) {  //条件が成立しているので通過
 10043:         XEiJ.mpuCycleCount += 2;
 10044:       } else {  //条件が成立していないのでデクリメント
 10045:         int rrr = XEiJ.regOC & 7;
 10046:         int s = XEiJ.regRn[rrr];
 10047:         if ((short) s == 0) {  //Drの下位16bitが0なので通過
 10048:           XEiJ.mpuCycleCount += 2;
 10049:           XEiJ.regRn[rrr] = s + 65535;
 10050:         } else {  //Drの下位16bitが0でないので分岐
 10051:           XEiJ.mpuCycleCount++;
 10052:           XEiJ.regRn[rrr] = s - 1;  //下位16bitが0でないので上位16bitは変化しない
 10053:           irpSetPC (t);
 10054:         }
 10055:       }
 10056:     } else if (ea < XEiJ.EA_AR) {  //SMI.B Dr
 10057:       if (XEiJ.MPU_CC_MI << XEiJ.regCCR < 0) {  //セット
 10058:         XEiJ.mpuCycleCount++;
 10059:         XEiJ.regRn[ea] |= 0xff;
 10060:       } else {  //クリア
 10061:         XEiJ.mpuCycleCount++;
 10062:         XEiJ.regRn[ea] &= ~0xff;
 10063:       }
 10064:     } else if ((XEiJ.EAM_PW | XEiJ.EAM_PX | XEiJ.EAM_IM) << ea < 0L) {  //TRAPMI.W/TRAPMI.L/TRAPMI
 10065:       XEiJ.regPC += (ea & 3) + (ea & 1);  //111_010→2,111_011→4,111_100→0
 10066:       if (XEiJ.MPU_CC_MI << XEiJ.regCCR < 0) {
 10067:         //条件が成立しているのでTRAPする
 10068:         M68kException.m6eAddress = XEiJ.regPC0;  //アドレスは命令の先頭
 10069:         M68kException.m6eNumber = M68kException.M6E_TRAPV_INSTRUCTION;
 10070:         throw M68kException.m6eSignal;
 10071:       } else {
 10072:         //条件が成立していないのでTRAPしない
 10073:         XEiJ.mpuCycleCount++;
 10074:       }
 10075:     } else {  //SMI.B <mem>
 10076:       XEiJ.mpuCycleCount++;
 10077:       mmuWriteByteData (efaMltByte (ea), XEiJ.MPU_CC_MI << XEiJ.regCCR >> 31, XEiJ.regSRS);
 10078:     }
 10079:   }  //irpSmi
 10080: 
 10081:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 10082:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
 10083:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
 10084:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 10085:   //SGE.B <ea>                                      |-|012346|-|-*-*-|-----|D M+-WXZ  |0101_110_011_mmm_rrr
 10086:   //SNLT.B <ea>                                     |A|012346|-|-*-*-|-----|D M+-WXZ  |0101_110_011_mmm_rrr [SGE.B <ea>]
 10087:   //DBGE.W Dr,<label>                               |-|012346|-|-*-*-|-----|          |0101_110_011_001_rrr-{offset}
 10088:   //DBNLT.W Dr,<label>                              |A|012346|-|-*-*-|-----|          |0101_110_011_001_rrr-{offset}        [DBGE.W Dr,<label>]
 10089:   //TRAPGE.W #<data>                                |-|--2346|-|-*-*-|-----|          |0101_110_011_111_010-{data}
 10090:   //TPGE.W #<data>                                  |A|--2346|-|-*-*-|-----|          |0101_110_011_111_010-{data}  [TRAPGE.W #<data>]
 10091:   //TPNLT.W #<data>                                 |A|--2346|-|-*-*-|-----|          |0101_110_011_111_010-{data}  [TRAPGE.W #<data>]
 10092:   //TRAPNLT.W #<data>                               |A|--2346|-|-*-*-|-----|          |0101_110_011_111_010-{data}  [TRAPGE.W #<data>]
 10093:   //TRAPGE.L #<data>                                |-|--2346|-|-*-*-|-----|          |0101_110_011_111_011-{data}
 10094:   //TPGE.L #<data>                                  |A|--2346|-|-*-*-|-----|          |0101_110_011_111_011-{data}  [TRAPGE.L #<data>]
 10095:   //TPNLT.L #<data>                                 |A|--2346|-|-*-*-|-----|          |0101_110_011_111_011-{data}  [TRAPGE.L #<data>]
 10096:   //TRAPNLT.L #<data>                               |A|--2346|-|-*-*-|-----|          |0101_110_011_111_011-{data}  [TRAPGE.L #<data>]
 10097:   //TRAPGE                                          |-|--2346|-|-*-*-|-----|          |0101_110_011_111_100
 10098:   //TPGE                                            |A|--2346|-|-*-*-|-----|          |0101_110_011_111_100 [TRAPGE]
 10099:   //TPNLT                                           |A|--2346|-|-*-*-|-----|          |0101_110_011_111_100 [TRAPGE]
 10100:   //TRAPNLT                                         |A|--2346|-|-*-*-|-----|          |0101_110_011_111_100 [TRAPGE]
 10101:   public static void irpSge () throws M68kException {
 10102:     int ea = XEiJ.regOC & 63;
 10103:     if (ea >> 3 == XEiJ.MMM_AR) {  //DBGE.W Dr,<label>
 10104:       int t = XEiJ.regPC;  //pc0+2
 10105:       XEiJ.regPC = t + 2;  //pc0+4
 10106:       t += mmuReadWordSignExword (t, XEiJ.regSRS);  //pc0+2+16bitディスプレースメント
 10107:       if ((t & 1) != 0) {  //分岐先のアドレスが奇数
 10108:         //MC68060のBcc/DBcc/FBccは分岐先のアドレスが奇数のとき分岐しなくてもアドレスエラーになる。FDBccは分岐するときだけ
 10109:         irpBccAddressError (t);
 10110:       }
 10111:       if (XEiJ.MPU_CC_GE << XEiJ.regCCR < 0) {  //条件が成立しているので通過
 10112:         XEiJ.mpuCycleCount += 2;
 10113:       } else {  //条件が成立していないのでデクリメント
 10114:         int rrr = XEiJ.regOC & 7;
 10115:         int s = XEiJ.regRn[rrr];
 10116:         if ((short) s == 0) {  //Drの下位16bitが0なので通過
 10117:           XEiJ.mpuCycleCount += 2;
 10118:           XEiJ.regRn[rrr] = s + 65535;
 10119:         } else {  //Drの下位16bitが0でないので分岐
 10120:           XEiJ.mpuCycleCount++;
 10121:           XEiJ.regRn[rrr] = s - 1;  //下位16bitが0でないので上位16bitは変化しない
 10122:           irpSetPC (t);
 10123:         }
 10124:       }
 10125:     } else if (ea < XEiJ.EA_AR) {  //SGE.B Dr
 10126:       if (XEiJ.MPU_CC_GE << XEiJ.regCCR < 0) {  //セット
 10127:         XEiJ.mpuCycleCount++;
 10128:         XEiJ.regRn[ea] |= 0xff;
 10129:       } else {  //クリア
 10130:         XEiJ.mpuCycleCount++;
 10131:         XEiJ.regRn[ea] &= ~0xff;
 10132:       }
 10133:     } else if ((XEiJ.EAM_PW | XEiJ.EAM_PX | XEiJ.EAM_IM) << ea < 0L) {  //TRAPGE.W/TRAPGE.L/TRAPGE
 10134:       XEiJ.regPC += (ea & 3) + (ea & 1);  //111_010→2,111_011→4,111_100→0
 10135:       if (XEiJ.MPU_CC_GE << XEiJ.regCCR < 0) {
 10136:         //条件が成立しているのでTRAPする
 10137:         M68kException.m6eAddress = XEiJ.regPC0;  //アドレスは命令の先頭
 10138:         M68kException.m6eNumber = M68kException.M6E_TRAPV_INSTRUCTION;
 10139:         throw M68kException.m6eSignal;
 10140:       } else {
 10141:         //条件が成立していないのでTRAPしない
 10142:         XEiJ.mpuCycleCount++;
 10143:       }
 10144:     } else {  //SGE.B <mem>
 10145:       XEiJ.mpuCycleCount++;
 10146:       mmuWriteByteData (efaMltByte (ea), XEiJ.MPU_CC_GE << XEiJ.regCCR >> 31, XEiJ.regSRS);
 10147:     }
 10148:   }  //irpSge
 10149: 
 10150:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 10151:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
 10152:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
 10153:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 10154:   //SLT.B <ea>                                      |-|012346|-|-*-*-|-----|D M+-WXZ  |0101_110_111_mmm_rrr
 10155:   //SNGE.B <ea>                                     |A|012346|-|-*-*-|-----|D M+-WXZ  |0101_110_111_mmm_rrr [SLT.B <ea>]
 10156:   //DBLT.W Dr,<label>                               |-|012346|-|-*-*-|-----|          |0101_110_111_001_rrr-{offset}
 10157:   //DBNGE.W Dr,<label>                              |A|012346|-|-*-*-|-----|          |0101_110_111_001_rrr-{offset}        [DBLT.W Dr,<label>]
 10158:   //TRAPLT.W #<data>                                |-|--2346|-|-*-*-|-----|          |0101_110_111_111_010-{data}
 10159:   //TPLT.W #<data>                                  |A|--2346|-|-*-*-|-----|          |0101_110_111_111_010-{data}  [TRAPLT.W #<data>]
 10160:   //TPNGE.W #<data>                                 |A|--2346|-|-*-*-|-----|          |0101_110_111_111_010-{data}  [TRAPLT.W #<data>]
 10161:   //TRAPNGE.W #<data>                               |A|--2346|-|-*-*-|-----|          |0101_110_111_111_010-{data}  [TRAPLT.W #<data>]
 10162:   //TRAPLT.L #<data>                                |-|--2346|-|-*-*-|-----|          |0101_110_111_111_011-{data}
 10163:   //TPLT.L #<data>                                  |A|--2346|-|-*-*-|-----|          |0101_110_111_111_011-{data}  [TRAPLT.L #<data>]
 10164:   //TPNGE.L #<data>                                 |A|--2346|-|-*-*-|-----|          |0101_110_111_111_011-{data}  [TRAPLT.L #<data>]
 10165:   //TRAPNGE.L #<data>                               |A|--2346|-|-*-*-|-----|          |0101_110_111_111_011-{data}  [TRAPLT.L #<data>]
 10166:   //TRAPLT                                          |-|--2346|-|-*-*-|-----|          |0101_110_111_111_100
 10167:   //TPLT                                            |A|--2346|-|-*-*-|-----|          |0101_110_111_111_100 [TRAPLT]
 10168:   //TPNGE                                           |A|--2346|-|-*-*-|-----|          |0101_110_111_111_100 [TRAPLT]
 10169:   //TRAPNGE                                         |A|--2346|-|-*-*-|-----|          |0101_110_111_111_100 [TRAPLT]
 10170:   public static void irpSlt () throws M68kException {
 10171:     int ea = XEiJ.regOC & 63;
 10172:     if (ea >> 3 == XEiJ.MMM_AR) {  //DBLT.W Dr,<label>
 10173:       int t = XEiJ.regPC;  //pc0+2
 10174:       XEiJ.regPC = t + 2;  //pc0+4
 10175:       t += mmuReadWordSignExword (t, XEiJ.regSRS);  //pc0+2+16bitディスプレースメント
 10176:       if ((t & 1) != 0) {  //分岐先のアドレスが奇数
 10177:         //MC68060のBcc/DBcc/FBccは分岐先のアドレスが奇数のとき分岐しなくてもアドレスエラーになる。FDBccは分岐するときだけ
 10178:         irpBccAddressError (t);
 10179:       }
 10180:       if (XEiJ.MPU_CC_LT << XEiJ.regCCR < 0) {  //条件が成立しているので通過
 10181:         XEiJ.mpuCycleCount += 2;
 10182:       } else {  //条件が成立していないのでデクリメント
 10183:         int rrr = XEiJ.regOC & 7;
 10184:         int s = XEiJ.regRn[rrr];
 10185:         if ((short) s == 0) {  //Drの下位16bitが0なので通過
 10186:           XEiJ.mpuCycleCount += 2;
 10187:           XEiJ.regRn[rrr] = s + 65535;
 10188:         } else {  //Drの下位16bitが0でないので分岐
 10189:           XEiJ.mpuCycleCount++;
 10190:           XEiJ.regRn[rrr] = s - 1;  //下位16bitが0でないので上位16bitは変化しない
 10191:           irpSetPC (t);
 10192:         }
 10193:       }
 10194:     } else if (ea < XEiJ.EA_AR) {  //SLT.B Dr
 10195:       if (XEiJ.MPU_CC_LT << XEiJ.regCCR < 0) {  //セット
 10196:         XEiJ.mpuCycleCount++;
 10197:         XEiJ.regRn[ea] |= 0xff;
 10198:       } else {  //クリア
 10199:         XEiJ.mpuCycleCount++;
 10200:         XEiJ.regRn[ea] &= ~0xff;
 10201:       }
 10202:     } else if ((XEiJ.EAM_PW | XEiJ.EAM_PX | XEiJ.EAM_IM) << ea < 0L) {  //TRAPLT.W/TRAPLT.L/TRAPLT
 10203:       XEiJ.regPC += (ea & 3) + (ea & 1);  //111_010→2,111_011→4,111_100→0
 10204:       if (XEiJ.MPU_CC_LT << XEiJ.regCCR < 0) {
 10205:         //条件が成立しているのでTRAPする
 10206:         M68kException.m6eAddress = XEiJ.regPC0;  //アドレスは命令の先頭
 10207:         M68kException.m6eNumber = M68kException.M6E_TRAPV_INSTRUCTION;
 10208:         throw M68kException.m6eSignal;
 10209:       } else {
 10210:         //条件が成立していないのでTRAPしない
 10211:         XEiJ.mpuCycleCount++;
 10212:       }
 10213:     } else {  //SLT.B <mem>
 10214:       XEiJ.mpuCycleCount++;
 10215:       mmuWriteByteData (efaMltByte (ea), XEiJ.MPU_CC_LT << XEiJ.regCCR >> 31, XEiJ.regSRS);
 10216:     }
 10217:   }  //irpSlt
 10218: 
 10219:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 10220:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
 10221:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
 10222:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 10223:   //SGT.B <ea>                                      |-|012346|-|-***-|-----|D M+-WXZ  |0101_111_011_mmm_rrr
 10224:   //SNLE.B <ea>                                     |A|012346|-|-***-|-----|D M+-WXZ  |0101_111_011_mmm_rrr [SGT.B <ea>]
 10225:   //DBGT.W Dr,<label>                               |-|012346|-|-***-|-----|          |0101_111_011_001_rrr-{offset}
 10226:   //DBNLE.W Dr,<label>                              |A|012346|-|-***-|-----|          |0101_111_011_001_rrr-{offset}        [DBGT.W Dr,<label>]
 10227:   //TRAPGT.W #<data>                                |-|--2346|-|-***-|-----|          |0101_111_011_111_010-{data}
 10228:   //TPGT.W #<data>                                  |A|--2346|-|-***-|-----|          |0101_111_011_111_010-{data}  [TRAPGT.W #<data>]
 10229:   //TPNLE.W #<data>                                 |A|--2346|-|-***-|-----|          |0101_111_011_111_010-{data}  [TRAPGT.W #<data>]
 10230:   //TRAPNLE.W #<data>                               |A|--2346|-|-***-|-----|          |0101_111_011_111_010-{data}  [TRAPGT.W #<data>]
 10231:   //TRAPGT.L #<data>                                |-|--2346|-|-***-|-----|          |0101_111_011_111_011-{data}
 10232:   //TPGT.L #<data>                                  |A|--2346|-|-***-|-----|          |0101_111_011_111_011-{data}  [TRAPGT.L #<data>]
 10233:   //TPNLE.L #<data>                                 |A|--2346|-|-***-|-----|          |0101_111_011_111_011-{data}  [TRAPGT.L #<data>]
 10234:   //TRAPNLE.L #<data>                               |A|--2346|-|-***-|-----|          |0101_111_011_111_011-{data}  [TRAPGT.L #<data>]
 10235:   //TRAPGT                                          |-|--2346|-|-***-|-----|          |0101_111_011_111_100
 10236:   //TPGT                                            |A|--2346|-|-***-|-----|          |0101_111_011_111_100 [TRAPGT]
 10237:   //TPNLE                                           |A|--2346|-|-***-|-----|          |0101_111_011_111_100 [TRAPGT]
 10238:   //TRAPNLE                                         |A|--2346|-|-***-|-----|          |0101_111_011_111_100 [TRAPGT]
 10239:   public static void irpSgt () throws M68kException {
 10240:     int ea = XEiJ.regOC & 63;
 10241:     if (ea >> 3 == XEiJ.MMM_AR) {  //DBGT.W Dr,<label>
 10242:       int t = XEiJ.regPC;  //pc0+2
 10243:       XEiJ.regPC = t + 2;  //pc0+4
 10244:       t += mmuReadWordSignExword (t, XEiJ.regSRS);  //pc0+2+16bitディスプレースメント
 10245:       if ((t & 1) != 0) {  //分岐先のアドレスが奇数
 10246:         //MC68060のBcc/DBcc/FBccは分岐先のアドレスが奇数のとき分岐しなくてもアドレスエラーになる。FDBccは分岐するときだけ
 10247:         irpBccAddressError (t);
 10248:       }
 10249:       if (XEiJ.MPU_CC_GT << XEiJ.regCCR < 0) {  //条件が成立しているので通過
 10250:         XEiJ.mpuCycleCount += 2;
 10251:       } else {  //条件が成立していないのでデクリメント
 10252:         int rrr = XEiJ.regOC & 7;
 10253:         int s = XEiJ.regRn[rrr];
 10254:         if ((short) s == 0) {  //Drの下位16bitが0なので通過
 10255:           XEiJ.mpuCycleCount += 2;
 10256:           XEiJ.regRn[rrr] = s + 65535;
 10257:         } else {  //Drの下位16bitが0でないので分岐
 10258:           XEiJ.mpuCycleCount++;
 10259:           XEiJ.regRn[rrr] = s - 1;  //下位16bitが0でないので上位16bitは変化しない
 10260:           irpSetPC (t);
 10261:         }
 10262:       }
 10263:     } else if (ea < XEiJ.EA_AR) {  //SGT.B Dr
 10264:       if (XEiJ.MPU_CC_GT << XEiJ.regCCR < 0) {  //セット
 10265:         XEiJ.mpuCycleCount++;
 10266:         XEiJ.regRn[ea] |= 0xff;
 10267:       } else {  //クリア
 10268:         XEiJ.mpuCycleCount++;
 10269:         XEiJ.regRn[ea] &= ~0xff;
 10270:       }
 10271:     } else if ((XEiJ.EAM_PW | XEiJ.EAM_PX | XEiJ.EAM_IM) << ea < 0L) {  //TRAPGT.W/TRAPGT.L/TRAPGT
 10272:       XEiJ.regPC += (ea & 3) + (ea & 1);  //111_010→2,111_011→4,111_100→0
 10273:       if (XEiJ.MPU_CC_GT << XEiJ.regCCR < 0) {
 10274:         //条件が成立しているのでTRAPする
 10275:         M68kException.m6eAddress = XEiJ.regPC0;  //アドレスは命令の先頭
 10276:         M68kException.m6eNumber = M68kException.M6E_TRAPV_INSTRUCTION;
 10277:         throw M68kException.m6eSignal;
 10278:       } else {
 10279:         //条件が成立していないのでTRAPしない
 10280:         XEiJ.mpuCycleCount++;
 10281:       }
 10282:     } else {  //SGT.B <mem>
 10283:       XEiJ.mpuCycleCount++;
 10284:       mmuWriteByteData (efaMltByte (ea), XEiJ.MPU_CC_GT << XEiJ.regCCR >> 31, XEiJ.regSRS);
 10285:     }
 10286:   }  //irpSgt
 10287: 
 10288:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 10289:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
 10290:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
 10291:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 10292:   //SLE.B <ea>                                      |-|012346|-|-***-|-----|D M+-WXZ  |0101_111_111_mmm_rrr
 10293:   //SNGT.B <ea>                                     |A|012346|-|-***-|-----|D M+-WXZ  |0101_111_111_mmm_rrr [SLE.B <ea>]
 10294:   //DBLE.W Dr,<label>                               |-|012346|-|-***-|-----|          |0101_111_111_001_rrr-{offset}
 10295:   //DBNGT.W Dr,<label>                              |A|012346|-|-***-|-----|          |0101_111_111_001_rrr-{offset}        [DBLE.W Dr,<label>]
 10296:   //TRAPLE.W #<data>                                |-|--2346|-|-***-|-----|          |0101_111_111_111_010-{data}
 10297:   //TPLE.W #<data>                                  |A|--2346|-|-***-|-----|          |0101_111_111_111_010-{data}  [TRAPLE.W #<data>]
 10298:   //TPNGT.W #<data>                                 |A|--2346|-|-***-|-----|          |0101_111_111_111_010-{data}  [TRAPLE.W #<data>]
 10299:   //TRAPNGT.W #<data>                               |A|--2346|-|-***-|-----|          |0101_111_111_111_010-{data}  [TRAPLE.W #<data>]
 10300:   //TRAPLE.L #<data>                                |-|--2346|-|-***-|-----|          |0101_111_111_111_011-{data}
 10301:   //TPLE.L #<data>                                  |A|--2346|-|-***-|-----|          |0101_111_111_111_011-{data}  [TRAPLE.L #<data>]
 10302:   //TPNGT.L #<data>                                 |A|--2346|-|-***-|-----|          |0101_111_111_111_011-{data}  [TRAPLE.L #<data>]
 10303:   //TRAPNGT.L #<data>                               |A|--2346|-|-***-|-----|          |0101_111_111_111_011-{data}  [TRAPLE.L #<data>]
 10304:   //TRAPLE                                          |-|--2346|-|-***-|-----|          |0101_111_111_111_100
 10305:   //TPLE                                            |A|--2346|-|-***-|-----|          |0101_111_111_111_100 [TRAPLE]
 10306:   //TPNGT                                           |A|--2346|-|-***-|-----|          |0101_111_111_111_100 [TRAPLE]
 10307:   //TRAPNGT                                         |A|--2346|-|-***-|-----|          |0101_111_111_111_100 [TRAPLE]
 10308:   public static void irpSle () throws M68kException {
 10309:     int ea = XEiJ.regOC & 63;
 10310:     if (ea >> 3 == XEiJ.MMM_AR) {  //DBLE.W Dr,<label>
 10311:       int t = XEiJ.regPC;  //pc0+2
 10312:       XEiJ.regPC = t + 2;  //pc0+4
 10313:       t += mmuReadWordSignExword (t, XEiJ.regSRS);  //pc0+2+16bitディスプレースメント
 10314:       if ((t & 1) != 0) {  //分岐先のアドレスが奇数
 10315:         //MC68060のBcc/DBcc/FBccは分岐先のアドレスが奇数のとき分岐しなくてもアドレスエラーになる。FDBccは分岐するときだけ
 10316:         irpBccAddressError (t);
 10317:       }
 10318:       if (XEiJ.MPU_CC_LE << XEiJ.regCCR < 0) {  //条件が成立しているので通過
 10319:         XEiJ.mpuCycleCount += 2;
 10320:       } else {  //条件が成立していないのでデクリメント
 10321:         int rrr = XEiJ.regOC & 7;
 10322:         int s = XEiJ.regRn[rrr];
 10323:         if ((short) s == 0) {  //Drの下位16bitが0なので通過
 10324:           XEiJ.mpuCycleCount += 2;
 10325:           XEiJ.regRn[rrr] = s + 65535;
 10326:         } else {  //Drの下位16bitが0でないので分岐
 10327:           XEiJ.mpuCycleCount++;
 10328:           XEiJ.regRn[rrr] = s - 1;  //下位16bitが0でないので上位16bitは変化しない
 10329:           irpSetPC (t);
 10330:         }
 10331:       }
 10332:     } else if (ea < XEiJ.EA_AR) {  //SLE.B Dr
 10333:       if (XEiJ.MPU_CC_LE << XEiJ.regCCR < 0) {  //セット
 10334:         XEiJ.mpuCycleCount++;
 10335:         XEiJ.regRn[ea] |= 0xff;
 10336:       } else {  //クリア
 10337:         XEiJ.mpuCycleCount++;
 10338:         XEiJ.regRn[ea] &= ~0xff;
 10339:       }
 10340:     } else if ((XEiJ.EAM_PW | XEiJ.EAM_PX | XEiJ.EAM_IM) << ea < 0L) {  //TRAPLE.W/TRAPLE.L/TRAPLE
 10341:       XEiJ.regPC += (ea & 3) + (ea & 1);  //111_010→2,111_011→4,111_100→0
 10342:       if (XEiJ.MPU_CC_LE << XEiJ.regCCR < 0) {
 10343:         //条件が成立しているのでTRAPする
 10344:         M68kException.m6eAddress = XEiJ.regPC0;  //アドレスは命令の先頭
 10345:         M68kException.m6eNumber = M68kException.M6E_TRAPV_INSTRUCTION;
 10346:         throw M68kException.m6eSignal;
 10347:       } else {
 10348:         //条件が成立していないのでTRAPしない
 10349:         XEiJ.mpuCycleCount++;
 10350:       }
 10351:     } else {  //SLE.B <mem>
 10352:       XEiJ.mpuCycleCount++;
 10353:       mmuWriteByteData (efaMltByte (ea), XEiJ.MPU_CC_LE << XEiJ.regCCR >> 31, XEiJ.regSRS);
 10354:     }
 10355:   }  //irpSle
 10356: 
 10357:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 10358:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
 10359:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
 10360:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 10361:   //BRA.W <label>                                   |-|012346|-|-----|-----|          |0110_000_000_000_000-{offset}
 10362:   //JBRA.W <label>                                  |A|012346|-|-----|-----|          |0110_000_000_000_000-{offset}        [BRA.W <label>]
 10363:   //BRA.S <label>                                   |-|012346|-|-----|-----|          |0110_000_000_sss_sss (s is not equal to 0)
 10364:   //JBRA.S <label>                                  |A|012346|-|-----|-----|          |0110_000_000_sss_sss (s is not equal to 0)   [BRA.S <label>]
 10365:   public static void irpBrasw () throws M68kException {
 10366:     XEiJ.mpuCycleCount++;  //0clkにしない
 10367:     int t = XEiJ.regPC;  //pc0+2
 10368:     int s = (byte) XEiJ.regOC;  //オフセット
 10369:     if (s == 0) {  //BRA.W
 10370:       XEiJ.regPC = t + 2;
 10371:       s = mmuReadWordSignExword (t, XEiJ.regSRS);  //pcws
 10372:     }
 10373:     irpSetPC (t + s);  //pc0+2+オフセット
 10374:   }  //irpBrasw
 10375: 
 10376:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 10377:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
 10378:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
 10379:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 10380:   //BRA.S <label>                                   |-|012346|-|-----|-----|          |0110_000_001_sss_sss
 10381:   //JBRA.S <label>                                  |A|012346|-|-----|-----|          |0110_000_001_sss_sss [BRA.S <label>]
 10382:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 10383:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
 10384:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
 10385:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 10386:   //BRA.S <label>                                   |-|012346|-|-----|-----|          |0110_000_010_sss_sss
 10387:   //JBRA.S <label>                                  |A|012346|-|-----|-----|          |0110_000_010_sss_sss [BRA.S <label>]
 10388:   public static void irpBras () throws M68kException {
 10389:     XEiJ.mpuCycleCount++;  //0clkにしない
 10390:     irpSetPC (XEiJ.regPC + (byte) XEiJ.regOC);  //pc0+2+オフセット
 10391:   }  //irpBras
 10392: 
 10393:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 10394:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
 10395:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
 10396:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 10397:   //BRA.S <label>                                   |-|--2346|-|-----|-----|          |0110_000_011_sss_sss (s is not equal to 63)
 10398:   //JBRA.S <label>                                  |A|--2346|-|-----|-----|          |0110_000_011_sss_sss (s is not equal to 63)  [BRA.S <label>]
 10399:   //BRA.L <label>                                   |-|--2346|-|-----|-----|          |0110_000_011_111_111-{offset}
 10400:   public static void irpBrasl () throws M68kException {
 10401:     XEiJ.mpuCycleCount++;  //0clkにしない
 10402:     int t = XEiJ.regPC;  //pc0+2
 10403:     int s = (byte) XEiJ.regOC;  //オフセット
 10404:     if (s == -1) {  //BRA.L
 10405:       XEiJ.regPC = t + 4;
 10406:       s = mmuReadLongExword (t, XEiJ.regSRS);  //pcls
 10407:     }
 10408:     irpSetPC (t + s);  //pc0+2+オフセット
 10409:   }  //irpBrasl
 10410: 
 10411:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 10412:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
 10413:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
 10414:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 10415:   //BSR.W <label>                                   |-|012346|-|-----|-----|          |0110_000_100_000_000-{offset}
 10416:   //JBSR.W <label>                                  |A|012346|-|-----|-----|          |0110_000_100_000_000-{offset}        [BSR.W <label>]
 10417:   //BSR.S <label>                                   |-|012346|-|-----|-----|          |0110_000_100_sss_sss (s is not equal to 0)
 10418:   //JBSR.S <label>                                  |A|012346|-|-----|-----|          |0110_000_100_sss_sss (s is not equal to 0)   [BSR.S <label>]
 10419:   public static void irpBsrsw () throws M68kException {
 10420:     XEiJ.mpuCycleCount++;
 10421:     int t = XEiJ.regPC;  //pc0+2
 10422:     int s = (byte) XEiJ.regOC;  //オフセット
 10423:     if (s == 0) {  //BSR.W
 10424:       XEiJ.regPC = t + 2;
 10425:       s = mmuReadWordSignExword (t, XEiJ.regSRS);  //pcws
 10426:     }
 10427:     M68kException.m6eIncremented -= 4L << (7 << 3);
 10428:     mmuWriteLongData (XEiJ.regRn[15] -= 4, XEiJ.regPC, XEiJ.regSRS);  //pushl
 10429:     irpSetPC (t + s);  //pc0+2+オフセット
 10430:   }  //irpBsrsw
 10431: 
 10432:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 10433:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
 10434:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
 10435:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 10436:   //BSR.S <label>                                   |-|012346|-|-----|-----|          |0110_000_101_sss_sss
 10437:   //JBSR.S <label>                                  |A|012346|-|-----|-----|          |0110_000_101_sss_sss [BSR.S <label>]
 10438:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 10439:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
 10440:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
 10441:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 10442:   //BSR.S <label>                                   |-|012346|-|-----|-----|          |0110_000_110_sss_sss
 10443:   //JBSR.S <label>                                  |A|012346|-|-----|-----|          |0110_000_110_sss_sss [BSR.S <label>]
 10444:   public static void irpBsrs () throws M68kException {
 10445:     XEiJ.mpuCycleCount++;
 10446:     M68kException.m6eIncremented -= 4L << (7 << 3);
 10447:     mmuWriteLongData (XEiJ.regRn[15] -= 4, XEiJ.regPC, XEiJ.regSRS);  //pushl
 10448:     irpSetPC (XEiJ.regPC + (byte) XEiJ.regOC);  //pc0+2+オフセット
 10449:   }  //irpBsrs
 10450: 
 10451:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 10452:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
 10453:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
 10454:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 10455:   //BSR.S <label>                                   |-|--2346|-|-----|-----|          |0110_000_111_sss_sss (s is not equal to 63)
 10456:   //JBSR.S <label>                                  |A|--2346|-|-----|-----|          |0110_000_111_sss_sss (s is not equal to 63)  [BSR.S <label>]
 10457:   //BSR.L <label>                                   |-|--2346|-|-----|-----|          |0110_000_111_111_111-{offset}
 10458:   public static void irpBsrsl () throws M68kException {
 10459:     XEiJ.mpuCycleCount++;
 10460:     int t = XEiJ.regPC;  //pc0+2
 10461:     int s = (byte) XEiJ.regOC;  //オフセット
 10462:     if (s == -1) {  //BSR.L
 10463:       XEiJ.regPC = t + 4;
 10464:       s = mmuReadLongExword (t, XEiJ.regSRS);  //pcls
 10465:     }
 10466:     M68kException.m6eIncremented -= 4L << (7 << 3);
 10467:     mmuWriteLongData (XEiJ.regRn[15] -= 4, XEiJ.regPC, XEiJ.regSRS);  //pushl
 10468:     irpSetPC (t + s);  //pc0+2+オフセット
 10469:   }  //irpBsrsl
 10470: 
 10471:   //irpBccAddressError (int t)
 10472:   public static void irpBccAddressError (int t) throws M68kException {
 10473:     M68kException.m6eNumber = M68kException.M6E_ADDRESS_ERROR;
 10474:     M68kException.m6eAddress = t & -2;  //偶数にする
 10475:     M68kException.m6eDirection = XEiJ.MPU_WR_READ;
 10476:     M68kException.m6eSize = XEiJ.MPU_SS_WORD;
 10477:     throw M68kException.m6eSignal;
 10478:   }
 10479: 
 10480:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 10481:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
 10482:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
 10483:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 10484:   //BHI.W <label>                                   |-|012346|-|--*-*|-----|          |0110_001_000_000_000-{offset}
 10485:   //BNLS.W <label>                                  |A|012346|-|--*-*|-----|          |0110_001_000_000_000-{offset}        [BHI.W <label>]
 10486:   //JBHI.W <label>                                  |A|012346|-|--*-*|-----|          |0110_001_000_000_000-{offset}        [BHI.W <label>]
 10487:   //JBNLS.W <label>                                 |A|012346|-|--*-*|-----|          |0110_001_000_000_000-{offset}        [BHI.W <label>]
 10488:   //BHI.S <label>                                   |-|012346|-|--*-*|-----|          |0110_001_000_sss_sss (s is not equal to 0)
 10489:   //BNLS.S <label>                                  |A|012346|-|--*-*|-----|          |0110_001_000_sss_sss (s is not equal to 0)   [BHI.S <label>]
 10490:   //JBHI.S <label>                                  |A|012346|-|--*-*|-----|          |0110_001_000_sss_sss (s is not equal to 0)   [BHI.S <label>]
 10491:   //JBNLS.S <label>                                 |A|012346|-|--*-*|-----|          |0110_001_000_sss_sss (s is not equal to 0)   [BHI.S <label>]
 10492:   //JBLS.L <label>                                  |A|012346|-|--*-*|-----|          |0110_001_000_000_110-0100111011111001-{address}      [BHI.S (*)+8;JMP <label>]
 10493:   //JBNHI.L <label>                                 |A|012346|-|--*-*|-----|          |0110_001_000_000_110-0100111011111001-{address}      [BHI.S (*)+8;JMP <label>]
 10494:   public static void irpBhisw () throws M68kException {
 10495:     XEiJ.mpuCycleCount++;
 10496:     int t = XEiJ.regPC;  //pc0+2
 10497:     int s = (byte) XEiJ.regOC;  //8bitディスプレースメント
 10498:     if (s == 0) {  //Bcc.W
 10499:       XEiJ.regPC = t + 2;  //pc0+4
 10500:       s = mmuReadWordSignExword (t, XEiJ.regSRS);  //16bitディスプレースメント
 10501:     }
 10502:     t += s;  //pc0+2+ディスプレースメント
 10503:     if ((t & 1) != 0) {  //分岐先のアドレスが奇数
 10504:       //MC68060のBcc/DBcc/FBccは分岐先のアドレスが奇数のとき分岐しなくてもアドレスエラーになる。FDBccは分岐するときだけ
 10505:       irpBccAddressError (t);
 10506:     }
 10507:     if (XEiJ.MPU_CC_HI << XEiJ.regCCR < 0) {  //分岐する
 10508:       irpSetPC (t);
 10509:     }
 10510:   }  //irpBhisw
 10511: 
 10512:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 10513:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
 10514:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
 10515:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 10516:   //BHI.S <label>                                   |-|012346|-|--*-*|-----|          |0110_001_001_sss_sss
 10517:   //BNLS.S <label>                                  |A|012346|-|--*-*|-----|          |0110_001_001_sss_sss [BHI.S <label>]
 10518:   //JBHI.S <label>                                  |A|012346|-|--*-*|-----|          |0110_001_001_sss_sss [BHI.S <label>]
 10519:   //JBNLS.S <label>                                 |A|012346|-|--*-*|-----|          |0110_001_001_sss_sss [BHI.S <label>]
 10520:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 10521:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
 10522:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
 10523:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 10524:   //BHI.S <label>                                   |-|012346|-|--*-*|-----|          |0110_001_010_sss_sss
 10525:   //BNLS.S <label>                                  |A|012346|-|--*-*|-----|          |0110_001_010_sss_sss [BHI.S <label>]
 10526:   //JBHI.S <label>                                  |A|012346|-|--*-*|-----|          |0110_001_010_sss_sss [BHI.S <label>]
 10527:   //JBNLS.S <label>                                 |A|012346|-|--*-*|-----|          |0110_001_010_sss_sss [BHI.S <label>]
 10528:   public static void irpBhis () throws M68kException {
 10529:     XEiJ.mpuCycleCount++;
 10530:     int t = XEiJ.regPC;  //pc0+2
 10531:     int s = (byte) XEiJ.regOC;  //8bitディスプレースメント
 10532:     t += s;  //pc0+2+ディスプレースメント
 10533:     if ((t & 1) != 0) {  //分岐先のアドレスが奇数
 10534:       //MC68060のBcc/DBcc/FBccは分岐先のアドレスが奇数のとき分岐しなくてもアドレスエラーになる。FDBccは分岐するときだけ
 10535:       irpBccAddressError (t);
 10536:     }
 10537:     if (XEiJ.MPU_CC_HI << XEiJ.regCCR < 0) {  //分岐する
 10538:       irpSetPC (t);
 10539:     }
 10540:   }  //irpBhis
 10541: 
 10542:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 10543:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
 10544:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
 10545:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 10546:   //BHI.S <label>                                   |-|--2346|-|--*-*|-----|          |0110_001_011_sss_sss (s is not equal to 63)
 10547:   //BNLS.S <label>                                  |A|--2346|-|--*-*|-----|          |0110_001_011_sss_sss (s is not equal to 63)  [BHI.S <label>]
 10548:   //JBHI.S <label>                                  |A|--2346|-|--*-*|-----|          |0110_001_011_sss_sss (s is not equal to 63)  [BHI.S <label>]
 10549:   //JBNLS.S <label>                                 |A|--2346|-|--*-*|-----|          |0110_001_011_sss_sss (s is not equal to 63)  [BHI.S <label>]
 10550:   //BHI.L <label>                                   |-|--2346|-|--*-*|-----|          |0110_001_011_111_111-{offset}
 10551:   //BNLS.L <label>                                  |A|--2346|-|--*-*|-----|          |0110_001_011_111_111-{offset}        [BHI.L <label>]
 10552:   public static void irpBhisl () throws M68kException {
 10553:     XEiJ.mpuCycleCount++;
 10554:     int t = XEiJ.regPC;  //pc0+2
 10555:     int s = (byte) XEiJ.regOC;  //8bitディスプレースメント
 10556:     if (s == -1) {  //Bcc.L
 10557:       XEiJ.regPC = t + 4;  //pc0+6
 10558:       s = mmuReadLongExword (t, XEiJ.regSRS);  //32bitディスプレースメント
 10559:     }
 10560:     t += s;  //pc0+2+ディスプレースメント
 10561:     if ((t & 1) != 0) {  //分岐先のアドレスが奇数
 10562:       //MC68060のBcc/DBcc/FBccは分岐先のアドレスが奇数のとき分岐しなくてもアドレスエラーになる。FDBccは分岐するときだけ
 10563:       irpBccAddressError (t);
 10564:     }
 10565:     if (XEiJ.MPU_CC_HI << XEiJ.regCCR < 0) {  //分岐する
 10566:       irpSetPC (t);
 10567:     }
 10568:   }  //irpBhisl
 10569: 
 10570:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 10571:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
 10572:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
 10573:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 10574:   //BLS.W <label>                                   |-|012346|-|--*-*|-----|          |0110_001_100_000_000-{offset}
 10575:   //BNHI.W <label>                                  |A|012346|-|--*-*|-----|          |0110_001_100_000_000-{offset}        [BLS.W <label>]
 10576:   //JBLS.W <label>                                  |A|012346|-|--*-*|-----|          |0110_001_100_000_000-{offset}        [BLS.W <label>]
 10577:   //JBNHI.W <label>                                 |A|012346|-|--*-*|-----|          |0110_001_100_000_000-{offset}        [BLS.W <label>]
 10578:   //BLS.S <label>                                   |-|012346|-|--*-*|-----|          |0110_001_100_sss_sss (s is not equal to 0)
 10579:   //BNHI.S <label>                                  |A|012346|-|--*-*|-----|          |0110_001_100_sss_sss (s is not equal to 0)   [BLS.S <label>]
 10580:   //JBLS.S <label>                                  |A|012346|-|--*-*|-----|          |0110_001_100_sss_sss (s is not equal to 0)   [BLS.S <label>]
 10581:   //JBNHI.S <label>                                 |A|012346|-|--*-*|-----|          |0110_001_100_sss_sss (s is not equal to 0)   [BLS.S <label>]
 10582:   //JBHI.L <label>                                  |A|012346|-|--*-*|-----|          |0110_001_100_000_110-0100111011111001-{address}      [BLS.S (*)+8;JMP <label>]
 10583:   //JBNLS.L <label>                                 |A|012346|-|--*-*|-----|          |0110_001_100_000_110-0100111011111001-{address}      [BLS.S (*)+8;JMP <label>]
 10584:   public static void irpBlssw () throws M68kException {
 10585:     XEiJ.mpuCycleCount++;
 10586:     int t = XEiJ.regPC;  //pc0+2
 10587:     int s = (byte) XEiJ.regOC;  //8bitディスプレースメント
 10588:     if (s == 0) {  //Bcc.W
 10589:       XEiJ.regPC = t + 2;  //pc0+4
 10590:       s = mmuReadWordSignExword (t, XEiJ.regSRS);  //16bitディスプレースメント
 10591:     }
 10592:     t += s;  //pc0+2+ディスプレースメント
 10593:     if ((t & 1) != 0) {  //分岐先のアドレスが奇数
 10594:       //MC68060のBcc/DBcc/FBccは分岐先のアドレスが奇数のとき分岐しなくてもアドレスエラーになる。FDBccは分岐するときだけ
 10595:       irpBccAddressError (t);
 10596:     }
 10597:     if (XEiJ.MPU_CC_LS << XEiJ.regCCR < 0) {  //分岐する
 10598:       irpSetPC (t);
 10599:     }
 10600:   }  //irpBlssw
 10601: 
 10602:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 10603:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
 10604:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
 10605:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 10606:   //BLS.S <label>                                   |-|012346|-|--*-*|-----|          |0110_001_101_sss_sss
 10607:   //BNHI.S <label>                                  |A|012346|-|--*-*|-----|          |0110_001_101_sss_sss [BLS.S <label>]
 10608:   //JBLS.S <label>                                  |A|012346|-|--*-*|-----|          |0110_001_101_sss_sss [BLS.S <label>]
 10609:   //JBNHI.S <label>                                 |A|012346|-|--*-*|-----|          |0110_001_101_sss_sss [BLS.S <label>]
 10610:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 10611:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
 10612:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
 10613:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 10614:   //BLS.S <label>                                   |-|012346|-|--*-*|-----|          |0110_001_110_sss_sss
 10615:   //BNHI.S <label>                                  |A|012346|-|--*-*|-----|          |0110_001_110_sss_sss [BLS.S <label>]
 10616:   //JBLS.S <label>                                  |A|012346|-|--*-*|-----|          |0110_001_110_sss_sss [BLS.S <label>]
 10617:   //JBNHI.S <label>                                 |A|012346|-|--*-*|-----|          |0110_001_110_sss_sss [BLS.S <label>]
 10618:   public static void irpBlss () throws M68kException {
 10619:     XEiJ.mpuCycleCount++;
 10620:     int t = XEiJ.regPC;  //pc0+2
 10621:     int s = (byte) XEiJ.regOC;  //8bitディスプレースメント
 10622:     t += s;  //pc0+2+ディスプレースメント
 10623:     if ((t & 1) != 0) {  //分岐先のアドレスが奇数
 10624:       //MC68060のBcc/DBcc/FBccは分岐先のアドレスが奇数のとき分岐しなくてもアドレスエラーになる。FDBccは分岐するときだけ
 10625:       irpBccAddressError (t);
 10626:     }
 10627:     if (XEiJ.MPU_CC_LS << XEiJ.regCCR < 0) {  //分岐する
 10628:       irpSetPC (t);
 10629:     }
 10630:   }  //irpBlss
 10631: 
 10632:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 10633:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
 10634:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
 10635:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 10636:   //BLS.S <label>                                   |-|--2346|-|--*-*|-----|          |0110_001_111_sss_sss (s is not equal to 63)
 10637:   //BNHI.S <label>                                  |A|--2346|-|--*-*|-----|          |0110_001_111_sss_sss (s is not equal to 63)  [BLS.S <label>]
 10638:   //JBLS.S <label>                                  |A|--2346|-|--*-*|-----|          |0110_001_111_sss_sss (s is not equal to 63)  [BLS.S <label>]
 10639:   //JBNHI.S <label>                                 |A|--2346|-|--*-*|-----|          |0110_001_111_sss_sss (s is not equal to 63)  [BLS.S <label>]
 10640:   //BLS.L <label>                                   |-|--2346|-|--*-*|-----|          |0110_001_111_111_111-{offset}
 10641:   //BNHI.L <label>                                  |A|--2346|-|--*-*|-----|          |0110_001_111_111_111-{offset}        [BLS.L <label>]
 10642:   public static void irpBlssl () throws M68kException {
 10643:     XEiJ.mpuCycleCount++;
 10644:     int t = XEiJ.regPC;  //pc0+2
 10645:     int s = (byte) XEiJ.regOC;  //8bitディスプレースメント
 10646:     if (s == -1) {  //Bcc.L
 10647:       XEiJ.regPC = t + 4;  //pc0+6
 10648:       s = mmuReadLongExword (t, XEiJ.regSRS);  //32bitディスプレースメント
 10649:     }
 10650:     t += s;  //pc0+2+ディスプレースメント
 10651:     if ((t & 1) != 0) {  //分岐先のアドレスが奇数
 10652:       //MC68060のBcc/DBcc/FBccは分岐先のアドレスが奇数のとき分岐しなくてもアドレスエラーになる。FDBccは分岐するときだけ
 10653:       irpBccAddressError (t);
 10654:     }
 10655:     if (XEiJ.MPU_CC_LS << XEiJ.regCCR < 0) {  //分岐する
 10656:       irpSetPC (t);
 10657:     }
 10658:   }  //irpBlssl
 10659: 
 10660:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 10661:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
 10662:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
 10663:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 10664:   //BCC.W <label>                                   |-|012346|-|----*|-----|          |0110_010_000_000_000-{offset}
 10665:   //BHS.W <label>                                   |A|012346|-|----*|-----|          |0110_010_000_000_000-{offset}        [BCC.W <label>]
 10666:   //BNCS.W <label>                                  |A|012346|-|----*|-----|          |0110_010_000_000_000-{offset}        [BCC.W <label>]
 10667:   //BNLO.W <label>                                  |A|012346|-|----*|-----|          |0110_010_000_000_000-{offset}        [BCC.W <label>]
 10668:   //JBCC.W <label>                                  |A|012346|-|----*|-----|          |0110_010_000_000_000-{offset}        [BCC.W <label>]
 10669:   //JBHS.W <label>                                  |A|012346|-|----*|-----|          |0110_010_000_000_000-{offset}        [BCC.W <label>]
 10670:   //JBNCS.W <label>                                 |A|012346|-|----*|-----|          |0110_010_000_000_000-{offset}        [BCC.W <label>]
 10671:   //JBNLO.W <label>                                 |A|012346|-|----*|-----|          |0110_010_000_000_000-{offset}        [BCC.W <label>]
 10672:   //BCC.S <label>                                   |-|012346|-|----*|-----|          |0110_010_000_sss_sss (s is not equal to 0)
 10673:   //BHS.S <label>                                   |A|012346|-|----*|-----|          |0110_010_000_sss_sss (s is not equal to 0)   [BCC.S <label>]
 10674:   //BNCS.S <label>                                  |A|012346|-|----*|-----|          |0110_010_000_sss_sss (s is not equal to 0)   [BCC.S <label>]
 10675:   //BNLO.S <label>                                  |A|012346|-|----*|-----|          |0110_010_000_sss_sss (s is not equal to 0)   [BCC.S <label>]
 10676:   //JBCC.S <label>                                  |A|012346|-|----*|-----|          |0110_010_000_sss_sss (s is not equal to 0)   [BCC.S <label>]
 10677:   //JBHS.S <label>                                  |A|012346|-|----*|-----|          |0110_010_000_sss_sss (s is not equal to 0)   [BCC.S <label>]
 10678:   //JBNCS.S <label>                                 |A|012346|-|----*|-----|          |0110_010_000_sss_sss (s is not equal to 0)   [BCC.S <label>]
 10679:   //JBNLO.S <label>                                 |A|012346|-|----*|-----|          |0110_010_000_sss_sss (s is not equal to 0)   [BCC.S <label>]
 10680:   //JBCS.L <label>                                  |A|012346|-|----*|-----|          |0110_010_000_000_110-0100111011111001-{address}      [BCC.S (*)+8;JMP <label>]
 10681:   //JBLO.L <label>                                  |A|012346|-|----*|-----|          |0110_010_000_000_110-0100111011111001-{address}      [BCC.S (*)+8;JMP <label>]
 10682:   //JBNCC.L <label>                                 |A|012346|-|----*|-----|          |0110_010_000_000_110-0100111011111001-{address}      [BCC.S (*)+8;JMP <label>]
 10683:   //JBNHS.L <label>                                 |A|012346|-|----*|-----|          |0110_010_000_000_110-0100111011111001-{address}      [BCC.S (*)+8;JMP <label>]
 10684:   public static void irpBhssw () throws M68kException {
 10685:     XEiJ.mpuCycleCount++;
 10686:     int t = XEiJ.regPC;  //pc0+2
 10687:     int s = (byte) XEiJ.regOC;  //8bitディスプレースメント
 10688:     if (s == 0) {  //Bcc.W
 10689:       XEiJ.regPC = t + 2;  //pc0+4
 10690:       s = mmuReadWordSignExword (t, XEiJ.regSRS);  //16bitディスプレースメント
 10691:     }
 10692:     t += s;  //pc0+2+ディスプレースメント
 10693:     if ((t & 1) != 0) {  //分岐先のアドレスが奇数
 10694:       //MC68060のBcc/DBcc/FBccは分岐先のアドレスが奇数のとき分岐しなくてもアドレスエラーになる。FDBccは分岐するときだけ
 10695:       irpBccAddressError (t);
 10696:     }
 10697:     if (XEiJ.MPU_CC_HS << XEiJ.regCCR < 0) {  //分岐する
 10698:       irpSetPC (t);
 10699:     }
 10700:   }  //irpBhssw
 10701: 
 10702:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 10703:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
 10704:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
 10705:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 10706:   //BCC.S <label>                                   |-|012346|-|----*|-----|          |0110_010_001_sss_sss
 10707:   //BHS.S <label>                                   |A|012346|-|----*|-----|          |0110_010_001_sss_sss [BCC.S <label>]
 10708:   //BNCS.S <label>                                  |A|012346|-|----*|-----|          |0110_010_001_sss_sss [BCC.S <label>]
 10709:   //BNLO.S <label>                                  |A|012346|-|----*|-----|          |0110_010_001_sss_sss [BCC.S <label>]
 10710:   //JBCC.S <label>                                  |A|012346|-|----*|-----|          |0110_010_001_sss_sss [BCC.S <label>]
 10711:   //JBHS.S <label>                                  |A|012346|-|----*|-----|          |0110_010_001_sss_sss [BCC.S <label>]
 10712:   //JBNCS.S <label>                                 |A|012346|-|----*|-----|          |0110_010_001_sss_sss [BCC.S <label>]
 10713:   //JBNLO.S <label>                                 |A|012346|-|----*|-----|          |0110_010_001_sss_sss [BCC.S <label>]
 10714:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 10715:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
 10716:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
 10717:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 10718:   //BCC.S <label>                                   |-|012346|-|----*|-----|          |0110_010_010_sss_sss
 10719:   //BHS.S <label>                                   |A|012346|-|----*|-----|          |0110_010_010_sss_sss [BCC.S <label>]
 10720:   //BNCS.S <label>                                  |A|012346|-|----*|-----|          |0110_010_010_sss_sss [BCC.S <label>]
 10721:   //BNLO.S <label>                                  |A|012346|-|----*|-----|          |0110_010_010_sss_sss [BCC.S <label>]
 10722:   //JBCC.S <label>                                  |A|012346|-|----*|-----|          |0110_010_010_sss_sss [BCC.S <label>]
 10723:   //JBHS.S <label>                                  |A|012346|-|----*|-----|          |0110_010_010_sss_sss [BCC.S <label>]
 10724:   //JBNCS.S <label>                                 |A|012346|-|----*|-----|          |0110_010_010_sss_sss [BCC.S <label>]
 10725:   //JBNLO.S <label>                                 |A|012346|-|----*|-----|          |0110_010_010_sss_sss [BCC.S <label>]
 10726:   public static void irpBhss () throws M68kException {
 10727:     XEiJ.mpuCycleCount++;
 10728:     int t = XEiJ.regPC;  //pc0+2
 10729:     int s = (byte) XEiJ.regOC;  //8bitディスプレースメント
 10730:     t += s;  //pc0+2+ディスプレースメント
 10731:     if ((t & 1) != 0) {  //分岐先のアドレスが奇数
 10732:       //MC68060のBcc/DBcc/FBccは分岐先のアドレスが奇数のとき分岐しなくてもアドレスエラーになる。FDBccは分岐するときだけ
 10733:       irpBccAddressError (t);
 10734:     }
 10735:     if (XEiJ.MPU_CC_HS << XEiJ.regCCR < 0) {  //分岐する
 10736:       irpSetPC (t);
 10737:     }
 10738:   }  //irpBhss
 10739: 
 10740:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 10741:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
 10742:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
 10743:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 10744:   //BCC.S <label>                                   |-|--2346|-|----*|-----|          |0110_010_011_sss_sss (s is not equal to 63)
 10745:   //BHS.S <label>                                   |A|--2346|-|----*|-----|          |0110_010_011_sss_sss (s is not equal to 63)  [BCC.S <label>]
 10746:   //BNCS.S <label>                                  |A|--2346|-|----*|-----|          |0110_010_011_sss_sss (s is not equal to 63)  [BCC.S <label>]
 10747:   //BNLO.S <label>                                  |A|--2346|-|----*|-----|          |0110_010_011_sss_sss (s is not equal to 63)  [BCC.S <label>]
 10748:   //JBCC.S <label>                                  |A|--2346|-|----*|-----|          |0110_010_011_sss_sss (s is not equal to 63)  [BCC.S <label>]
 10749:   //JBHS.S <label>                                  |A|--2346|-|----*|-----|          |0110_010_011_sss_sss (s is not equal to 63)  [BCC.S <label>]
 10750:   //JBNCS.S <label>                                 |A|--2346|-|----*|-----|          |0110_010_011_sss_sss (s is not equal to 63)  [BCC.S <label>]
 10751:   //JBNLO.S <label>                                 |A|--2346|-|----*|-----|          |0110_010_011_sss_sss (s is not equal to 63)  [BCC.S <label>]
 10752:   //BCC.L <label>                                   |-|--2346|-|----*|-----|          |0110_010_011_111_111-{offset}
 10753:   //BHS.L <label>                                   |A|--2346|-|----*|-----|          |0110_010_011_111_111-{offset}        [BCC.L <label>]
 10754:   //BNCS.L <label>                                  |A|--2346|-|----*|-----|          |0110_010_011_111_111-{offset}        [BCC.L <label>]
 10755:   //BNLO.L <label>                                  |A|--2346|-|----*|-----|          |0110_010_011_111_111-{offset}        [BCC.L <label>]
 10756:   public static void irpBhssl () throws M68kException {
 10757:     XEiJ.mpuCycleCount++;
 10758:     int t = XEiJ.regPC;  //pc0+2
 10759:     int s = (byte) XEiJ.regOC;  //8bitディスプレースメント
 10760:     if (s == -1) {  //Bcc.L
 10761:       XEiJ.regPC = t + 4;  //pc0+6
 10762:       s = mmuReadLongExword (t, XEiJ.regSRS);  //32bitディスプレースメント
 10763:     }
 10764:     t += s;  //pc0+2+ディスプレースメント
 10765:     if ((t & 1) != 0) {  //分岐先のアドレスが奇数
 10766:       //MC68060のBcc/DBcc/FBccは分岐先のアドレスが奇数のとき分岐しなくてもアドレスエラーになる。FDBccは分岐するときだけ
 10767:       irpBccAddressError (t);
 10768:     }
 10769:     if (XEiJ.MPU_CC_HS << XEiJ.regCCR < 0) {  //分岐する
 10770:       irpSetPC (t);
 10771:     }
 10772:   }  //irpBhssl
 10773: 
 10774:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 10775:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
 10776:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
 10777:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 10778:   //BCS.W <label>                                   |-|012346|-|----*|-----|          |0110_010_100_000_000-{offset}
 10779:   //BLO.W <label>                                   |A|012346|-|----*|-----|          |0110_010_100_000_000-{offset}        [BCS.W <label>]
 10780:   //BNCC.W <label>                                  |A|012346|-|----*|-----|          |0110_010_100_000_000-{offset}        [BCS.W <label>]
 10781:   //BNHS.W <label>                                  |A|012346|-|----*|-----|          |0110_010_100_000_000-{offset}        [BCS.W <label>]
 10782:   //JBCS.W <label>                                  |A|012346|-|----*|-----|          |0110_010_100_000_000-{offset}        [BCS.W <label>]
 10783:   //JBLO.W <label>                                  |A|012346|-|----*|-----|          |0110_010_100_000_000-{offset}        [BCS.W <label>]
 10784:   //JBNCC.W <label>                                 |A|012346|-|----*|-----|          |0110_010_100_000_000-{offset}        [BCS.W <label>]
 10785:   //JBNHS.W <label>                                 |A|012346|-|----*|-----|          |0110_010_100_000_000-{offset}        [BCS.W <label>]
 10786:   //BCS.S <label>                                   |-|012346|-|----*|-----|          |0110_010_100_sss_sss (s is not equal to 0)
 10787:   //BLO.S <label>                                   |A|012346|-|----*|-----|          |0110_010_100_sss_sss (s is not equal to 0)   [BCS.S <label>]
 10788:   //BNCC.S <label>                                  |A|012346|-|----*|-----|          |0110_010_100_sss_sss (s is not equal to 0)   [BCS.S <label>]
 10789:   //BNHS.S <label>                                  |A|012346|-|----*|-----|          |0110_010_100_sss_sss (s is not equal to 0)   [BCS.S <label>]
 10790:   //JBCS.S <label>                                  |A|012346|-|----*|-----|          |0110_010_100_sss_sss (s is not equal to 0)   [BCS.S <label>]
 10791:   //JBLO.S <label>                                  |A|012346|-|----*|-----|          |0110_010_100_sss_sss (s is not equal to 0)   [BCS.S <label>]
 10792:   //JBNCC.S <label>                                 |A|012346|-|----*|-----|          |0110_010_100_sss_sss (s is not equal to 0)   [BCS.S <label>]
 10793:   //JBNHS.S <label>                                 |A|012346|-|----*|-----|          |0110_010_100_sss_sss (s is not equal to 0)   [BCS.S <label>]
 10794:   //JBCC.L <label>                                  |A|012346|-|----*|-----|          |0110_010_100_000_110-0100111011111001-{address}      [BCS.S (*)+8;JMP <label>]
 10795:   //JBHS.L <label>                                  |A|012346|-|----*|-----|          |0110_010_100_000_110-0100111011111001-{address}      [BCS.S (*)+8;JMP <label>]
 10796:   //JBNCS.L <label>                                 |A|012346|-|----*|-----|          |0110_010_100_000_110-0100111011111001-{address}      [BCS.S (*)+8;JMP <label>]
 10797:   //JBNLO.L <label>                                 |A|012346|-|----*|-----|          |0110_010_100_000_110-0100111011111001-{address}      [BCS.S (*)+8;JMP <label>]
 10798:   public static void irpBlosw () throws M68kException {
 10799:     XEiJ.mpuCycleCount++;
 10800:     int t = XEiJ.regPC;  //pc0+2
 10801:     int s = (byte) XEiJ.regOC;  //8bitディスプレースメント
 10802:     if (s == 0) {  //Bcc.W
 10803:       XEiJ.regPC = t + 2;  //pc0+4
 10804:       s = mmuReadWordSignExword (t, XEiJ.regSRS);  //16bitディスプレースメント
 10805:     }
 10806:     t += s;  //pc0+2+ディスプレースメント
 10807:     if ((t & 1) != 0) {  //分岐先のアドレスが奇数
 10808:       //MC68060のBcc/DBcc/FBccは分岐先のアドレスが奇数のとき分岐しなくてもアドレスエラーになる。FDBccは分岐するときだけ
 10809:       irpBccAddressError (t);
 10810:     }
 10811:     if (XEiJ.MPU_CC_LO << XEiJ.regCCR < 0) {  //分岐する
 10812:       irpSetPC (t);
 10813:     }
 10814:   }  //irpBlosw
 10815: 
 10816:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 10817:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
 10818:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
 10819:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 10820:   //BCS.S <label>                                   |-|012346|-|----*|-----|          |0110_010_101_sss_sss
 10821:   //BLO.S <label>                                   |A|012346|-|----*|-----|          |0110_010_101_sss_sss [BCS.S <label>]
 10822:   //BNCC.S <label>                                  |A|012346|-|----*|-----|          |0110_010_101_sss_sss [BCS.S <label>]
 10823:   //BNHS.S <label>                                  |A|012346|-|----*|-----|          |0110_010_101_sss_sss [BCS.S <label>]
 10824:   //JBCS.S <label>                                  |A|012346|-|----*|-----|          |0110_010_101_sss_sss [BCS.S <label>]
 10825:   //JBLO.S <label>                                  |A|012346|-|----*|-----|          |0110_010_101_sss_sss [BCS.S <label>]
 10826:   //JBNCC.S <label>                                 |A|012346|-|----*|-----|          |0110_010_101_sss_sss [BCS.S <label>]
 10827:   //JBNHS.S <label>                                 |A|012346|-|----*|-----|          |0110_010_101_sss_sss [BCS.S <label>]
 10828:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 10829:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
 10830:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
 10831:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 10832:   //BCS.S <label>                                   |-|012346|-|----*|-----|          |0110_010_110_sss_sss
 10833:   //BLO.S <label>                                   |A|012346|-|----*|-----|          |0110_010_110_sss_sss [BCS.S <label>]
 10834:   //BNCC.S <label>                                  |A|012346|-|----*|-----|          |0110_010_110_sss_sss [BCS.S <label>]
 10835:   //BNHS.S <label>                                  |A|012346|-|----*|-----|          |0110_010_110_sss_sss [BCS.S <label>]
 10836:   //JBCS.S <label>                                  |A|012346|-|----*|-----|          |0110_010_110_sss_sss [BCS.S <label>]
 10837:   //JBLO.S <label>                                  |A|012346|-|----*|-----|          |0110_010_110_sss_sss [BCS.S <label>]
 10838:   //JBNCC.S <label>                                 |A|012346|-|----*|-----|          |0110_010_110_sss_sss [BCS.S <label>]
 10839:   //JBNHS.S <label>                                 |A|012346|-|----*|-----|          |0110_010_110_sss_sss [BCS.S <label>]
 10840:   public static void irpBlos () throws M68kException {
 10841:     XEiJ.mpuCycleCount++;
 10842:     int t = XEiJ.regPC;  //pc0+2
 10843:     int s = (byte) XEiJ.regOC;  //8bitディスプレースメント
 10844:     t += s;  //pc0+2+ディスプレースメント
 10845:     if ((t & 1) != 0) {  //分岐先のアドレスが奇数
 10846:       //MC68060のBcc/DBcc/FBccは分岐先のアドレスが奇数のとき分岐しなくてもアドレスエラーになる。FDBccは分岐するときだけ
 10847:       irpBccAddressError (t);
 10848:     }
 10849:     if (XEiJ.MPU_CC_LO << XEiJ.regCCR < 0) {  //分岐する
 10850:       irpSetPC (t);
 10851:     }
 10852:   }  //irpBlos
 10853: 
 10854:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 10855:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
 10856:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
 10857:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 10858:   //BCS.S <label>                                   |-|--2346|-|----*|-----|          |0110_010_111_sss_sss (s is not equal to 63)
 10859:   //BLO.S <label>                                   |A|--2346|-|----*|-----|          |0110_010_111_sss_sss (s is not equal to 63)  [BCS.S <label>]
 10860:   //BNCC.S <label>                                  |A|--2346|-|----*|-----|          |0110_010_111_sss_sss (s is not equal to 63)  [BCS.S <label>]
 10861:   //BNHS.S <label>                                  |A|--2346|-|----*|-----|          |0110_010_111_sss_sss (s is not equal to 63)  [BCS.S <label>]
 10862:   //JBCS.S <label>                                  |A|--2346|-|----*|-----|          |0110_010_111_sss_sss (s is not equal to 63)  [BCS.S <label>]
 10863:   //JBLO.S <label>                                  |A|--2346|-|----*|-----|          |0110_010_111_sss_sss (s is not equal to 63)  [BCS.S <label>]
 10864:   //JBNCC.S <label>                                 |A|--2346|-|----*|-----|          |0110_010_111_sss_sss (s is not equal to 63)  [BCS.S <label>]
 10865:   //JBNHS.S <label>                                 |A|--2346|-|----*|-----|          |0110_010_111_sss_sss (s is not equal to 63)  [BCS.S <label>]
 10866:   //BCS.L <label>                                   |-|--2346|-|----*|-----|          |0110_010_111_111_111-{offset}
 10867:   //BLO.L <label>                                   |A|--2346|-|----*|-----|          |0110_010_111_111_111-{offset}        [BCS.L <label>]
 10868:   //BNCC.L <label>                                  |A|--2346|-|----*|-----|          |0110_010_111_111_111-{offset}        [BCS.L <label>]
 10869:   //BNHS.L <label>                                  |A|--2346|-|----*|-----|          |0110_010_111_111_111-{offset}        [BCS.L <label>]
 10870:   public static void irpBlosl () throws M68kException {
 10871:     XEiJ.mpuCycleCount++;
 10872:     int t = XEiJ.regPC;  //pc0+2
 10873:     int s = (byte) XEiJ.regOC;  //8bitディスプレースメント
 10874:     if (s == -1) {  //Bcc.L
 10875:       XEiJ.regPC = t + 4;  //pc0+6
 10876:       s = mmuReadLongExword (t, XEiJ.regSRS);  //32bitディスプレースメント
 10877:     }
 10878:     t += s;  //pc0+2+ディスプレースメント
 10879:     if ((t & 1) != 0) {  //分岐先のアドレスが奇数
 10880:       //MC68060のBcc/DBcc/FBccは分岐先のアドレスが奇数のとき分岐しなくてもアドレスエラーになる。FDBccは分岐するときだけ
 10881:       irpBccAddressError (t);
 10882:     }
 10883:     if (XEiJ.MPU_CC_LO << XEiJ.regCCR < 0) {  //分岐する
 10884:       irpSetPC (t);
 10885:     }
 10886:   }  //irpBlosl
 10887: 
 10888:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 10889:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
 10890:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
 10891:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 10892:   //BNE.W <label>                                   |-|012346|-|--*--|-----|          |0110_011_000_000_000-{offset}
 10893:   //BNEQ.W <label>                                  |A|012346|-|--*--|-----|          |0110_011_000_000_000-{offset}        [BNE.W <label>]
 10894:   //BNZ.W <label>                                   |A|012346|-|--*--|-----|          |0110_011_000_000_000-{offset}        [BNE.W <label>]
 10895:   //BNZE.W <label>                                  |A|012346|-|--*--|-----|          |0110_011_000_000_000-{offset}        [BNE.W <label>]
 10896:   //JBNE.W <label>                                  |A|012346|-|--*--|-----|          |0110_011_000_000_000-{offset}        [BNE.W <label>]
 10897:   //JBNEQ.W <label>                                 |A|012346|-|--*--|-----|          |0110_011_000_000_000-{offset}        [BNE.W <label>]
 10898:   //JBNZ.W <label>                                  |A|012346|-|--*--|-----|          |0110_011_000_000_000-{offset}        [BNE.W <label>]
 10899:   //JBNZE.W <label>                                 |A|012346|-|--*--|-----|          |0110_011_000_000_000-{offset}        [BNE.W <label>]
 10900:   //BNE.S <label>                                   |-|012346|-|--*--|-----|          |0110_011_000_sss_sss (s is not equal to 0)
 10901:   //BNEQ.S <label>                                  |A|012346|-|--*--|-----|          |0110_011_000_sss_sss (s is not equal to 0)   [BNE.S <label>]
 10902:   //BNZ.S <label>                                   |A|012346|-|--*--|-----|          |0110_011_000_sss_sss (s is not equal to 0)   [BNE.S <label>]
 10903:   //BNZE.S <label>                                  |A|012346|-|--*--|-----|          |0110_011_000_sss_sss (s is not equal to 0)   [BNE.S <label>]
 10904:   //JBNE.S <label>                                  |A|012346|-|--*--|-----|          |0110_011_000_sss_sss (s is not equal to 0)   [BNE.S <label>]
 10905:   //JBNEQ.S <label>                                 |A|012346|-|--*--|-----|          |0110_011_000_sss_sss (s is not equal to 0)   [BNE.S <label>]
 10906:   //JBNZ.S <label>                                  |A|012346|-|--*--|-----|          |0110_011_000_sss_sss (s is not equal to 0)   [BNE.S <label>]
 10907:   //JBNZE.S <label>                                 |A|012346|-|--*--|-----|          |0110_011_000_sss_sss (s is not equal to 0)   [BNE.S <label>]
 10908:   //JBEQ.L <label>                                  |A|012346|-|--*--|-----|          |0110_011_000_000_110-0100111011111001-{address}      [BNE.S (*)+8;JMP <label>]
 10909:   //JBNEQ.L <label>                                 |A|012346|-|--*--|-----|          |0110_011_000_000_110-0100111011111001-{address}      [BNE.S (*)+8;JMP <label>]
 10910:   //JBNNE.L <label>                                 |A|012346|-|--*--|-----|          |0110_011_000_000_110-0100111011111001-{address}      [BNE.S (*)+8;JMP <label>]
 10911:   //JBNNZ.L <label>                                 |A|012346|-|--*--|-----|          |0110_011_000_000_110-0100111011111001-{address}      [BNE.S (*)+8;JMP <label>]
 10912:   //JBNZ.L <label>                                  |A|012346|-|--*--|-----|          |0110_011_000_000_110-0100111011111001-{address}      [BNE.S (*)+8;JMP <label>]
 10913:   //JBNZE.L <label>                                 |A|012346|-|--*--|-----|          |0110_011_000_000_110-0100111011111001-{address}      [BNE.S (*)+8;JMP <label>]
 10914:   //JBZE.L <label>                                  |A|012346|-|--*--|-----|          |0110_011_000_000_110-0100111011111001-{address}      [BNE.S (*)+8;JMP <label>]
 10915:   public static void irpBnesw () throws M68kException {
 10916:     XEiJ.mpuCycleCount++;
 10917:     int t = XEiJ.regPC;  //pc0+2
 10918:     int s = (byte) XEiJ.regOC;  //8bitディスプレースメント
 10919:     if (s == 0) {  //Bcc.W
 10920:       XEiJ.regPC = t + 2;  //pc0+4
 10921:       s = mmuReadWordSignExword (t, XEiJ.regSRS);  //16bitディスプレースメント
 10922:     }
 10923:     t += s;  //pc0+2+ディスプレースメント
 10924:     if ((t & 1) != 0) {  //分岐先のアドレスが奇数
 10925:       //MC68060のBcc/DBcc/FBccは分岐先のアドレスが奇数のとき分岐しなくてもアドレスエラーになる。FDBccは分岐するときだけ
 10926:       irpBccAddressError (t);
 10927:     }
 10928:     if (XEiJ.MPU_CC_NE << XEiJ.regCCR < 0) {  //分岐する
 10929:       irpSetPC (t);
 10930:     }
 10931:   }  //irpBnesw
 10932: 
 10933:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 10934:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
 10935:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
 10936:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 10937:   //BNE.S <label>                                   |-|012346|-|--*--|-----|          |0110_011_001_sss_sss
 10938:   //BNEQ.S <label>                                  |A|012346|-|--*--|-----|          |0110_011_001_sss_sss [BNE.S <label>]
 10939:   //BNZ.S <label>                                   |A|012346|-|--*--|-----|          |0110_011_001_sss_sss [BNE.S <label>]
 10940:   //BNZE.S <label>                                  |A|012346|-|--*--|-----|          |0110_011_001_sss_sss [BNE.S <label>]
 10941:   //JBNE.S <label>                                  |A|012346|-|--*--|-----|          |0110_011_001_sss_sss [BNE.S <label>]
 10942:   //JBNEQ.S <label>                                 |A|012346|-|--*--|-----|          |0110_011_001_sss_sss [BNE.S <label>]
 10943:   //JBNZ.S <label>                                  |A|012346|-|--*--|-----|          |0110_011_001_sss_sss [BNE.S <label>]
 10944:   //JBNZE.S <label>                                 |A|012346|-|--*--|-----|          |0110_011_001_sss_sss [BNE.S <label>]
 10945:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 10946:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
 10947:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
 10948:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 10949:   //BNE.S <label>                                   |-|012346|-|--*--|-----|          |0110_011_010_sss_sss
 10950:   //BNEQ.S <label>                                  |A|012346|-|--*--|-----|          |0110_011_010_sss_sss [BNE.S <label>]
 10951:   //BNZ.S <label>                                   |A|012346|-|--*--|-----|          |0110_011_010_sss_sss [BNE.S <label>]
 10952:   //BNZE.S <label>                                  |A|012346|-|--*--|-----|          |0110_011_010_sss_sss [BNE.S <label>]
 10953:   //JBNE.S <label>                                  |A|012346|-|--*--|-----|          |0110_011_010_sss_sss [BNE.S <label>]
 10954:   //JBNEQ.S <label>                                 |A|012346|-|--*--|-----|          |0110_011_010_sss_sss [BNE.S <label>]
 10955:   //JBNZ.S <label>                                  |A|012346|-|--*--|-----|          |0110_011_010_sss_sss [BNE.S <label>]
 10956:   //JBNZE.S <label>                                 |A|012346|-|--*--|-----|          |0110_011_010_sss_sss [BNE.S <label>]
 10957:   public static void irpBnes () throws M68kException {
 10958:     XEiJ.mpuCycleCount++;
 10959:     int t = XEiJ.regPC;  //pc0+2
 10960:     int s = (byte) XEiJ.regOC;  //8bitディスプレースメント
 10961:     t += s;  //pc0+2+ディスプレースメント
 10962:     if ((t & 1) != 0) {  //分岐先のアドレスが奇数
 10963:       //MC68060のBcc/DBcc/FBccは分岐先のアドレスが奇数のとき分岐しなくてもアドレスエラーになる。FDBccは分岐するときだけ
 10964:       irpBccAddressError (t);
 10965:     }
 10966:     if (XEiJ.MPU_CC_NE << XEiJ.regCCR < 0) {  //分岐する
 10967:       irpSetPC (t);
 10968:     }
 10969:   }  //irpBnes
 10970: 
 10971:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 10972:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
 10973:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
 10974:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 10975:   //BNE.S <label>                                   |-|--2346|-|--*--|-----|          |0110_011_011_sss_sss (s is not equal to 63)
 10976:   //BNEQ.S <label>                                  |A|--2346|-|--*--|-----|          |0110_011_011_sss_sss (s is not equal to 63)  [BNE.S <label>]
 10977:   //BNZ.S <label>                                   |A|--2346|-|--*--|-----|          |0110_011_011_sss_sss (s is not equal to 63)  [BNE.S <label>]
 10978:   //BNZE.S <label>                                  |A|--2346|-|--*--|-----|          |0110_011_011_sss_sss (s is not equal to 63)  [BNE.S <label>]
 10979:   //JBNE.S <label>                                  |A|--2346|-|--*--|-----|          |0110_011_011_sss_sss (s is not equal to 63)  [BNE.S <label>]
 10980:   //JBNEQ.S <label>                                 |A|--2346|-|--*--|-----|          |0110_011_011_sss_sss (s is not equal to 63)  [BNE.S <label>]
 10981:   //JBNZ.S <label>                                  |A|--2346|-|--*--|-----|          |0110_011_011_sss_sss (s is not equal to 63)  [BNE.S <label>]
 10982:   //JBNZE.S <label>                                 |A|--2346|-|--*--|-----|          |0110_011_011_sss_sss (s is not equal to 63)  [BNE.S <label>]
 10983:   //BNE.L <label>                                   |-|--2346|-|--*--|-----|          |0110_011_011_111_111-{offset}
 10984:   //BNEQ.L <label>                                  |A|--2346|-|--*--|-----|          |0110_011_011_111_111-{offset}        [BNE.L <label>]
 10985:   //BNZ.L <label>                                   |A|--2346|-|--*--|-----|          |0110_011_011_111_111-{offset}        [BNE.L <label>]
 10986:   //BNZE.L <label>                                  |A|--2346|-|--*--|-----|          |0110_011_011_111_111-{offset}        [BNE.L <label>]
 10987:   public static void irpBnesl () throws M68kException {
 10988:     XEiJ.mpuCycleCount++;
 10989:     int t = XEiJ.regPC;  //pc0+2
 10990:     int s = (byte) XEiJ.regOC;  //8bitディスプレースメント
 10991:     if (s == -1) {  //Bcc.L
 10992:       XEiJ.regPC = t + 4;  //pc0+6
 10993:       s = mmuReadLongExword (t, XEiJ.regSRS);  //32bitディスプレースメント
 10994:     }
 10995:     t += s;  //pc0+2+ディスプレースメント
 10996:     if ((t & 1) != 0) {  //分岐先のアドレスが奇数
 10997:       //MC68060のBcc/DBcc/FBccは分岐先のアドレスが奇数のとき分岐しなくてもアドレスエラーになる。FDBccは分岐するときだけ
 10998:       irpBccAddressError (t);
 10999:     }
 11000:     if (XEiJ.MPU_CC_NE << XEiJ.regCCR < 0) {  //分岐する
 11001:       irpSetPC (t);
 11002:     }
 11003:   }  //irpBnesl
 11004: 
 11005:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 11006:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
 11007:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
 11008:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 11009:   //BEQ.W <label>                                   |-|012346|-|--*--|-----|          |0110_011_100_000_000-{offset}
 11010:   //BNNE.W <label>                                  |A|012346|-|--*--|-----|          |0110_011_100_000_000-{offset}        [BEQ.W <label>]
 11011:   //BNNZ.W <label>                                  |A|012346|-|--*--|-----|          |0110_011_100_000_000-{offset}        [BEQ.W <label>]
 11012:   //BZE.W <label>                                   |A|012346|-|--*--|-----|          |0110_011_100_000_000-{offset}        [BEQ.W <label>]
 11013:   //JBEQ.W <label>                                  |A|012346|-|--*--|-----|          |0110_011_100_000_000-{offset}        [BEQ.W <label>]
 11014:   //JBNNE.W <label>                                 |A|012346|-|--*--|-----|          |0110_011_100_000_000-{offset}        [BEQ.W <label>]
 11015:   //JBNNZ.W <label>                                 |A|012346|-|--*--|-----|          |0110_011_100_000_000-{offset}        [BEQ.W <label>]
 11016:   //JBZE.W <label>                                  |A|012346|-|--*--|-----|          |0110_011_100_000_000-{offset}        [BEQ.W <label>]
 11017:   //BEQ.S <label>                                   |-|012346|-|--*--|-----|          |0110_011_100_sss_sss (s is not equal to 0)
 11018:   //BNNE.S <label>                                  |A|012346|-|--*--|-----|          |0110_011_100_sss_sss (s is not equal to 0)   [BEQ.S <label>]
 11019:   //BNNZ.S <label>                                  |A|012346|-|--*--|-----|          |0110_011_100_sss_sss (s is not equal to 0)   [BEQ.S <label>]
 11020:   //BZE.S <label>                                   |A|012346|-|--*--|-----|          |0110_011_100_sss_sss (s is not equal to 0)   [BEQ.S <label>]
 11021:   //JBEQ.S <label>                                  |A|012346|-|--*--|-----|          |0110_011_100_sss_sss (s is not equal to 0)   [BEQ.S <label>]
 11022:   //JBNNE.S <label>                                 |A|012346|-|--*--|-----|          |0110_011_100_sss_sss (s is not equal to 0)   [BEQ.S <label>]
 11023:   //JBNNZ.S <label>                                 |A|012346|-|--*--|-----|          |0110_011_100_sss_sss (s is not equal to 0)   [BEQ.S <label>]
 11024:   //JBZE.S <label>                                  |A|012346|-|--*--|-----|          |0110_011_100_sss_sss (s is not equal to 0)   [BEQ.S <label>]
 11025:   //JBNE.L <label>                                  |A|012346|-|--*--|-----|          |0110_011_100_000_110-0100111011111001-{address}      [BEQ.S (*)+8;JMP <label>]
 11026:   public static void irpBeqsw () throws M68kException {
 11027:     XEiJ.mpuCycleCount++;
 11028:     int t = XEiJ.regPC;  //pc0+2
 11029:     int s = (byte) XEiJ.regOC;  //8bitディスプレースメント
 11030:     if (s == 0) {  //Bcc.W
 11031:       XEiJ.regPC = t + 2;  //pc0+4
 11032:       s = mmuReadWordSignExword (t, XEiJ.regSRS);  //16bitディスプレースメント
 11033:     }
 11034:     t += s;  //pc0+2+ディスプレースメント
 11035:     if ((t & 1) != 0) {  //分岐先のアドレスが奇数
 11036:       //MC68060のBcc/DBcc/FBccは分岐先のアドレスが奇数のとき分岐しなくてもアドレスエラーになる。FDBccは分岐するときだけ
 11037:       irpBccAddressError (t);
 11038:     }
 11039:     if (XEiJ.MPU_CC_EQ << XEiJ.regCCR < 0) {  //分岐する
 11040:       irpSetPC (t);
 11041:     }
 11042:   }  //irpBeqsw
 11043: 
 11044:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 11045:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
 11046:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
 11047:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 11048:   //BEQ.S <label>                                   |-|012346|-|--*--|-----|          |0110_011_101_sss_sss
 11049:   //BNNE.S <label>                                  |A|012346|-|--*--|-----|          |0110_011_101_sss_sss [BEQ.S <label>]
 11050:   //BNNZ.S <label>                                  |A|012346|-|--*--|-----|          |0110_011_101_sss_sss [BEQ.S <label>]
 11051:   //BZE.S <label>                                   |A|012346|-|--*--|-----|          |0110_011_101_sss_sss [BEQ.S <label>]
 11052:   //JBEQ.S <label>                                  |A|012346|-|--*--|-----|          |0110_011_101_sss_sss [BEQ.S <label>]
 11053:   //JBNNE.S <label>                                 |A|012346|-|--*--|-----|          |0110_011_101_sss_sss [BEQ.S <label>]
 11054:   //JBNNZ.S <label>                                 |A|012346|-|--*--|-----|          |0110_011_101_sss_sss [BEQ.S <label>]
 11055:   //JBZE.S <label>                                  |A|012346|-|--*--|-----|          |0110_011_101_sss_sss [BEQ.S <label>]
 11056:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 11057:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
 11058:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
 11059:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 11060:   //BEQ.S <label>                                   |-|012346|-|--*--|-----|          |0110_011_110_sss_sss
 11061:   //BNNE.S <label>                                  |A|012346|-|--*--|-----|          |0110_011_110_sss_sss [BEQ.S <label>]
 11062:   //BNNZ.S <label>                                  |A|012346|-|--*--|-----|          |0110_011_110_sss_sss [BEQ.S <label>]
 11063:   //BZE.S <label>                                   |A|012346|-|--*--|-----|          |0110_011_110_sss_sss [BEQ.S <label>]
 11064:   //JBEQ.S <label>                                  |A|012346|-|--*--|-----|          |0110_011_110_sss_sss [BEQ.S <label>]
 11065:   //JBNNE.S <label>                                 |A|012346|-|--*--|-----|          |0110_011_110_sss_sss [BEQ.S <label>]
 11066:   //JBNNZ.S <label>                                 |A|012346|-|--*--|-----|          |0110_011_110_sss_sss [BEQ.S <label>]
 11067:   //JBZE.S <label>                                  |A|012346|-|--*--|-----|          |0110_011_110_sss_sss [BEQ.S <label>]
 11068:   public static void irpBeqs () throws M68kException {
 11069:     XEiJ.mpuCycleCount++;
 11070:     int t = XEiJ.regPC;  //pc0+2
 11071:     int s = (byte) XEiJ.regOC;  //8bitディスプレースメント
 11072:     t += s;  //pc0+2+ディスプレースメント
 11073:     if ((t & 1) != 0) {  //分岐先のアドレスが奇数
 11074:       //MC68060のBcc/DBcc/FBccは分岐先のアドレスが奇数のとき分岐しなくてもアドレスエラーになる。FDBccは分岐するときだけ
 11075:       irpBccAddressError (t);
 11076:     }
 11077:     if (XEiJ.MPU_CC_EQ << XEiJ.regCCR < 0) {  //分岐する
 11078:       irpSetPC (t);
 11079:     }
 11080:   }  //irpBeqs
 11081: 
 11082:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 11083:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
 11084:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
 11085:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 11086:   //BEQ.S <label>                                   |-|--2346|-|--*--|-----|          |0110_011_111_sss_sss (s is not equal to 63)
 11087:   //BNNE.S <label>                                  |A|--2346|-|--*--|-----|          |0110_011_111_sss_sss (s is not equal to 63)  [BEQ.S <label>]
 11088:   //BNNZ.S <label>                                  |A|--2346|-|--*--|-----|          |0110_011_111_sss_sss (s is not equal to 63)  [BEQ.S <label>]
 11089:   //BZE.S <label>                                   |A|--2346|-|--*--|-----|          |0110_011_111_sss_sss (s is not equal to 63)  [BEQ.S <label>]
 11090:   //JBEQ.S <label>                                  |A|--2346|-|--*--|-----|          |0110_011_111_sss_sss (s is not equal to 63)  [BEQ.S <label>]
 11091:   //JBNNE.S <label>                                 |A|--2346|-|--*--|-----|          |0110_011_111_sss_sss (s is not equal to 63)  [BEQ.S <label>]
 11092:   //JBNNZ.S <label>                                 |A|--2346|-|--*--|-----|          |0110_011_111_sss_sss (s is not equal to 63)  [BEQ.S <label>]
 11093:   //JBZE.S <label>                                  |A|--2346|-|--*--|-----|          |0110_011_111_sss_sss (s is not equal to 63)  [BEQ.S <label>]
 11094:   //BEQ.L <label>                                   |-|--2346|-|--*--|-----|          |0110_011_111_111_111-{offset}
 11095:   //BNNE.L <label>                                  |A|--2346|-|--*--|-----|          |0110_011_111_111_111-{offset}        [BEQ.L <label>]
 11096:   //BNNZ.L <label>                                  |A|--2346|-|--*--|-----|          |0110_011_111_111_111-{offset}        [BEQ.L <label>]
 11097:   //BZE.L <label>                                   |A|--2346|-|--*--|-----|          |0110_011_111_111_111-{offset}        [BEQ.L <label>]
 11098:   public static void irpBeqsl () throws M68kException {
 11099:     XEiJ.mpuCycleCount++;
 11100:     int t = XEiJ.regPC;  //pc0+2
 11101:     int s = (byte) XEiJ.regOC;  //8bitディスプレースメント
 11102:     if (s == -1) {  //Bcc.L
 11103:       XEiJ.regPC = t + 4;  //pc0+6
 11104:       s = mmuReadLongExword (t, XEiJ.regSRS);  //32bitディスプレースメント
 11105:     }
 11106:     t += s;  //pc0+2+ディスプレースメント
 11107:     if ((t & 1) != 0) {  //分岐先のアドレスが奇数
 11108:       //MC68060のBcc/DBcc/FBccは分岐先のアドレスが奇数のとき分岐しなくてもアドレスエラーになる。FDBccは分岐するときだけ
 11109:       irpBccAddressError (t);
 11110:     }
 11111:     if (XEiJ.MPU_CC_EQ << XEiJ.regCCR < 0) {  //分岐する
 11112:       irpSetPC (t);
 11113:     }
 11114:   }  //irpBeqsl
 11115: 
 11116:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 11117:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
 11118:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
 11119:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 11120:   //BVC.W <label>                                   |-|012346|-|---*-|-----|          |0110_100_000_000_000-{offset}
 11121:   //BNVS.W <label>                                  |A|012346|-|---*-|-----|          |0110_100_000_000_000-{offset}        [BVC.W <label>]
 11122:   //JBNVS.W <label>                                 |A|012346|-|---*-|-----|          |0110_100_000_000_000-{offset}        [BVC.W <label>]
 11123:   //JBVC.W <label>                                  |A|012346|-|---*-|-----|          |0110_100_000_000_000-{offset}        [BVC.W <label>]
 11124:   //BVC.S <label>                                   |-|012346|-|---*-|-----|          |0110_100_000_sss_sss (s is not equal to 0)
 11125:   //BNVS.S <label>                                  |A|012346|-|---*-|-----|          |0110_100_000_sss_sss (s is not equal to 0)   [BVC.S <label>]
 11126:   //JBNVS.S <label>                                 |A|012346|-|---*-|-----|          |0110_100_000_sss_sss (s is not equal to 0)   [BVC.S <label>]
 11127:   //JBVC.S <label>                                  |A|012346|-|---*-|-----|          |0110_100_000_sss_sss (s is not equal to 0)   [BVC.S <label>]
 11128:   //JBNVC.L <label>                                 |A|012346|-|---*-|-----|          |0110_100_000_000_110-0100111011111001-{address}      [BVC.S (*)+8;JMP <label>]
 11129:   //JBVS.L <label>                                  |A|012346|-|---*-|-----|          |0110_100_000_000_110-0100111011111001-{address}      [BVC.S (*)+8;JMP <label>]
 11130:   public static void irpBvcsw () throws M68kException {
 11131:     XEiJ.mpuCycleCount++;
 11132:     int t = XEiJ.regPC;  //pc0+2
 11133:     int s = (byte) XEiJ.regOC;  //8bitディスプレースメント
 11134:     if (s == 0) {  //Bcc.W
 11135:       XEiJ.regPC = t + 2;  //pc0+4
 11136:       s = mmuReadWordSignExword (t, XEiJ.regSRS);  //16bitディスプレースメント
 11137:     }
 11138:     t += s;  //pc0+2+ディスプレースメント
 11139:     if ((t & 1) != 0) {  //分岐先のアドレスが奇数
 11140:       //MC68060のBcc/DBcc/FBccは分岐先のアドレスが奇数のとき分岐しなくてもアドレスエラーになる。FDBccは分岐するときだけ
 11141:       irpBccAddressError (t);
 11142:     }
 11143:     if (XEiJ.MPU_CC_VC << XEiJ.regCCR < 0) {  //分岐する
 11144:       irpSetPC (t);
 11145:     }
 11146:   }  //irpBvcsw
 11147: 
 11148:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 11149:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
 11150:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
 11151:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 11152:   //BVC.S <label>                                   |-|012346|-|---*-|-----|          |0110_100_001_sss_sss
 11153:   //BNVS.S <label>                                  |A|012346|-|---*-|-----|          |0110_100_001_sss_sss [BVC.S <label>]
 11154:   //JBNVS.S <label>                                 |A|012346|-|---*-|-----|          |0110_100_001_sss_sss [BVC.S <label>]
 11155:   //JBVC.S <label>                                  |A|012346|-|---*-|-----|          |0110_100_001_sss_sss [BVC.S <label>]
 11156:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 11157:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
 11158:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
 11159:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 11160:   //BVC.S <label>                                   |-|012346|-|---*-|-----|          |0110_100_010_sss_sss
 11161:   //BNVS.S <label>                                  |A|012346|-|---*-|-----|          |0110_100_010_sss_sss [BVC.S <label>]
 11162:   //JBNVS.S <label>                                 |A|012346|-|---*-|-----|          |0110_100_010_sss_sss [BVC.S <label>]
 11163:   //JBVC.S <label>                                  |A|012346|-|---*-|-----|          |0110_100_010_sss_sss [BVC.S <label>]
 11164:   public static void irpBvcs () throws M68kException {
 11165:     XEiJ.mpuCycleCount++;
 11166:     int t = XEiJ.regPC;  //pc0+2
 11167:     int s = (byte) XEiJ.regOC;  //8bitディスプレースメント
 11168:     t += s;  //pc0+2+ディスプレースメント
 11169:     if ((t & 1) != 0) {  //分岐先のアドレスが奇数
 11170:       //MC68060のBcc/DBcc/FBccは分岐先のアドレスが奇数のとき分岐しなくてもアドレスエラーになる。FDBccは分岐するときだけ
 11171:       irpBccAddressError (t);
 11172:     }
 11173:     if (XEiJ.MPU_CC_VC << XEiJ.regCCR < 0) {  //分岐する
 11174:       irpSetPC (t);
 11175:     }
 11176:   }  //irpBvcs
 11177: 
 11178:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 11179:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
 11180:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
 11181:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 11182:   //BVC.S <label>                                   |-|--2346|-|---*-|-----|          |0110_100_011_sss_sss (s is not equal to 63)
 11183:   //BNVS.S <label>                                  |A|--2346|-|---*-|-----|          |0110_100_011_sss_sss (s is not equal to 63)  [BVC.S <label>]
 11184:   //JBNVS.S <label>                                 |A|--2346|-|---*-|-----|          |0110_100_011_sss_sss (s is not equal to 63)  [BVC.S <label>]
 11185:   //JBVC.S <label>                                  |A|--2346|-|---*-|-----|          |0110_100_011_sss_sss (s is not equal to 63)  [BVC.S <label>]
 11186:   //BVC.L <label>                                   |-|--2346|-|---*-|-----|          |0110_100_011_111_111-{offset}
 11187:   //BNVS.L <label>                                  |A|--2346|-|---*-|-----|          |0110_100_011_111_111-{offset}        [BVC.L <label>]
 11188:   public static void irpBvcsl () throws M68kException {
 11189:     XEiJ.mpuCycleCount++;
 11190:     int t = XEiJ.regPC;  //pc0+2
 11191:     int s = (byte) XEiJ.regOC;  //8bitディスプレースメント
 11192:     if (s == -1) {  //Bcc.L
 11193:       XEiJ.regPC = t + 4;  //pc0+6
 11194:       s = mmuReadLongExword (t, XEiJ.regSRS);  //32bitディスプレースメント
 11195:     }
 11196:     t += s;  //pc0+2+ディスプレースメント
 11197:     if ((t & 1) != 0) {  //分岐先のアドレスが奇数
 11198:       //MC68060のBcc/DBcc/FBccは分岐先のアドレスが奇数のとき分岐しなくてもアドレスエラーになる。FDBccは分岐するときだけ
 11199:       irpBccAddressError (t);
 11200:     }
 11201:     if (XEiJ.MPU_CC_VC << XEiJ.regCCR < 0) {  //分岐する
 11202:       irpSetPC (t);
 11203:     }
 11204:   }  //irpBvcsl
 11205: 
 11206:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 11207:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
 11208:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
 11209:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 11210:   //BVS.W <label>                                   |-|012346|-|---*-|-----|          |0110_100_100_000_000-{offset}
 11211:   //BNVC.W <label>                                  |A|012346|-|---*-|-----|          |0110_100_100_000_000-{offset}        [BVS.W <label>]
 11212:   //JBNVC.W <label>                                 |A|012346|-|---*-|-----|          |0110_100_100_000_000-{offset}        [BVS.W <label>]
 11213:   //JBVS.W <label>                                  |A|012346|-|---*-|-----|          |0110_100_100_000_000-{offset}        [BVS.W <label>]
 11214:   //BVS.S <label>                                   |-|012346|-|---*-|-----|          |0110_100_100_sss_sss (s is not equal to 0)
 11215:   //BNVC.S <label>                                  |A|012346|-|---*-|-----|          |0110_100_100_sss_sss (s is not equal to 0)   [BVS.S <label>]
 11216:   //JBNVC.S <label>                                 |A|012346|-|---*-|-----|          |0110_100_100_sss_sss (s is not equal to 0)   [BVS.S <label>]
 11217:   //JBVS.S <label>                                  |A|012346|-|---*-|-----|          |0110_100_100_sss_sss (s is not equal to 0)   [BVS.S <label>]
 11218:   //JBNVS.L <label>                                 |A|012346|-|---*-|-----|          |0110_100_100_000_110-0100111011111001-{address}      [BVS.S (*)+8;JMP <label>]
 11219:   //JBVC.L <label>                                  |A|012346|-|---*-|-----|          |0110_100_100_000_110-0100111011111001-{address}      [BVS.S (*)+8;JMP <label>]
 11220:   public static void irpBvssw () throws M68kException {
 11221:     XEiJ.mpuCycleCount++;
 11222:     int t = XEiJ.regPC;  //pc0+2
 11223:     int s = (byte) XEiJ.regOC;  //8bitディスプレースメント
 11224:     if (s == 0) {  //Bcc.W
 11225:       XEiJ.regPC = t + 2;  //pc0+4
 11226:       s = mmuReadWordSignExword (t, XEiJ.regSRS);  //16bitディスプレースメント
 11227:     }
 11228:     t += s;  //pc0+2+ディスプレースメント
 11229:     if ((t & 1) != 0) {  //分岐先のアドレスが奇数
 11230:       //MC68060のBcc/DBcc/FBccは分岐先のアドレスが奇数のとき分岐しなくてもアドレスエラーになる。FDBccは分岐するときだけ
 11231:       irpBccAddressError (t);
 11232:     }
 11233:     if (XEiJ.MPU_CC_VS << XEiJ.regCCR < 0) {  //分岐する
 11234:       irpSetPC (t);
 11235:     }
 11236:   }  //irpBvssw
 11237: 
 11238:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 11239:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
 11240:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
 11241:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 11242:   //BVS.S <label>                                   |-|012346|-|---*-|-----|          |0110_100_101_sss_sss
 11243:   //BNVC.S <label>                                  |A|012346|-|---*-|-----|          |0110_100_101_sss_sss [BVS.S <label>]
 11244:   //JBNVC.S <label>                                 |A|012346|-|---*-|-----|          |0110_100_101_sss_sss [BVS.S <label>]
 11245:   //JBVS.S <label>                                  |A|012346|-|---*-|-----|          |0110_100_101_sss_sss [BVS.S <label>]
 11246:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 11247:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
 11248:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
 11249:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 11250:   //BVS.S <label>                                   |-|012346|-|---*-|-----|          |0110_100_110_sss_sss
 11251:   //BNVC.S <label>                                  |A|012346|-|---*-|-----|          |0110_100_110_sss_sss [BVS.S <label>]
 11252:   //JBNVC.S <label>                                 |A|012346|-|---*-|-----|          |0110_100_110_sss_sss [BVS.S <label>]
 11253:   //JBVS.S <label>                                  |A|012346|-|---*-|-----|          |0110_100_110_sss_sss [BVS.S <label>]
 11254:   public static void irpBvss () throws M68kException {
 11255:     XEiJ.mpuCycleCount++;
 11256:     int t = XEiJ.regPC;  //pc0+2
 11257:     int s = (byte) XEiJ.regOC;  //8bitディスプレースメント
 11258:     t += s;  //pc0+2+ディスプレースメント
 11259:     if ((t & 1) != 0) {  //分岐先のアドレスが奇数
 11260:       //MC68060のBcc/DBcc/FBccは分岐先のアドレスが奇数のとき分岐しなくてもアドレスエラーになる。FDBccは分岐するときだけ
 11261:       irpBccAddressError (t);
 11262:     }
 11263:     if (XEiJ.MPU_CC_VS << XEiJ.regCCR < 0) {  //分岐する
 11264:       irpSetPC (t);
 11265:     }
 11266:   }  //irpBvss
 11267: 
 11268:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 11269:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
 11270:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
 11271:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 11272:   //BVS.S <label>                                   |-|--2346|-|---*-|-----|          |0110_100_111_sss_sss (s is not equal to 63)
 11273:   //BNVC.S <label>                                  |A|--2346|-|---*-|-----|          |0110_100_111_sss_sss (s is not equal to 63)  [BVS.S <label>]
 11274:   //JBNVC.S <label>                                 |A|--2346|-|---*-|-----|          |0110_100_111_sss_sss (s is not equal to 63)  [BVS.S <label>]
 11275:   //JBVS.S <label>                                  |A|--2346|-|---*-|-----|          |0110_100_111_sss_sss (s is not equal to 63)  [BVS.S <label>]
 11276:   //BVS.L <label>                                   |-|--2346|-|---*-|-----|          |0110_100_111_111_111-{offset}
 11277:   //BNVC.L <label>                                  |A|--2346|-|---*-|-----|          |0110_100_111_111_111-{offset}        [BVS.L <label>]
 11278:   public static void irpBvssl () throws M68kException {
 11279:     XEiJ.mpuCycleCount++;
 11280:     int t = XEiJ.regPC;  //pc0+2
 11281:     int s = (byte) XEiJ.regOC;  //8bitディスプレースメント
 11282:     if (s == -1) {  //Bcc.L
 11283:       XEiJ.regPC = t + 4;  //pc0+6
 11284:       s = mmuReadLongExword (t, XEiJ.regSRS);  //32bitディスプレースメント
 11285:     }
 11286:     t += s;  //pc0+2+ディスプレースメント
 11287:     if ((t & 1) != 0) {  //分岐先のアドレスが奇数
 11288:       //MC68060のBcc/DBcc/FBccは分岐先のアドレスが奇数のとき分岐しなくてもアドレスエラーになる。FDBccは分岐するときだけ
 11289:       irpBccAddressError (t);
 11290:     }
 11291:     if (XEiJ.MPU_CC_VS << XEiJ.regCCR < 0) {  //分岐する
 11292:       irpSetPC (t);
 11293:     }
 11294:   }  //irpBvssl
 11295: 
 11296:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 11297:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
 11298:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
 11299:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 11300:   //BPL.W <label>                                   |-|012346|-|-*---|-----|          |0110_101_000_000_000-{offset}
 11301:   //BNMI.W <label>                                  |A|012346|-|-*---|-----|          |0110_101_000_000_000-{offset}        [BPL.W <label>]
 11302:   //JBNMI.W <label>                                 |A|012346|-|-*---|-----|          |0110_101_000_000_000-{offset}        [BPL.W <label>]
 11303:   //JBPL.W <label>                                  |A|012346|-|-*---|-----|          |0110_101_000_000_000-{offset}        [BPL.W <label>]
 11304:   //BPL.S <label>                                   |-|012346|-|-*---|-----|          |0110_101_000_sss_sss (s is not equal to 0)
 11305:   //BNMI.S <label>                                  |A|012346|-|-*---|-----|          |0110_101_000_sss_sss (s is not equal to 0)   [BPL.S <label>]
 11306:   //JBNMI.S <label>                                 |A|012346|-|-*---|-----|          |0110_101_000_sss_sss (s is not equal to 0)   [BPL.S <label>]
 11307:   //JBPL.S <label>                                  |A|012346|-|-*---|-----|          |0110_101_000_sss_sss (s is not equal to 0)   [BPL.S <label>]
 11308:   //JBMI.L <label>                                  |A|012346|-|-*---|-----|          |0110_101_000_000_110-0100111011111001-{address}      [BPL.S (*)+8;JMP <label>]
 11309:   //JBNPL.L <label>                                 |A|012346|-|-*---|-----|          |0110_101_000_000_110-0100111011111001-{address}      [BPL.S (*)+8;JMP <label>]
 11310:   public static void irpBplsw () throws M68kException {
 11311:     XEiJ.mpuCycleCount++;
 11312:     int t = XEiJ.regPC;  //pc0+2
 11313:     int s = (byte) XEiJ.regOC;  //8bitディスプレースメント
 11314:     if (s == 0) {  //Bcc.W
 11315:       XEiJ.regPC = t + 2;  //pc0+4
 11316:       s = mmuReadWordSignExword (t, XEiJ.regSRS);  //16bitディスプレースメント
 11317:     }
 11318:     t += s;  //pc0+2+ディスプレースメント
 11319:     if ((t & 1) != 0) {  //分岐先のアドレスが奇数
 11320:       //MC68060のBcc/DBcc/FBccは分岐先のアドレスが奇数のとき分岐しなくてもアドレスエラーになる。FDBccは分岐するときだけ
 11321:       irpBccAddressError (t);
 11322:     }
 11323:     if (XEiJ.MPU_CC_PL << XEiJ.regCCR < 0) {  //分岐する
 11324:       irpSetPC (t);
 11325:     }
 11326:   }  //irpBplsw
 11327: 
 11328:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 11329:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
 11330:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
 11331:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 11332:   //BPL.S <label>                                   |-|012346|-|-*---|-----|          |0110_101_001_sss_sss
 11333:   //BNMI.S <label>                                  |A|012346|-|-*---|-----|          |0110_101_001_sss_sss [BPL.S <label>]
 11334:   //JBNMI.S <label>                                 |A|012346|-|-*---|-----|          |0110_101_001_sss_sss [BPL.S <label>]
 11335:   //JBPL.S <label>                                  |A|012346|-|-*---|-----|          |0110_101_001_sss_sss [BPL.S <label>]
 11336:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 11337:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
 11338:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
 11339:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 11340:   //BPL.S <label>                                   |-|012346|-|-*---|-----|          |0110_101_010_sss_sss
 11341:   //BNMI.S <label>                                  |A|012346|-|-*---|-----|          |0110_101_010_sss_sss [BPL.S <label>]
 11342:   //JBNMI.S <label>                                 |A|012346|-|-*---|-----|          |0110_101_010_sss_sss [BPL.S <label>]
 11343:   //JBPL.S <label>                                  |A|012346|-|-*---|-----|          |0110_101_010_sss_sss [BPL.S <label>]
 11344:   public static void irpBpls () throws M68kException {
 11345:     XEiJ.mpuCycleCount++;
 11346:     int t = XEiJ.regPC;  //pc0+2
 11347:     int s = (byte) XEiJ.regOC;  //8bitディスプレースメント
 11348:     t += s;  //pc0+2+ディスプレースメント
 11349:     if ((t & 1) != 0) {  //分岐先のアドレスが奇数
 11350:       //MC68060のBcc/DBcc/FBccは分岐先のアドレスが奇数のとき分岐しなくてもアドレスエラーになる。FDBccは分岐するときだけ
 11351:       irpBccAddressError (t);
 11352:     }
 11353:     if (XEiJ.MPU_CC_PL << XEiJ.regCCR < 0) {  //分岐する
 11354:       irpSetPC (t);
 11355:     }
 11356:   }  //irpBpls
 11357: 
 11358:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 11359:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
 11360:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
 11361:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 11362:   //BPL.S <label>                                   |-|--2346|-|-*---|-----|          |0110_101_011_sss_sss (s is not equal to 63)
 11363:   //BNMI.S <label>                                  |A|--2346|-|-*---|-----|          |0110_101_011_sss_sss (s is not equal to 63)  [BPL.S <label>]
 11364:   //JBNMI.S <label>                                 |A|--2346|-|-*---|-----|          |0110_101_011_sss_sss (s is not equal to 63)  [BPL.S <label>]
 11365:   //JBPL.S <label>                                  |A|--2346|-|-*---|-----|          |0110_101_011_sss_sss (s is not equal to 63)  [BPL.S <label>]
 11366:   //BPL.L <label>                                   |-|--2346|-|-*---|-----|          |0110_101_011_111_111-{offset}
 11367:   //BNMI.L <label>                                  |A|--2346|-|-*---|-----|          |0110_101_011_111_111-{offset}        [BPL.L <label>]
 11368:   public static void irpBplsl () throws M68kException {
 11369:     XEiJ.mpuCycleCount++;
 11370:     int t = XEiJ.regPC;  //pc0+2
 11371:     int s = (byte) XEiJ.regOC;  //8bitディスプレースメント
 11372:     if (s == -1) {  //Bcc.L
 11373:       XEiJ.regPC = t + 4;  //pc0+6
 11374:       s = mmuReadLongExword (t, XEiJ.regSRS);  //32bitディスプレースメント
 11375:     }
 11376:     t += s;  //pc0+2+ディスプレースメント
 11377:     if ((t & 1) != 0) {  //分岐先のアドレスが奇数
 11378:       //MC68060のBcc/DBcc/FBccは分岐先のアドレスが奇数のとき分岐しなくてもアドレスエラーになる。FDBccは分岐するときだけ
 11379:       irpBccAddressError (t);
 11380:     }
 11381:     if (XEiJ.MPU_CC_PL << XEiJ.regCCR < 0) {  //分岐する
 11382:       irpSetPC (t);
 11383:     }
 11384:   }  //irpBplsl
 11385: 
 11386:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 11387:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
 11388:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
 11389:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 11390:   //BMI.W <label>                                   |-|012346|-|-*---|-----|          |0110_101_100_000_000-{offset}
 11391:   //BNPL.W <label>                                  |A|012346|-|-*---|-----|          |0110_101_100_000_000-{offset}        [BMI.W <label>]
 11392:   //JBMI.W <label>                                  |A|012346|-|-*---|-----|          |0110_101_100_000_000-{offset}        [BMI.W <label>]
 11393:   //JBNPL.W <label>                                 |A|012346|-|-*---|-----|          |0110_101_100_000_000-{offset}        [BMI.W <label>]
 11394:   //BMI.S <label>                                   |-|012346|-|-*---|-----|          |0110_101_100_sss_sss (s is not equal to 0)
 11395:   //BNPL.S <label>                                  |A|012346|-|-*---|-----|          |0110_101_100_sss_sss (s is not equal to 0)   [BMI.S <label>]
 11396:   //JBMI.S <label>                                  |A|012346|-|-*---|-----|          |0110_101_100_sss_sss (s is not equal to 0)   [BMI.S <label>]
 11397:   //JBNPL.S <label>                                 |A|012346|-|-*---|-----|          |0110_101_100_sss_sss (s is not equal to 0)   [BMI.S <label>]
 11398:   //JBNMI.L <label>                                 |A|012346|-|-*---|-----|          |0110_101_100_000_110-0100111011111001-{address}      [BMI.S (*)+8;JMP <label>]
 11399:   //JBPL.L <label>                                  |A|012346|-|-*---|-----|          |0110_101_100_000_110-0100111011111001-{address}      [BMI.S (*)+8;JMP <label>]
 11400:   public static void irpBmisw () throws M68kException {
 11401:     XEiJ.mpuCycleCount++;
 11402:     int t = XEiJ.regPC;  //pc0+2
 11403:     int s = (byte) XEiJ.regOC;  //8bitディスプレースメント
 11404:     if (s == 0) {  //Bcc.W
 11405:       XEiJ.regPC = t + 2;  //pc0+4
 11406:       s = mmuReadWordSignExword (t, XEiJ.regSRS);  //16bitディスプレースメント
 11407:     }
 11408:     t += s;  //pc0+2+ディスプレースメント
 11409:     if ((t & 1) != 0) {  //分岐先のアドレスが奇数
 11410:       //MC68060のBcc/DBcc/FBccは分岐先のアドレスが奇数のとき分岐しなくてもアドレスエラーになる。FDBccは分岐するときだけ
 11411:       irpBccAddressError (t);
 11412:     }
 11413:     if (XEiJ.MPU_CC_MI << XEiJ.regCCR < 0) {  //分岐する
 11414:       irpSetPC (t);
 11415:     }
 11416:   }  //irpBmisw
 11417: 
 11418:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 11419:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
 11420:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
 11421:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 11422:   //BMI.S <label>                                   |-|012346|-|-*---|-----|          |0110_101_101_sss_sss
 11423:   //BNPL.S <label>                                  |A|012346|-|-*---|-----|          |0110_101_101_sss_sss [BMI.S <label>]
 11424:   //JBMI.S <label>                                  |A|012346|-|-*---|-----|          |0110_101_101_sss_sss [BMI.S <label>]
 11425:   //JBNPL.S <label>                                 |A|012346|-|-*---|-----|          |0110_101_101_sss_sss [BMI.S <label>]
 11426:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 11427:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
 11428:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
 11429:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 11430:   //BMI.S <label>                                   |-|012346|-|-*---|-----|          |0110_101_110_sss_sss
 11431:   //BNPL.S <label>                                  |A|012346|-|-*---|-----|          |0110_101_110_sss_sss [BMI.S <label>]
 11432:   //JBMI.S <label>                                  |A|012346|-|-*---|-----|          |0110_101_110_sss_sss [BMI.S <label>]
 11433:   //JBNPL.S <label>                                 |A|012346|-|-*---|-----|          |0110_101_110_sss_sss [BMI.S <label>]
 11434:   public static void irpBmis () throws M68kException {
 11435:     XEiJ.mpuCycleCount++;
 11436:     int t = XEiJ.regPC;  //pc0+2
 11437:     int s = (byte) XEiJ.regOC;  //8bitディスプレースメント
 11438:     t += s;  //pc0+2+ディスプレースメント
 11439:     if ((t & 1) != 0) {  //分岐先のアドレスが奇数
 11440:       //MC68060のBcc/DBcc/FBccは分岐先のアドレスが奇数のとき分岐しなくてもアドレスエラーになる。FDBccは分岐するときだけ
 11441:       irpBccAddressError (t);
 11442:     }
 11443:     if (XEiJ.MPU_CC_MI << XEiJ.regCCR < 0) {  //分岐する
 11444:       irpSetPC (t);
 11445:     }
 11446:   }  //irpBmis
 11447: 
 11448:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 11449:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
 11450:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
 11451:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 11452:   //BMI.S <label>                                   |-|--2346|-|-*---|-----|          |0110_101_111_sss_sss (s is not equal to 63)
 11453:   //BNPL.S <label>                                  |A|--2346|-|-*---|-----|          |0110_101_111_sss_sss (s is not equal to 63)  [BMI.S <label>]
 11454:   //JBMI.S <label>                                  |A|--2346|-|-*---|-----|          |0110_101_111_sss_sss (s is not equal to 63)  [BMI.S <label>]
 11455:   //JBNPL.S <label>                                 |A|--2346|-|-*---|-----|          |0110_101_111_sss_sss (s is not equal to 63)  [BMI.S <label>]
 11456:   //BMI.L <label>                                   |-|--2346|-|-*---|-----|          |0110_101_111_111_111-{offset}
 11457:   //BNPL.L <label>                                  |A|--2346|-|-*---|-----|          |0110_101_111_111_111-{offset}        [BMI.L <label>]
 11458:   public static void irpBmisl () throws M68kException {
 11459:     XEiJ.mpuCycleCount++;
 11460:     int t = XEiJ.regPC;  //pc0+2
 11461:     int s = (byte) XEiJ.regOC;  //8bitディスプレースメント
 11462:     if (s == -1) {  //Bcc.L
 11463:       XEiJ.regPC = t + 4;  //pc0+6
 11464:       s = mmuReadLongExword (t, XEiJ.regSRS);  //32bitディスプレースメント
 11465:     }
 11466:     t += s;  //pc0+2+ディスプレースメント
 11467:     if ((t & 1) != 0) {  //分岐先のアドレスが奇数
 11468:       //MC68060のBcc/DBcc/FBccは分岐先のアドレスが奇数のとき分岐しなくてもアドレスエラーになる。FDBccは分岐するときだけ
 11469:       irpBccAddressError (t);
 11470:     }
 11471:     if (XEiJ.MPU_CC_MI << XEiJ.regCCR < 0) {  //分岐する
 11472:       irpSetPC (t);
 11473:     }
 11474:   }  //irpBmisl
 11475: 
 11476:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 11477:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
 11478:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
 11479:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 11480:   //BGE.W <label>                                   |-|012346|-|-*-*-|-----|          |0110_110_000_000_000-{offset}
 11481:   //BNLT.W <label>                                  |A|012346|-|-*-*-|-----|          |0110_110_000_000_000-{offset}        [BGE.W <label>]
 11482:   //JBGE.W <label>                                  |A|012346|-|-*-*-|-----|          |0110_110_000_000_000-{offset}        [BGE.W <label>]
 11483:   //JBNLT.W <label>                                 |A|012346|-|-*-*-|-----|          |0110_110_000_000_000-{offset}        [BGE.W <label>]
 11484:   //BGE.S <label>                                   |-|012346|-|-*-*-|-----|          |0110_110_000_sss_sss (s is not equal to 0)
 11485:   //BNLT.S <label>                                  |A|012346|-|-*-*-|-----|          |0110_110_000_sss_sss (s is not equal to 0)   [BGE.S <label>]
 11486:   //JBGE.S <label>                                  |A|012346|-|-*-*-|-----|          |0110_110_000_sss_sss (s is not equal to 0)   [BGE.S <label>]
 11487:   //JBNLT.S <label>                                 |A|012346|-|-*-*-|-----|          |0110_110_000_sss_sss (s is not equal to 0)   [BGE.S <label>]
 11488:   //JBLT.L <label>                                  |A|012346|-|-*-*-|-----|          |0110_110_000_000_110-0100111011111001-{address}      [BGE.S (*)+8;JMP <label>]
 11489:   //JBNGE.L <label>                                 |A|012346|-|-*-*-|-----|          |0110_110_000_000_110-0100111011111001-{address}      [BGE.S (*)+8;JMP <label>]
 11490:   public static void irpBgesw () throws M68kException {
 11491:     XEiJ.mpuCycleCount++;
 11492:     int t = XEiJ.regPC;  //pc0+2
 11493:     int s = (byte) XEiJ.regOC;  //8bitディスプレースメント
 11494:     if (s == 0) {  //Bcc.W
 11495:       XEiJ.regPC = t + 2;  //pc0+4
 11496:       s = mmuReadWordSignExword (t, XEiJ.regSRS);  //16bitディスプレースメント
 11497:     }
 11498:     t += s;  //pc0+2+ディスプレースメント
 11499:     if ((t & 1) != 0) {  //分岐先のアドレスが奇数
 11500:       //MC68060のBcc/DBcc/FBccは分岐先のアドレスが奇数のとき分岐しなくてもアドレスエラーになる。FDBccは分岐するときだけ
 11501:       irpBccAddressError (t);
 11502:     }
 11503:     if (XEiJ.MPU_CC_GE << XEiJ.regCCR < 0) {  //分岐する
 11504:       irpSetPC (t);
 11505:     }
 11506:   }  //irpBgesw
 11507: 
 11508:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 11509:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
 11510:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
 11511:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 11512:   //BGE.S <label>                                   |-|012346|-|-*-*-|-----|          |0110_110_001_sss_sss
 11513:   //BNLT.S <label>                                  |A|012346|-|-*-*-|-----|          |0110_110_001_sss_sss [BGE.S <label>]
 11514:   //JBGE.S <label>                                  |A|012346|-|-*-*-|-----|          |0110_110_001_sss_sss [BGE.S <label>]
 11515:   //JBNLT.S <label>                                 |A|012346|-|-*-*-|-----|          |0110_110_001_sss_sss [BGE.S <label>]
 11516:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 11517:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
 11518:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
 11519:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 11520:   //BGE.S <label>                                   |-|012346|-|-*-*-|-----|          |0110_110_010_sss_sss
 11521:   //BNLT.S <label>                                  |A|012346|-|-*-*-|-----|          |0110_110_010_sss_sss [BGE.S <label>]
 11522:   //JBGE.S <label>                                  |A|012346|-|-*-*-|-----|          |0110_110_010_sss_sss [BGE.S <label>]
 11523:   //JBNLT.S <label>                                 |A|012346|-|-*-*-|-----|          |0110_110_010_sss_sss [BGE.S <label>]
 11524:   public static void irpBges () throws M68kException {
 11525:     XEiJ.mpuCycleCount++;
 11526:     int t = XEiJ.regPC;  //pc0+2
 11527:     int s = (byte) XEiJ.regOC;  //8bitディスプレースメント
 11528:     t += s;  //pc0+2+ディスプレースメント
 11529:     if ((t & 1) != 0) {  //分岐先のアドレスが奇数
 11530:       //MC68060のBcc/DBcc/FBccは分岐先のアドレスが奇数のとき分岐しなくてもアドレスエラーになる。FDBccは分岐するときだけ
 11531:       irpBccAddressError (t);
 11532:     }
 11533:     if (XEiJ.MPU_CC_GE << XEiJ.regCCR < 0) {  //分岐する
 11534:       irpSetPC (t);
 11535:     }
 11536:   }  //irpBges
 11537: 
 11538:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 11539:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
 11540:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
 11541:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 11542:   //BGE.S <label>                                   |-|--2346|-|-*-*-|-----|          |0110_110_011_sss_sss (s is not equal to 63)
 11543:   //BNLT.S <label>                                  |A|--2346|-|-*-*-|-----|          |0110_110_011_sss_sss (s is not equal to 63)  [BGE.S <label>]
 11544:   //JBGE.S <label>                                  |A|--2346|-|-*-*-|-----|          |0110_110_011_sss_sss (s is not equal to 63)  [BGE.S <label>]
 11545:   //JBNLT.S <label>                                 |A|--2346|-|-*-*-|-----|          |0110_110_011_sss_sss (s is not equal to 63)  [BGE.S <label>]
 11546:   //BGE.L <label>                                   |-|--2346|-|-*-*-|-----|          |0110_110_011_111_111-{offset}
 11547:   //BNLT.L <label>                                  |A|--2346|-|-*-*-|-----|          |0110_110_011_111_111-{offset}        [BGE.L <label>]
 11548:   public static void irpBgesl () throws M68kException {
 11549:     XEiJ.mpuCycleCount++;
 11550:     int t = XEiJ.regPC;  //pc0+2
 11551:     int s = (byte) XEiJ.regOC;  //8bitディスプレースメント
 11552:     if (s == -1) {  //Bcc.L
 11553:       XEiJ.regPC = t + 4;  //pc0+6
 11554:       s = mmuReadLongExword (t, XEiJ.regSRS);  //32bitディスプレースメント
 11555:     }
 11556:     t += s;  //pc0+2+ディスプレースメント
 11557:     if ((t & 1) != 0) {  //分岐先のアドレスが奇数
 11558:       //MC68060のBcc/DBcc/FBccは分岐先のアドレスが奇数のとき分岐しなくてもアドレスエラーになる。FDBccは分岐するときだけ
 11559:       irpBccAddressError (t);
 11560:     }
 11561:     if (XEiJ.MPU_CC_GE << XEiJ.regCCR < 0) {  //分岐する
 11562:       irpSetPC (t);
 11563:     }
 11564:   }  //irpBgesl
 11565: 
 11566:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 11567:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
 11568:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
 11569:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 11570:   //BLT.W <label>                                   |-|012346|-|-*-*-|-----|          |0110_110_100_000_000-{offset}
 11571:   //BNGE.W <label>                                  |A|012346|-|-*-*-|-----|          |0110_110_100_000_000-{offset}        [BLT.W <label>]
 11572:   //JBLT.W <label>                                  |A|012346|-|-*-*-|-----|          |0110_110_100_000_000-{offset}        [BLT.W <label>]
 11573:   //JBNGE.W <label>                                 |A|012346|-|-*-*-|-----|          |0110_110_100_000_000-{offset}        [BLT.W <label>]
 11574:   //BLT.S <label>                                   |-|012346|-|-*-*-|-----|          |0110_110_100_sss_sss (s is not equal to 0)
 11575:   //BNGE.S <label>                                  |A|012346|-|-*-*-|-----|          |0110_110_100_sss_sss (s is not equal to 0)   [BLT.S <label>]
 11576:   //JBLT.S <label>                                  |A|012346|-|-*-*-|-----|          |0110_110_100_sss_sss (s is not equal to 0)   [BLT.S <label>]
 11577:   //JBNGE.S <label>                                 |A|012346|-|-*-*-|-----|          |0110_110_100_sss_sss (s is not equal to 0)   [BLT.S <label>]
 11578:   //JBGE.L <label>                                  |A|012346|-|-*-*-|-----|          |0110_110_100_000_110-0100111011111001-{address}      [BLT.S (*)+8;JMP <label>]
 11579:   //JBNLT.L <label>                                 |A|012346|-|-*-*-|-----|          |0110_110_100_000_110-0100111011111001-{address}      [BLT.S (*)+8;JMP <label>]
 11580:   public static void irpBltsw () throws M68kException {
 11581:     XEiJ.mpuCycleCount++;
 11582:     int t = XEiJ.regPC;  //pc0+2
 11583:     int s = (byte) XEiJ.regOC;  //8bitディスプレースメント
 11584:     if (s == 0) {  //Bcc.W
 11585:       XEiJ.regPC = t + 2;  //pc0+4
 11586:       s = mmuReadWordSignExword (t, XEiJ.regSRS);  //16bitディスプレースメント
 11587:     }
 11588:     t += s;  //pc0+2+ディスプレースメント
 11589:     if ((t & 1) != 0) {  //分岐先のアドレスが奇数
 11590:       //MC68060のBcc/DBcc/FBccは分岐先のアドレスが奇数のとき分岐しなくてもアドレスエラーになる。FDBccは分岐するときだけ
 11591:       irpBccAddressError (t);
 11592:     }
 11593:     if (XEiJ.MPU_CC_LT << XEiJ.regCCR < 0) {  //分岐する
 11594:       irpSetPC (t);
 11595:     }
 11596:   }  //irpBltsw
 11597: 
 11598:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 11599:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
 11600:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
 11601:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 11602:   //BLT.S <label>                                   |-|012346|-|-*-*-|-----|          |0110_110_101_sss_sss
 11603:   //BNGE.S <label>                                  |A|012346|-|-*-*-|-----|          |0110_110_101_sss_sss [BLT.S <label>]
 11604:   //JBLT.S <label>                                  |A|012346|-|-*-*-|-----|          |0110_110_101_sss_sss [BLT.S <label>]
 11605:   //JBNGE.S <label>                                 |A|012346|-|-*-*-|-----|          |0110_110_101_sss_sss [BLT.S <label>]
 11606:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 11607:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
 11608:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
 11609:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 11610:   //BLT.S <label>                                   |-|012346|-|-*-*-|-----|          |0110_110_110_sss_sss
 11611:   //BNGE.S <label>                                  |A|012346|-|-*-*-|-----|          |0110_110_110_sss_sss [BLT.S <label>]
 11612:   //JBLT.S <label>                                  |A|012346|-|-*-*-|-----|          |0110_110_110_sss_sss [BLT.S <label>]
 11613:   //JBNGE.S <label>                                 |A|012346|-|-*-*-|-----|          |0110_110_110_sss_sss [BLT.S <label>]
 11614:   public static void irpBlts () throws M68kException {
 11615:     XEiJ.mpuCycleCount++;
 11616:     int t = XEiJ.regPC;  //pc0+2
 11617:     int s = (byte) XEiJ.regOC;  //8bitディスプレースメント
 11618:     t += s;  //pc0+2+ディスプレースメント
 11619:     if ((t & 1) != 0) {  //分岐先のアドレスが奇数
 11620:       //MC68060のBcc/DBcc/FBccは分岐先のアドレスが奇数のとき分岐しなくてもアドレスエラーになる。FDBccは分岐するときだけ
 11621:       irpBccAddressError (t);
 11622:     }
 11623:     if (XEiJ.MPU_CC_LT << XEiJ.regCCR < 0) {  //分岐する
 11624:       irpSetPC (t);
 11625:     }
 11626:   }  //irpBlts
 11627: 
 11628:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 11629:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
 11630:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
 11631:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 11632:   //BLT.S <label>                                   |-|--2346|-|-*-*-|-----|          |0110_110_111_sss_sss (s is not equal to 63)
 11633:   //BNGE.S <label>                                  |A|--2346|-|-*-*-|-----|          |0110_110_111_sss_sss (s is not equal to 63)  [BLT.S <label>]
 11634:   //JBLT.S <label>                                  |A|--2346|-|-*-*-|-----|          |0110_110_111_sss_sss (s is not equal to 63)  [BLT.S <label>]
 11635:   //JBNGE.S <label>                                 |A|--2346|-|-*-*-|-----|          |0110_110_111_sss_sss (s is not equal to 63)  [BLT.S <label>]
 11636:   //BLT.L <label>                                   |-|--2346|-|-*-*-|-----|          |0110_110_111_111_111-{offset}
 11637:   //BNGE.L <label>                                  |A|--2346|-|-*-*-|-----|          |0110_110_111_111_111-{offset}        [BLT.L <label>]
 11638:   public static void irpBltsl () throws M68kException {
 11639:     XEiJ.mpuCycleCount++;
 11640:     int t = XEiJ.regPC;  //pc0+2
 11641:     int s = (byte) XEiJ.regOC;  //8bitディスプレースメント
 11642:     if (s == -1) {  //Bcc.L
 11643:       XEiJ.regPC = t + 4;  //pc0+6
 11644:       s = mmuReadLongExword (t, XEiJ.regSRS);  //32bitディスプレースメント
 11645:     }
 11646:     t += s;  //pc0+2+ディスプレースメント
 11647:     if ((t & 1) != 0) {  //分岐先のアドレスが奇数
 11648:       //MC68060のBcc/DBcc/FBccは分岐先のアドレスが奇数のとき分岐しなくてもアドレスエラーになる。FDBccは分岐するときだけ
 11649:       irpBccAddressError (t);
 11650:     }
 11651:     if (XEiJ.MPU_CC_LT << XEiJ.regCCR < 0) {  //分岐する
 11652:       irpSetPC (t);
 11653:     }
 11654:   }  //irpBltsl
 11655: 
 11656:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 11657:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
 11658:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
 11659:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 11660:   //BGT.W <label>                                   |-|012346|-|-***-|-----|          |0110_111_000_000_000-{offset}
 11661:   //BNLE.W <label>                                  |A|012346|-|-***-|-----|          |0110_111_000_000_000-{offset}        [BGT.W <label>]
 11662:   //JBGT.W <label>                                  |A|012346|-|-***-|-----|          |0110_111_000_000_000-{offset}        [BGT.W <label>]
 11663:   //JBNLE.W <label>                                 |A|012346|-|-***-|-----|          |0110_111_000_000_000-{offset}        [BGT.W <label>]
 11664:   //BGT.S <label>                                   |-|012346|-|-***-|-----|          |0110_111_000_sss_sss (s is not equal to 0)
 11665:   //BNLE.S <label>                                  |A|012346|-|-***-|-----|          |0110_111_000_sss_sss (s is not equal to 0)   [BGT.S <label>]
 11666:   //JBGT.S <label>                                  |A|012346|-|-***-|-----|          |0110_111_000_sss_sss (s is not equal to 0)   [BGT.S <label>]
 11667:   //JBNLE.S <label>                                 |A|012346|-|-***-|-----|          |0110_111_000_sss_sss (s is not equal to 0)   [BGT.S <label>]
 11668:   //JBLE.L <label>                                  |A|012346|-|-***-|-----|          |0110_111_000_000_110-0100111011111001-{address}      [BGT.S (*)+8;JMP <label>]
 11669:   //JBNGT.L <label>                                 |A|012346|-|-***-|-----|          |0110_111_000_000_110-0100111011111001-{address}      [BGT.S (*)+8;JMP <label>]
 11670:   public static void irpBgtsw () throws M68kException {
 11671:     XEiJ.mpuCycleCount++;
 11672:     int t = XEiJ.regPC;  //pc0+2
 11673:     int s = (byte) XEiJ.regOC;  //8bitディスプレースメント
 11674:     if (s == 0) {  //Bcc.W
 11675:       XEiJ.regPC = t + 2;  //pc0+4
 11676:       s = mmuReadWordSignExword (t, XEiJ.regSRS);  //16bitディスプレースメント
 11677:     }
 11678:     t += s;  //pc0+2+ディスプレースメント
 11679:     if ((t & 1) != 0) {  //分岐先のアドレスが奇数
 11680:       //MC68060のBcc/DBcc/FBccは分岐先のアドレスが奇数のとき分岐しなくてもアドレスエラーになる。FDBccは分岐するときだけ
 11681:       irpBccAddressError (t);
 11682:     }
 11683:     if (XEiJ.MPU_CC_GT << XEiJ.regCCR < 0) {  //分岐する
 11684:       irpSetPC (t);
 11685:     }
 11686:   }  //irpBgtsw
 11687: 
 11688:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 11689:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
 11690:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
 11691:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 11692:   //BGT.S <label>                                   |-|012346|-|-***-|-----|          |0110_111_001_sss_sss
 11693:   //BNLE.S <label>                                  |A|012346|-|-***-|-----|          |0110_111_001_sss_sss [BGT.S <label>]
 11694:   //JBGT.S <label>                                  |A|012346|-|-***-|-----|          |0110_111_001_sss_sss [BGT.S <label>]
 11695:   //JBNLE.S <label>                                 |A|012346|-|-***-|-----|          |0110_111_001_sss_sss [BGT.S <label>]
 11696:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 11697:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
 11698:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
 11699:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 11700:   //BGT.S <label>                                   |-|012346|-|-***-|-----|          |0110_111_010_sss_sss
 11701:   //BNLE.S <label>                                  |A|012346|-|-***-|-----|          |0110_111_010_sss_sss [BGT.S <label>]
 11702:   //JBGT.S <label>                                  |A|012346|-|-***-|-----|          |0110_111_010_sss_sss [BGT.S <label>]
 11703:   //JBNLE.S <label>                                 |A|012346|-|-***-|-----|          |0110_111_010_sss_sss [BGT.S <label>]
 11704:   public static void irpBgts () throws M68kException {
 11705:     XEiJ.mpuCycleCount++;
 11706:     int t = XEiJ.regPC;  //pc0+2
 11707:     int s = (byte) XEiJ.regOC;  //8bitディスプレースメント
 11708:     t += s;  //pc0+2+ディスプレースメント
 11709:     if ((t & 1) != 0) {  //分岐先のアドレスが奇数
 11710:       //MC68060のBcc/DBcc/FBccは分岐先のアドレスが奇数のとき分岐しなくてもアドレスエラーになる。FDBccは分岐するときだけ
 11711:       irpBccAddressError (t);
 11712:     }
 11713:     if (XEiJ.MPU_CC_GT << XEiJ.regCCR < 0) {  //分岐する
 11714:       irpSetPC (t);
 11715:     }
 11716:   }  //irpBgts
 11717: 
 11718:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 11719:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
 11720:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
 11721:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 11722:   //BGT.S <label>                                   |-|--2346|-|-***-|-----|          |0110_111_011_sss_sss (s is not equal to 63)
 11723:   //BNLE.S <label>                                  |A|--2346|-|-***-|-----|          |0110_111_011_sss_sss (s is not equal to 63)  [BGT.S <label>]
 11724:   //JBGT.S <label>                                  |A|--2346|-|-***-|-----|          |0110_111_011_sss_sss (s is not equal to 63)  [BGT.S <label>]
 11725:   //JBNLE.S <label>                                 |A|--2346|-|-***-|-----|          |0110_111_011_sss_sss (s is not equal to 63)  [BGT.S <label>]
 11726:   //BGT.L <label>                                   |-|--2346|-|-***-|-----|          |0110_111_011_111_111-{offset}
 11727:   //BNLE.L <label>                                  |A|--2346|-|-***-|-----|          |0110_111_011_111_111-{offset}        [BGT.L <label>]
 11728:   public static void irpBgtsl () throws M68kException {
 11729:     XEiJ.mpuCycleCount++;
 11730:     int t = XEiJ.regPC;  //pc0+2
 11731:     int s = (byte) XEiJ.regOC;  //8bitディスプレースメント
 11732:     if (s == -1) {  //Bcc.L
 11733:       XEiJ.regPC = t + 4;  //pc0+6
 11734:       s = mmuReadLongExword (t, XEiJ.regSRS);  //32bitディスプレースメント
 11735:     }
 11736:     t += s;  //pc0+2+ディスプレースメント
 11737:     if ((t & 1) != 0) {  //分岐先のアドレスが奇数
 11738:       //MC68060のBcc/DBcc/FBccは分岐先のアドレスが奇数のとき分岐しなくてもアドレスエラーになる。FDBccは分岐するときだけ
 11739:       irpBccAddressError (t);
 11740:     }
 11741:     if (XEiJ.MPU_CC_GT << XEiJ.regCCR < 0) {  //分岐する
 11742:       irpSetPC (t);
 11743:     }
 11744:   }  //irpBgtsl
 11745: 
 11746:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 11747:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
 11748:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
 11749:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 11750:   //BLE.W <label>                                   |-|012346|-|-***-|-----|          |0110_111_100_000_000-{offset}
 11751:   //BNGT.W <label>                                  |A|012346|-|-***-|-----|          |0110_111_100_000_000-{offset}        [BLE.W <label>]
 11752:   //JBLE.W <label>                                  |A|012346|-|-***-|-----|          |0110_111_100_000_000-{offset}        [BLE.W <label>]
 11753:   //JBNGT.W <label>                                 |A|012346|-|-***-|-----|          |0110_111_100_000_000-{offset}        [BLE.W <label>]
 11754:   //BLE.S <label>                                   |-|012346|-|-***-|-----|          |0110_111_100_sss_sss (s is not equal to 0)
 11755:   //BNGT.S <label>                                  |A|012346|-|-***-|-----|          |0110_111_100_sss_sss (s is not equal to 0)   [BLE.S <label>]
 11756:   //JBLE.S <label>                                  |A|012346|-|-***-|-----|          |0110_111_100_sss_sss (s is not equal to 0)   [BLE.S <label>]
 11757:   //JBNGT.S <label>                                 |A|012346|-|-***-|-----|          |0110_111_100_sss_sss (s is not equal to 0)   [BLE.S <label>]
 11758:   //JBGT.L <label>                                  |A|012346|-|-***-|-----|          |0110_111_100_000_110-0100111011111001-{address}      [BLE.S (*)+8;JMP <label>]
 11759:   //JBNLE.L <label>                                 |A|012346|-|-***-|-----|          |0110_111_100_000_110-0100111011111001-{address}      [BLE.S (*)+8;JMP <label>]
 11760:   public static void irpBlesw () throws M68kException {
 11761:     XEiJ.mpuCycleCount++;
 11762:     int t = XEiJ.regPC;  //pc0+2
 11763:     int s = (byte) XEiJ.regOC;  //8bitディスプレースメント
 11764:     if (s == 0) {  //Bcc.W
 11765:       XEiJ.regPC = t + 2;  //pc0+4
 11766:       s = mmuReadWordSignExword (t, XEiJ.regSRS);  //16bitディスプレースメント
 11767:     }
 11768:     t += s;  //pc0+2+ディスプレースメント
 11769:     if ((t & 1) != 0) {  //分岐先のアドレスが奇数
 11770:       //MC68060のBcc/DBcc/FBccは分岐先のアドレスが奇数のとき分岐しなくてもアドレスエラーになる。FDBccは分岐するときだけ
 11771:       irpBccAddressError (t);
 11772:     }
 11773:     if (XEiJ.MPU_CC_LE << XEiJ.regCCR < 0) {  //分岐する
 11774:       irpSetPC (t);
 11775:     }
 11776:   }  //irpBlesw
 11777: 
 11778:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 11779:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
 11780:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
 11781:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 11782:   //BLE.S <label>                                   |-|012346|-|-***-|-----|          |0110_111_101_sss_sss
 11783:   //BNGT.S <label>                                  |A|012346|-|-***-|-----|          |0110_111_101_sss_sss [BLE.S <label>]
 11784:   //JBLE.S <label>                                  |A|012346|-|-***-|-----|          |0110_111_101_sss_sss [BLE.S <label>]
 11785:   //JBNGT.S <label>                                 |A|012346|-|-***-|-----|          |0110_111_101_sss_sss [BLE.S <label>]
 11786:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 11787:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
 11788:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
 11789:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 11790:   //BLE.S <label>                                   |-|012346|-|-***-|-----|          |0110_111_110_sss_sss
 11791:   //BNGT.S <label>                                  |A|012346|-|-***-|-----|          |0110_111_110_sss_sss [BLE.S <label>]
 11792:   //JBLE.S <label>                                  |A|012346|-|-***-|-----|          |0110_111_110_sss_sss [BLE.S <label>]
 11793:   //JBNGT.S <label>                                 |A|012346|-|-***-|-----|          |0110_111_110_sss_sss [BLE.S <label>]
 11794:   public static void irpBles () throws M68kException {
 11795:     XEiJ.mpuCycleCount++;
 11796:     int t = XEiJ.regPC;  //pc0+2
 11797:     int s = (byte) XEiJ.regOC;  //8bitディスプレースメント
 11798:     t += s;  //pc0+2+ディスプレースメント
 11799:     if ((t & 1) != 0) {  //分岐先のアドレスが奇数
 11800:       //MC68060のBcc/DBcc/FBccは分岐先のアドレスが奇数のとき分岐しなくてもアドレスエラーになる。FDBccは分岐するときだけ
 11801:       irpBccAddressError (t);
 11802:     }
 11803:     if (XEiJ.MPU_CC_LE << XEiJ.regCCR < 0) {  //分岐する
 11804:       irpSetPC (t);
 11805:     }
 11806:   }  //irpBles
 11807: 
 11808:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 11809:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
 11810:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
 11811:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 11812:   //BLE.S <label>                                   |-|--2346|-|-***-|-----|          |0110_111_111_sss_sss (s is not equal to 63)
 11813:   //BNGT.S <label>                                  |A|--2346|-|-***-|-----|          |0110_111_111_sss_sss (s is not equal to 63)  [BLE.S <label>]
 11814:   //JBLE.S <label>                                  |A|--2346|-|-***-|-----|          |0110_111_111_sss_sss (s is not equal to 63)  [BLE.S <label>]
 11815:   //JBNGT.S <label>                                 |A|--2346|-|-***-|-----|          |0110_111_111_sss_sss (s is not equal to 63)  [BLE.S <label>]
 11816:   //BLE.L <label>                                   |-|--2346|-|-***-|-----|          |0110_111_111_111_111-{offset}
 11817:   //BNGT.L <label>                                  |A|--2346|-|-***-|-----|          |0110_111_111_111_111-{offset}        [BLE.L <label>]
 11818:   public static void irpBlesl () throws M68kException {
 11819:     XEiJ.mpuCycleCount++;
 11820:     int t = XEiJ.regPC;  //pc0+2
 11821:     int s = (byte) XEiJ.regOC;  //8bitディスプレースメント
 11822:     if (s == -1) {  //Bcc.L
 11823:       XEiJ.regPC = t + 4;  //pc0+6
 11824:       s = mmuReadLongExword (t, XEiJ.regSRS);  //32bitディスプレースメント
 11825:     }
 11826:     t += s;  //pc0+2+ディスプレースメント
 11827:     if ((t & 1) != 0) {  //分岐先のアドレスが奇数
 11828:       //MC68060のBcc/DBcc/FBccは分岐先のアドレスが奇数のとき分岐しなくてもアドレスエラーになる。FDBccは分岐するときだけ
 11829:       irpBccAddressError (t);
 11830:     }
 11831:     if (XEiJ.MPU_CC_LE << XEiJ.regCCR < 0) {  //分岐する
 11832:       irpSetPC (t);
 11833:     }
 11834:   }  //irpBlesl
 11835: 
 11836:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 11837:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
 11838:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
 11839:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 11840:   //IOCS <name>                                     |A|012346|-|UUUUU|UUUUU|          |0111_000_0dd_ddd_ddd-0100111001001111        [MOVEQ.L #<data>,D0;TRAP #15]
 11841:   //MOVEQ.L #<data>,Dq                              |-|012346|-|-UUUU|-**00|          |0111_qqq_0dd_ddd_ddd
 11842:   public static void irpMoveq () throws M68kException {
 11843:     XEiJ.mpuCycleCount++;
 11844:     int z;
 11845:     XEiJ.regRn[XEiJ.regOC >> 9 & 7] = z = (byte) XEiJ.regOC;
 11846:     XEiJ.regCCR = z >> 28 & XEiJ.REG_CCR_N | (z == 0 ? XEiJ.regCCR & XEiJ.REG_CCR_X | XEiJ.REG_CCR_Z : XEiJ.regCCR & XEiJ.REG_CCR_X);  //ccr_tst
 11847:   }  //irpMoveq
 11848: 
 11849:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 11850:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
 11851:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
 11852:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 11853:   //MVS.B <ea>,Dq                                   |-|------|-|-UUUU|-**00|D M+-WXZPI|0111_qqq_100_mmm_rrr (ISA_B)
 11854:   //
 11855:   //MVS.B <ea>,Dq
 11856:   //  バイトデータをロングに符号拡張してDqの全体を更新する
 11857:   public static void irpMvsByte () throws M68kException {
 11858:     XEiJ.mpuCycleCount++;
 11859:     int ea = XEiJ.regOC & 63;
 11860:     int z;
 11861:     XEiJ.regRn[XEiJ.regOC >> 9 & 7] = z = ea < XEiJ.EA_AR ? (byte) XEiJ.regRn[ea] : ea == XEiJ.EA_IM ? mmuReadByteSignExword ((XEiJ.regPC += 2) - 1, XEiJ.regSRS) : mmuReadByteSignData (efaAnyByte (ea), XEiJ.regSRS);  //pcbs。イミディエイトを分離
 11862:     XEiJ.regCCR = z >> 28 & XEiJ.REG_CCR_N | (z == 0 ? XEiJ.regCCR & XEiJ.REG_CCR_X | XEiJ.REG_CCR_Z : XEiJ.regCCR & XEiJ.REG_CCR_X);  //ccr_tst
 11863:   }  //irpMvsByte
 11864: 
 11865:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 11866:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
 11867:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
 11868:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 11869:   //MVS.W <ea>,Dq                                   |-|------|-|-UUUU|-**00|D M+-WXZPI|0111_qqq_101_mmm_rrr (ISA_B)
 11870:   //
 11871:   //MVS.W <ea>,Dq
 11872:   //  ワードデータをロングに符号拡張してDqの全体を更新する
 11873:   public static void irpMvsWord () throws M68kException {
 11874:     XEiJ.mpuCycleCount++;
 11875:     int ea = XEiJ.regOC & 63;
 11876:     int z;
 11877:     XEiJ.regRn[XEiJ.regOC >> 9 & 7] = z = ea < XEiJ.EA_AR ? (short) XEiJ.regRn[ea] : ea == XEiJ.EA_IM ? mmuReadWordSignExword ((XEiJ.regPC += 2) - 2, XEiJ.regSRS) : mmuReadWordSignData (efaAnyWord (ea), XEiJ.regSRS);  //pcws。イミディエイトを分離
 11878:     XEiJ.regCCR = z >> 28 & XEiJ.REG_CCR_N | (z == 0 ? XEiJ.regCCR & XEiJ.REG_CCR_X | XEiJ.REG_CCR_Z : XEiJ.regCCR & XEiJ.REG_CCR_X);  //ccr_tst
 11879:   }  //irpMvsWord
 11880: 
 11881:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 11882:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
 11883:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
 11884:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 11885:   //MVZ.B <ea>,Dq                                   |-|------|-|-UUUU|-0*00|D M+-WXZPI|0111_qqq_110_mmm_rrr (ISA_B)
 11886:   //
 11887:   //MVZ.B <ea>,Dq
 11888:   //  バイトデータをロングにゼロ拡張してDqの全体を更新する
 11889:   public static void irpMvzByte () throws M68kException {
 11890:     XEiJ.mpuCycleCount++;
 11891:     int ea = XEiJ.regOC & 63;
 11892:     int z;
 11893:     XEiJ.regRn[XEiJ.regOC >> 9 & 7] = z = ea < XEiJ.EA_AR ? 0xff & XEiJ.regRn[ea] : ea == XEiJ.EA_IM ? mmuReadByteZeroExword ((XEiJ.regPC += 2) - 1, XEiJ.regSRS) : mmuReadByteZeroData (efaAnyByte (ea), XEiJ.regSRS);  //pcbz。イミディエイトを分離
 11894:     XEiJ.regCCR = XEiJ.REG_CCR_X & XEiJ.regCCR | (z == 0 ? XEiJ.REG_CCR_Z : 0);
 11895:   }  //irpMvzByte
 11896: 
 11897:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 11898:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
 11899:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
 11900:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 11901:   //MVZ.W <ea>,Dq                                   |-|------|-|-UUUU|-0*00|D M+-WXZPI|0111_qqq_111_mmm_rrr (ISA_B)
 11902:   //
 11903:   //MVZ.W <ea>,Dq
 11904:   //  ワードデータをロングにゼロ拡張してDqの全体を更新する
 11905:   public static void irpMvzWord () throws M68kException {
 11906:     XEiJ.mpuCycleCount++;
 11907:     int ea = XEiJ.regOC & 63;
 11908:     int z;
 11909:     XEiJ.regRn[XEiJ.regOC >> 9 & 7] = z = ea < XEiJ.EA_AR ? (char) XEiJ.regRn[ea] : ea == XEiJ.EA_IM ? mmuReadWordZeroExword ((XEiJ.regPC += 2) - 2, XEiJ.regSRS) : mmuReadWordZeroData (efaAnyWord (ea), XEiJ.regSRS);  //pcwz。イミディエイトを分離
 11910:     XEiJ.regCCR = XEiJ.REG_CCR_X & XEiJ.regCCR | (z == 0 ? XEiJ.REG_CCR_Z : 0);
 11911:   }  //irpMvzWord
 11912: 
 11913:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 11914:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
 11915:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
 11916:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 11917:   //OR.B <ea>,Dq                                    |-|012346|-|-UUUU|-**00|D M+-WXZPI|1000_qqq_000_mmm_rrr
 11918:   public static void irpOrToRegByte () throws M68kException {
 11919:     XEiJ.mpuCycleCount++;
 11920:     int ea = XEiJ.regOC & 63;
 11921:     XEiJ.regCCR = XEiJ.regCCR & XEiJ.REG_CCR_X | XEiJ.MPU_TSTB_TABLE[255 & (XEiJ.regRn[XEiJ.regOC >> 9 & 7] |= 255 & (ea < XEiJ.EA_AR ? XEiJ.regRn[ea] : ea == XEiJ.EA_IM ? mmuReadByteSignExword ((XEiJ.regPC += 2) - 1, XEiJ.regSRS) : mmuReadByteSignData (efaAnyByte (ea), XEiJ.regSRS)))];  //ccr_tst_byte。pcbs。イミディエイトを分離。0拡張してからOR
 11922:   }  //irpOrToRegByte
 11923: 
 11924:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 11925:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
 11926:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
 11927:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 11928:   //OR.W <ea>,Dq                                    |-|012346|-|-UUUU|-**00|D M+-WXZPI|1000_qqq_001_mmm_rrr
 11929:   public static void irpOrToRegWord () throws M68kException {
 11930:     XEiJ.mpuCycleCount++;
 11931:     int ea = XEiJ.regOC & 63;
 11932:     int z = (short) (XEiJ.regRn[XEiJ.regOC >> 9 & 7] |= ea < XEiJ.EA_AR ? (char) XEiJ.regRn[ea] : ea == XEiJ.EA_IM ? mmuReadWordZeroExword ((XEiJ.regPC += 2) - 2, XEiJ.regSRS) : mmuReadWordZeroData (efaAnyWord (ea), XEiJ.regSRS));  //pcwz。イミディエイトを分離。0拡張してからOR
 11933:     XEiJ.regCCR = z >> 28 & XEiJ.REG_CCR_N | (z == 0 ? XEiJ.regCCR & XEiJ.REG_CCR_X | XEiJ.REG_CCR_Z : XEiJ.regCCR & XEiJ.REG_CCR_X);  //ccr_tst
 11934:   }  //irpOrToRegWord
 11935: 
 11936:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 11937:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
 11938:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
 11939:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 11940:   //OR.L <ea>,Dq                                    |-|012346|-|-UUUU|-**00|D M+-WXZPI|1000_qqq_010_mmm_rrr
 11941:   public static void irpOrToRegLong () throws M68kException {
 11942:     int ea = XEiJ.regOC & 63;
 11943:     int z = XEiJ.regRn[XEiJ.regOC >> 9 & 7] |= ea < XEiJ.EA_AR ? XEiJ.regRn[ea] : ea == XEiJ.EA_IM ? mmuReadLongExword ((XEiJ.regPC += 4) - 4, XEiJ.regSRS) : mmuReadLongData (efaAnyLong (ea), XEiJ.regSRS);  //pcls。イミディエイトを分離
 11944:     XEiJ.regCCR = z >> 28 & XEiJ.REG_CCR_N | (z == 0 ? XEiJ.regCCR & XEiJ.REG_CCR_X | XEiJ.REG_CCR_Z : XEiJ.regCCR & XEiJ.REG_CCR_X);  //ccr_tst
 11945:   }  //irpOrToRegLong
 11946: 
 11947:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 11948:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
 11949:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
 11950:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 11951:   //DIVU.W <ea>,Dq                                  |-|012346|-|-UUUU|-***0|D M+-WXZPI|1000_qqq_011_mmm_rrr
 11952:   //
 11953:   //DIVU.W <ea>,Dq
 11954:   //  M68000PRMでDIVU.Wのオーバーフローの条件が16bit符号あり整数と書かれているのは16bit符号なし整数の間違い
 11955:   public static void irpDivuWord () throws M68kException {
 11956:     //  X  変化しない
 11957:     //  N  ゼロ除算またはオーバーフローのとき不定。商が負のときセット。それ以外はクリア
 11958:     //  Z  ゼロ除算またはオーバーフローのとき不定。商が0のときセット。それ以外はクリア
 11959:     //  V  ゼロ除算のとき不定。オーバーフローのときセット。それ以外はクリア
 11960:     //  C  常にクリア
 11961:     XEiJ.mpuCycleCount += 22;  //最大
 11962:     int ea = XEiJ.regOC & 63;
 11963:     int qqq = XEiJ.regOC >> 9 & 7;
 11964:     int y = ea < XEiJ.EA_AR ? (char) XEiJ.regRn[ea] : ea == XEiJ.EA_IM ? mmuReadWordZeroExword ((XEiJ.regPC += 2) - 2, XEiJ.regSRS) : mmuReadWordZeroData (efaAnyWord (ea), XEiJ.regSRS);  //除数。pcwz。イミディエイトを分離
 11965:     int x = XEiJ.regRn[qqq];  //被除数
 11966:     if (y == 0) {  //ゼロ除算
 11967:       //Dqは変化しない
 11968:       XEiJ.regCCR = (XEiJ.regCCR & (XEiJ.REG_CCR_X | XEiJ.REG_CCR_N | XEiJ.REG_CCR_Z | XEiJ.REG_CCR_V)  //XとNとZとVは変化しない
 11969:                      );  //Cは常にクリア
 11970:       M68kException.m6eAddress = XEiJ.regPC0;  //アドレスは命令の先頭
 11971:       M68kException.m6eNumber = M68kException.M6E_DIVIDE_BY_ZERO;
 11972:       throw M68kException.m6eSignal;
 11973:     }
 11974:     //無理にintで符号なし除算をやろうとするよりもdoubleにキャストしてから割ったほうが速い
 11975:     //  intの除算をdoubleの除算器で行うプロセッサならばなおさら
 11976:     //被除数を符号なし32ビットとみなすためlongを経由してdoubleに変換する
 11977:     //doubleからlongやintへのキャストは小数点以下が切り捨てられ、オーバーフローは表現できる絶対値最大の値になる
 11978:     //doubleから直接intに戻しているので0xffffffff/0x0001=0xffffffffが絶対値最大の0x7fffffffになってしまうが、
 11979:     //DIVU.Wではオーバーフローになることに変わりはないのでよいことにする
 11980:     //  符号なし32ビットの0xffffffffにしたいときは戻すときもlongを経由すればよい
 11981:     int z = (int) ((double) ((long) x & 0xffffffffL) / (double) y);  //商
 11982:     if (z >>> 16 != 0) {  //オーバーフローあり
 11983:       //Dqは変化しない
 11984:       XEiJ.regCCR = (XEiJ.regCCR & (XEiJ.REG_CCR_X | XEiJ.REG_CCR_N | XEiJ.REG_CCR_Z) |  //XとNとZは変化しない
 11985:                      XEiJ.REG_CCR_V  //Vは常にセット
 11986:                      );  //Cは常にクリア
 11987:     } else {  //オーバーフローなし
 11988:       XEiJ.regRn[qqq] = x - y * z << 16 | z;  //余り<<16|商
 11989:       z = (short) z;
 11990:       XEiJ.regCCR = (XEiJ.regCCR & XEiJ.REG_CCR_X |  //Xは変化しない
 11991:                      (z < 0 ? XEiJ.REG_CCR_N : 0) |  //Nは商が負のときセット、さもなくばクリア
 11992:                      (z == 0 ? XEiJ.REG_CCR_Z : 0)  //Zは商が0のときセット、さもなくばクリア
 11993:                      //Vは常にクリア
 11994:                      );  //Cは常にクリア
 11995:     }  //if オーバーフローあり/オーバーフローなし
 11996:   }  //irpDivuWord
 11997: 
 11998:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 11999:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
 12000:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
 12001:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 12002:   //SBCD.B Dr,Dq                                    |-|012346|-|UUUUU|*U*U*|          |1000_qqq_100_000_rrr
 12003:   //SBCD.B -(Ar),-(Aq)                              |-|012346|-|UUUUU|*U*U*|          |1000_qqq_100_001_rrr
 12004:   //OR.B Dq,<ea>                                    |-|012346|-|-UUUU|-**00|  M+-WXZ  |1000_qqq_100_mmm_rrr
 12005:   public static void irpOrToMemByte () throws M68kException {
 12006:     int ea = XEiJ.regOC & 63;
 12007:     if (ea >= XEiJ.EA_MM) {  //OR.B Dq,<ea>
 12008:       XEiJ.mpuCycleCount++;
 12009:       int a = efaMltByte (ea);
 12010:       int z = XEiJ.regRn[XEiJ.regOC >> 9 & 7] | mmuReadByteSignData (a, XEiJ.regSRS);
 12011:       mmuWriteByteData (a, z, XEiJ.regSRS);
 12012:       XEiJ.regCCR = XEiJ.regCCR & XEiJ.REG_CCR_X | XEiJ.MPU_TSTB_TABLE[255 & z];  //ccr_tst_byte
 12013:     } else if (ea < XEiJ.EA_AR) {  //SBCD.B Dr,Dq
 12014:       int qqq = XEiJ.regOC >> 9 & 7;
 12015:       XEiJ.mpuCycleCount++;
 12016:       int x;
 12017:       XEiJ.regRn[qqq] = ~0xff & (x = XEiJ.regRn[qqq]) | irpSbcd (x, XEiJ.regRn[ea]);
 12018:     } else {  //SBCD.B -(Ar),-(Aq)
 12019:       XEiJ.mpuCycleCount += 2;
 12020:       M68kException.m6eIncremented -= 1L << (ea << 3);
 12021:       int a = --XEiJ.regRn[ea];  //このr[ea]はアドレスレジスタ
 12022:       int y = mmuReadByteZeroData (a, XEiJ.regSRS);
 12023:       int aqq = (XEiJ.regOC >> 9) - (64 - 8);
 12024:       M68kException.m6eIncremented -= 1L << (aqq << 3);
 12025:       a = --XEiJ.regRn[aqq];
 12026:       mmuWriteByteData (a, irpSbcd (mmuModifyByteZeroData (a, XEiJ.regSRS), y), XEiJ.regSRS);
 12027:     }
 12028:   }  //irpOrToMemByte
 12029: 
 12030:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 12031:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
 12032:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
 12033:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 12034:   //PACK Dr,Dq,#<data>                              |-|--2346|-|-----|-----|          |1000_qqq_101_000_rrr-{data}
 12035:   //PACK -(Ar),-(Aq),#<data>                        |-|--2346|-|-----|-----|          |1000_qqq_101_001_rrr-{data}
 12036:   //OR.W Dq,<ea>                                    |-|012346|-|-UUUU|-**00|  M+-WXZ  |1000_qqq_101_mmm_rrr
 12037:   //
 12038:   //PACK Dr,Dq,#<data>
 12039:   //PACK -(Ar),-(Aq),#<data>
 12040:   //  PACK/UNPKは第1オペランドのソースと第2オペランドのデスティネーションのサイズが違う。パックされていない方がワードでされている方がバイト
 12041:   //  10の位を4ビット右または左にシフトする。第3オペランドの補正値はワードでパックされていない方に加算する。CCRは変化しない
 12042:   public static void irpOrToMemWord () throws M68kException {
 12043:     int ea = XEiJ.regOC & 63;
 12044:     if (ea >= XEiJ.EA_MM) {  //OR.W Dq,<ea>
 12045:       XEiJ.mpuCycleCount++;
 12046:       int a = efaMltWord (ea);
 12047:       int z;
 12048:       mmuWriteWordData (a, z = XEiJ.regRn[XEiJ.regOC >> 9 & 7] | mmuModifyWordSignData (a, XEiJ.regSRS), XEiJ.regSRS);
 12049:       XEiJ.regCCR = XEiJ.regCCR & XEiJ.REG_CCR_X | (char) z - 1 >> 31 & XEiJ.REG_CCR_Z | ((short) z < 0 ? XEiJ.REG_CCR_N : 0);  //ccr_tst_word
 12050:     } else if (ea < XEiJ.EA_AR) {  //PACK Dr,Dq,#<data>
 12051:       XEiJ.mpuCycleCount += 2;
 12052:       int qqq = XEiJ.regOC >> 9 & 7;
 12053:       int t = XEiJ.regRn[ea] + mmuReadWordSignExword ((XEiJ.regPC += 2) - 2, XEiJ.regSRS);  //pcws
 12054:       XEiJ.regRn[qqq] = ~0xff & XEiJ.regRn[qqq] | t >> 4 & 0xf0 | t & 15;
 12055:     } else {  //PACK -(Ar),-(Aq),#<data>
 12056:       int o = mmuReadWordSignExword ((XEiJ.regPC += 2) - 2, XEiJ.regSRS);  //pcws
 12057:       M68kException.m6eIncremented -= 2L << (ea << 3);
 12058:       int a = XEiJ.regRn[ea] -= 2;
 12059:       int t = mmuReadWordSignData (a, XEiJ.regSRS) + o;  //020以上なのでアドレスエラーは出ない
 12060:       int aqq = (XEiJ.regOC >> 9) - (64 - 8);
 12061:       M68kException.m6eIncremented -= 1L << (aqq << 3);
 12062:       a = --XEiJ.regRn[aqq];
 12063:       mmuWriteByteData (a, t >> 4 & 0xf0 | t & 15, XEiJ.regSRS);
 12064:     }
 12065:   }  //irpOrToMemWord
 12066: 
 12067:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 12068:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
 12069:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
 12070:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 12071:   //UNPK Dr,Dq,#<data>                              |-|--2346|-|-----|-----|          |1000_qqq_110_000_rrr-{data}
 12072:   //UNPK -(Ar),-(Aq),#<data>                        |-|--2346|-|-----|-----|          |1000_qqq_110_001_rrr-{data}
 12073:   //OR.L Dq,<ea>                                    |-|012346|-|-UUUU|-**00|  M+-WXZ  |1000_qqq_110_mmm_rrr
 12074:   //
 12075:   //UNPK Dr,Dq,#<data>
 12076:   //UNPK -(Ar),-(Aq),#<data>
 12077:   //  PACK/UNPKは第1オペランドのソースと第2オペランドのデスティネーションのサイズが違う。パックされていない方がワードでされている方がバイト
 12078:   //  10の位を4ビット右または左にシフトする。第3オペランドの補正値はワードでパックされていない方に加算する。CCRは変化しない
 12079:   public static void irpOrToMemLong () throws M68kException {
 12080:     int ea = XEiJ.regOC & 63;
 12081:     if (ea >= XEiJ.EA_MM) {  //OR.L Dq,<ea>
 12082:       XEiJ.mpuCycleCount++;
 12083:       int a = efaMltLong (ea);
 12084:       int z;
 12085:       mmuWriteLongData (a, z = XEiJ.regRn[XEiJ.regOC >> 9 & 7] | mmuModifyLongData (a, XEiJ.regSRS), XEiJ.regSRS);
 12086:       XEiJ.regCCR = z >> 28 & XEiJ.REG_CCR_N | (z == 0 ? XEiJ.regCCR & XEiJ.REG_CCR_X | XEiJ.REG_CCR_Z : XEiJ.regCCR & XEiJ.REG_CCR_X);  //ccr_tst
 12087:     } else if (ea < XEiJ.EA_AR) {  //UNPK Dr,Dq,#<data>
 12088:       int qqq = XEiJ.regOC >> 9 & 7;
 12089:       int t = XEiJ.regRn[ea];
 12090:       XEiJ.regRn[qqq] = ~0xffff & XEiJ.regRn[qqq] | (char) ((t << 4 & 0x0f00 | t & 15) + mmuReadWordSignExword ((XEiJ.regPC += 2) - 2, XEiJ.regSRS));  //pcws
 12091:     } else {  //UNPK -(Ar),-(Aq),#<data>
 12092:       int o = mmuReadWordSignExword ((XEiJ.regPC += 2) - 2, XEiJ.regSRS);  //pcws
 12093:       M68kException.m6eIncremented -= 1L << (ea << 3);
 12094:       int a = --XEiJ.regRn[ea];
 12095:       int t = mmuReadByteSignData (a, XEiJ.regSRS);
 12096:       int aqq = (XEiJ.regOC >> 9) - (64 - 8);
 12097:       M68kException.m6eIncremented -= 2L << (aqq << 3);
 12098:       a = XEiJ.regRn[aqq] -= 2;
 12099:       mmuWriteWordData (a, (t << 4 & 0x0f00 | t & 15) + o, XEiJ.regSRS);  //020以上なのでアドレスエラーは出ない
 12100:     }
 12101:   }  //irpOrToMemLong
 12102: 
 12103:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 12104:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
 12105:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
 12106:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 12107:   //DIVS.W <ea>,Dq                                  |-|012346|-|-UUUU|-***0|D M+-WXZPI|1000_qqq_111_mmm_rrr
 12108:   //
 12109:   //DIVS.W <ea>,Dq
 12110:   //  DIVSの余りの符号は被除数と一致
 12111:   //  M68000PRMでDIVS.Wのアドレッシングモードがデータ可変と書かれているのはデータの間違い
 12112:   public static void irpDivsWord () throws M68kException {
 12113:     //  X  変化しない
 12114:     //  N  ゼロ除算またはオーバーフローのとき不定。商が負のときセット。それ以外はクリア
 12115:     //  Z  ゼロ除算またはオーバーフローのとき不定。商が0のときセット。それ以外はクリア
 12116:     //  V  ゼロ除算のとき不定。オーバーフローのときセット。それ以外はクリア
 12117:     //  C  常にクリア
 12118:     //divsの余りの符号は被除数と一致
 12119:     //Javaの除算演算子の挙動
 12120:     //   10 /  3 ==  3   10 %  3 ==  1   10 =  3 *  3 +  1
 12121:     //   10 / -3 == -3   10 % -3 ==  1   10 = -3 * -3 +  1
 12122:     //  -10 /  3 == -3  -10 %  3 == -1  -10 =  3 * -3 + -1
 12123:     //  -10 / -3 ==  3  -10 % -3 == -1  -10 = -3 *  3 + -1
 12124:     XEiJ.mpuCycleCount += 22;  //最大
 12125:     int ea = XEiJ.regOC & 63;
 12126:     int qqq = XEiJ.regOC >> 9 & 7;
 12127:     int y = ea < XEiJ.EA_AR ? (short) XEiJ.regRn[ea] : ea == XEiJ.EA_IM ? mmuReadWordSignExword ((XEiJ.regPC += 2) - 2, XEiJ.regSRS) : mmuReadWordSignData (efaAnyWord (ea), XEiJ.regSRS);  //除数。pcws。イミディエイトを分離
 12128:     int x = XEiJ.regRn[qqq];  //被除数
 12129:     if (y == 0) {  //ゼロ除算
 12130:       //Dqは変化しない
 12131:       XEiJ.regCCR = (XEiJ.regCCR & (XEiJ.REG_CCR_X | XEiJ.REG_CCR_N | XEiJ.REG_CCR_Z | XEiJ.REG_CCR_V)  //XとNとZとVは変化しない
 12132:                      );  //Cは常にクリア
 12133:       M68kException.m6eAddress = XEiJ.regPC0;  //アドレスは命令の先頭
 12134:       M68kException.m6eNumber = M68kException.M6E_DIVIDE_BY_ZERO;
 12135:       throw M68kException.m6eSignal;
 12136:     }
 12137:     int z = x / y;  //商
 12138:     if ((short) z != z) {  //オーバーフローあり
 12139:       //Dqは変化しない
 12140:       XEiJ.regCCR = (XEiJ.regCCR & (XEiJ.REG_CCR_X | XEiJ.REG_CCR_N | XEiJ.REG_CCR_Z) |  //XとNとZは変化しない
 12141:                      XEiJ.REG_CCR_V  //Vは常にセット
 12142:                      );  //Cは常にクリア
 12143:     } else {  //オーバーフローなし
 12144:       XEiJ.regRn[qqq] = x - y * z << 16 | (char) z;  //Dqは余り<<16|商&$ffff
 12145:       XEiJ.regCCR = (XEiJ.regCCR & XEiJ.REG_CCR_X |  //Xは変化しない
 12146:                      (z < 0 ? XEiJ.REG_CCR_N : 0) |  //Nは商が負のときセット、さもなくばクリア
 12147:                      (z == 0 ? XEiJ.REG_CCR_Z : 0)  //Zは商が0のときセット、さもなくばクリア
 12148:                      //Vは常にクリア
 12149:                      );  //Cは常にクリア
 12150:     }
 12151:   }  //irpDivsWord
 12152: 
 12153:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 12154:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
 12155:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
 12156:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 12157:   //SUB.B <ea>,Dq                                   |-|012346|-|UUUUU|*****|D M+-WXZPI|1001_qqq_000_mmm_rrr
 12158:   public static void irpSubToRegByte () throws M68kException {
 12159:     XEiJ.mpuCycleCount++;
 12160:     int ea = XEiJ.regOC & 63;
 12161:     int qqq = XEiJ.regOC >> 9 & 7;
 12162:     int x, y, z;
 12163:     y = ea < XEiJ.EA_AR ? XEiJ.regRn[ea] : ea == XEiJ.EA_IM ? mmuReadByteSignExword ((XEiJ.regPC += 2) - 1, XEiJ.regSRS) : mmuReadByteSignData (efaAnyByte (ea), XEiJ.regSRS);  //pcbs。イミディエイトを分離
 12164:     x = XEiJ.regRn[qqq];
 12165:     z = x - y;
 12166:     XEiJ.regRn[qqq] = ~255 & x | 255 & z;
 12167:     XEiJ.regCCR = (XEiJ.MPU_TSTB_TABLE[255 & z] |
 12168:            ((x ^ y) & (x ^ z)) >> 6 & XEiJ.REG_CCR_V |
 12169:            (byte) (x & (y ^ z) ^ (y | z)) >> 7 & (XEiJ.REG_CCR_X | XEiJ.REG_CCR_C));  //ccr_sub_byte
 12170:   }  //irpSubToRegByte
 12171: 
 12172:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 12173:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
 12174:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
 12175:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 12176:   //SUB.W <ea>,Dq                                   |-|012346|-|UUUUU|*****|DAM+-WXZPI|1001_qqq_001_mmm_rrr
 12177:   public static void irpSubToRegWord () throws M68kException {
 12178:     XEiJ.mpuCycleCount++;
 12179:     int ea = XEiJ.regOC & 63;
 12180:     int qqq = XEiJ.regOC >> 9 & 7;
 12181:     int x, y, z;
 12182:     y = ea < XEiJ.EA_MM ? XEiJ.regRn[ea] : ea == XEiJ.EA_IM ? mmuReadWordSignExword ((XEiJ.regPC += 2) - 2, XEiJ.regSRS) : mmuReadWordSignData (efaAnyWord (ea), XEiJ.regSRS);  //このr[ea]はデータレジスタまたはアドレスレジスタ。pcws。イミディエイトを分離
 12183:     x = XEiJ.regRn[qqq];
 12184:     z = x - y;
 12185:     XEiJ.regRn[qqq] = ~65535 & x | (char) z;
 12186:     XEiJ.regCCR = (z >> 12 & XEiJ.REG_CCR_N | (char) z - 1 >> 14 & XEiJ.REG_CCR_Z |
 12187:            ((x ^ y) & (x ^ z)) >> 14 & XEiJ.REG_CCR_V |
 12188:            (short) (x & (y ^ z) ^ (y | z)) >> 15 & (XEiJ.REG_CCR_X | XEiJ.REG_CCR_C));  //ccr_sub_word
 12189:   }  //irpSubToRegWord
 12190: 
 12191:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 12192:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
 12193:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
 12194:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 12195:   //SUB.L <ea>,Dq                                   |-|012346|-|UUUUU|*****|DAM+-WXZPI|1001_qqq_010_mmm_rrr
 12196:   public static void irpSubToRegLong () throws M68kException {
 12197:     int ea = XEiJ.regOC & 63;
 12198:     int qqq = XEiJ.regOC >> 9 & 7;
 12199:     XEiJ.mpuCycleCount++;
 12200:     int x, y, z;
 12201:     y = ea < XEiJ.EA_MM ? XEiJ.regRn[ea] : ea == XEiJ.EA_IM ? mmuReadLongExword ((XEiJ.regPC += 4) - 4, XEiJ.regSRS) : mmuReadLongData (efaAnyLong (ea), XEiJ.regSRS);  //このr[ea]はデータレジスタまたはアドレスレジスタ。pcls。イミディエイトを分離
 12202:     x = XEiJ.regRn[qqq];
 12203:     z = x - y;
 12204:     XEiJ.regRn[qqq] = z;
 12205:     XEiJ.regCCR = (z >> 28 & XEiJ.REG_CCR_N | (z == 0 ? XEiJ.REG_CCR_Z : 0) |
 12206:            ((x ^ y) & (x ^ z)) >> 30 & XEiJ.REG_CCR_V |
 12207:            (x & (y ^ z) ^ (y | z)) >> 31 & (XEiJ.REG_CCR_X | XEiJ.REG_CCR_C));  //ccr_sub
 12208:   }  //irpSubToRegLong
 12209: 
 12210:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 12211:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
 12212:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
 12213:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 12214:   //SUBA.W <ea>,Aq                                  |-|012346|-|-----|-----|DAM+-WXZPI|1001_qqq_011_mmm_rrr
 12215:   //SUB.W <ea>,Aq                                   |A|012346|-|-----|-----|DAM+-WXZPI|1001_qqq_011_mmm_rrr [SUBA.W <ea>,Aq]
 12216:   //CLR.W Ar                                        |A|012346|-|-----|-----| A        |1001_rrr_011_001_rrr [SUBA.W Ar,Ar]
 12217:   //
 12218:   //SUBA.W <ea>,Aq
 12219:   //  ソースを符号拡張してロングで減算する
 12220:   public static void irpSubaWord () throws M68kException {
 12221:     XEiJ.mpuCycleCount++;
 12222:     int ea = XEiJ.regOC & 63;
 12223:     int z = ea < XEiJ.EA_MM ? (short) XEiJ.regRn[ea] : ea == XEiJ.EA_IM ? mmuReadWordSignExword ((XEiJ.regPC += 2) - 2, XEiJ.regSRS) : mmuReadWordSignData (efaAnyWord (ea), XEiJ.regSRS);  //このr[ea]はデータレジスタまたはアドレスレジスタ。pcws。イミディエイトを分離。ここでAqが変化する可能性があることに注意
 12224:     XEiJ.regRn[XEiJ.regOC >> 9 & 15] -= z;  //r[op >> 9 & 15] -= ea < XEiJ.EA_MM ? (short) r[ea] : rws (efaAnyWord (ea));は不可
 12225:     //ccrは変化しない
 12226:   }  //irpSubaWord
 12227: 
 12228:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 12229:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
 12230:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
 12231:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 12232:   //SUBX.B Dr,Dq                                    |-|012346|-|*UUUU|*****|          |1001_qqq_100_000_rrr
 12233:   //SUBX.B -(Ar),-(Aq)                              |-|012346|-|*UUUU|*****|          |1001_qqq_100_001_rrr
 12234:   //SUB.B Dq,<ea>                                   |-|012346|-|UUUUU|*****|  M+-WXZ  |1001_qqq_100_mmm_rrr
 12235:   public static void irpSubToMemByte () throws M68kException {
 12236:     int ea = XEiJ.regOC & 63;
 12237:     int a, x, y, z;
 12238:     if (ea < XEiJ.EA_MM) {
 12239:       if (ea < XEiJ.EA_AR) {  //SUBX.B Dr,Dq
 12240:         int qqq = XEiJ.regOC >> 9 & 7;
 12241:         XEiJ.mpuCycleCount++;
 12242:         y = XEiJ.regRn[ea];
 12243:         x = XEiJ.regRn[qqq];
 12244:         z = x - y - (XEiJ.regCCR >> 4);  //Xの左側はすべて0なのでCCR_X&を省略
 12245:         XEiJ.regRn[qqq] = ~255 & x | 255 & z;
 12246:       } else {  //SUBX.B -(Ar),-(Aq)
 12247:         XEiJ.mpuCycleCount += 2;
 12248:         M68kException.m6eIncremented -= 1L << (ea << 3);
 12249:         a = --XEiJ.regRn[ea];
 12250:         y = mmuReadByteSignData (a, XEiJ.regSRS);  //このr[ea]はアドレスレジスタ
 12251:         int aqq = XEiJ.regOC >> 9 & 15;  //1qqq=aqq
 12252:         M68kException.m6eIncremented -= 1L << (aqq << 3);
 12253:         a = --XEiJ.regRn[aqq];
 12254:         x = mmuModifyByteSignData (a, XEiJ.regSRS);
 12255:         z = x - y - (XEiJ.regCCR >> 4);  //Xの左側はすべて0なのでCCR_X&を省略
 12256:         mmuWriteByteData (a, z, XEiJ.regSRS);
 12257:       }
 12258:       XEiJ.regCCR = (z >> 4 & XEiJ.REG_CCR_N | (255 & z) - 1 >> 6 & XEiJ.regCCR & XEiJ.REG_CCR_Z |  //SUBXはZをクリアすることはあるがセットすることはない
 12259:              ((x ^ y) & (x ^ z)) >> 6 & XEiJ.REG_CCR_V |
 12260:              (byte) (x & (y ^ z) ^ (y | z)) >> 7 & (XEiJ.REG_CCR_X | XEiJ.REG_CCR_C));  //ccr_subx_byte
 12261:     } else {  //SUB.B Dq,<ea>
 12262:       XEiJ.mpuCycleCount++;
 12263:       y = XEiJ.regRn[XEiJ.regOC >> 9 & 7];
 12264:       a = efaMltByte (ea);
 12265:       x = mmuModifyByteSignData (a, XEiJ.regSRS);
 12266:       z = x - y;
 12267:       mmuWriteByteData (a, z, XEiJ.regSRS);
 12268:       XEiJ.regCCR = (XEiJ.MPU_TSTB_TABLE[255 & z] |
 12269:              ((x ^ y) & (x ^ z)) >> 6 & XEiJ.REG_CCR_V |
 12270:              (byte) (x & (y ^ z) ^ (y | z)) >> 7 & (XEiJ.REG_CCR_X | XEiJ.REG_CCR_C));  //ccr_sub_byte
 12271:     }
 12272:   }  //irpSubToMemByte
 12273: 
 12274:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 12275:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
 12276:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
 12277:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 12278:   //SUBX.W Dr,Dq                                    |-|012346|-|*UUUU|*****|          |1001_qqq_101_000_rrr
 12279:   //SUBX.W -(Ar),-(Aq)                              |-|012346|-|*UUUU|*****|          |1001_qqq_101_001_rrr
 12280:   //SUB.W Dq,<ea>                                   |-|012346|-|UUUUU|*****|  M+-WXZ  |1001_qqq_101_mmm_rrr
 12281:   public static void irpSubToMemWord () throws M68kException {
 12282:     int ea = XEiJ.regOC & 63;
 12283:     int a, x, y, z;
 12284:     if (ea < XEiJ.EA_MM) {
 12285:       if (ea < XEiJ.EA_AR) {  //SUBX.W Dr,Dq
 12286:         int qqq = XEiJ.regOC >> 9 & 7;
 12287:         XEiJ.mpuCycleCount++;
 12288:         y = XEiJ.regRn[ea];
 12289:         x = XEiJ.regRn[qqq];
 12290:         z = x - y - (XEiJ.regCCR >> 4);  //Xの左側はすべて0なのでCCR_X&を省略
 12291:         XEiJ.regRn[qqq] = ~65535 & x | (char) z;
 12292:       } else {  //SUBX.W -(Ar),-(Aq)
 12293:         XEiJ.mpuCycleCount += 2;
 12294:         M68kException.m6eIncremented -= 2L << (ea << 3);
 12295:         a = XEiJ.regRn[ea] -= 2;
 12296:         y = mmuReadWordSignData (a, XEiJ.regSRS);  //このr[ea]はアドレスレジスタ
 12297:         int aqq = XEiJ.regOC >> 9 & 15;
 12298:         M68kException.m6eIncremented -= 2L << (aqq << 3);
 12299:         a = XEiJ.regRn[aqq] -= 2;
 12300:         x = mmuModifyWordSignData (a, XEiJ.regSRS);
 12301:         z = x - y - (XEiJ.regCCR >> 4);  //Xの左側はすべて0なのでCCR_X&を省略
 12302:         mmuWriteWordData (a, z, XEiJ.regSRS);
 12303:       }
 12304:       XEiJ.regCCR = (z >> 12 & XEiJ.REG_CCR_N | (char) z - 1 >> 14 & XEiJ.regCCR & XEiJ.REG_CCR_Z |  //ADDXはZをクリアすることはあるがセットすることはない
 12305:              ((x ^ y) & (x ^ z)) >> 14 & XEiJ.REG_CCR_V |
 12306:              (short) (x & (y ^ z) ^ (y | z)) >> 15 & (XEiJ.REG_CCR_X | XEiJ.REG_CCR_C));  //ccr_subx_word
 12307:     } else {  //SUB.W Dq,<ea>
 12308:       XEiJ.mpuCycleCount++;
 12309:       y = (short) XEiJ.regRn[XEiJ.regOC >> 9 & 7];
 12310:       a = efaMltWord (ea);
 12311:       x = mmuModifyWordSignData (a, XEiJ.regSRS);
 12312:       z = x - y;
 12313:       mmuWriteWordData (a, z, XEiJ.regSRS);
 12314:       XEiJ.regCCR = (z >> 12 & XEiJ.REG_CCR_N | (char) z - 1 >> 14 & XEiJ.REG_CCR_Z |
 12315:              ((x ^ y) & (x ^ z)) >> 14 & XEiJ.REG_CCR_V |
 12316:              (short) (x & (y ^ z) ^ (y | z)) >> 15 & (XEiJ.REG_CCR_X | XEiJ.REG_CCR_C));  //ccr_sub_word
 12317:     }
 12318:   }  //irpSubToMemWord
 12319: 
 12320:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 12321:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
 12322:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
 12323:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 12324:   //SUBX.L Dr,Dq                                    |-|012346|-|*UUUU|*****|          |1001_qqq_110_000_rrr
 12325:   //SUBX.L -(Ar),-(Aq)                              |-|012346|-|*UUUU|*****|          |1001_qqq_110_001_rrr
 12326:   //SUB.L Dq,<ea>                                   |-|012346|-|UUUUU|*****|  M+-WXZ  |1001_qqq_110_mmm_rrr
 12327:   public static void irpSubToMemLong () throws M68kException {
 12328:     int ea = XEiJ.regOC & 63;
 12329:     if (ea < XEiJ.EA_MM) {
 12330:       int x;
 12331:       int y;
 12332:       int z;
 12333:       if (ea < XEiJ.EA_AR) {  //SUBX.L Dr,Dq
 12334:         int qqq = XEiJ.regOC >> 9 & 7;
 12335:         XEiJ.mpuCycleCount++;
 12336:         XEiJ.regRn[qqq] = z = (x = XEiJ.regRn[qqq]) - (y = XEiJ.regRn[ea]) - (XEiJ.regCCR >> 4);  //Xの左側はすべて0なのでCCR_X&を省略
 12337:       } else {  //SUBX.L -(Ar),-(Aq)
 12338:         XEiJ.mpuCycleCount += 2;
 12339:         M68kException.m6eIncremented -= 4L << (ea << 3);
 12340:         int a = XEiJ.regRn[ea] -= 4;  //このr[ea]はアドレスレジスタ
 12341:         y = mmuReadLongData (a, XEiJ.regSRS);
 12342:         int aqq = XEiJ.regOC >> 9 & 15;
 12343:         M68kException.m6eIncremented -= 4L << (aqq << 3);
 12344:         a = XEiJ.regRn[aqq] -= 4;
 12345:         mmuWriteLongData (a, z = (x = mmuModifyLongData (a, XEiJ.regSRS)) - y - (XEiJ.regCCR >> 4), XEiJ.regSRS);  //Xの左側はすべて0なのでCCR_X&を省略
 12346:       }
 12347:       XEiJ.regCCR = (z >> 28 & XEiJ.REG_CCR_N | (z == 0 ? XEiJ.regCCR & XEiJ.REG_CCR_Z : 0) |
 12348:              ((x ^ y) & (x ^ z)) >>> 31 << 1 |
 12349:              (x & (y ^ z) ^ (y | z)) >> 31 & (XEiJ.REG_CCR_X | XEiJ.REG_CCR_C));  //ccr_subx
 12350:     } else {  //SUB.L Dq,<ea>
 12351:       XEiJ.mpuCycleCount++;
 12352:       int a = efaMltLong (ea);
 12353:       int x;
 12354:       int y;
 12355:       int z;
 12356:       mmuWriteLongData (a, z = (x = mmuModifyLongData (a, XEiJ.regSRS)) - (y = XEiJ.regRn[XEiJ.regOC >> 9 & 7]), XEiJ.regSRS);
 12357:       XEiJ.regCCR = (z >> 28 & XEiJ.REG_CCR_N | (z == 0 ? XEiJ.REG_CCR_Z : 0) |
 12358:              ((x ^ y) & (x ^ z)) >>> 31 << 1 |
 12359:              (x & (y ^ z) ^ (y | z)) >> 31 & (XEiJ.REG_CCR_X | XEiJ.REG_CCR_C));  //ccr_sub
 12360:     }
 12361:   }  //irpSubToMemLong
 12362: 
 12363:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 12364:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
 12365:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
 12366:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 12367:   //SUBA.L <ea>,Aq                                  |-|012346|-|-----|-----|DAM+-WXZPI|1001_qqq_111_mmm_rrr
 12368:   //SUB.L <ea>,Aq                                   |A|012346|-|-----|-----|DAM+-WXZPI|1001_qqq_111_mmm_rrr [SUBA.L <ea>,Aq]
 12369:   //CLR.L Ar                                        |A|012346|-|-----|-----| A        |1001_rrr_111_001_rrr [SUBA.L Ar,Ar]
 12370:   public static void irpSubaLong () throws M68kException {
 12371:     int ea = XEiJ.regOC & 63;
 12372:     XEiJ.mpuCycleCount++;
 12373:     int z = ea < XEiJ.EA_MM ? XEiJ.regRn[ea] : ea == XEiJ.EA_IM ? mmuReadLongExword ((XEiJ.regPC += 4) - 4, XEiJ.regSRS) : mmuReadLongData (efaAnyLong (ea), XEiJ.regSRS);  //このr[ea]はデータレジスタまたはアドレスレジスタ。pcls。イミディエイトを分離。ここでAqが変化する可能性があることに注意
 12374:     XEiJ.regRn[XEiJ.regOC >> 9 & 15] -= z;  //r[op >> 9 & 15] -= ea < XEiJ.EA_MM ? r[ea] : rls (efaAnyLong (ea));は不可
 12375:     //ccrは変化しない
 12376:   }  //irpSubaLong
 12377: 
 12378:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 12379:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
 12380:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
 12381:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 12382:   //SXCALL <name>                                   |A|012346|-|UUUUU|*****|          |1010_0dd_ddd_ddd_ddd [ALINE #<data>]
 12383:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 12384:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
 12385:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
 12386:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 12387:   //ALINE #<data>                                   |-|012346|-|UUUUU|*****|          |1010_ddd_ddd_ddd_ddd (line 1010 emulator)
 12388:   public static void irpAline () throws M68kException {
 12389:     irpExceptionFormat0 (M68kException.M6E_LINE_1010_EMULATOR << 2, XEiJ.regPC0);  //pcは命令の先頭
 12390:   }  //irpAline
 12391: 
 12392:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 12393:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
 12394:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
 12395:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 12396:   //CMP.B <ea>,Dq                                   |-|012346|-|-UUUU|-****|D M+-WXZPI|1011_qqq_000_mmm_rrr
 12397:   public static void irpCmpByte () throws M68kException {
 12398:     XEiJ.mpuCycleCount++;
 12399:     int ea = XEiJ.regOC & 63;
 12400:     int x;
 12401:     int y;
 12402:     int z = (byte) ((x = (byte) XEiJ.regRn[XEiJ.regOC >> 9 & 7]) - (y = ea < XEiJ.EA_AR ? (byte) XEiJ.regRn[ea] : ea == XEiJ.EA_IM ? mmuReadByteSignExword ((XEiJ.regPC += 2) - 1, XEiJ.regSRS) : mmuReadByteSignData (efaAnyByte (ea), XEiJ.regSRS)));  //pcbs。イミディエイトを分離
 12403:     XEiJ.regCCR = (z >> 28 & XEiJ.REG_CCR_N | (z == 0 ? XEiJ.regCCR & XEiJ.REG_CCR_X | XEiJ.REG_CCR_Z : XEiJ.regCCR & XEiJ.REG_CCR_X) |
 12404:            ((x ^ y) & (x ^ z)) >>> 31 << 1 |
 12405:            (x & (y ^ z) ^ (y | z)) >>> 31);  //ccr_cmp
 12406:   }  //irpCmpByte
 12407: 
 12408:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 12409:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
 12410:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
 12411:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 12412:   //CMP.W <ea>,Dq                                   |-|012346|-|-UUUU|-****|DAM+-WXZPI|1011_qqq_001_mmm_rrr
 12413:   public static void irpCmpWord () throws M68kException {
 12414:     XEiJ.mpuCycleCount++;
 12415:     int ea = XEiJ.regOC & 63;
 12416:     int x;
 12417:     int y;
 12418:     int z = (short) ((x = (short) XEiJ.regRn[XEiJ.regOC >> 9 & 7]) - (y = ea < XEiJ.EA_MM ? (short) XEiJ.regRn[ea] : ea == XEiJ.EA_IM ? mmuReadWordSignExword ((XEiJ.regPC += 2) - 2, XEiJ.regSRS) : mmuReadWordSignData (efaAnyWord (ea), XEiJ.regSRS)));  //このr[ea]はデータレジスタまたはアドレスレジスタ。pcws。イミディエイトを分離
 12419:     XEiJ.regCCR = (z >> 28 & XEiJ.REG_CCR_N | (z == 0 ? XEiJ.regCCR & XEiJ.REG_CCR_X | XEiJ.REG_CCR_Z : XEiJ.regCCR & XEiJ.REG_CCR_X) |
 12420:            ((x ^ y) & (x ^ z)) >>> 31 << 1 |
 12421:            (x & (y ^ z) ^ (y | z)) >>> 31);  //ccr_cmp
 12422:   }  //irpCmpWord
 12423: 
 12424:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 12425:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
 12426:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
 12427:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 12428:   //CMP.L <ea>,Dq                                   |-|012346|-|-UUUU|-****|DAM+-WXZPI|1011_qqq_010_mmm_rrr
 12429:   public static void irpCmpLong () throws M68kException {
 12430:     XEiJ.mpuCycleCount++;
 12431:     int ea = XEiJ.regOC & 63;
 12432:     int x;
 12433:     int y;
 12434:     int z = (x = XEiJ.regRn[XEiJ.regOC >> 9 & 7]) - (y = ea < XEiJ.EA_MM ? XEiJ.regRn[ea] : ea == XEiJ.EA_IM ? mmuReadLongExword ((XEiJ.regPC += 4) - 4, XEiJ.regSRS) : mmuReadLongData (efaAnyLong (ea), XEiJ.regSRS));  //このr[ea]はデータレジスタまたはアドレスレジスタ。pcls。イミディエイトを分離
 12435:     XEiJ.regCCR = (z >> 28 & XEiJ.REG_CCR_N | (z == 0 ? XEiJ.regCCR & XEiJ.REG_CCR_X | XEiJ.REG_CCR_Z : XEiJ.regCCR & XEiJ.REG_CCR_X) |
 12436:            ((x ^ y) & (x ^ z)) >>> 31 << 1 |
 12437:            (x & (y ^ z) ^ (y | z)) >>> 31);  //ccr_cmp
 12438:   }  //irpCmpLong
 12439: 
 12440:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 12441:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
 12442:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
 12443:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 12444:   //CMPA.W <ea>,Aq                                  |-|012346|-|-UUUU|-****|DAM+-WXZPI|1011_qqq_011_mmm_rrr
 12445:   //CMP.W <ea>,Aq                                   |A|012346|-|-UUUU|-****|DAM+-WXZPI|1011_qqq_011_mmm_rrr [CMPA.W <ea>,Aq]
 12446:   //
 12447:   //CMPA.W <ea>,Aq
 12448:   //  ソースを符号拡張してロングで比較する
 12449:   public static void irpCmpaWord () throws M68kException {
 12450:     XEiJ.mpuCycleCount++;
 12451:     int ea = XEiJ.regOC & 63;
 12452:     //ソースを符号拡張してからロングで比較する
 12453:     int y = ea < XEiJ.EA_MM ? (short) XEiJ.regRn[ea] : ea == XEiJ.EA_IM ? mmuReadWordSignExword ((XEiJ.regPC += 2) - 2, XEiJ.regSRS) : mmuReadWordSignData (efaAnyWord (ea), XEiJ.regSRS);  //このr[ea]はデータレジスタまたはアドレスレジスタ。pcws。イミディエイトを分離。ここでAqが変化する可能性があることに注意
 12454:     int x;
 12455:     int z = (x = XEiJ.regRn[XEiJ.regOC >> 9 & 15]) - y;
 12456:     XEiJ.regCCR = (z >> 28 & XEiJ.REG_CCR_N | (z == 0 ? XEiJ.regCCR & XEiJ.REG_CCR_X | XEiJ.REG_CCR_Z : XEiJ.regCCR & XEiJ.REG_CCR_X) |
 12457:            ((x ^ y) & (x ^ z)) >>> 31 << 1 |
 12458:            (x & (y ^ z) ^ (y | z)) >>> 31);  //ccr_cmp
 12459:   }  //irpCmpaWord
 12460: 
 12461:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 12462:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
 12463:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
 12464:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 12465:   //EOR.B Dq,<ea>                                   |-|012346|-|-UUUU|-**00|D M+-WXZ  |1011_qqq_100_mmm_rrr
 12466:   //CMPM.B (Ar)+,(Aq)+                              |-|012346|-|-UUUU|-****|          |1011_qqq_100_001_rrr
 12467:   public static void irpEorByte () throws M68kException {
 12468:     int ea = XEiJ.regOC & 63;
 12469:     if (ea >> 3 == XEiJ.MMM_AR) {  //CMPM.B (Ar)+,(Aq)+
 12470:       XEiJ.mpuCycleCount += 2;
 12471:       M68kException.m6eIncremented += 1L << (ea << 3);
 12472:       int a = XEiJ.regRn[ea]++;  //このr[ea]はアドレスレジスタ
 12473:       int y = mmuReadByteSignData (a, XEiJ.regSRS);
 12474:       int x;
 12475:       int aqq = XEiJ.regOC >> 9 & 15;
 12476:       M68kException.m6eIncremented += 1L << (aqq << 3);
 12477:       a = XEiJ.regRn[aqq]++;
 12478:       int z = (byte) ((x = mmuReadByteSignData (a, XEiJ.regSRS)) - y);
 12479:       XEiJ.regCCR = (z >> 28 & XEiJ.REG_CCR_N | (z == 0 ? XEiJ.regCCR & XEiJ.REG_CCR_X | XEiJ.REG_CCR_Z : XEiJ.regCCR & XEiJ.REG_CCR_X) |
 12480:              ((x ^ y) & (x ^ z)) >>> 31 << 1 |
 12481:              (x & (y ^ z) ^ (y | z)) >>> 31);  //ccr_cmp
 12482:     } else {
 12483:       int qqq = XEiJ.regOC >> 9 & 7;
 12484:       int z;
 12485:       if (ea < XEiJ.EA_AR) {  //EOR.B Dq,Dr
 12486:         XEiJ.mpuCycleCount++;
 12487:         z = XEiJ.regRn[ea] ^= 255 & XEiJ.regRn[qqq];  //0拡張してからEOR
 12488:       } else {  //EOR.B Dq,<mem>
 12489:         XEiJ.mpuCycleCount++;
 12490:         int a = efaMltByte (ea);
 12491:         mmuWriteByteData (a, z = XEiJ.regRn[qqq] ^ mmuModifyByteSignData (a, XEiJ.regSRS), XEiJ.regSRS);
 12492:       }
 12493:       XEiJ.regCCR = XEiJ.regCCR & XEiJ.REG_CCR_X | XEiJ.MPU_TSTB_TABLE[255 & z];  //ccr_tst_byte
 12494:     }
 12495:   }  //irpEorByte
 12496: 
 12497:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 12498:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
 12499:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
 12500:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 12501:   //EOR.W Dq,<ea>                                   |-|012346|-|-UUUU|-**00|D M+-WXZ  |1011_qqq_101_mmm_rrr
 12502:   //CMPM.W (Ar)+,(Aq)+                              |-|012346|-|-UUUU|-****|          |1011_qqq_101_001_rrr
 12503:   public static void irpEorWord () throws M68kException {
 12504:     int ea = XEiJ.regOC & 63;
 12505:     int rrr = XEiJ.regOC & 7;
 12506:     int mmm = ea >> 3;
 12507:     if (mmm == XEiJ.MMM_AR) {  //CMPM.W (Ar)+,(Aq)+
 12508:       XEiJ.mpuCycleCount += 2;
 12509:       M68kException.m6eIncremented += 2L << (ea << 3);
 12510:       int a = (XEiJ.regRn[ea] += 2) - 2;  //このr[ea]はアドレスレジスタ
 12511:       int y = mmuReadWordSignData (a, XEiJ.regSRS);
 12512:       int x;
 12513:       int aqq = XEiJ.regOC >> 9 & 15;
 12514:       M68kException.m6eIncremented += 2L << (aqq << 3);
 12515:       a = (XEiJ.regRn[aqq] += 2) - 2;
 12516:       int z = (short) ((x = mmuReadWordSignData (a, XEiJ.regSRS)) - y);
 12517:       XEiJ.regCCR = (z >> 28 & XEiJ.REG_CCR_N | (z == 0 ? XEiJ.regCCR & XEiJ.REG_CCR_X | XEiJ.REG_CCR_Z : XEiJ.regCCR & XEiJ.REG_CCR_X) |
 12518:              ((x ^ y) & (x ^ z)) >>> 31 << 1 |
 12519:              (x & (y ^ z) ^ (y | z)) >>> 31);  //ccr_cmp
 12520:     } else {
 12521:       int qqq = XEiJ.regOC >> 9 & 7;
 12522:       int z;
 12523:       if (ea < XEiJ.EA_AR) {  //EOR.W Dq,Dr
 12524:         XEiJ.mpuCycleCount++;
 12525:         z = XEiJ.regRn[rrr] ^= (char) XEiJ.regRn[qqq];  //0拡張してからEOR
 12526:       } else {  //EOR.W Dq,<mem>
 12527:         XEiJ.mpuCycleCount++;
 12528:         int a = efaMltWord (ea);
 12529:         mmuWriteWordData (a, z = XEiJ.regRn[qqq] ^ mmuModifyWordSignData (a, XEiJ.regSRS), XEiJ.regSRS);
 12530:       }
 12531:       XEiJ.regCCR = XEiJ.regCCR & XEiJ.REG_CCR_X | (char) z - 1 >> 31 & XEiJ.REG_CCR_Z | ((short) z < 0 ? XEiJ.REG_CCR_N : 0);  //ccr_tst_word
 12532:     }
 12533:   }  //irpEorWord
 12534: 
 12535:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 12536:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
 12537:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
 12538:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 12539:   //EOR.L Dq,<ea>                                   |-|012346|-|-UUUU|-**00|D M+-WXZ  |1011_qqq_110_mmm_rrr
 12540:   //CMPM.L (Ar)+,(Aq)+                              |-|012346|-|-UUUU|-****|          |1011_qqq_110_001_rrr
 12541:   public static void irpEorLong () throws M68kException {
 12542:     int ea = XEiJ.regOC & 63;
 12543:     if (ea >> 3 == XEiJ.MMM_AR) {  //CMPM.L (Ar)+,(Aq)+
 12544:       XEiJ.mpuCycleCount += 2;
 12545:       M68kException.m6eIncremented += 4L << (ea << 3);
 12546:       int a = (XEiJ.regRn[ea] += 4) - 4;  //このr[ea]はアドレスレジスタ
 12547:       int y = mmuReadLongData (a, XEiJ.regSRS);
 12548:       int x;
 12549:       int aqq = XEiJ.regOC >> 9 & 15;
 12550:       M68kException.m6eIncremented += 4L << (aqq << 3);
 12551:       a = (XEiJ.regRn[aqq] += 4) - 4;
 12552:       int z = (x = mmuReadLongData (a, XEiJ.regSRS)) - y;
 12553:       XEiJ.regCCR = (z >> 28 & XEiJ.REG_CCR_N | (z == 0 ? XEiJ.regCCR & XEiJ.REG_CCR_X | XEiJ.REG_CCR_Z : XEiJ.regCCR & XEiJ.REG_CCR_X) |
 12554:              ((x ^ y) & (x ^ z)) >>> 31 << 1 |
 12555:              (x & (y ^ z) ^ (y | z)) >>> 31);  //ccr_cmp
 12556:     } else {
 12557:       int qqq = XEiJ.regOC >> 9 & 7;
 12558:       int z;
 12559:       if (ea < XEiJ.EA_AR) {  //EOR.L Dq,Dr
 12560:         XEiJ.mpuCycleCount++;
 12561:         XEiJ.regRn[ea] = z = XEiJ.regRn[ea] ^ XEiJ.regRn[qqq];
 12562:       } else {  //EOR.L Dq,<mem>
 12563:         XEiJ.mpuCycleCount++;
 12564:         int a = efaMltLong (ea);
 12565:         mmuWriteLongData (a, z = mmuModifyLongData (a, XEiJ.regSRS) ^ XEiJ.regRn[qqq], XEiJ.regSRS);
 12566:       }
 12567:       XEiJ.regCCR = z >> 28 & XEiJ.REG_CCR_N | (z == 0 ? XEiJ.regCCR & XEiJ.REG_CCR_X | XEiJ.REG_CCR_Z : XEiJ.regCCR & XEiJ.REG_CCR_X);  //ccr_tst
 12568:     }
 12569:   }  //irpEorLong
 12570: 
 12571:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 12572:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
 12573:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
 12574:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 12575:   //CMPA.L <ea>,Aq                                  |-|012346|-|-UUUU|-****|DAM+-WXZPI|1011_qqq_111_mmm_rrr
 12576:   //CMP.L <ea>,Aq                                   |A|012346|-|-UUUU|-****|DAM+-WXZPI|1011_qqq_111_mmm_rrr [CMPA.L <ea>,Aq]
 12577:   public static void irpCmpaLong () throws M68kException {
 12578:     XEiJ.mpuCycleCount++;
 12579:     int ea = XEiJ.regOC & 63;
 12580:     int y = ea < XEiJ.EA_MM ? XEiJ.regRn[ea] : ea == XEiJ.EA_IM ? mmuReadLongExword ((XEiJ.regPC += 4) - 4, XEiJ.regSRS) : mmuReadLongData (efaAnyLong (ea), XEiJ.regSRS);  //このr[ea]はデータレジスタまたはアドレスレジスタ。pcls。イミディエイトを分離。ここでAqが変化する可能性があることに注意
 12581:     int x;
 12582:     int z = (x = XEiJ.regRn[XEiJ.regOC >> 9 & 15]) - y;
 12583:     XEiJ.regCCR = (z >> 28 & XEiJ.REG_CCR_N | (z == 0 ? XEiJ.regCCR & XEiJ.REG_CCR_X | XEiJ.REG_CCR_Z : XEiJ.regCCR & XEiJ.REG_CCR_X) |
 12584:            ((x ^ y) & (x ^ z)) >>> 31 << 1 |
 12585:            (x & (y ^ z) ^ (y | z)) >>> 31);  //ccr_cmp
 12586:   }  //irpCmpaLong
 12587: 
 12588:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 12589:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
 12590:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
 12591:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 12592:   //AND.B <ea>,Dq                                   |-|012346|-|-UUUU|-**00|D M+-WXZPI|1100_qqq_000_mmm_rrr
 12593:   public static void irpAndToRegByte () throws M68kException {
 12594:     XEiJ.mpuCycleCount++;
 12595:     int ea = XEiJ.regOC & 63;
 12596:     XEiJ.regCCR = XEiJ.regCCR & XEiJ.REG_CCR_X | XEiJ.MPU_TSTB_TABLE[255 & (XEiJ.regRn[XEiJ.regOC >> 9 & 7] &= ~255 | (ea < XEiJ.EA_AR ? XEiJ.regRn[ea] : ea == XEiJ.EA_IM ? mmuReadByteSignExword ((XEiJ.regPC += 2) - 1, XEiJ.regSRS) : mmuReadByteSignData (efaAnyByte (ea), XEiJ.regSRS)))];  //ccr_tst_byte。pcbs。イミディエイトを分離。1拡張してからAND
 12597:   }  //irpAndToRegByte
 12598: 
 12599:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 12600:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
 12601:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
 12602:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 12603:   //AND.W <ea>,Dq                                   |-|012346|-|-UUUU|-**00|D M+-WXZPI|1100_qqq_001_mmm_rrr
 12604:   public static void irpAndToRegWord () throws M68kException {
 12605:     XEiJ.mpuCycleCount++;
 12606:     int ea = XEiJ.regOC & 63;
 12607:     int z = XEiJ.regRn[XEiJ.regOC >> 9 & 7] &= ~65535 | (ea < XEiJ.EA_AR ? XEiJ.regRn[ea] : ea == XEiJ.EA_IM ? mmuReadWordSignExword ((XEiJ.regPC += 2) - 2, XEiJ.regSRS) : mmuReadWordSignData (efaAnyWord (ea), XEiJ.regSRS));  //pcws。イミディエイトを分離。1拡張してからAND
 12608:     XEiJ.regCCR = XEiJ.regCCR & XEiJ.REG_CCR_X | (char) z - 1 >> 31 & XEiJ.REG_CCR_Z | ((short) z < 0 ? XEiJ.REG_CCR_N : 0);  //ccr_tst_word
 12609:   }  //irpAndToRegWord
 12610: 
 12611:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 12612:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
 12613:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
 12614:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 12615:   //AND.L <ea>,Dq                                   |-|012346|-|-UUUU|-**00|D M+-WXZPI|1100_qqq_010_mmm_rrr
 12616:   public static void irpAndToRegLong () throws M68kException {
 12617:     XEiJ.mpuCycleCount++;
 12618:     int ea = XEiJ.regOC & 63;
 12619:     int z = XEiJ.regRn[XEiJ.regOC >> 9 & 7] &= ea < XEiJ.EA_AR ? XEiJ.regRn[ea] : ea == XEiJ.EA_IM ? mmuReadLongExword ((XEiJ.regPC += 4) - 4, XEiJ.regSRS) : mmuReadLongData (efaAnyLong (ea), XEiJ.regSRS);  //pcls。イミディエイトを分離
 12620:     XEiJ.regCCR = z >> 28 & XEiJ.REG_CCR_N | (z == 0 ? XEiJ.regCCR & XEiJ.REG_CCR_X | XEiJ.REG_CCR_Z : XEiJ.regCCR & XEiJ.REG_CCR_X);  //ccr_tst
 12621:   }  //irpAndToRegLong
 12622: 
 12623:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 12624:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
 12625:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
 12626:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 12627:   //MULU.W <ea>,Dq                                  |-|012346|-|-UUUU|-***0|D M+-WXZPI|1100_qqq_011_mmm_rrr
 12628:   public static void irpMuluWord () throws M68kException {
 12629:     XEiJ.mpuCycleCount += 2;
 12630:     int ea = XEiJ.regOC & 63;
 12631:     int qqq = XEiJ.regOC >> 9 & 7;
 12632:     int y = ea < XEiJ.EA_AR ? (char) XEiJ.regRn[ea] : ea == XEiJ.EA_IM ? mmuReadWordZeroExword ((XEiJ.regPC += 2) - 2, XEiJ.regSRS) : mmuReadWordZeroData (efaAnyWord (ea), XEiJ.regSRS);  //pcwz。イミディエイトを分離
 12633:     int z;
 12634:     XEiJ.regRn[qqq] = z = (char) XEiJ.regRn[qqq] * y;  //積の下位32ビット。オーバーフローは無視
 12635:     XEiJ.regCCR = z >> 28 & XEiJ.REG_CCR_N | (z == 0 ? XEiJ.regCCR & XEiJ.REG_CCR_X | XEiJ.REG_CCR_Z : XEiJ.regCCR & XEiJ.REG_CCR_X);  //ccr_tst
 12636:   }  //irpMuluWord
 12637: 
 12638:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 12639:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
 12640:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
 12641:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 12642:   //ABCD.B Dr,Dq                                    |-|012346|-|UUUUU|*U*U*|          |1100_qqq_100_000_rrr
 12643:   //ABCD.B -(Ar),-(Aq)                              |-|012346|-|UUUUU|*U*U*|          |1100_qqq_100_001_rrr
 12644:   //AND.B Dq,<ea>                                   |-|012346|-|-UUUU|-**00|  M+-WXZ  |1100_qqq_100_mmm_rrr
 12645:   public static void irpAndToMemByte () throws M68kException {
 12646:     int ea = XEiJ.regOC & 63;
 12647:     if (ea >= XEiJ.EA_MM) {  //AND.B Dq,<ea>
 12648:       XEiJ.mpuCycleCount++;
 12649:       int a = efaMltByte (ea);
 12650:       int z = XEiJ.regRn[XEiJ.regOC >> 9 & 7] & mmuModifyByteSignData (a, XEiJ.regSRS);
 12651:       mmuWriteByteData (a, z, XEiJ.regSRS);
 12652:       XEiJ.regCCR = XEiJ.regCCR & XEiJ.REG_CCR_X | XEiJ.MPU_TSTB_TABLE[255 & z];  //ccr_tst_byte
 12653:     } else if (ea < XEiJ.EA_AR) {  //ABCD.B Dr,Dq
 12654:       int qqq = XEiJ.regOC >> 9 & 7;
 12655:       XEiJ.mpuCycleCount++;
 12656:       XEiJ.regRn[qqq] = ~0xff & XEiJ.regRn[qqq] | irpAbcd (XEiJ.regRn[qqq], XEiJ.regRn[ea]);
 12657:     } else {  //ABCD.B -(Ar),-(Aq)
 12658:       XEiJ.mpuCycleCount += 2;
 12659:       M68kException.m6eIncremented -= 1L << (ea << 3);
 12660:       int a = --XEiJ.regRn[ea];  //このr[ea]はアドレスレジスタ
 12661:       int y = mmuReadByteZeroData (a, XEiJ.regSRS);
 12662:       int aqq = (XEiJ.regOC >> 9) - (96 - 8);
 12663:       M68kException.m6eIncremented -= 1L << (aqq << 3);
 12664:       a = --XEiJ.regRn[aqq];
 12665:       mmuWriteByteData (a, irpAbcd (mmuModifyByteZeroData (a, XEiJ.regSRS), y), XEiJ.regSRS);
 12666:     }
 12667:   }  //irpAndToMemByte
 12668: 
 12669:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 12670:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
 12671:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
 12672:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 12673:   //EXG.L Dq,Dr                                     |-|012346|-|-----|-----|          |1100_qqq_101_000_rrr
 12674:   //EXG.L Aq,Ar                                     |-|012346|-|-----|-----|          |1100_qqq_101_001_rrr
 12675:   //AND.W Dq,<ea>                                   |-|012346|-|-UUUU|-**00|  M+-WXZ  |1100_qqq_101_mmm_rrr
 12676:   public static void irpAndToMemWord () throws M68kException {
 12677:     int ea = XEiJ.regOC & 63;
 12678:     if (ea < XEiJ.EA_MM) {  //EXG
 12679:       XEiJ.mpuCycleCount++;
 12680:       if (ea < XEiJ.EA_AR) {  //EXG.L Dq,Dr
 12681:         int qqq = XEiJ.regOC >> 9 & 7;
 12682:         int t = XEiJ.regRn[qqq];
 12683:         XEiJ.regRn[qqq] = XEiJ.regRn[ea];
 12684:         XEiJ.regRn[ea] = t;
 12685:       } else {  //EXG.L Aq,Ar
 12686:         int aqq = (XEiJ.regOC >> 9) - (96 - 8);
 12687:         int t = XEiJ.regRn[aqq];
 12688:         XEiJ.regRn[aqq] = XEiJ.regRn[ea];  //このr[ea]アドレスレジスタ
 12689:         XEiJ.regRn[ea] = t;  //このr[ea]はアドレスレジスタ
 12690:       }
 12691:     } else {  //AND.W Dq,<ea>
 12692:       XEiJ.mpuCycleCount++;
 12693:       int a = efaMltWord (ea);
 12694:       int z = XEiJ.regRn[XEiJ.regOC >> 9 & 7] & mmuModifyWordSignData (a, XEiJ.regSRS);
 12695:       mmuWriteWordData (a, z, XEiJ.regSRS);
 12696:       XEiJ.regCCR = XEiJ.regCCR & XEiJ.REG_CCR_X | (char) z - 1 >> 31 & XEiJ.REG_CCR_Z | ((short) z < 0 ? XEiJ.REG_CCR_N : 0);  //ccr_tst_word
 12697:     }
 12698:   }  //irpAndToMemWord
 12699: 
 12700:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 12701:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
 12702:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
 12703:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 12704:   //EXG.L Dq,Ar                                     |-|012346|-|-----|-----|          |1100_qqq_110_001_rrr
 12705:   //AND.L Dq,<ea>                                   |-|012346|-|-UUUU|-**00|  M+-WXZ  |1100_qqq_110_mmm_rrr
 12706:   public static void irpAndToMemLong () throws M68kException {
 12707:     int ea = XEiJ.regOC & 63;
 12708:     int qqq = XEiJ.regOC >> 9 & 7;
 12709:     if (ea >> 3 == XEiJ.MMM_AR) {  //EXG.L Dq,Ar
 12710:       XEiJ.mpuCycleCount++;
 12711:       int t = XEiJ.regRn[qqq];
 12712:       XEiJ.regRn[qqq] = XEiJ.regRn[ea];  //このr[ea]はアドレスレジスタ
 12713:       XEiJ.regRn[ea] = t;  //このr[ea]はアドレスレジスタ
 12714:     } else {  //AND.L Dq,<ea>
 12715:       XEiJ.mpuCycleCount++;
 12716:       int a = efaMltLong (ea);
 12717:       int z;
 12718:       mmuWriteLongData (a, z = mmuModifyLongData (a, XEiJ.regSRS) & XEiJ.regRn[qqq], XEiJ.regSRS);
 12719:       XEiJ.regCCR = z >> 28 & XEiJ.REG_CCR_N | (z == 0 ? XEiJ.regCCR & XEiJ.REG_CCR_X | XEiJ.REG_CCR_Z : XEiJ.regCCR & XEiJ.REG_CCR_X);  //ccr_tst
 12720:     }
 12721:   }  //irpAndToMemLong
 12722: 
 12723:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 12724:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
 12725:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
 12726:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 12727:   //MULS.W <ea>,Dq                                  |-|012346|-|-UUUU|-***0|D M+-WXZPI|1100_qqq_111_mmm_rrr
 12728:   public static void irpMulsWord () throws M68kException {
 12729:     XEiJ.mpuCycleCount += 2;
 12730:     int ea = XEiJ.regOC & 63;
 12731:     int qqq = XEiJ.regOC >> 9 & 7;
 12732:     int y = ea < XEiJ.EA_AR ? (short) XEiJ.regRn[ea] : ea == XEiJ.EA_IM ? mmuReadWordSignExword ((XEiJ.regPC += 2) - 2, XEiJ.regSRS) : mmuReadWordSignData (efaAnyWord (ea), XEiJ.regSRS);  //pcws。イミディエイトを分離
 12733:     int z;
 12734:     XEiJ.regRn[qqq] = z = (short) XEiJ.regRn[qqq] * y;  //積の下位32ビット。オーバーフローは無視
 12735:     XEiJ.regCCR = z >> 28 & XEiJ.REG_CCR_N | (z == 0 ? XEiJ.regCCR & XEiJ.REG_CCR_X | XEiJ.REG_CCR_Z : XEiJ.regCCR & XEiJ.REG_CCR_X);  //ccr_tst
 12736:   }  //irpMulsWord
 12737: 
 12738:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 12739:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
 12740:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
 12741:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 12742:   //ADD.B <ea>,Dq                                   |-|012346|-|UUUUU|*****|D M+-WXZPI|1101_qqq_000_mmm_rrr
 12743:   public static void irpAddToRegByte () throws M68kException {
 12744:     XEiJ.mpuCycleCount++;
 12745:     int ea = XEiJ.regOC & 63;
 12746:     int qqq = XEiJ.regOC >> 9 & 7;
 12747:     int x, y, z;
 12748:     y = ea < XEiJ.EA_AR ? XEiJ.regRn[ea] : ea == XEiJ.EA_IM ? mmuReadByteSignExword ((XEiJ.regPC += 2) - 1, XEiJ.regSRS) : mmuReadByteSignData (efaAnyByte (ea), XEiJ.regSRS);  //pcbs。イミディエイトを分離
 12749:     x = XEiJ.regRn[qqq];
 12750:     z = x + y;
 12751:     XEiJ.regRn[qqq] = ~255 & x | 255 & z;
 12752:     XEiJ.regCCR = (XEiJ.MPU_TSTB_TABLE[255 & z] |
 12753:            ((x ^ z) & (y ^ z)) >> 6 & XEiJ.REG_CCR_V |
 12754:            (byte) ((x | y) ^ (x ^ y) & z) >> 7 & (XEiJ.REG_CCR_X | XEiJ.REG_CCR_C));  //ccr_add_byte
 12755:   }  //irpAddToRegByte
 12756: 
 12757:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 12758:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
 12759:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
 12760:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 12761:   //ADD.W <ea>,Dq                                   |-|012346|-|UUUUU|*****|DAM+-WXZPI|1101_qqq_001_mmm_rrr
 12762:   public static void irpAddToRegWord () throws M68kException {
 12763:     XEiJ.mpuCycleCount++;
 12764:     int ea = XEiJ.regOC & 63;
 12765:     int qqq = XEiJ.regOC >> 9 & 7;
 12766:     int x, y, z;
 12767:     y = ea < XEiJ.EA_MM ? XEiJ.regRn[ea] : ea == XEiJ.EA_IM ? mmuReadWordSignExword ((XEiJ.regPC += 2) - 2, XEiJ.regSRS) : mmuReadWordSignData (efaAnyWord (ea), XEiJ.regSRS);  //このr[ea]はデータレジスタまたはアドレスレジスタ。pcws。イミディエイトを分離
 12768:     x = XEiJ.regRn[qqq];
 12769:     z = x + y;
 12770:     XEiJ.regRn[qqq] = ~65535 & x | (char) z;
 12771:     XEiJ.regCCR = (z >> 12 & XEiJ.REG_CCR_N | (char) z - 1 >> 14 & XEiJ.REG_CCR_Z |
 12772:            ((x ^ z) & (y ^ z)) >> 14 & XEiJ.REG_CCR_V |
 12773:            (short) ((x | y) ^ (x ^ y) & z) >> 15 & (XEiJ.REG_CCR_X | XEiJ.REG_CCR_C));  //ccr_add_word
 12774:   }  //irpAddToRegWord
 12775: 
 12776:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 12777:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
 12778:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
 12779:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 12780:   //ADD.L <ea>,Dq                                   |-|012346|-|UUUUU|*****|DAM+-WXZPI|1101_qqq_010_mmm_rrr
 12781:   public static void irpAddToRegLong () throws M68kException {
 12782:     XEiJ.mpuCycleCount++;
 12783:     int ea = XEiJ.regOC & 63;
 12784:     int qqq = XEiJ.regOC >> 9 & 7;
 12785:     int x, y, z;
 12786:     y = ea < XEiJ.EA_MM ? XEiJ.regRn[ea] : ea == XEiJ.EA_IM ? mmuReadLongExword ((XEiJ.regPC += 4) - 4, XEiJ.regSRS) : mmuReadLongData (efaAnyLong (ea), XEiJ.regSRS);  //このr[ea]はデータレジスタまたはアドレスレジスタ。pcls。イミディエイトを分離
 12787:     x = XEiJ.regRn[qqq];
 12788:     z = x + y;
 12789:     XEiJ.regRn[qqq] = z;
 12790:     XEiJ.regCCR = (z >> 28 & XEiJ.REG_CCR_N | (z == 0 ? XEiJ.REG_CCR_Z : 0) |
 12791:            ((x ^ z) & (y ^ z)) >> 30 & XEiJ.REG_CCR_V |
 12792:            ((x | y) ^ (x ^ y) & z) >> 31 & (XEiJ.REG_CCR_X | XEiJ.REG_CCR_C));  //ccr_add
 12793:   }  //irpAddToRegLong
 12794: 
 12795:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 12796:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
 12797:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
 12798:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 12799:   //ADDA.W <ea>,Aq                                  |-|012346|-|-----|-----|DAM+-WXZPI|1101_qqq_011_mmm_rrr
 12800:   //ADD.W <ea>,Aq                                   |A|012346|-|-----|-----|DAM+-WXZPI|1101_qqq_011_mmm_rrr [ADDA.W <ea>,Aq]
 12801:   //
 12802:   //ADDA.W <ea>,Aq
 12803:   //  ソースを符号拡張してロングで加算する
 12804:   public static void irpAddaWord () throws M68kException {
 12805:     XEiJ.mpuCycleCount++;
 12806:     int ea = XEiJ.regOC & 63;
 12807:     int z = ea < XEiJ.EA_MM ? (short) XEiJ.regRn[ea] : ea == XEiJ.EA_IM ? mmuReadWordSignExword ((XEiJ.regPC += 2) - 2, XEiJ.regSRS) : mmuReadWordSignData (efaAnyWord (ea), XEiJ.regSRS);  //このr[ea]はデータレジスタまたはアドレスレジスタ。pcws。イミディエイトを分離。ここでAqが変化する可能性があることに注意
 12808:     XEiJ.regRn[XEiJ.regOC >> 9 & 15] += z;  //r[op >> 9 & 15] += ea < XEiJ.EA_MM ? (short) r[ea] : rws (efaAnyWord (ea));は不可
 12809:     //ccrは変化しない
 12810:   }  //irpAddaWord
 12811: 
 12812:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 12813:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
 12814:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
 12815:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 12816:   //ADDX.B Dr,Dq                                    |-|012346|-|*UUUU|*****|          |1101_qqq_100_000_rrr
 12817:   //ADDX.B -(Ar),-(Aq)                              |-|012346|-|*UUUU|*****|          |1101_qqq_100_001_rrr
 12818:   //ADD.B Dq,<ea>                                   |-|012346|-|UUUUU|*****|  M+-WXZ  |1101_qqq_100_mmm_rrr
 12819:   public static void irpAddToMemByte () throws M68kException {
 12820:     int ea = XEiJ.regOC & 63;
 12821:     int a, x, y, z;
 12822:     if (ea < XEiJ.EA_MM) {
 12823:       if (ea < XEiJ.EA_AR) {  //ADDX.B Dr,Dq
 12824:         int qqq = XEiJ.regOC >> 9 & 7;
 12825:         XEiJ.mpuCycleCount++;
 12826:         y = XEiJ.regRn[ea];
 12827:         x = XEiJ.regRn[qqq];
 12828:         z = x + y + (XEiJ.regCCR >> 4);  //Xの左側はすべて0なのでCCR_X&を省略
 12829:         XEiJ.regRn[qqq] = ~255 & x | 255 & z;
 12830:       } else {  //ADDX.B -(Ar),-(Aq)
 12831:         XEiJ.mpuCycleCount += 2;
 12832:         M68kException.m6eIncremented -= 1L << (ea << 3);
 12833:         a = --XEiJ.regRn[ea];  //このr[ea]はアドレスレジスタ
 12834:         y = mmuReadByteSignData (a, XEiJ.regSRS);
 12835:         int aqq = XEiJ.regOC >> 9 & 15;  //1qqq=aqq
 12836:         M68kException.m6eIncremented -= 1L << (aqq << 3);
 12837:         a = --XEiJ.regRn[aqq];
 12838:         x = mmuModifyByteSignData (a, XEiJ.regSRS);
 12839:         z = x + y + (XEiJ.regCCR >> 4);  //Xの左側はすべて0なのでCCR_X&を省略
 12840:         mmuWriteByteData (a, z, XEiJ.regSRS);
 12841:       }
 12842:       XEiJ.regCCR = (z >> 4 & XEiJ.REG_CCR_N | (255 & z) - 1 >> 6 & XEiJ.regCCR & XEiJ.REG_CCR_Z |  //ADDXはZをクリアすることはあるがセットすることはない
 12843:              ((x ^ z) & (y ^ z)) >> 6 & XEiJ.REG_CCR_V |
 12844:              (byte) ((x | y) ^ (x ^ y) & z) >> 7 & (XEiJ.REG_CCR_X | XEiJ.REG_CCR_C));  //ccr_addx_byte
 12845:     } else {  //ADD.B Dq,<ea>
 12846:       XEiJ.mpuCycleCount++;
 12847:       y = XEiJ.regRn[XEiJ.regOC >> 9 & 7];
 12848:       a = efaMltByte (ea);
 12849:       x = mmuModifyByteSignData (a, XEiJ.regSRS);
 12850:       z = x + y;
 12851:       mmuWriteByteData (a, z, XEiJ.regSRS);
 12852:       XEiJ.regCCR = (XEiJ.MPU_TSTB_TABLE[255 & z] |
 12853:              ((x ^ z) & (y ^ z)) >> 6 & XEiJ.REG_CCR_V |
 12854:              (byte) ((x | y) ^ (x ^ y) & z) >> 7 & (XEiJ.REG_CCR_X | XEiJ.REG_CCR_C));  //ccr_add_byte
 12855:     }
 12856:   }  //irpAddToMemByte
 12857: 
 12858:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 12859:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
 12860:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
 12861:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 12862:   //ADDX.W Dr,Dq                                    |-|012346|-|*UUUU|*****|          |1101_qqq_101_000_rrr
 12863:   //ADDX.W -(Ar),-(Aq)                              |-|012346|-|*UUUU|*****|          |1101_qqq_101_001_rrr
 12864:   //ADD.W Dq,<ea>                                   |-|012346|-|UUUUU|*****|  M+-WXZ  |1101_qqq_101_mmm_rrr
 12865:   public static void irpAddToMemWord () throws M68kException {
 12866:     int ea = XEiJ.regOC & 63;
 12867:     int a, x, y, z;
 12868:     if (ea < XEiJ.EA_MM) {
 12869:       if (ea < XEiJ.EA_AR) {  //ADDX.W Dr,Dq
 12870:         int qqq = XEiJ.regOC >> 9 & 7;
 12871:         XEiJ.mpuCycleCount++;
 12872:         y = XEiJ.regRn[ea];
 12873:         x = XEiJ.regRn[qqq];
 12874:         z = x + y + (XEiJ.regCCR >> 4);  //Xの左側はすべて0なのでCCR_X&を省略
 12875:         XEiJ.regRn[qqq] = ~65535 & x | (char) z;
 12876:       } else {  //ADDX.W -(Ar),-(Aq)
 12877:         XEiJ.mpuCycleCount += 2;
 12878:         M68kException.m6eIncremented -= 2L << (ea << 3);
 12879:         a = XEiJ.regRn[ea] -= 2;  //このr[ea]はアドレスレジスタ
 12880:         y = mmuReadWordSignData (a, XEiJ.regSRS);
 12881:         int aqq = XEiJ.regOC >> 9 & 15;
 12882:         M68kException.m6eIncremented -= 2L << (aqq << 3);
 12883:         a = XEiJ.regRn[aqq] -= 2;
 12884:         x = mmuModifyWordSignData (a, XEiJ.regSRS);
 12885:         z = x + y + (XEiJ.regCCR >> 4);  //Xの左側はすべて0なのでCCR_X&を省略
 12886:         mmuWriteWordData (a, z, XEiJ.regSRS);
 12887:       }
 12888:       XEiJ.regCCR = (z >> 12 & XEiJ.REG_CCR_N | (char) z - 1 >> 14 & XEiJ.regCCR & XEiJ.REG_CCR_Z |  //ADDXはZをクリアすることはあるがセットすることはない
 12889:              ((x ^ z) & (y ^ z)) >> 14 & XEiJ.REG_CCR_V |
 12890:              (short) ((x | y) ^ (x ^ y) & z) >> 15 & (XEiJ.REG_CCR_X | XEiJ.REG_CCR_C));  //ccr_addx_word
 12891:     } else {  //ADD.W Dq,<ea>
 12892:       XEiJ.mpuCycleCount++;
 12893:       a = efaMltWord (ea);
 12894:       y = XEiJ.regRn[XEiJ.regOC >> 9 & 7];
 12895:       x = mmuModifyWordSignData (a, XEiJ.regSRS);
 12896:       z = x + y;
 12897:       mmuWriteWordData (a, z, XEiJ.regSRS);
 12898:       XEiJ.regCCR = (z >> 12 & XEiJ.REG_CCR_N | (char) z - 1 >> 14 & XEiJ.REG_CCR_Z |
 12899:              ((x ^ z) & (y ^ z)) >> 14 & XEiJ.REG_CCR_V |
 12900:              (short) ((x | y) ^ (x ^ y) & z) >> 15 & (XEiJ.REG_CCR_X | XEiJ.REG_CCR_C));  //ccr_add_word
 12901:     }
 12902:   }  //irpAddToMemWord
 12903: 
 12904:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 12905:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
 12906:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
 12907:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 12908:   //ADDX.L Dr,Dq                                    |-|012346|-|*UUUU|*****|          |1101_qqq_110_000_rrr
 12909:   //ADDX.L -(Ar),-(Aq)                              |-|012346|-|*UUUU|*****|          |1101_qqq_110_001_rrr
 12910:   //ADD.L Dq,<ea>                                   |-|012346|-|UUUUU|*****|  M+-WXZ  |1101_qqq_110_mmm_rrr
 12911:   public static void irpAddToMemLong () throws M68kException {
 12912:     int ea = XEiJ.regOC & 63;
 12913:     if (ea < XEiJ.EA_MM) {
 12914:       int x;
 12915:       int y;
 12916:       int z;
 12917:       if (ea < XEiJ.EA_AR) {  //ADDX.L Dr,Dq
 12918:         int qqq = XEiJ.regOC >> 9 & 7;
 12919:         XEiJ.mpuCycleCount++;
 12920:         XEiJ.regRn[qqq] = z = (x = XEiJ.regRn[qqq]) + (y = XEiJ.regRn[ea]) + (XEiJ.regCCR >> 4);  //Xの左側はすべて0なのでCCR_X&を省略
 12921:       } else {  //ADDX.L -(Ar),-(Aq)
 12922:         XEiJ.mpuCycleCount += 2;
 12923:         M68kException.m6eIncremented -= 4L << (ea << 3);
 12924:         int a = XEiJ.regRn[ea] -= 4;  //このr[ea]はアドレスレジスタ
 12925:         y = mmuReadLongData (a, XEiJ.regSRS);
 12926:         int aqq = XEiJ.regOC >> 9 & 15;
 12927:         M68kException.m6eIncremented -= 4L << (aqq << 3);
 12928:         a = XEiJ.regRn[aqq] -= 4;
 12929:         mmuWriteLongData (a, z = (x = mmuModifyLongData (a, XEiJ.regSRS)) + y + (XEiJ.regCCR >> 4), XEiJ.regSRS);  //Xの左側はすべて0なのでCCR_X&を省略
 12930:       }
 12931:       XEiJ.regCCR = (z >> 28 & XEiJ.REG_CCR_N | (z == 0 ? XEiJ.regCCR & XEiJ.REG_CCR_Z : 0) |
 12932:              ((x ^ z) & (y ^ z)) >>> 31 << 1 |
 12933:              ((x | y) ^ (x ^ y) & z) >> 31 & (XEiJ.REG_CCR_X | XEiJ.REG_CCR_C));  //ccr_addx
 12934:     } else {  //ADD.L Dq,<ea>
 12935:       XEiJ.mpuCycleCount++;
 12936:       int a = efaMltLong (ea);
 12937:       int x;
 12938:       int y;
 12939:       int z;
 12940:       mmuWriteLongData (a, z = (x = mmuModifyLongData (a, XEiJ.regSRS)) + (y = XEiJ.regRn[XEiJ.regOC >> 9 & 7]), XEiJ.regSRS);
 12941:       XEiJ.regCCR = (z >> 28 & XEiJ.REG_CCR_N | (z == 0 ? XEiJ.REG_CCR_Z : 0) |
 12942:              ((x ^ z) & (y ^ z)) >>> 31 << 1 |
 12943:              ((x | y) ^ (x ^ y) & z) >> 31 & (XEiJ.REG_CCR_X | XEiJ.REG_CCR_C));  //ccr_add
 12944:     }
 12945:   }  //irpAddToMemLong
 12946: 
 12947:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 12948:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
 12949:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
 12950:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 12951:   //ADDA.L <ea>,Aq                                  |-|012346|-|-----|-----|DAM+-WXZPI|1101_qqq_111_mmm_rrr
 12952:   //ADD.L <ea>,Aq                                   |A|012346|-|-----|-----|DAM+-WXZPI|1101_qqq_111_mmm_rrr [ADDA.L <ea>,Aq]
 12953:   public static void irpAddaLong () throws M68kException {
 12954:     int ea = XEiJ.regOC & 63;
 12955:     XEiJ.mpuCycleCount++;
 12956:     int z = ea < XEiJ.EA_MM ? XEiJ.regRn[ea] : ea == XEiJ.EA_IM ? mmuReadLongExword ((XEiJ.regPC += 4) - 4, XEiJ.regSRS) : mmuReadLongData (efaAnyLong (ea), XEiJ.regSRS);  //このr[ea]はデータレジスタまたはアドレスレジスタ。pcls。イミディエイトを分離。ここでAqが変化する可能性があることに注意
 12957:     XEiJ.regRn[XEiJ.regOC >> 9 & 15] += z;  //r[op >> 9 & 15] += ea < XEiJ.EA_MM ? r[ea] : rls (efaAnyLong (ea));は不可
 12958:     //ccrは変化しない
 12959:   }  //irpAddaLong
 12960: 
 12961:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 12962:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
 12963:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
 12964:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 12965:   //ASR.B #<data>,Dr                                |-|012346|-|UUUUU|***0*|          |1110_qqq_000_000_rrr
 12966:   //LSR.B #<data>,Dr                                |-|012346|-|UUUUU|***0*|          |1110_qqq_000_001_rrr
 12967:   //ROXR.B #<data>,Dr                               |-|012346|-|*UUUU|***0*|          |1110_qqq_000_010_rrr
 12968:   //ROR.B #<data>,Dr                                |-|012346|-|-UUUU|-**0*|          |1110_qqq_000_011_rrr
 12969:   //ASR.B Dq,Dr                                     |-|012346|-|UUUUU|***0*|          |1110_qqq_000_100_rrr
 12970:   //LSR.B Dq,Dr                                     |-|012346|-|UUUUU|***0*|          |1110_qqq_000_101_rrr
 12971:   //ROXR.B Dq,Dr                                    |-|012346|-|*UUUU|***0*|          |1110_qqq_000_110_rrr
 12972:   //ROR.B Dq,Dr                                     |-|012346|-|-UUUU|-**0*|          |1110_qqq_000_111_rrr
 12973:   //ASR.B Dr                                        |A|012346|-|UUUUU|***0*|          |1110_001_000_000_rrr [ASR.B #1,Dr]
 12974:   //LSR.B Dr                                        |A|012346|-|UUUUU|***0*|          |1110_001_000_001_rrr [LSR.B #1,Dr]
 12975:   //ROXR.B Dr                                       |A|012346|-|*UUUU|***0*|          |1110_001_000_010_rrr [ROXR.B #1,Dr]
 12976:   //ROR.B Dr                                        |A|012346|-|-UUUU|-**0*|          |1110_001_000_011_rrr [ROR.B #1,Dr]
 12977:   //
 12978:   //ASR.B #<data>,Dr
 12979:   //ASR.B Dq,Dr
 12980:   //  算術右シフトバイト
 12981:   //       ........................アイウエオカキク XNZVC
 12982:   //     0 ........................アイウエオカキク Xア*00 Z=アイウエオカキク==0
 12983:   //     1 ........................アアイウエオカキ クア*0ク Z=アイウエオカキ==0
 12984:   //     2 ........................アアアイウエオカ キア*0キ Z=アイウエオカ==0
 12985:   //     3 ........................アアアアイウエオ カア*0カ Z=アイウエオ==0
 12986:   //     4 ........................アアアアアイウエ オア*0オ Z=アイウエ==0
 12987:   //     5 ........................アアアアアアイウ エア*0エ Z=アイウ==0
 12988:   //     6 ........................アアアアアアアイ ウア*0ウ Z=アイ==0
 12989:   //     7 ........................アアアアアアアア イア*0イ Z=ア==0
 12990:   //     8 ........................アアアアアアアア アア*0ア Z=ア==0
 12991:   //  CCR
 12992:   //    X  countが0のとき変化しない。他は最後に押し出されたビット
 12993:   //    N  結果の最上位ビット
 12994:   //    Z  結果が0のときセット。他はクリア
 12995:   //    V  常にクリア
 12996:   //    C  countが0のときクリア。他は最後に押し出されたビット
 12997:   //
 12998:   //LSR.B #<data>,Dr
 12999:   //LSR.B Dq,Dr
 13000:   //  論理右シフトバイト
 13001:   //       ........................アイウエオカキク XNZVC
 13002:   //     0 ........................アイウエオカキク Xア*00 Z=アイウエオカキク==0
 13003:   //     1 ........................0アイウエオカキ ク0*0ク Z=アイウエオカキ==0
 13004:   //     2 ........................00アイウエオカ キ0*0キ Z=アイウエオカ==0
 13005:   //     3 ........................000アイウエオ カ0*0カ Z=アイウエオ==0
 13006:   //     4 ........................0000アイウエ オ0*0オ Z=アイウエ==0
 13007:   //     5 ........................00000アイウ エ0*0エ Z=アイウ==0
 13008:   //     6 ........................000000アイ ウ0*0ウ Z=アイ==0
 13009:   //     7 ........................0000000ア イ0*0イ Z=ア==0
 13010:   //     8 ........................00000000 ア010ア
 13011:   //     9 ........................00000000 00100
 13012:   //  CCR
 13013:   //    X  countが0のとき変化しない。他は最後に押し出されたビット
 13014:   //    N  結果の最上位ビット
 13015:   //    Z  結果が0のときセット。他はクリア
 13016:   //    V  常にクリア
 13017:   //    C  countが0のときクリア。他は最後に押し出されたビット
 13018:   //
 13019:   //ROR.B #<data>,Dr
 13020:   //ROR.B Dq,Dr
 13021:   //  右ローテートバイト
 13022:   //       ........................アイウエオカキク XNZVC
 13023:   //     0 ........................アイウエオカキク Xア*00 Z=アイウエオカキク==0
 13024:   //     1 ........................クアイウエオカキ Xク*0ク Z=アイウエオカキク==0
 13025:   //     :
 13026:   //     7 ........................イウエオカキクア Xイ*0イ Z=アイウエオカキク==0
 13027:   //     8 ........................アイウエオカキク Xア*0ア Z=アイウエオカキク==0
 13028:   //  CCR
 13029:   //    X  常に変化しない
 13030:   //    N  結果の最上位ビット
 13031:   //    Z  結果が0のときセット。他はクリア
 13032:   //    V  常にクリア
 13033:   //    C  countが0のときクリア。他は結果の最上位ビット
 13034:   //
 13035:   //ROXR.B #<data>,Dr
 13036:   //ROXR.B Dq,Dr
 13037:   //  拡張右ローテートバイト
 13038:   //       ........................アイウエオカキク XNZVC
 13039:   //     0 ........................アイウエオカキク Xア*0X Z=アイウエオカキク==0
 13040:   //     1 ........................Xアイウエオカキ クX*0ク Z=アイウエオカキX==0
 13041:   //     2 ........................クXアイウエオカ キク*0キ Z=アイウエオカクX==0
 13042:   //     3 ........................キクXアイウエオ カキ*0カ Z=アイウエオキクX==0
 13043:   //     4 ........................カキクXアイウエ オカ*0オ Z=アイウエカキクX==0
 13044:   //     5 ........................オカキクXアイウ エオ*0エ Z=アイウオカキクX==0
 13045:   //     6 ........................エオカキクXアイ ウエ*0ウ Z=アイエオカキクX==0
 13046:   //     7 ........................ウエオカキクXア イウ*0イ Z=アウエオカキクX==0
 13047:   //     8 ........................イウエオカキクX アイ*0ア Z=イウエオカキクX==0
 13048:   //     9 ........................アイウエオカキク Xア*0X Z=アイウエオカキク==0
 13049:   //  CCR
 13050:   //    X  countが0のとき変化しない。他は最後に押し出されたビット
 13051:   //    N  結果の最上位ビット
 13052:   //    Z  結果が0のときセット。他はクリア
 13053:   //    V  常にクリア
 13054:   //    C  countが0のときXのコピー。他は最後に押し出されたビット
 13055:   public static void irpXxrToRegByte () throws M68kException {
 13056:     int rrr;
 13057:     int x = XEiJ.regRn[rrr = XEiJ.regOC & 7];
 13058:     int y;
 13059:     int z;
 13060:     int t;
 13061:     XEiJ.mpuCycleCount++;
 13062:     switch (XEiJ.regOC >> 3 & 0b111_000 >> 3) {
 13063:     case 0b000_000 >> 3:  //ASR.B #<data>,Dr
 13064:       y = (XEiJ.regOC >> 9) - 1 & 7;  //y=data-1=1-1~8-1
 13065:       XEiJ.regRn[rrr] = ~0xff & x | 0xff & (z = (t = (byte) x >> y) >> 1);
 13066:       XEiJ.regCCR = z >> 28 & XEiJ.REG_CCR_N | (z == 0 ? XEiJ.REG_CCR_Z : 0) | -(t & 1) & (XEiJ.REG_CCR_X | XEiJ.REG_CCR_C);  //XとCは最後に押し出されたビット
 13067:       break;
 13068:     case 0b001_000 >> 3:  //LSR.B #<data>,Dr
 13069:       y = (XEiJ.regOC >> 9) - 1 & 7;  //y=data-1=1-1~8-1
 13070:       XEiJ.regRn[rrr] = ~0xff & x | (z = (t = (0xff & x) >>> y) >>> 1);
 13071:       XEiJ.regCCR = (z == 0 ? XEiJ.REG_CCR_Z : 0) | -(t & 1) & (XEiJ.REG_CCR_X | XEiJ.REG_CCR_C);  //XとCは最後に押し出されたビット
 13072:       break;
 13073:     case 0b010_000 >> 3:  //ROXR.B #<data>,Dr
 13074:       y = (XEiJ.regOC >> 9) - 1 & 7;  //y=data-1=1-1~8-1
 13075:       z = (XEiJ.regCCR & XEiJ.REG_CCR_X) << 7 - 4 | (0xff & x) >>> 1;
 13076:       if (y == 1 - 1) {  //y=data-1=1-1
 13077:         t = x;
 13078:       } else {  //y=data-1=2-1~8-1
 13079:         z = x << 9 - 1 - y | (t = z >>> y - (2 - 1)) >>> 1;
 13080:       }
 13081:       XEiJ.regRn[rrr] = ~0xff & x | 0xff & (z = (byte) z);
 13082:       XEiJ.regCCR = z >> 28 & XEiJ.REG_CCR_N | (z == 0 ? XEiJ.REG_CCR_Z : 0) | -(t & 1) & (XEiJ.REG_CCR_X | XEiJ.REG_CCR_C);  //XとCは最後に押し出されたビット
 13083:       break;
 13084:     case 0b011_000 >> 3:  //ROR.B #<data>,Dr
 13085:       y = XEiJ.regOC >> 9 & 7;  //y=data&7
 13086:       XEiJ.regRn[rrr] = ~0xff & x | 0xff & (z = (byte) (x << 8 - y | (0xff & x) >>> y));
 13087:       XEiJ.regCCR = z >> 28 & XEiJ.REG_CCR_N | (z == 0 ? XEiJ.regCCR & XEiJ.REG_CCR_X | XEiJ.REG_CCR_Z : XEiJ.regCCR & XEiJ.REG_CCR_X) | z >>> 7 & 1;  //Xは変化しない。Cは結果の最上位ビット
 13088:       break;
 13089:     case 0b100_000 >> 3:  //ASR.B Dq,Dr
 13090:       y = XEiJ.regRn[XEiJ.regOC >> 9 & 7] & 63;  //y=0~63。Javaのシフト演算子は5ビットでマスクされることに注意
 13091:       if (y == 0) {  //y=data=0
 13092:         z = (byte) x;
 13093:         t = XEiJ.regCCR & XEiJ.REG_CCR_X;  //Xは変化しない。Cはクリア
 13094:       } else {  //y=data=1~63
 13095:         XEiJ.regRn[rrr] = ~0xff & x | 0xff & (z = (t = (byte) x >> (y <= 8 ? y - 1 : 7)) >> 1);
 13096:         t = -(t & 1) & (XEiJ.REG_CCR_X | XEiJ.REG_CCR_C);  //XとCは最後に押し出されたビット
 13097:       }
 13098:       XEiJ.regCCR = z >> 28 & XEiJ.REG_CCR_N | (z == 0 ? XEiJ.REG_CCR_Z : 0) | t;
 13099:       break;
 13100:     case 0b101_000 >> 3:  //LSR.B Dq,Dr
 13101:       y = XEiJ.regRn[XEiJ.regOC >> 9 & 7] & 63;  //y=0~63。Javaのシフト演算子は5ビットでマスクされることに注意
 13102:       if (y == 0) {  //y=data=0
 13103:         z = (byte) x;
 13104:         XEiJ.regCCR = XEiJ.regCCR & XEiJ.REG_CCR_X | (z < 0 ? XEiJ.REG_CCR_N : z == 0 ? XEiJ.REG_CCR_Z : 0);  //Xは変化しない。Cはクリア
 13105:       } else {  //y=data=1~63
 13106:         XEiJ.regRn[rrr] = ~0xff & x | (z = (t = y <= 8 ? (0xff & x) >>> y - 1 : 0) >>> 1);
 13107:         XEiJ.regCCR = (z == 0 ? XEiJ.REG_CCR_Z : 0) | -(t & 1) & (XEiJ.REG_CCR_X | XEiJ.REG_CCR_C);  //XとCは最後に押し出されたビット
 13108:       }
 13109:       break;
 13110:     case 0b110_000 >> 3:  //ROXR.B Dq,Dr
 13111:       y = XEiJ.regRn[XEiJ.regOC >> 9 & 7] & 63;  //y=0~63。Javaのシフト演算子は5ビットでマスクされることに注意
 13112:       //y %= 9;
 13113:       y = (y & 7) - (y >> 3);  //y=data=-7~7
 13114:       y += y >> 3 & 9;  //y=data=0~8
 13115:       if (y == 0) {  //y=data=0
 13116:         z = (byte) x;
 13117:         t = -(XEiJ.regCCR >> 4 & 1) & (XEiJ.REG_CCR_X | XEiJ.REG_CCR_C);  //Xは変化しない。CはXのコピー
 13118:       } else {  //y=data=1~8
 13119:         z = (XEiJ.regCCR & XEiJ.REG_CCR_X) << 7 - 4 | (0xff & x) >>> 1;
 13120:         if (y == 1) {  //y=data=1
 13121:           t = x;  //Cは最後に押し出されたビット
 13122:         } else {  //y=data=2~8
 13123:           z = x << 9 - y | (t = z >>> y - 2) >>> 1;
 13124:         }
 13125:         XEiJ.regRn[rrr] = ~0xff & x | 0xff & (z = (byte) z);
 13126:         t = -(t & 1) & (XEiJ.REG_CCR_X | XEiJ.REG_CCR_C);  //XとCは最後に押し出されたビット
 13127:       }
 13128:       XEiJ.regCCR = z >> 28 & XEiJ.REG_CCR_N | (z == 0 ? XEiJ.REG_CCR_Z : 0) | t;
 13129:       break;
 13130:     case 0b111_000 >> 3:  //ROR.B Dq,Dr
 13131:     default:
 13132:       y = XEiJ.regRn[XEiJ.regOC >> 9 & 7] & 63;  //y=0~63。Javaのシフト演算子は5ビットでマスクされることに注意
 13133:       if (y == 0) {
 13134:         z = (byte) x;
 13135:         t = 0;  //Cはクリア
 13136:       } else {
 13137:         y &= 7;  //y=data=0~7
 13138:         XEiJ.regRn[rrr] = ~0xff & x | 0xff & (z = (byte) (x << 8 - y | (0xff & x) >>> y));
 13139:         t = z >>> 7 & 1;  //Cは結果の最上位ビット
 13140:       }
 13141:       XEiJ.regCCR = z >> 28 & XEiJ.REG_CCR_N | (z == 0 ? XEiJ.regCCR & XEiJ.REG_CCR_X | XEiJ.REG_CCR_Z : XEiJ.regCCR & XEiJ.REG_CCR_X) | t;  //Xは変化しない
 13142:     }
 13143:   }  //irpXxrToRegByte
 13144: 
 13145:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 13146:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
 13147:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
 13148:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 13149:   //ASR.W #<data>,Dr                                |-|012346|-|UUUUU|***0*|          |1110_qqq_001_000_rrr
 13150:   //LSR.W #<data>,Dr                                |-|012346|-|UUUUU|***0*|          |1110_qqq_001_001_rrr
 13151:   //ROXR.W #<data>,Dr                               |-|012346|-|*UUUU|***0*|          |1110_qqq_001_010_rrr
 13152:   //ROR.W #<data>,Dr                                |-|012346|-|-UUUU|-**0*|          |1110_qqq_001_011_rrr
 13153:   //ASR.W Dq,Dr                                     |-|012346|-|UUUUU|***0*|          |1110_qqq_001_100_rrr
 13154:   //LSR.W Dq,Dr                                     |-|012346|-|UUUUU|***0*|          |1110_qqq_001_101_rrr
 13155:   //ROXR.W Dq,Dr                                    |-|012346|-|*UUUU|***0*|          |1110_qqq_001_110_rrr
 13156:   //ROR.W Dq,Dr                                     |-|012346|-|-UUUU|-**0*|          |1110_qqq_001_111_rrr
 13157:   //ASR.W Dr                                        |A|012346|-|UUUUU|***0*|          |1110_001_001_000_rrr [ASR.W #1,Dr]
 13158:   //LSR.W Dr                                        |A|012346|-|UUUUU|***0*|          |1110_001_001_001_rrr [LSR.W #1,Dr]
 13159:   //ROXR.W Dr                                       |A|012346|-|*UUUU|***0*|          |1110_001_001_010_rrr [ROXR.W #1,Dr]
 13160:   //ROR.W Dr                                        |A|012346|-|-UUUU|-**0*|          |1110_001_001_011_rrr [ROR.W #1,Dr]
 13161:   //
 13162:   //ASR.W #<data>,Dr
 13163:   //ASR.W Dq,Dr
 13164:   //ASR.W <ea>
 13165:   //  算術右シフトワード
 13166:   //       ................アイウエオカキクケコサシスセソタ XNZVC
 13167:   //     0 ................アイウエオカキクケコサシスセソタ Xア*00 Z=アイウエオカキクケコサシスセソタ==0
 13168:   //     1 ................アアイウエオカキクケコサシスセソ タア*0タ Z=アイウエオカキクケコサシスセソ==0
 13169:   //     :
 13170:   //    15 ................アアアアアアアアアアアアアアアア イア*0イ Z=ア==0
 13171:   //    16 ................アアアアアアアアアアアアアアアア アア*0ア Z=ア==0
 13172:   //  CCR
 13173:   //    X  countが0のとき変化しない。他は最後に押し出されたビット
 13174:   //    N  結果の最上位ビット
 13175:   //    Z  結果が0のときセット。他はクリア
 13176:   //    V  常にクリア
 13177:   //    C  countが0のときクリア。他は最後に押し出されたビット
 13178:   //
 13179:   //LSR.W #<data>,Dr
 13180:   //LSR.W Dq,Dr
 13181:   //LSR.W <ea>
 13182:   //  論理右シフトワード
 13183:   //       ................アイウエオカキクケコサシスセソタ XNZVC
 13184:   //     0 ................アイウエオカキクケコサシスセソタ Xア*00 Z=アイウエオカキクケコサシスセソタ==0
 13185:   //     1 ................0アイウエオカキクケコサシスセソ タ0*0タ Z=アイウエオカキクケコサシスセソ==0
 13186:   //     :
 13187:   //    15 ................000000000000000ア イ0*0イ Z=ア==0
 13188:   //    16 ................0000000000000000 ア010ア
 13189:   //    17 ................0000000000000000 00100
 13190:   //  CCR
 13191:   //    X  countが0のとき変化しない。他は最後に押し出されたビット
 13192:   //    N  結果の最上位ビット
 13193:   //    Z  結果が0のときセット。他はクリア
 13194:   //    V  常にクリア
 13195:   //    C  countが0のときクリア。他は最後に押し出されたビット
 13196:   //
 13197:   //ROR.W #<data>,Dr
 13198:   //ROR.W Dq,Dr
 13199:   //ROR.W <ea>
 13200:   //  右ローテートワード
 13201:   //       ................アイウエオカキクケコサシスセソタ XNZVC
 13202:   //     0 ................アイウエオカキクケコサシスセソタ Xア*00 Z=アイウエオカキクケコサシスセソタ==0
 13203:   //     1 ................タアイウエオカキクケコサシスセソ Xタ*0タ Z=アイウエオカキクケコサシスセソタ==0
 13204:   //     :
 13205:   //    15 ................イウエオカキクケコサシスセソタア Xイ*0イ Z=アイウエオカキクケコサシスセソタ==0
 13206:   //    16 ................アイウエオカキクケコサシスセソタ Xア*0ア Z=アイウエオカキクケコサシスセソタ==0
 13207:   //  CCR
 13208:   //    X  常に変化しない
 13209:   //    N  結果の最上位ビット
 13210:   //    Z  結果が0のときセット。他はクリア
 13211:   //    V  常にクリア
 13212:   //    C  countが0のときクリア。他は結果の最上位ビット
 13213:   //
 13214:   //ROXR.W #<data>,Dr
 13215:   //ROXR.W Dq,Dr
 13216:   //ROXR.W <ea>
 13217:   //  拡張右ローテートワード
 13218:   //       ................アイウエオカキクケコサシスセソタ XNZVC
 13219:   //     0 ................アイウエオカキクケコサシスセソタ Xア*0X Z=アイウエオカキクケコサシスセソタ==0
 13220:   //     1 ................Xアイウエオカキクケコサシスセソ タX*0タ Z=アイウエオカキクケコサシスセソX==0
 13221:   //     2 ................タXアイウエオカキクケコサシスセ ソタ*0ソ Z=アイウエオカキクケコサシスセタX==0
 13222:   //     :
 13223:   //    15 ................ウエオカキクケコサシスセソタXア イウ*0イ Z=アウエオカキクケコサシスセソタX==0
 13224:   //    16 ................イウエオカキクケコサシスセソタX アイ*0ア Z=イウエオカキクケコサシスセソタX==0
 13225:   //    17 ................アイウエオカキクケコサシスセソタ Xア*0X Z=アイウエオカキクケコサシスセソタ==0
 13226:   //  CCR
 13227:   //    X  countが0のとき変化しない。他は最後に押し出されたビット
 13228:   //    N  結果の最上位ビット
 13229:   //    Z  結果が0のときセット。他はクリア
 13230:   //    V  常にクリア
 13231:   //    C  countが0のときXのコピー。他は最後に押し出されたビット
 13232:   public static void irpXxrToRegWord () throws M68kException {
 13233:     int rrr;
 13234:     int x = XEiJ.regRn[rrr = XEiJ.regOC & 7];
 13235:     int y;
 13236:     int z;
 13237:     int t;
 13238:     XEiJ.mpuCycleCount++;
 13239:     switch (XEiJ.regOC >> 3 & 0b111_000 >> 3) {
 13240:     case 0b000_000 >> 3:  //ASR.W #<data>,Dr
 13241:       y = (XEiJ.regOC >> 9) - 1 & 7;  //y=data-1=1-1~8-1
 13242:       XEiJ.regRn[rrr] = ~0xffff & x | (char) (z = (t = (short) x >> y) >> 1);
 13243:       XEiJ.regCCR = z >> 28 & XEiJ.REG_CCR_N | (z == 0 ? XEiJ.REG_CCR_Z : 0) | -(t & 1) & (XEiJ.REG_CCR_X | XEiJ.REG_CCR_C);  //XとCは最後に押し出されたビット
 13244:       break;
 13245:     case 0b001_000 >> 3:  //LSR.W #<data>,Dr
 13246:       y = (XEiJ.regOC >> 9) - 1 & 7;  //y=data-1=1-1~8-1
 13247:       XEiJ.regRn[rrr] = ~0xffff & x | (z = (t = (char) x >>> y) >>> 1);
 13248:       XEiJ.regCCR = (z == 0 ? XEiJ.REG_CCR_Z : 0) | -(t & 1) & (XEiJ.REG_CCR_X | XEiJ.REG_CCR_C);  //XとCは最後に押し出されたビット
 13249:       break;
 13250:     case 0b010_000 >> 3:  //ROXR.W #<data>,Dr
 13251:       y = (XEiJ.regOC >> 9) - 1 & 7;  //y=data-1=1-1~8-1
 13252:       z = (XEiJ.regCCR & XEiJ.REG_CCR_X) << 15 - 4 | (char) x >>> 1;
 13253:       if (y == 1 - 1) {  //y=data-1=1-1
 13254:         t = x;
 13255:       } else {  //y=data-1=2-1~8-1
 13256:         z = x << 17 - 1 - y | (t = z >>> y - (2 - 1)) >>> 1;
 13257:       }
 13258:       XEiJ.regRn[rrr] = ~0xffff & x | (char) (z = (short) z);
 13259:       XEiJ.regCCR = z >> 28 & XEiJ.REG_CCR_N | (z == 0 ? XEiJ.REG_CCR_Z : 0) | -(t & 1) & (XEiJ.REG_CCR_X | XEiJ.REG_CCR_C);  //XとCは最後に押し出されたビット
 13260:       break;
 13261:     case 0b011_000 >> 3:  //ROR.W #<data>,Dr
 13262:       y = (XEiJ.regOC >> 9) - 1 & 7;  //y=data-1=1-1~8-1
 13263:       XEiJ.regRn[rrr] = ~0xffff & x | (char) (z = (short) (x << 16 - 1 - y | (char) x >>> y + 1));
 13264:       XEiJ.regCCR = z >> 28 & XEiJ.REG_CCR_N | (z == 0 ? XEiJ.regCCR & XEiJ.REG_CCR_X | XEiJ.REG_CCR_Z : XEiJ.regCCR & XEiJ.REG_CCR_X) | z >>> 15 & 1;  //Xは変化しない。Cは結果の最上位ビット
 13265:       break;
 13266:     case 0b100_000 >> 3:  //ASR.W Dq,Dr
 13267:       y = XEiJ.regRn[XEiJ.regOC >> 9 & 7] & 63;  //y=0~63。Javaのシフト演算子は5ビットでマスクされることに注意
 13268:       if (y == 0) {  //y=data=0
 13269:         z = (short) x;
 13270:         t = XEiJ.regCCR & XEiJ.REG_CCR_X;  //Xは変化しない。Cはクリア
 13271:       } else {  //y=data=1~63
 13272:         XEiJ.regRn[rrr] = ~0xffff & x | (char) (z = (t = (short) x >> (y <= 16 ? y - 1 : 15)) >> 1);
 13273:         t = -(t & 1) & (XEiJ.REG_CCR_X | XEiJ.REG_CCR_C);  //XとCは最後に押し出されたビット
 13274:       }
 13275:       XEiJ.regCCR = z >> 28 & XEiJ.REG_CCR_N | (z == 0 ? XEiJ.REG_CCR_Z : 0) | t;
 13276:       break;
 13277:     case 0b101_000 >> 3:  //LSR.W Dq,Dr
 13278:       y = XEiJ.regRn[XEiJ.regOC >> 9 & 7] & 63;  //y=0~63。Javaのシフト演算子は5ビットでマスクされることに注意
 13279:       if (y == 0) {  //y=data=0
 13280:         z = (short) x;
 13281:         XEiJ.regCCR = XEiJ.regCCR & XEiJ.REG_CCR_X | (z < 0 ? XEiJ.REG_CCR_N : z == 0 ? XEiJ.REG_CCR_Z : 0);  //Xは変化しない。Cはクリア
 13282:       } else {  //y=data=1~63
 13283:         XEiJ.regRn[rrr] = ~0xffff & x | (z = (t = y <= 16 ? (char) x >>> y - 1 : 0) >>> 1);
 13284:         XEiJ.regCCR = (z == 0 ? XEiJ.REG_CCR_Z : 0) | -(t & 1) & (XEiJ.REG_CCR_X | XEiJ.REG_CCR_C);  //XとCは最後に押し出されたビット
 13285:       }
 13286:       break;
 13287:     case 0b110_000 >> 3:  //ROXR.W Dq,Dr
 13288:       y = XEiJ.regRn[XEiJ.regOC >> 9 & 7] & 63;  //y=0~63。Javaのシフト演算子は5ビットでマスクされることに注意
 13289:       //y %= 17;
 13290:       y = (y & 15) - (y >> 4);  //y=data=-3~15
 13291:       y += y >> 4 & 17;  //y=data=0~16
 13292:       if (y == 0) {  //y=data=0
 13293:         z = (short) x;
 13294:         t = -(XEiJ.regCCR >> 4 & 1) & (XEiJ.REG_CCR_X | XEiJ.REG_CCR_C);  //Xは変化しない。CはXのコピー
 13295:       } else {  //y=data=1~16
 13296:         z = (XEiJ.regCCR & XEiJ.REG_CCR_X) << 15 - 4 | (char) x >>> 1;
 13297:         if (y == 1) {  //y=data=1
 13298:           t = x;  //Cは最後に押し出されたビット
 13299:         } else {  //y=data=2~16
 13300:           z = x << 17 - y | (t = z >>> y - 2) >>> 1;
 13301:         }
 13302:         XEiJ.regRn[rrr] = ~0xffff & x | (char) (z = (short) z);
 13303:         t = -(t & 1) & (XEiJ.REG_CCR_X | XEiJ.REG_CCR_C);  //XとCは最後に押し出されたビット
 13304:       }
 13305:       XEiJ.regCCR = z >> 28 & XEiJ.REG_CCR_N | (z == 0 ? XEiJ.REG_CCR_Z : 0) | t;
 13306:       break;
 13307:     case 0b111_000 >> 3:  //ROR.W Dq,Dr
 13308:     default:
 13309:       y = XEiJ.regRn[XEiJ.regOC >> 9 & 7] & 63;  //y=0~63。Javaのシフト演算子は5ビットでマスクされることに注意
 13310:       if (y == 0) {
 13311:         z = (short) x;
 13312:         t = 0;  //Cはクリア
 13313:       } else {
 13314:         y &= 15;  //y=data=0~15
 13315:         XEiJ.regRn[rrr] = ~0xffff & x | (char) (z = (short) (x << 16 - y | (char) x >>> y));
 13316:         t = z >>> 15 & 1;  //Cは結果の最上位ビット
 13317:       }
 13318:       XEiJ.regCCR = z >> 28 & XEiJ.REG_CCR_N | (z == 0 ? XEiJ.regCCR & XEiJ.REG_CCR_X | XEiJ.REG_CCR_Z : XEiJ.regCCR & XEiJ.REG_CCR_X) | t;  //Xは変化しない
 13319:     }
 13320:   }  //irpXxrToRegWord
 13321: 
 13322:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 13323:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
 13324:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
 13325:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 13326:   //ASR.L #<data>,Dr                                |-|012346|-|UUUUU|***0*|          |1110_qqq_010_000_rrr
 13327:   //LSR.L #<data>,Dr                                |-|012346|-|UUUUU|***0*|          |1110_qqq_010_001_rrr
 13328:   //ROXR.L #<data>,Dr                               |-|012346|-|*UUUU|***0*|          |1110_qqq_010_010_rrr
 13329:   //ROR.L #<data>,Dr                                |-|012346|-|-UUUU|-**0*|          |1110_qqq_010_011_rrr
 13330:   //ASR.L Dq,Dr                                     |-|012346|-|UUUUU|***0*|          |1110_qqq_010_100_rrr
 13331:   //LSR.L Dq,Dr                                     |-|012346|-|UUUUU|***0*|          |1110_qqq_010_101_rrr
 13332:   //ROXR.L Dq,Dr                                    |-|012346|-|*UUUU|***0*|          |1110_qqq_010_110_rrr
 13333:   //ROR.L Dq,Dr                                     |-|012346|-|-UUUU|-**0*|          |1110_qqq_010_111_rrr
 13334:   //ASR.L Dr                                        |A|012346|-|UUUUU|***0*|          |1110_001_010_000_rrr [ASR.L #1,Dr]
 13335:   //LSR.L Dr                                        |A|012346|-|UUUUU|***0*|          |1110_001_010_001_rrr [LSR.L #1,Dr]
 13336:   //ROXR.L Dr                                       |A|012346|-|*UUUU|***0*|          |1110_001_010_010_rrr [ROXR.L #1,Dr]
 13337:   //ROR.L Dr                                        |A|012346|-|-UUUU|-**0*|          |1110_001_010_011_rrr [ROR.L #1,Dr]
 13338:   //
 13339:   //ASR.L #<data>,Dr
 13340:   //ASR.L Dq,Dr
 13341:   //  算術右シフトロング
 13342:   //       アイウエオカキクケコサシスセソタチツテトナニヌネノハヒフヘホマミ XNZVC
 13343:   //     0 アイウエオカキクケコサシスセソタチツテトナニヌネノハヒフヘホマミ Xア*00 Z=アイウエオカキクケコサシスセソタチツテトナニヌネノハヒフヘホマミ==0
 13344:   //     1 アアイウエオカキクケコサシスセソタチツテトナニヌネノハヒフヘホマ ミア*0ミ Z=アイウエオカキクケコサシスセソタチツテトナニヌネノハヒフヘホマ==0
 13345:   //     :
 13346:   //    31 アアアアアアアアアアアアアアアアアアアアアアアアアアアアアアアア イア*0イ Z=ア==0
 13347:   //    32 アアアアアアアアアアアアアアアアアアアアアアアアアアアアアアアア アア*0ア Z=ア==0
 13348:   //  CCR
 13349:   //    X  countが0のとき変化しない。他は最後に押し出されたビット
 13350:   //    N  結果の最上位ビット
 13351:   //    Z  結果が0のときセット。他はクリア
 13352:   //    V  常にクリア
 13353:   //    C  countが0のときクリア。他は最後に押し出されたビット
 13354:   //
 13355:   //LSR.L #<data>,Dr
 13356:   //LSR.L Dq,Dr
 13357:   //  論理右シフトロング
 13358:   //       アイウエオカキクケコサシスセソタチツテトナニヌネノハヒフヘホマミ XNZVC
 13359:   //     0 アイウエオカキクケコサシスセソタチツテトナニヌネノハヒフヘホマミ Xア*00 Z=アイウエオカキクケコサシスセソタチツテトナニヌネノハヒフヘホマミ==0
 13360:   //     1 0アイウエオカキクケコサシスセソタチツテトナニヌネノハヒフヘホマ ミ0*0ミ Z=アイウエオカキクケコサシスセソタチツテトナニヌネノハヒフヘホマ==0
 13361:   //     :
 13362:   //    31 0000000000000000000000000000000ア イ0*0イ Z=ア==0
 13363:   //    32 00000000000000000000000000000000 ア010ア
 13364:   //    33 00000000000000000000000000000000 00100
 13365:   //  CCR
 13366:   //    X  countが0のとき変化しない。他は最後に押し出されたビット
 13367:   //    N  結果の最上位ビット
 13368:   //    Z  結果が0のときセット。他はクリア
 13369:   //    V  常にクリア
 13370:   //    C  countが0のときクリア。他は最後に押し出されたビット
 13371:   //
 13372:   //ROR.L #<data>,Dr
 13373:   //ROR.L Dq,Dr
 13374:   //  右ローテートロング
 13375:   //       アイウエオカキクケコサシスセソタチツテトナニヌネノハヒフヘホマミ XNZVC
 13376:   //     0 アイウエオカキクケコサシスセソタチツテトナニヌネノハヒフヘホマミ Xア*00 Z=アイウエオカキクケコサシスセソタチツテトナニヌネノハヒフヘホマミ==0
 13377:   //     1 ミアイウエオカキクケコサシスセソタチツテトナニヌネノハヒフヘホマ Xミ*0ミ Z=アイウエオカキクケコサシスセソタチツテトナニヌネノハヒフヘホマミ==0
 13378:   //     :
 13379:   //    31 イウエオカキクケコサシスセソタチツテトナニヌネノハヒフヘホマミア Xイ*0イ Z=アイウエオカキクケコサシスセソタチツテトナニヌネノハヒフヘホマミ==0
 13380:   //    32 アイウエオカキクケコサシスセソタチツテトナニヌネノハヒフヘホマミ Xア*0ア Z=アイウエオカキクケコサシスセソタチツテトナニヌネノハヒフヘホマミ==0
 13381:   //  CCR
 13382:   //    X  常に変化しない
 13383:   //    N  結果の最上位ビット
 13384:   //    Z  結果が0のときセット。他はクリア
 13385:   //    V  常にクリア
 13386:   //    C  countが0のときクリア。他は結果の最上位ビット
 13387:   //
 13388:   //ROXR.L #<data>,Dr
 13389:   //ROXR.L Dq,Dr
 13390:   //  拡張右ローテートロング
 13391:   //       アイウエオカキクケコサシスセソタチツテトナニヌネノハヒフヘホマミ XNZVC
 13392:   //     0 アイウエオカキクケコサシスセソタチツテトナニヌネノハヒフヘホマミ Xア*0X Z=アイウエオカキクケコサシスセソタチツテトナニヌネノハヒフヘホマミ==0
 13393:   //     1 Xアイウエオカキクケコサシスセソタチツテトナニヌネノハヒフヘホマ ミX*0ミ Z=アイウエオカキクケコサシスセソタチツテトナニヌネノハヒフヘホマX==0
 13394:   //     2 ミXアイウエオカキクケコサシスセソタチツテトナニヌネノハヒフヘホ マミ*0マ Z=アイウエオカキクケコサシスセソタチツテトナニヌネノハヒフヘホミX==0
 13395:   //     :
 13396:   //    31 ウエオカキクケコサシスセソタチツテトナニヌネノハヒフヘホマミXア イウ*0イ Z=アウエオカキクケコサシスセソタチツテトナニヌネノハヒフヘホマミX==0
 13397:   //    32 イウエオカキクケコサシスセソタチツテトナニヌネノハヒフヘホマミX アイ*0ア Z=イウエオカキクケコサシスセソタチツテトナニヌネノハヒフヘホマミX==0
 13398:   //    33 アイウエオカキクケコサシスセソタチツテトナニヌネノハヒフヘホマミ Xア*0X Z=アイウエオカキクケコサシスセソタチツテトナニヌネノハヒフヘホマミ==0
 13399:   //  CCR
 13400:   //    X  countが0のとき変化しない。他は最後に押し出されたビット
 13401:   //    N  結果の最上位ビット
 13402:   //    Z  結果が0のときセット。他はクリア
 13403:   //    V  常にクリア
 13404:   //    C  countが0のときXのコピー。他は最後に押し出されたビット
 13405:   public static void irpXxrToRegLong () throws M68kException {
 13406:     int rrr;
 13407:     int x = XEiJ.regRn[rrr = XEiJ.regOC & 7];
 13408:     int y;
 13409:     int z;
 13410:     int t;
 13411:     XEiJ.mpuCycleCount++;
 13412:     switch (XEiJ.regOC >> 3 & 0b111_000 >> 3) {
 13413:     case 0b000_000 >> 3:  //ASR.L #<data>,Dr
 13414:       y = (XEiJ.regOC >> 9) - 1 & 7;  //y=data-1=1-1~8-1
 13415:       XEiJ.regRn[rrr] = z = (t = x >> y) >> 1;
 13416:       XEiJ.regCCR = z >> 28 & XEiJ.REG_CCR_N | (z == 0 ? XEiJ.REG_CCR_Z : 0) | -(t & 1) & (XEiJ.REG_CCR_X | XEiJ.REG_CCR_C);  //XとCは最後に押し出されたビット
 13417:       break;
 13418:     case 0b001_000 >> 3:  //LSR.L #<data>,Dr
 13419:       y = (XEiJ.regOC >> 9) - 1 & 7;  //y=data-1=1-1~8-1
 13420:       XEiJ.regRn[rrr] = z = (t = x >>> y) >>> 1;
 13421:       XEiJ.regCCR = (z == 0 ? XEiJ.REG_CCR_Z : 0) | -(t & 1) & (XEiJ.REG_CCR_X | XEiJ.REG_CCR_C);  //XとCは最後に押し出されたビット
 13422:       break;
 13423:     case 0b010_000 >> 3:  //ROXR.L #<data>,Dr
 13424:       y = (XEiJ.regOC >> 9) - 1 & 7;  //y=data-1=1-1~8-1
 13425:       z = (XEiJ.regCCR & XEiJ.REG_CCR_X) << 31 - 4 | x >>> 1;
 13426:       if (y == 1 - 1) {  //y=data-1=1-1
 13427:         t = x;
 13428:       } else {  //y=data-1=2-1~8-1
 13429:         z = x << -y | (t = z >>> y - (2 - 1)) >>> 1;  //Javaのシフト演算子は5ビットでマスクされるので33-1-yを-yに省略
 13430:       }
 13431:       XEiJ.regRn[rrr] = z;
 13432:       XEiJ.regCCR = z >> 28 & XEiJ.REG_CCR_N | (z == 0 ? XEiJ.REG_CCR_Z : 0) | -(t & 1) & (XEiJ.REG_CCR_X | XEiJ.REG_CCR_C);  //XとCは最後に押し出されたビット
 13433:       break;
 13434:     case 0b011_000 >> 3:  //ROR.L #<data>,Dr
 13435:       y = (XEiJ.regOC >> 9) - 1 & 7;  //y=data-1=1-1~8-1
 13436:       XEiJ.regRn[rrr] = z = x << ~y | x >>> y + 1;  //Javaのシフト演算子は5ビットでマスクされるので32-1-yを~yに省略
 13437:       XEiJ.regCCR = z >> 28 & XEiJ.REG_CCR_N | (z == 0 ? XEiJ.regCCR & XEiJ.REG_CCR_X | XEiJ.REG_CCR_Z : XEiJ.regCCR & XEiJ.REG_CCR_X) | z >>> 31;  //Xは変化しない。Cは結果の最上位ビット
 13438:       break;
 13439:     case 0b100_000 >> 3:  //ASR.L Dq,Dr
 13440:       y = XEiJ.regRn[XEiJ.regOC >> 9 & 7] & 63;  //y=0~63。Javaのシフト演算子は5ビットでマスクされることに注意
 13441:       if (y == 0) {  //y=data=0
 13442:         z = x;
 13443:         t = XEiJ.regCCR & XEiJ.REG_CCR_X;  //Xは変化しない。Cはクリア
 13444:       } else {  //y=data=1~63
 13445:         XEiJ.regRn[rrr] = z = (t = x >> (y <= 32 ? y - 1 : 31)) >> 1;
 13446:         t = -(t & 1) & (XEiJ.REG_CCR_X | XEiJ.REG_CCR_C);  //XとCは最後に押し出されたビット
 13447:       }
 13448:       XEiJ.regCCR = z >> 28 & XEiJ.REG_CCR_N | (z == 0 ? XEiJ.REG_CCR_Z : 0) | t;
 13449:       break;
 13450:     case 0b101_000 >> 3:  //LSR.L Dq,Dr
 13451:       y = XEiJ.regRn[XEiJ.regOC >> 9 & 7] & 63;  //y=0~63。Javaのシフト演算子は5ビットでマスクされることに注意
 13452:       if (y == 0) {  //y=data=0
 13453:         z = x;
 13454:         XEiJ.regCCR = XEiJ.regCCR & XEiJ.REG_CCR_X | (z < 0 ? XEiJ.REG_CCR_N : z == 0 ? XEiJ.REG_CCR_Z : 0);  //Xは変化しない。Cはクリア
 13455:       } else {  //y=data=1~63
 13456:         XEiJ.regRn[rrr] = z = (t = y <= 32 ? x >>> y - 1 : 0) >>> 1;
 13457:         XEiJ.regCCR = (z == 0 ? XEiJ.REG_CCR_Z : 0) | -(t & 1) & (XEiJ.REG_CCR_X | XEiJ.REG_CCR_C);  //XとCは最後に押し出されたビット
 13458:       }
 13459:       break;
 13460:     case 0b110_000 >> 3:  //ROXR.L Dq,Dr
 13461:       y = XEiJ.regRn[XEiJ.regOC >> 9 & 7] & 63;  //y=0~63。Javaのシフト演算子は5ビットでマスクされることに注意
 13462:       //y %= 33;
 13463:       y -= 32 - y >> 6 & 33;  //y=data=0~32
 13464:       if (y == 0) {  //y=data=0
 13465:         z = x;
 13466:         t = -(XEiJ.regCCR >> 4 & 1) & (XEiJ.REG_CCR_X | XEiJ.REG_CCR_C);  //Xは変化しない。CはXのコピー
 13467:       } else {  //y=data=1~32
 13468:         z = (XEiJ.regCCR & XEiJ.REG_CCR_X) << 31 - 4 | x >>> 1;
 13469:         if (y == 1) {  //y=data=1
 13470:           t = x;  //Cは最後に押し出されたビット
 13471:         } else {  //y=data=2~32
 13472:           z = x << 33 - y | (t = z >>> y - 2) >>> 1;
 13473:         }
 13474:         XEiJ.regRn[rrr] = z;
 13475:         t = -(t & 1) & (XEiJ.REG_CCR_X | XEiJ.REG_CCR_C);  //XとCは最後に押し出されたビット
 13476:       }
 13477:       XEiJ.regCCR = z >> 28 & XEiJ.REG_CCR_N | (z == 0 ? XEiJ.REG_CCR_Z : 0) | t;
 13478:       break;
 13479:     case 0b111_000 >> 3:  //ROR.L Dq,Dr
 13480:     default:
 13481:       y = XEiJ.regRn[XEiJ.regOC >> 9 & 7] & 63;  //y=0~63。Javaのシフト演算子は5ビットでマスクされることに注意
 13482:       if (y == 0) {
 13483:         z = x;
 13484:         t = 0;  //Cはクリア
 13485:       } else {
 13486:         y &= 31;  //y=data=0~31
 13487:         XEiJ.regRn[rrr] = z = x << -y | x >>> y;  //Javaのシフト演算子は5ビットでマスクされるので32-yを-yに省略。y=32のときx|xになるが問題ない
 13488:         t = z >>> 31;  //Cは結果の最上位ビット
 13489:       }
 13490:       XEiJ.regCCR = z >> 28 & XEiJ.REG_CCR_N | (z == 0 ? XEiJ.regCCR & XEiJ.REG_CCR_X | XEiJ.REG_CCR_Z : XEiJ.regCCR & XEiJ.REG_CCR_X) | t;  //Xは変化しない
 13491:     }
 13492:   }  //irpXxrToRegLong
 13493: 
 13494:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 13495:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
 13496:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
 13497:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 13498:   //ASR.W <ea>                                      |-|012346|-|UUUUU|***0*|  M+-WXZ  |1110_000_011_mmm_rrr
 13499:   //
 13500:   //ASR.W #<data>,Dr
 13501:   //ASR.W Dq,Dr
 13502:   //ASR.W <ea>
 13503:   //  算術右シフトワード
 13504:   //       ................アイウエオカキクケコサシスセソタ XNZVC
 13505:   //     0 ................アイウエオカキクケコサシスセソタ Xア*00 Z=アイウエオカキクケコサシスセソタ==0
 13506:   //     1 ................アアイウエオカキクケコサシスセソ タア*0タ Z=アイウエオカキクケコサシスセソ==0
 13507:   //     :
 13508:   //    15 ................アアアアアアアアアアアアアアアア イア*0イ Z=ア==0
 13509:   //    16 ................アアアアアアアアアアアアアアアア アア*0ア Z=ア==0
 13510:   //  CCR
 13511:   //    X  countが0のとき変化しない。他は最後に押し出されたビット
 13512:   //    N  結果の最上位ビット
 13513:   //    Z  結果が0のときセット。他はクリア
 13514:   //    V  常にクリア
 13515:   //    C  countが0のときクリア。他は最後に押し出されたビット
 13516:   public static void irpAsrToMem () throws M68kException {
 13517:     XEiJ.mpuCycleCount++;
 13518:     int ea = XEiJ.regOC & 63;
 13519:     int a = efaMltWord (ea);
 13520:     int x = mmuModifyWordSignData (a, XEiJ.regSRS);
 13521:     int z = x >> 1;
 13522:     mmuWriteWordData (a, z, XEiJ.regSRS);
 13523:     XEiJ.regCCR = ((z < 0 ? XEiJ.REG_CCR_N : 0) |
 13524:                    (z == 0 ? XEiJ.REG_CCR_Z : 0) |
 13525:                    -(x & 1) & (XEiJ.REG_CCR_X | XEiJ.REG_CCR_C));  //XとCは最後に押し出されたビット
 13526:   }  //irpAsrToMem
 13527: 
 13528:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 13529:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
 13530:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
 13531:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 13532:   //ASL.B #<data>,Dr                                |-|012346|-|UUUUU|*****|          |1110_qqq_100_000_rrr
 13533:   //LSL.B #<data>,Dr                                |-|012346|-|UUUUU|***0*|          |1110_qqq_100_001_rrr
 13534:   //ROXL.B #<data>,Dr                               |-|012346|-|*UUUU|***0*|          |1110_qqq_100_010_rrr
 13535:   //ROL.B #<data>,Dr                                |-|012346|-|-UUUU|-**0*|          |1110_qqq_100_011_rrr
 13536:   //ASL.B Dq,Dr                                     |-|012346|-|UUUUU|*****|          |1110_qqq_100_100_rrr
 13537:   //LSL.B Dq,Dr                                     |-|012346|-|UUUUU|***0*|          |1110_qqq_100_101_rrr
 13538:   //ROXL.B Dq,Dr                                    |-|012346|-|*UUUU|***0*|          |1110_qqq_100_110_rrr
 13539:   //ROL.B Dq,Dr                                     |-|012346|-|-UUUU|-**0*|          |1110_qqq_100_111_rrr
 13540:   //ASL.B Dr                                        |A|012346|-|UUUUU|*****|          |1110_001_100_000_rrr [ASL.B #1,Dr]
 13541:   //LSL.B Dr                                        |A|012346|-|UUUUU|***0*|          |1110_001_100_001_rrr [LSL.B #1,Dr]
 13542:   //ROXL.B Dr                                       |A|012346|-|*UUUU|***0*|          |1110_001_100_010_rrr [ROXL.B #1,Dr]
 13543:   //ROL.B Dr                                        |A|012346|-|-UUUU|-**0*|          |1110_001_100_011_rrr [ROL.B #1,Dr]
 13544:   //
 13545:   //ASL.B #<data>,Dr
 13546:   //ASL.B Dq,Dr
 13547:   //  算術左シフトバイト
 13548:   //       ........................アイウエオカキク XNZVC
 13549:   //     0 ........................アイウエオカキク Xア*00 Z=アイウエオカキク==0
 13550:   //     1 ........................イウエオカキク0 アイ**ア Z=イウエオカキク==0,V=アイ!=0/-1
 13551:   //     :
 13552:   //     7 ........................ク0000000 キク**キ Z=ク==0,V=アイウエオカキク!=0/-1
 13553:   //     8 ........................00000000 ク01*ク V=アイウエオカキク!=0
 13554:   //     9 ........................00000000 001*0 V=アイウエオカキク!=0
 13555:   //  CCR
 13556:   //    X  countが0のとき変化しない。他は最後に押し出されたビット
 13557:   //    N  結果の最上位ビット
 13558:   //    Z  結果が0のときセット。他はクリア
 13559:   //    V  ASRで元に戻せないときセット。他はクリア
 13560:   //    C  countが0のときクリア。他は最後に押し出されたビット
 13561:   //
 13562:   //LSL.B #<data>,Dr
 13563:   //LSL.B Dq,Dr
 13564:   //  論理左シフトバイト
 13565:   //       ........................アイウエオカキク XNZVC
 13566:   //     0 ........................アイウエオカキク Xア*00 Z=アイウエオカキク==0
 13567:   //     1 ........................イウエオカキク0 アイ*0ア Z=イウエオカキク==0
 13568:   //     :
 13569:   //     7 ........................ク0000000 キク*0キ Z=ク==0
 13570:   //     8 ........................00000000 ク010ク
 13571:   //     9 ........................00000000 00100
 13572:   //  CCR
 13573:   //    X  countが0のとき変化しない。他は最後に押し出されたビット
 13574:   //    N  結果の最上位ビット
 13575:   //    Z  結果が0のときセット。他はクリア
 13576:   //    V  常にクリア
 13577:   //    C  countが0のときクリア。他は最後に押し出されたビット
 13578:   //
 13579:   //ROL.B #<data>,Dr
 13580:   //ROL.B Dq,Dr
 13581:   //  左ローテートバイト
 13582:   //       ........................アイウエオカキク XNZVC
 13583:   //     0 ........................アイウエオカキク Xア*00 Z=アイウエオカキク==0
 13584:   //     1 ........................イウエオカキクア Xイ*0ア Z=アイウエオカキク==0
 13585:   //     :
 13586:   //     7 ........................クアイウエオカキ Xク*0キ Z=アイウエオカキク==0
 13587:   //     8 ........................アイウエオカキク Xア*0ク Z=アイウエオカキク==0
 13588:   //  CCR
 13589:   //    X  常に変化しない
 13590:   //    N  結果の最上位ビット
 13591:   //    Z  結果が0のときセット。他はクリア
 13592:   //    V  常にクリア
 13593:   //    C  countが0のときクリア。他は結果の最下位ビット
 13594:   //
 13595:   //ROXL.B #<data>,Dr
 13596:   //ROXL.B Dq,Dr
 13597:   //  拡張左ローテートバイト
 13598:   //       ........................アイウエオカキク XNZVC
 13599:   //     0 ........................アイウエオカキク Xア*0X Z=アイウエオカキク==0
 13600:   //     1 ........................イウエオカキクX アイ*0ア Z=イウエオカキクX==0
 13601:   //     2 ........................ウエオカキクXア イウ*0イ Z=アウエオカキクX==0
 13602:   //     :
 13603:   //     7 ........................クXアイウエオカ キク*0キ Z=アイウエオカクX==0
 13604:   //     8 ........................Xアイウエオカキ クX*0ク Z=アイウエオカキX==0
 13605:   //     9 ........................アイウエオカキク Xア*0X Z=アイウエオカキク==0
 13606:   //  CCR
 13607:   //    X  countが0のとき変化しない。他は最後に押し出されたビット
 13608:   //    N  結果の最上位ビット
 13609:   //    Z  結果が0のときセット。他はクリア
 13610:   //    V  常にクリア
 13611:   //    C  countが0のときXのコピー。他は最後に押し出されたビット
 13612:   public static void irpXxlToRegByte () throws M68kException {
 13613:     int rrr;
 13614:     int x = XEiJ.regRn[rrr = XEiJ.regOC & 7];
 13615:     int y;
 13616:     int z;
 13617:     int t;
 13618:     XEiJ.mpuCycleCount++;
 13619:     switch (XEiJ.regOC >> 3 & 0b111_000 >> 3) {
 13620:     case 0b000_000 >> 3:  //ASL.B #<data>,Dr
 13621:       y = (XEiJ.regOC >> 9) - 1 & 7;  //y=data-1=1-1~8-1
 13622:       XEiJ.regRn[rrr] = ~0xff & x | 0xff & (z = (byte) ((t = x << y) << 1));
 13623:       XEiJ.regCCR = z >> 28 & XEiJ.REG_CCR_N | (z == 0 ? XEiJ.REG_CCR_Z : 0) | (z >> y + 1 != (byte) x ? XEiJ.REG_CCR_V : 0) | (byte) t >> 7 & (XEiJ.REG_CCR_X | XEiJ.REG_CCR_C);  //VはASRで元に戻せないときセット。XとCは最後に押し出されたビット
 13624:       break;
 13625:     case 0b001_000 >> 3:  //LSL.B #<data>,Dr
 13626:       y = (XEiJ.regOC >> 9) - 1 & 7;  //y=data-1=1-1~8-1
 13627:       XEiJ.regRn[rrr] = ~0xff & x | 0xff & (z = (byte) ((t = x << y) << 1));
 13628:       XEiJ.regCCR = z >> 28 & XEiJ.REG_CCR_N | (z == 0 ? XEiJ.REG_CCR_Z : 0) | (byte) t >> 7 & (XEiJ.REG_CCR_X | XEiJ.REG_CCR_C);  //XとCは最後に押し出されたビット
 13629:       break;
 13630:     case 0b010_000 >> 3:  //ROXL.B #<data>,Dr
 13631:       y = (XEiJ.regOC >> 9) - 1 & 7;  //y=data-1=1-1~8-1
 13632:       z = x << 1 | XEiJ.regCCR >> 4 & 1;
 13633:       if (y == 1 - 1) {  //y=data-1=1-1
 13634:         t = x;
 13635:       } else {  //y=data-1=2-1~8-1
 13636:         z = (t = z << y - (2 - 1)) << 1 | (0xff & x) >>> 9 - 1 - y;
 13637:       }
 13638:       XEiJ.regRn[rrr] = ~0xff & x | 0xff & (z = (byte) z);
 13639:       XEiJ.regCCR = z >> 28 & XEiJ.REG_CCR_N | (z == 0 ? XEiJ.REG_CCR_Z : 0) | (byte) t >> 7 & (XEiJ.REG_CCR_X | XEiJ.REG_CCR_C);  //XとCは最後に押し出されたビット
 13640:       break;
 13641:     case 0b011_000 >> 3:  //ROL.B #<data>,Dr
 13642:       y = XEiJ.regOC >> 9 & 7;  //y=data&7
 13643:       XEiJ.regRn[rrr] = ~0xff & x | 0xff & (z = (byte) (x << y | (0xff & x) >>> 8 - y));
 13644:       XEiJ.regCCR = z >> 28 & XEiJ.REG_CCR_N | (z == 0 ? XEiJ.regCCR & XEiJ.REG_CCR_X | XEiJ.REG_CCR_Z : XEiJ.regCCR & XEiJ.REG_CCR_X) | z & 1;  //Xは変化しない。Cは結果の最下位ビット
 13645:       break;
 13646:     case 0b100_000 >> 3:  //ASL.B Dq,Dr
 13647:       y = XEiJ.regRn[XEiJ.regOC >> 9 & 7] & 63;  //y=0~63。Javaのシフト演算子は5ビットでマスクされることに注意
 13648:       if (y <= 7) {  //y=data=0~7
 13649:         if (y == 0) {  //y=data=0
 13650:           z = (byte) x;
 13651:           t = XEiJ.regCCR & XEiJ.REG_CCR_X;  //Xは変化しない。VとCはクリア
 13652:         } else {  //y=data=1~7
 13653:           XEiJ.regRn[rrr] = ~0xff & x | 0xff & (z = (byte) ((t = x << y - 1) << 1));
 13654:           t = (z >> y != (byte) x ? XEiJ.REG_CCR_V : 0) | (byte) t >> 7 & (XEiJ.REG_CCR_X | XEiJ.REG_CCR_C);  //VはASRで元に戻せないときセット。XとCは最後に押し出されたビット
 13655:         }
 13656:         XEiJ.regCCR = z >> 28 & XEiJ.REG_CCR_N | (z == 0 ? XEiJ.REG_CCR_Z : 0) | t;
 13657:       } else {  //y=data=8~63
 13658:         XEiJ.regRn[rrr] = ~0xff & x;
 13659:         XEiJ.regCCR = XEiJ.REG_CCR_Z | ((byte) x != 0 ? XEiJ.REG_CCR_V : 0) | (y == 8 ? -(x & 1) & (XEiJ.REG_CCR_X | XEiJ.REG_CCR_C) : 0);
 13660:       }
 13661:       break;
 13662:     case 0b101_000 >> 3:  //LSL.B Dq,Dr
 13663:       y = XEiJ.regRn[XEiJ.regOC >> 9 & 7] & 63;  //y=0~63。Javaのシフト演算子は5ビットでマスクされることに注意
 13664:       if (y == 0) {  //y=data=0
 13665:         z = (byte) x;
 13666:         t = XEiJ.regCCR & XEiJ.REG_CCR_X;  //Xは変化しない。Cはクリア
 13667:       } else {  //y=data=1~63
 13668:         XEiJ.regRn[rrr] = ~0xff & x | 0xff & (z = (byte) ((t = y <= 8 ? x << y - 1 : 0) << 1));
 13669:         t = (byte) t >> 7 & (XEiJ.REG_CCR_X | XEiJ.REG_CCR_C);  //XとCは最後に押し出されたビット
 13670:       }
 13671:       XEiJ.regCCR = z >> 28 & XEiJ.REG_CCR_N | (z == 0 ? XEiJ.REG_CCR_Z : 0) | t;
 13672:       break;
 13673:     case 0b110_000 >> 3:  //ROXL.B Dq,Dr
 13674:       y = XEiJ.regRn[XEiJ.regOC >> 9 & 7] & 63;  //y=0~63。Javaのシフト演算子は5ビットでマスクされることに注意
 13675:       //y %= 9;
 13676:       y = (y & 7) - (y >> 3);  //y=data=-7~7
 13677:       y += y >> 3 & 9;  //y=data=0~8
 13678:       if (y == 0) {  //y=data=0
 13679:         z = (byte) x;
 13680:         t = -(XEiJ.regCCR >> 4 & 1) & (XEiJ.REG_CCR_X | XEiJ.REG_CCR_C);  //Xは変化しない。CはXのコピー
 13681:       } else {  //y=data=1~8
 13682:         z = x << 1 | XEiJ.regCCR >> 4 & 1;
 13683:         if (y == 1) {  //y=data=1
 13684:           t = x;  //Cは最後に押し出されたビット
 13685:         } else {  //y=data=2~8
 13686:           z = (t = z << y - 2) << 1 | (0xff & x) >>> 9 - y;
 13687:         }
 13688:         XEiJ.regRn[rrr] = ~0xff & x | 0xff & (z = (byte) z);
 13689:         t = (byte) t >> 7 & (XEiJ.REG_CCR_X | XEiJ.REG_CCR_C);  //XとCは最後に押し出されたビット
 13690:       }
 13691:       XEiJ.regCCR = z >> 28 & XEiJ.REG_CCR_N | (z == 0 ? XEiJ.REG_CCR_Z : 0) | t;
 13692:       break;
 13693:     case 0b111_000 >> 3:  //ROL.B Dq,Dr
 13694:     default:
 13695:       y = XEiJ.regRn[XEiJ.regOC >> 9 & 7] & 63;  //y=0~63。Javaのシフト演算子は5ビットでマスクされることに注意
 13696:       if (y == 0) {
 13697:         z = (byte) x;
 13698:         t = 0;  //Cはクリア
 13699:       } else {
 13700:         y &= 7;  //y=data=0~7
 13701:         XEiJ.regRn[rrr] = ~0xff & x | 0xff & (z = (byte) (x << y | (0xff & x) >>> 8 - y));
 13702:         t = z & 1;  //Cは結果の最下位ビット
 13703:       }
 13704:       XEiJ.regCCR = z >> 28 & XEiJ.REG_CCR_N | (z == 0 ? XEiJ.regCCR & XEiJ.REG_CCR_X | XEiJ.REG_CCR_Z : XEiJ.regCCR & XEiJ.REG_CCR_X) | t;  //Xは変化しない
 13705:     }
 13706:   }  //irpXxlToRegByte
 13707: 
 13708:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 13709:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
 13710:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
 13711:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 13712:   //ASL.W #<data>,Dr                                |-|012346|-|UUUUU|*****|          |1110_qqq_101_000_rrr
 13713:   //LSL.W #<data>,Dr                                |-|012346|-|UUUUU|***0*|          |1110_qqq_101_001_rrr
 13714:   //ROXL.W #<data>,Dr                               |-|012346|-|*UUUU|***0*|          |1110_qqq_101_010_rrr
 13715:   //ROL.W #<data>,Dr                                |-|012346|-|-UUUU|-**0*|          |1110_qqq_101_011_rrr
 13716:   //ASL.W Dq,Dr                                     |-|012346|-|UUUUU|*****|          |1110_qqq_101_100_rrr
 13717:   //LSL.W Dq,Dr                                     |-|012346|-|UUUUU|***0*|          |1110_qqq_101_101_rrr
 13718:   //ROXL.W Dq,Dr                                    |-|012346|-|*UUUU|***0*|          |1110_qqq_101_110_rrr
 13719:   //ROL.W Dq,Dr                                     |-|012346|-|-UUUU|-**0*|          |1110_qqq_101_111_rrr
 13720:   //ASL.W Dr                                        |A|012346|-|UUUUU|*****|          |1110_001_101_000_rrr [ASL.W #1,Dr]
 13721:   //LSL.W Dr                                        |A|012346|-|UUUUU|***0*|          |1110_001_101_001_rrr [LSL.W #1,Dr]
 13722:   //ROXL.W Dr                                       |A|012346|-|*UUUU|***0*|          |1110_001_101_010_rrr [ROXL.W #1,Dr]
 13723:   //ROL.W Dr                                        |A|012346|-|-UUUU|-**0*|          |1110_001_101_011_rrr [ROL.W #1,Dr]
 13724:   //
 13725:   //ASL.W #<data>,Dr
 13726:   //ASL.W Dq,Dr
 13727:   //ASL.W <ea>
 13728:   //  算術左シフトワード
 13729:   //       ................アイウエオカキクケコサシスセソタ XNZVC
 13730:   //     0 ................アイウエオカキクケコサシスセソタ Xア*00 Z=アイウエオカキクケコサシスセソタ==0
 13731:   //     1 ................イウエオカキクケコサシスセソタ0 アイ**ア Z=イウエオカキクケコサシスセソタ==0,V=アイ!=0/-1
 13732:   //     :
 13733:   //    15 ................タ000000000000000 ソタ**ソ Z=タ==0,V=アイウエオカキクケコサシスセソタ!=0/-1
 13734:   //    16 ................0000000000000000 タ01*タ V=アイウエオカキクケコサシスセソタ!=0
 13735:   //    17 ................0000000000000000 001*0 V=アイウエオカキクケコサシスセソタ!=0
 13736:   //  CCR
 13737:   //    X  countが0のとき変化しない。他は最後に押し出されたビット
 13738:   //    N  結果の最上位ビット
 13739:   //    Z  結果が0のときセット。他はクリア
 13740:   //    V  ASRで元に戻せないときセット。他はクリア
 13741:   //    C  countが0のときクリア。他は最後に押し出されたビット
 13742:   //
 13743:   //LSL.W #<data>,Dr
 13744:   //LSL.W Dq,Dr
 13745:   //LSL.W <ea>
 13746:   //  論理左シフトワード
 13747:   //       ................アイウエオカキクケコサシスセソタ XNZVC
 13748:   //     0 ................アイウエオカキクケコサシスセソタ Xア*00 Z=アイウエオカキクケコサシスセソタ==0
 13749:   //     1 ................イウエオカキクケコサシスセソタ0 アイ*0ア Z=イウエオカキクケコサシスセソタ==0
 13750:   //     :
 13751:   //    15 ................タ000000000000000 ソタ*0ソ Z=タ==0
 13752:   //    16 ................0000000000000000 タ010タ
 13753:   //    17 ................0000000000000000 00100
 13754:   //  CCR
 13755:   //    X  countが0のとき変化しない。他は最後に押し出されたビット
 13756:   //    N  結果の最上位ビット
 13757:   //    Z  結果が0のときセット。他はクリア
 13758:   //    V  常にクリア
 13759:   //    C  countが0のときクリア。他は最後に押し出されたビット
 13760:   //
 13761:   //ROL.W #<data>,Dr
 13762:   //ROL.W Dq,Dr
 13763:   //ROL.W <ea>
 13764:   //  左ローテートワード
 13765:   //       ................アイウエオカキクケコサシスセソタ XNZVC
 13766:   //     0 ................アイウエオカキクケコサシスセソタ Xア*00 Z=アイウエオカキクケコサシスセソタ==0
 13767:   //     1 ................イウエオカキクケコサシスセソタア Xイ*0ア Z=アイウエオカキクケコサシスセソタ==0
 13768:   //     :
 13769:   //    15 ................タアイウエオカキクケコサシスセソ Xタ*0ソ Z=アイウエオカキクケコサシスセソタ==0
 13770:   //    16 ................アイウエオカキクケコサシスセソタ Xア*0タ Z=アイウエオカキクケコサシスセソタ==0
 13771:   //  CCR
 13772:   //    X  常に変化しない
 13773:   //    N  結果の最上位ビット
 13774:   //    Z  結果が0のときセット。他はクリア
 13775:   //    V  常にクリア
 13776:   //    C  countが0のときクリア。他は結果の最下位ビット
 13777:   //
 13778:   //ROXL.W #<data>,Dr
 13779:   //ROXL.W Dq,Dr
 13780:   //ROXL.W <ea>
 13781:   //  拡張左ローテートワード
 13782:   //       ................アイウエオカキクケコサシスセソタ XNZVC
 13783:   //     0 ................アイウエオカキクケコサシスセソタ Xア*0X Z=アイウエオカキクケコサシスセソタ==0
 13784:   //     1 ................イウエオカキクケコサシスセソタX アイ*0ア Z=イウエオカキクケコサシスセソタX==0
 13785:   //     2 ................ウエオカキクケコサシスセソタXア イウ*0イ Z=アウエオカキクケコサシスセソタX==0
 13786:   //     :
 13787:   //    15 ................タXアイウエオカキクケコサシスセ ソタ*0ソ Z=アイウエオカキクケコサシスセタX==0
 13788:   //    16 ................Xアイウエオカキクケコサシスセソ タX*0タ Z=アイウエオカキクケコサシスセソX==0
 13789:   //    17 ................アイウエオカキクケコサシスセソタ Xア*0X Z=アイウエオカキクケコサシスセソタ==0
 13790:   //  CCR
 13791:   //    X  countが0のとき変化しない。他は最後に押し出されたビット
 13792:   //    N  結果の最上位ビット
 13793:   //    Z  結果が0のときセット。他はクリア
 13794:   //    V  常にクリア
 13795:   //    C  countが0のときXのコピー。他は最後に押し出されたビット
 13796:   public static void irpXxlToRegWord () throws M68kException {
 13797:     int rrr;
 13798:     int x = XEiJ.regRn[rrr = XEiJ.regOC & 7];
 13799:     int y;
 13800:     int z;
 13801:     int t;
 13802:     XEiJ.mpuCycleCount++;
 13803:     switch (XEiJ.regOC >> 3 & 0b111_000 >> 3) {
 13804:     case 0b000_000 >> 3:  //ASL.W #<data>,Dr
 13805:       y = (XEiJ.regOC >> 9) - 1 & 7;  //y=data-1=1-1~8-1
 13806:       XEiJ.regRn[rrr] = ~0xffff & x | (char) (z = (short) ((t = x << y) << 1));
 13807:       XEiJ.regCCR = z >> 28 & XEiJ.REG_CCR_N | (z == 0 ? XEiJ.REG_CCR_Z : 0) | (z >> y + 1 != (short) x ? XEiJ.REG_CCR_V : 0) | (short) t >> 15 & (XEiJ.REG_CCR_X | XEiJ.REG_CCR_C);  //VはASRで元に戻せないときセット。XとCは最後に押し出されたビット
 13808:       break;
 13809:     case 0b001_000 >> 3:  //LSL.W #<data>,Dr
 13810:       y = (XEiJ.regOC >> 9) - 1 & 7;  //y=data-1=1-1~8-1
 13811:       XEiJ.regRn[rrr] = ~0xffff & x | (char) (z = (short) ((t = x << y) << 1));
 13812:       XEiJ.regCCR = z >> 28 & XEiJ.REG_CCR_N | (z == 0 ? XEiJ.REG_CCR_Z : 0) | (short) t >> 15 & (XEiJ.REG_CCR_X | XEiJ.REG_CCR_C);  //XとCは最後に押し出されたビット
 13813:       break;
 13814:     case 0b010_000 >> 3:  //ROXL.W #<data>,Dr
 13815:       y = (XEiJ.regOC >> 9) - 1 & 7;  //y=data-1=1-1~8-1
 13816:       z = x << 1 | XEiJ.regCCR >> 4 & 1;
 13817:       if (y == 1 - 1) {  //y=data-1=1-1
 13818:         t = x;
 13819:       } else {  //y=data-1=2-1~8-1
 13820:         z = (t = z << y - (2 - 1)) << 1 | (char) x >>> 17 - 1 - y;
 13821:       }
 13822:       XEiJ.regRn[rrr] = ~0xffff & x | (char) (z = (short) z);
 13823:       XEiJ.regCCR = z >> 28 & XEiJ.REG_CCR_N | (z == 0 ? XEiJ.REG_CCR_Z : 0) | (short) t >> 15 & (XEiJ.REG_CCR_X | XEiJ.REG_CCR_C);  //XとCは最後に押し出されたビット
 13824:       break;
 13825:     case 0b011_000 >> 3:  //ROL.W #<data>,Dr
 13826:       y = (XEiJ.regOC >> 9) - 1 & 7;  //y=data-1=1-1~8-1
 13827:       XEiJ.regRn[rrr] = ~0xffff & x | (char) (z = (short) (x << y + 1 | (char) x >>> 16 - 1 - y));
 13828:       XEiJ.regCCR = z >> 28 & XEiJ.REG_CCR_N | (z == 0 ? XEiJ.regCCR & XEiJ.REG_CCR_X | XEiJ.REG_CCR_Z : XEiJ.regCCR & XEiJ.REG_CCR_X) | z & 1;  //Xは変化しない。Cは結果の最下位ビット
 13829:       break;
 13830:     case 0b100_000 >> 3:  //ASL.W Dq,Dr
 13831:       y = XEiJ.regRn[XEiJ.regOC >> 9 & 7] & 63;  //y=0~63。Javaのシフト演算子は5ビットでマスクされることに注意
 13832:       if (y <= 15) {  //y=data=0~15
 13833:         if (y == 0) {  //y=data=0
 13834:           z = (short) x;
 13835:           t = XEiJ.regCCR & XEiJ.REG_CCR_X;  //Xは変化しない。VとCはクリア
 13836:         } else {  //y=data=1~15
 13837:           XEiJ.regRn[rrr] = ~0xffff & x | (char) (z = (short) ((t = x << y - 1) << 1));
 13838:           t = (z >> y != (short) x ? XEiJ.REG_CCR_V : 0) | (short) t >> 15 & (XEiJ.REG_CCR_X | XEiJ.REG_CCR_C);  //VはASRで元に戻せないときセット。XとCは最後に押し出されたビット
 13839:         }
 13840:         XEiJ.regCCR = z >> 28 & XEiJ.REG_CCR_N | (z == 0 ? XEiJ.REG_CCR_Z : 0) | t;
 13841:       } else {  //y=data=16~63
 13842:         XEiJ.regRn[rrr] = ~0xffff & x;
 13843:         XEiJ.regCCR = XEiJ.REG_CCR_Z | ((short) x != 0 ? XEiJ.REG_CCR_V : 0) | (y == 16 ? -(x & 1) & (XEiJ.REG_CCR_X | XEiJ.REG_CCR_C) : 0);
 13844:       }
 13845:       break;
 13846:     case 0b101_000 >> 3:  //LSL.W Dq,Dr
 13847:       y = XEiJ.regRn[XEiJ.regOC >> 9 & 7] & 63;  //y=0~63。Javaのシフト演算子は5ビットでマスクされることに注意
 13848:       if (y == 0) {  //y=data=0
 13849:         z = (short) x;
 13850:         t = XEiJ.regCCR & XEiJ.REG_CCR_X;  //Xは変化しない。Cはクリア
 13851:       } else {  //y=data=1~63
 13852:         XEiJ.regRn[rrr] = ~0xffff & x | (char) (z = (short) ((t = y <= 16 ? x << y - 1 : 0) << 1));
 13853:         t = (short) t >> 15 & (XEiJ.REG_CCR_X | XEiJ.REG_CCR_C);  //XとCは最後に押し出されたビット
 13854:       }
 13855:       XEiJ.regCCR = z >> 28 & XEiJ.REG_CCR_N | (z == 0 ? XEiJ.REG_CCR_Z : 0) | t;
 13856:       break;
 13857:     case 0b110_000 >> 3:  //ROXL.W Dq,Dr
 13858:       y = XEiJ.regRn[XEiJ.regOC >> 9 & 7] & 63;  //y=0~63。Javaのシフト演算子は5ビットでマスクされることに注意
 13859:       //y %= 17;
 13860:       y = (y & 15) - (y >> 4);  //y=data=-3~15
 13861:       y += y >> 4 & 17;  //y=data=0~16
 13862:       if (y == 0) {  //y=data=0
 13863:         z = (short) x;
 13864:         t = -(XEiJ.regCCR >> 4 & 1) & (XEiJ.REG_CCR_X | XEiJ.REG_CCR_C);  //Xは変化しない。CはXのコピー
 13865:       } else {  //y=data=1~16
 13866:         z = x << 1 | XEiJ.regCCR >> 4 & 1;
 13867:         if (y == 1) {  //y=data=1
 13868:           t = x;  //Cは最後に押し出されたビット
 13869:         } else {  //y=data=2~16
 13870:           z = (t = z << y - 2) << 1 | (char) x >>> 17 - y;
 13871:         }
 13872:         XEiJ.regRn[rrr] = ~0xffff & x | (char) (z = (short) z);
 13873:         t = (short) t >> 15 & (XEiJ.REG_CCR_X | XEiJ.REG_CCR_C);  //XとCは最後に押し出されたビット
 13874:       }
 13875:       XEiJ.regCCR = z >> 28 & XEiJ.REG_CCR_N | (z == 0 ? XEiJ.REG_CCR_Z : 0) | t;
 13876:       break;
 13877:     case 0b111_000 >> 3:  //ROL.W Dq,Dr
 13878:     default:
 13879:       y = XEiJ.regRn[XEiJ.regOC >> 9 & 7] & 63;  //y=0~63。Javaのシフト演算子は5ビットでマスクされることに注意
 13880:       if (y == 0) {
 13881:         z = (short) x;
 13882:         t = 0;  //Cはクリア
 13883:       } else {
 13884:         y &= 15;  //y=data=0~15
 13885:         XEiJ.regRn[rrr] = ~0xffff & x | (char) (z = (short) (x << y | (char) x >>> 16 - y));
 13886:         t = z & 1;  //Cは結果の最下位ビット
 13887:       }
 13888:       XEiJ.regCCR = z >> 28 & XEiJ.REG_CCR_N | (z == 0 ? XEiJ.regCCR & XEiJ.REG_CCR_X | XEiJ.REG_CCR_Z : XEiJ.regCCR & XEiJ.REG_CCR_X) | t;  //Xは変化しない
 13889:     }
 13890:   }  //irpXxlToRegWord
 13891: 
 13892:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 13893:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
 13894:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
 13895:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 13896:   //ASL.L #<data>,Dr                                |-|012346|-|UUUUU|*****|          |1110_qqq_110_000_rrr
 13897:   //LSL.L #<data>,Dr                                |-|012346|-|UUUUU|***0*|          |1110_qqq_110_001_rrr
 13898:   //ROXL.L #<data>,Dr                               |-|012346|-|*UUUU|***0*|          |1110_qqq_110_010_rrr
 13899:   //ROL.L #<data>,Dr                                |-|012346|-|-UUUU|-**0*|          |1110_qqq_110_011_rrr
 13900:   //ASL.L Dq,Dr                                     |-|012346|-|UUUUU|*****|          |1110_qqq_110_100_rrr
 13901:   //LSL.L Dq,Dr                                     |-|012346|-|UUUUU|***0*|          |1110_qqq_110_101_rrr
 13902:   //ROXL.L Dq,Dr                                    |-|012346|-|*UUUU|***0*|          |1110_qqq_110_110_rrr
 13903:   //ROL.L Dq,Dr                                     |-|012346|-|-UUUU|-**0*|          |1110_qqq_110_111_rrr
 13904:   //ASL.L Dr                                        |A|012346|-|UUUUU|*****|          |1110_001_110_000_rrr [ASL.L #1,Dr]
 13905:   //LSL.L Dr                                        |A|012346|-|UUUUU|***0*|          |1110_001_110_001_rrr [LSL.L #1,Dr]
 13906:   //ROXL.L Dr                                       |A|012346|-|*UUUU|***0*|          |1110_001_110_010_rrr [ROXL.L #1,Dr]
 13907:   //ROL.L Dr                                        |A|012346|-|-UUUU|-**0*|          |1110_001_110_011_rrr [ROL.L #1,Dr]
 13908:   //
 13909:   //ASL.L #<data>,Dr
 13910:   //ASL.L Dq,Dr
 13911:   //  算術左シフトロング
 13912:   //       アイウエオカキクケコサシスセソタチツテトナニヌネノハヒフヘホマミ XNZVC
 13913:   //     0 アイウエオカキクケコサシスセソタチツテトナニヌネノハヒフヘホマミ Xア**0 Z=アイウエオカキクケコサシスセソタチツテトナニヌネノハヒフヘホマミ==0
 13914:   //     1 イウエオカキクケコサシスセソタチツテトナニヌネノハヒフヘホマミ0 アイ**ア Z=イウエオカキクケコサシスセソタチツテトナニヌネノハヒフヘホマミ==0,V=アイ!=0/-1
 13915:   //     :
 13916:   //    31 ミ0000000000000000000000000000000 マミ**マ Z=ミ==0,V=アイウエオカキクケコサシスセソタチツテトナニヌネノハヒフヘホマミ!=0/-1
 13917:   //    32 00000000000000000000000000000000 ミ01*ミ V=アイウエオカキクケコサシスセソタチツテトナニヌネノハヒフヘホマミ!=0
 13918:   //    33 00000000000000000000000000000000 001*0 V=アイウエオカキクケコサシスセソタチツテトナニヌネノハヒフヘホマミ!=0
 13919:   //  CCR
 13920:   //    X  countが0のとき変化しない。他は最後に押し出されたビット
 13921:   //    N  結果の最上位ビット
 13922:   //    Z  結果が0のときセット。他はクリア
 13923:   //    V  ASRで元に戻せないときセット。他はクリア
 13924:   //    C  countが0のときクリア。他は最後に押し出されたビット
 13925:   //
 13926:   //LSL.L #<data>,Dr
 13927:   //LSL.L Dq,Dr
 13928:   //  論理左シフトロング
 13929:   //       アイウエオカキクケコサシスセソタチツテトナニヌネノハヒフヘホマミ XNZVC
 13930:   //     0 アイウエオカキクケコサシスセソタチツテトナニヌネノハヒフヘホマミ Xア*00 Z=アイウエオカキクケコサシスセソタチツテトナニヌネノハヒフヘホマミ==0
 13931:   //     1 イウエオカキクケコサシスセソタチツテトナニヌネノハヒフヘホマミ0 アイ*0ア Z=イウエオカキクケコサシスセソタチツテトナニヌネノハヒフヘホマミ==0
 13932:   //     :
 13933:   //    31 ミ0000000000000000000000000000000 マミ*0マ Z=ミ==0
 13934:   //    32 00000000000000000000000000000000 ミ010ミ
 13935:   //    33 00000000000000000000000000000000 00100
 13936:   //  CCR
 13937:   //    X  countが0のとき変化しない。他は最後に押し出されたビット
 13938:   //    N  結果の最上位ビット
 13939:   //    Z  結果が0のときセット。他はクリア
 13940:   //    V  常にクリア
 13941:   //    C  countが0のときクリア。他は最後に押し出されたビット
 13942:   //
 13943:   //ROL.L #<data>,Dr
 13944:   //ROL.L Dq,Dr
 13945:   //  左ローテートロング
 13946:   //       アイウエオカキクケコサシスセソタチツテトナニヌネノハヒフヘホマミ XNZVC
 13947:   //     0 アイウエオカキクケコサシスセソタチツテトナニヌネノハヒフヘホマミ Xア*00 Z=アイウエオカキクケコサシスセソタチツテトナニヌネノハヒフヘホマミ==0
 13948:   //     1 イウエオカキクケコサシスセソタチツテトナニヌネノハヒフヘホマミア Xイ*0ア Z=アイウエオカキクケコサシスセソタチツテトナニヌネノハヒフヘホマミ==0
 13949:   //     :
 13950:   //    31 ミアイウエオカキクケコサシスセソタチツテトナニヌネノハヒフヘホマ Xミ*0マ Z=アイウエオカキクケコサシスセソタチツテトナニヌネノハヒフヘホマミ==0
 13951:   //    32 アイウエオカキクケコサシスセソタチツテトナニヌネノハヒフヘホマミ Xア*0ミ Z=アイウエオカキクケコサシスセソタチツテトナニヌネノハヒフヘホマミ==0
 13952:   //  CCR
 13953:   //    X  常に変化しない
 13954:   //    N  結果の最上位ビット
 13955:   //    Z  結果が0のときセット。他はクリア
 13956:   //    V  常にクリア
 13957:   //    C  countが0のときクリア。他は結果の最下位ビット
 13958:   //
 13959:   //ROXL.L #<data>,Dr
 13960:   //ROXL.L Dq,Dr
 13961:   //  拡張左ローテートロング
 13962:   //       アイウエオカキクケコサシスセソタチツテトナニヌネノハヒフヘホマミ XNZVC
 13963:   //     0 アイウエオカキクケコサシスセソタチツテトナニヌネノハヒフヘホマミ Xア*0X Z=アイウエオカキクケコサシスセソタチツテトナニヌネノハヒフヘホマミ==0
 13964:   //     1 イウエオカキクケコサシスセソタチツテトナニヌネノハヒフヘホマミX アイ*0ア Z=イウエオカキクケコサシスセソタチツテトナニヌネノハヒフヘホマミX==0
 13965:   //     2 ウエオカキクケコサシスセソタチツテトナニヌネノハヒフヘホマミXア イウ*0イ Z=アウエオカキクケコサシスセソタチツテトナニヌネノハヒフヘホマミX==0
 13966:   //     :
 13967:   //    31 ミXアイウエオカキクケコサシスセソタチツテトナニヌネノハヒフヘホ マミ*0マ Z=アイウエオカキクケコサシスセソタチツテトナニヌネノハヒフヘホミX==0
 13968:   //    32 Xアイウエオカキクケコサシスセソタチツテトナニヌネノハヒフヘホマ ミX*0ミ Z=アイウエオカキクケコサシスセソタチツテトナニヌネノハヒフヘホマX==0
 13969:   //    33 アイウエオカキクケコサシスセソタチツテトナニヌネノハヒフヘホマミ Xア*0X Z=アイウエオカキクケコサシスセソタチツテトナニヌネノハヒフヘホマミ==0
 13970:   //  CCR
 13971:   //    X  countが0のとき変化しない。他は最後に押し出されたビット
 13972:   //    N  結果の最上位ビット
 13973:   //    Z  結果が0のときセット。他はクリア
 13974:   //    V  常にクリア
 13975:   //    C  countが0のときXのコピー。他は最後に押し出されたビット
 13976:   public static void irpXxlToRegLong () throws M68kException {
 13977:     int rrr;
 13978:     int x = XEiJ.regRn[rrr = XEiJ.regOC & 7];
 13979:     int y;
 13980:     int z;
 13981:     int t;
 13982:     XEiJ.mpuCycleCount++;
 13983:     switch (XEiJ.regOC >> 3 & 0b111_000 >> 3) {
 13984:     case 0b000_000 >> 3:  //ASL.L #<data>,Dr
 13985:       y = (XEiJ.regOC >> 9) - 1 & 7;  //y=data-1=1-1~8-1
 13986:       XEiJ.regRn[rrr] = z = (t = x << y) << 1;
 13987:       XEiJ.regCCR = z >> 28 & XEiJ.REG_CCR_N | (z == 0 ? XEiJ.REG_CCR_Z : 0) | (z >> y + 1 != x ? XEiJ.REG_CCR_V : 0) | t >> 31 & (XEiJ.REG_CCR_X | XEiJ.REG_CCR_C);  //VはASRで元に戻せないときセット。XとCは最後に押し出されたビット
 13988:       break;
 13989:     case 0b001_000 >> 3:  //LSL.L #<data>,Dr
 13990:       y = (XEiJ.regOC >> 9) - 1 & 7;  //y=data-1=1-1~8-1
 13991:       XEiJ.regRn[rrr] = z = (t = x << y) << 1;
 13992:       XEiJ.regCCR = z >> 28 & XEiJ.REG_CCR_N | (z == 0 ? XEiJ.REG_CCR_Z : 0) | t >> 31 & (XEiJ.REG_CCR_X | XEiJ.REG_CCR_C);  //XとCは最後に押し出されたビット
 13993:       break;
 13994:     case 0b010_000 >> 3:  //ROXL.L #<data>,Dr
 13995:       y = (XEiJ.regOC >> 9) - 1 & 7;  //y=data-1=1-1~8-1
 13996:       z = x << 1 | XEiJ.regCCR >> 4 & 1;
 13997:       if (y == 1 - 1) {  //y=data-1=1-1
 13998:         t = x;
 13999:       } else {  //y=data-1=2-1~8-1
 14000:         z = (t = z << y - (2 - 1)) << 1 | x >>> -y;  //Javaのシフト演算子は5ビットでマスクされるので33-1-yを-yに省略
 14001:       }
 14002:       XEiJ.regRn[rrr] = z;
 14003:       XEiJ.regCCR = z >> 28 & XEiJ.REG_CCR_N | (z == 0 ? XEiJ.REG_CCR_Z : 0) | t >> 31 & (XEiJ.REG_CCR_X | XEiJ.REG_CCR_C);  //XとCは最後に押し出されたビット
 14004:       break;
 14005:     case 0b011_000 >> 3:  //ROL.L #<data>,Dr
 14006:       y = (XEiJ.regOC >> 9) - 1 & 7;  //y=data-1=1-1~8-1
 14007:       XEiJ.regRn[rrr] = z = x << y + 1 | x >>> ~y;  //Javaのシフト演算子は5ビットでマスクされるので32-1-yを~yに省略
 14008:       XEiJ.regCCR = z >> 28 & XEiJ.REG_CCR_N | (z == 0 ? XEiJ.regCCR & XEiJ.REG_CCR_X | XEiJ.REG_CCR_Z : XEiJ.regCCR & XEiJ.REG_CCR_X) | z & 1;  //Xは変化しない。Cは結果の最下位ビット
 14009:       break;
 14010:     case 0b100_000 >> 3:  //ASL.L Dq,Dr
 14011:       y = XEiJ.regRn[XEiJ.regOC >> 9 & 7] & 63;  //y=0~63。Javaのシフト演算子は5ビットでマスクされることに注意
 14012:       if (y <= 31) {  //y=data=0~31
 14013:         if (y == 0) {  //y=data=0
 14014:           z = x;
 14015:           t = XEiJ.regCCR & XEiJ.REG_CCR_X;  //Xは変化しない。VとCはクリア
 14016:         } else {  //y=data=1~31
 14017:           XEiJ.regRn[rrr] = z = (t = x << y - 1) << 1;
 14018:           t = (z >> y != x ? XEiJ.REG_CCR_V : 0) | t >> 31 & (XEiJ.REG_CCR_X | XEiJ.REG_CCR_C);  //VはASRで元に戻せないときセット。XとCは最後に押し出されたビット
 14019:         }
 14020:         XEiJ.regCCR = z >> 28 & XEiJ.REG_CCR_N | (z == 0 ? XEiJ.REG_CCR_Z : 0) | t;
 14021:       } else {  //y=data=32~63
 14022:         XEiJ.regRn[rrr] = 0;
 14023:         XEiJ.regCCR = XEiJ.REG_CCR_Z | (x != 0 ? XEiJ.REG_CCR_V : 0) | (y == 32 ? -(x & 1) & (XEiJ.REG_CCR_X | XEiJ.REG_CCR_C) : 0);
 14024:       }
 14025:       break;
 14026:     case 0b101_000 >> 3:  //LSL.L Dq,Dr
 14027:       y = XEiJ.regRn[XEiJ.regOC >> 9 & 7] & 63;  //y=0~63。Javaのシフト演算子は5ビットでマスクされることに注意
 14028:       if (y == 0) {  //y=data=0
 14029:         z = x;
 14030:         t = XEiJ.regCCR & XEiJ.REG_CCR_X;  //Xは変化しない。Cはクリア
 14031:       } else {  //y=data=1~63
 14032:         XEiJ.regRn[rrr] = z = (t = y <= 32 ? x << y - 1 : 0) << 1;
 14033:         t = t >> 31 & (XEiJ.REG_CCR_X | XEiJ.REG_CCR_C);  //XとCは最後に押し出されたビット
 14034:       }
 14035:       XEiJ.regCCR = z >> 28 & XEiJ.REG_CCR_N | (z == 0 ? XEiJ.REG_CCR_Z : 0) | t;
 14036:       break;
 14037:     case 0b110_000 >> 3:  //ROXL.L Dq,Dr
 14038:       y = XEiJ.regRn[XEiJ.regOC >> 9 & 7] & 63;  //y=0~63。Javaのシフト演算子は5ビットでマスクされることに注意
 14039:       //y %= 33;
 14040:       y -= 32 - y >> 6 & 33;  //y=data=0~32
 14041:       if (y == 0) {  //y=data=0
 14042:         z = x;
 14043:         t = -(XEiJ.regCCR >> 4 & 1) & (XEiJ.REG_CCR_X | XEiJ.REG_CCR_C);  //Xは変化しない。CはXのコピー
 14044:       } else {  //y=data=1~32
 14045:         z = x << 1 | XEiJ.regCCR >> 4 & 1;
 14046:         if (y == 1) {  //y=data=1
 14047:           t = x;  //Cは最後に押し出されたビット
 14048:         } else {  //y=data=2~32
 14049:           z = (t = z << y - 2) << 1 | x >>> 33 - y;
 14050:         }
 14051:         XEiJ.regRn[rrr] = z;
 14052:         t = t >> 31 & (XEiJ.REG_CCR_X | XEiJ.REG_CCR_C);  //XとCは最後に押し出されたビット
 14053:       }
 14054:       XEiJ.regCCR = z >> 28 & XEiJ.REG_CCR_N | (z == 0 ? XEiJ.REG_CCR_Z : 0) | t;
 14055:       break;
 14056:     case 0b111_000 >> 3:  //ROL.L Dq,Dr
 14057:     default:
 14058:       y = XEiJ.regRn[XEiJ.regOC >> 9 & 7] & 63;  //y=0~63。Javaのシフト演算子は5ビットでマスクされることに注意
 14059:       if (y == 0) {
 14060:         z = x;
 14061:         t = 0;  //Cはクリア
 14062:       } else {
 14063:         XEiJ.regRn[rrr] = z = x << y | x >>> -y;  //Javaのシフト演算子は5ビットでマスクされるのでy&31をyに、32-(y&31)を-yに省略。y=32のときx|xになるが問題ない
 14064:         t = z & 1;
 14065:       }
 14066:       XEiJ.regCCR = z >> 28 & XEiJ.REG_CCR_N | (z == 0 ? XEiJ.regCCR & XEiJ.REG_CCR_X | XEiJ.REG_CCR_Z : XEiJ.regCCR & XEiJ.REG_CCR_X) | t;  //Xは変化しない
 14067:     }
 14068:   }  //irpXxlToRegLong
 14069: 
 14070:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 14071:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
 14072:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
 14073:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 14074:   //ASL.W <ea>                                      |-|012346|-|UUUUU|*****|  M+-WXZ  |1110_000_111_mmm_rrr
 14075:   //
 14076:   //ASL.W #<data>,Dr
 14077:   //ASL.W Dq,Dr
 14078:   //ASL.W <ea>
 14079:   //  算術左シフトワード
 14080:   //       ................アイウエオカキクケコサシスセソタ XNZVC
 14081:   //     0 ................アイウエオカキクケコサシスセソタ Xア*00 Z=アイウエオカキクケコサシスセソタ==0
 14082:   //     1 ................イウエオカキクケコサシスセソタ0 アイ**ア Z=イウエオカキクケコサシスセソタ==0,V=アイ!=0/-1
 14083:   //     :
 14084:   //    15 ................タ000000000000000 ソタ**ソ Z=タ==0,V=アイウエオカキクケコサシスセソタ!=0/-1
 14085:   //    16 ................0000000000000000 タ01*タ V=アイウエオカキクケコサシスセソタ!=0
 14086:   //    17 ................0000000000000000 001*0 V=アイウエオカキクケコサシスセソタ!=0
 14087:   //  CCR
 14088:   //    X  countが0のとき変化しない。他は最後に押し出されたビット
 14089:   //    N  結果の最上位ビット
 14090:   //    Z  結果が0のときセット。他はクリア
 14091:   //    V  ASRで元に戻せないときセット。他はクリア
 14092:   //    C  countが0のときクリア。他は最後に押し出されたビット
 14093:   public static void irpAslToMem () throws M68kException {
 14094:     XEiJ.mpuCycleCount++;
 14095:     int ea = XEiJ.regOC & 63;
 14096:     int a = efaMltWord (ea);
 14097:     int x = mmuModifyWordSignData (a, XEiJ.regSRS);
 14098:     int z = (short) (x << 1);
 14099:     mmuWriteWordData (a, z, XEiJ.regSRS);
 14100:     XEiJ.regCCR = ((z < 0 ? XEiJ.REG_CCR_N : 0) |
 14101:                    (z == 0 ? XEiJ.REG_CCR_Z : 0) |
 14102:                    (x ^ z) >>> 31 << 1 |  //Vは最上位ビットが変化したときセット
 14103:                    x >> 15 & (XEiJ.REG_CCR_X | XEiJ.REG_CCR_C));  //XとCは最後に押し出されたビット
 14104:   }  //irpAslToMem
 14105: 
 14106:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 14107:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
 14108:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
 14109:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 14110:   //LSR.W <ea>                                      |-|012346|-|UUUUU|*0*0*|  M+-WXZ  |1110_001_011_mmm_rrr
 14111:   //
 14112:   //LSR.W #<data>,Dr
 14113:   //LSR.W Dq,Dr
 14114:   //LSR.W <ea>
 14115:   //  論理右シフトワード
 14116:   //       ................アイウエオカキクケコサシスセソタ XNZVC
 14117:   //     0 ................アイウエオカキクケコサシスセソタ Xア*00 Z=アイウエオカキクケコサシスセソタ==0
 14118:   //     1 ................0アイウエオカキクケコサシスセソ タ0*0タ Z=アイウエオカキクケコサシスセソ==0
 14119:   //     :
 14120:   //    15 ................000000000000000ア イ0*0イ Z=ア==0
 14121:   //    16 ................0000000000000000 ア010ア
 14122:   //    17 ................0000000000000000 00100
 14123:   //  CCR
 14124:   //    X  countが0のとき変化しない。他は最後に押し出されたビット
 14125:   //    N  結果の最上位ビット
 14126:   //    Z  結果が0のときセット。他はクリア
 14127:   //    V  常にクリア
 14128:   //    C  countが0のときクリア。他は最後に押し出されたビット
 14129:   public static void irpLsrToMem () throws M68kException {
 14130:     XEiJ.mpuCycleCount++;
 14131:     int ea = XEiJ.regOC & 63;
 14132:     int a = efaMltWord (ea);
 14133:     int x = mmuModifyWordZeroData (a, XEiJ.regSRS);
 14134:     int z = x >>> 1;
 14135:     mmuWriteWordData (a, z, XEiJ.regSRS);
 14136:     XEiJ.regCCR = ((z == 0 ? XEiJ.REG_CCR_Z : 0) |
 14137:                    -(x & 1) & (XEiJ.REG_CCR_X | XEiJ.REG_CCR_C));  //XとCは最後に押し出されたビット
 14138:   }  //irpLsrToMem
 14139: 
 14140:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 14141:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
 14142:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
 14143:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 14144:   //LSL.W <ea>                                      |-|012346|-|UUUUU|***0*|  M+-WXZ  |1110_001_111_mmm_rrr
 14145:   //
 14146:   //LSL.W #<data>,Dr
 14147:   //LSL.W Dq,Dr
 14148:   //LSL.W <ea>
 14149:   //  論理左シフトワード
 14150:   //       ................アイウエオカキクケコサシスセソタ XNZVC
 14151:   //     0 ................アイウエオカキクケコサシスセソタ Xア*00 Z=アイウエオカキクケコサシスセソタ==0
 14152:   //     1 ................イウエオカキクケコサシスセソタ0 アイ*0ア Z=イウエオカキクケコサシスセソタ==0
 14153:   //     :
 14154:   //    15 ................タ000000000000000 ソタ*0ソ Z=タ==0
 14155:   //    16 ................0000000000000000 タ010タ
 14156:   //    17 ................0000000000000000 00100
 14157:   //  CCR
 14158:   //    X  countが0のとき変化しない。他は最後に押し出されたビット
 14159:   //    N  結果の最上位ビット
 14160:   //    Z  結果が0のときセット。他はクリア
 14161:   //    V  常にクリア
 14162:   //    C  countが0のときクリア。他は最後に押し出されたビット
 14163:   public static void irpLslToMem () throws M68kException {
 14164:     XEiJ.mpuCycleCount++;
 14165:     int ea = XEiJ.regOC & 63;
 14166:     int a = efaMltWord (ea);
 14167:     int x = mmuModifyWordSignData (a, XEiJ.regSRS);
 14168:     int z = (short) (x << 1);
 14169:     mmuWriteWordData (a, z, XEiJ.regSRS);
 14170:     XEiJ.regCCR = ((z < 0 ? XEiJ.REG_CCR_N : 0) |
 14171:                    (z == 0 ? XEiJ.REG_CCR_Z : 0) |
 14172:                    x >> 15 & (XEiJ.REG_CCR_X | XEiJ.REG_CCR_C));  //XとCは最後に押し出されたビット
 14173:   }  //irpLslToMem
 14174: 
 14175:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 14176:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
 14177:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
 14178:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 14179:   //ROXR.W <ea>                                     |-|012346|-|*UUUU|***0*|  M+-WXZ  |1110_010_011_mmm_rrr
 14180:   //
 14181:   //ROXR.W #<data>,Dr
 14182:   //ROXR.W Dq,Dr
 14183:   //ROXR.W <ea>
 14184:   //  拡張右ローテートワード
 14185:   //       ................アイウエオカキクケコサシスセソタ XNZVC
 14186:   //     0 ................アイウエオカキクケコサシスセソタ Xア*0X Z=アイウエオカキクケコサシスセソタ==0
 14187:   //     1 ................Xアイウエオカキクケコサシスセソ タX*0タ Z=アイウエオカキクケコサシスセソX==0
 14188:   //     2 ................タXアイウエオカキクケコサシスセ ソタ*0ソ Z=アイウエオカキクケコサシスセタX==0
 14189:   //     :
 14190:   //    15 ................ウエオカキクケコサシスセソタXア イウ*0イ Z=アウエオカキクケコサシスセソタX==0
 14191:   //    16 ................イウエオカキクケコサシスセソタX アイ*0ア Z=イウエオカキクケコサシスセソタX==0
 14192:   //    17 ................アイウエオカキクケコサシスセソタ Xア*0X Z=アイウエオカキクケコサシスセソタ==0
 14193:   //  CCR
 14194:   //    X  countが0のとき変化しない。他は最後に押し出されたビット
 14195:   //    N  結果の最上位ビット
 14196:   //    Z  結果が0のときセット。他はクリア
 14197:   //    V  常にクリア
 14198:   //    C  countが0のときXのコピー。他は最後に押し出されたビット
 14199:   public static void irpRoxrToMem () throws M68kException {
 14200:     XEiJ.mpuCycleCount++;
 14201:     int ea = XEiJ.regOC & 63;
 14202:     int a = efaMltWord (ea);
 14203:     int x = mmuModifyWordZeroData (a, XEiJ.regSRS);
 14204:     int z = -(XEiJ.regCCR & XEiJ.REG_CCR_X) << 15 - 4 | x >>> 1;
 14205:     mmuWriteWordData (a, z, XEiJ.regSRS);
 14206:     XEiJ.regCCR = ((z < 0 ? XEiJ.REG_CCR_N : 0) |
 14207:                    (z == 0 ? XEiJ.REG_CCR_Z : 0) |
 14208:                    -(x & 1) & (XEiJ.REG_CCR_X | XEiJ.REG_CCR_C));  //XとCは最後に押し出されたビット
 14209:   }  //irpRoxrToMem
 14210: 
 14211:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 14212:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
 14213:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
 14214:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 14215:   //ROXL.W <ea>                                     |-|012346|-|*UUUU|***0*|  M+-WXZ  |1110_010_111_mmm_rrr
 14216:   //
 14217:   //ROXL.W #<data>,Dr
 14218:   //ROXL.W Dq,Dr
 14219:   //ROXL.W <ea>
 14220:   //  拡張左ローテートワード
 14221:   //       ................アイウエオカキクケコサシスセソタ XNZVC
 14222:   //     0 ................アイウエオカキクケコサシスセソタ Xア*0X Z=アイウエオカキクケコサシスセソタ==0
 14223:   //     1 ................イウエオカキクケコサシスセソタX アイ*0ア Z=イウエオカキクケコサシスセソタX==0
 14224:   //     2 ................ウエオカキクケコサシスセソタXア イウ*0イ Z=アウエオカキクケコサシスセソタX==0
 14225:   //     :
 14226:   //    15 ................タXアイウエオカキクケコサシスセ ソタ*0ソ Z=アイウエオカキクケコサシスセタX==0
 14227:   //    16 ................Xアイウエオカキクケコサシスセソ タX*0タ Z=アイウエオカキクケコサシスセソX==0
 14228:   //    17 ................アイウエオカキクケコサシスセソタ Xア*0X Z=アイウエオカキクケコサシスセソタ==0
 14229:   //  CCR
 14230:   //    X  countが0のとき変化しない。他は最後に押し出されたビット
 14231:   //    N  結果の最上位ビット
 14232:   //    Z  結果が0のときセット。他はクリア
 14233:   //    V  常にクリア
 14234:   //    C  countが0のときXのコピー。他は最後に押し出されたビット
 14235:   public static void irpRoxlToMem () throws M68kException {
 14236:     XEiJ.mpuCycleCount++;
 14237:     int ea = XEiJ.regOC & 63;
 14238:     int a = efaMltWord (ea);
 14239:     int x = mmuModifyWordSignData (a, XEiJ.regSRS);
 14240:     int z = (short) (x << 1 | XEiJ.regCCR >> 4 & 1);
 14241:     mmuWriteWordData (a, z, XEiJ.regSRS);
 14242:     XEiJ.regCCR = ((z < 0 ? XEiJ.REG_CCR_N : 0) |
 14243:                    (z == 0 ? XEiJ.REG_CCR_Z : 0) |
 14244:                    x >> 15 & (XEiJ.REG_CCR_X | XEiJ.REG_CCR_C));  //XとCは最後に押し出されたビット
 14245:   }  //irpRoxlToMem
 14246: 
 14247:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 14248:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
 14249:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
 14250:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 14251:   //ROR.W <ea>                                      |-|012346|-|-UUUU|-**0*|  M+-WXZ  |1110_011_011_mmm_rrr
 14252:   //
 14253:   //ROR.W #<data>,Dr
 14254:   //ROR.W Dq,Dr
 14255:   //ROR.W <ea>
 14256:   //  右ローテートワード
 14257:   //       ................アイウエオカキクケコサシスセソタ XNZVC
 14258:   //     0 ................アイウエオカキクケコサシスセソタ Xア*00 Z=アイウエオカキクケコサシスセソタ==0
 14259:   //     1 ................タアイウエオカキクケコサシスセソ Xタ*0タ Z=アイウエオカキクケコサシスセソタ==0
 14260:   //     :
 14261:   //    15 ................イウエオカキクケコサシスセソタア Xイ*0イ Z=アイウエオカキクケコサシスセソタ==0
 14262:   //    16 ................アイウエオカキクケコサシスセソタ Xア*0ア Z=アイウエオカキクケコサシスセソタ==0
 14263:   //  CCR
 14264:   //    X  常に変化しない
 14265:   //    N  結果の最上位ビット
 14266:   //    Z  結果が0のときセット。他はクリア
 14267:   //    V  常にクリア
 14268:   //    C  countが0のときクリア。他は結果の最上位ビット
 14269:   public static void irpRorToMem () throws M68kException {
 14270:     XEiJ.mpuCycleCount++;
 14271:     int ea = XEiJ.regOC & 63;
 14272:     int a = efaMltWord (ea);
 14273:     int x = mmuModifyWordZeroData (a, XEiJ.regSRS);
 14274:     int z = (short) (x << 15 | x >>> 1);
 14275:     mmuWriteWordData (a, z, XEiJ.regSRS);
 14276:     XEiJ.regCCR = (XEiJ.regCCR & XEiJ.REG_CCR_X |  //Xは変化しない
 14277:                    (z < 0 ? XEiJ.REG_CCR_N : 0) |
 14278:                    (z == 0 ? XEiJ.REG_CCR_Z : 0) |
 14279:                    z >>> 31);  //Cは結果の最上位ビット
 14280:   }  //irpRorToMem
 14281: 
 14282:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 14283:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
 14284:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
 14285:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 14286:   //ROL.W <ea>                                      |-|012346|-|-UUUU|-**0*|  M+-WXZ  |1110_011_111_mmm_rrr
 14287:   //
 14288:   //ROL.W #<data>,Dr
 14289:   //ROL.W Dq,Dr
 14290:   //ROL.W <ea>
 14291:   //  左ローテートワード
 14292:   //       ................アイウエオカキクケコサシスセソタ XNZVC
 14293:   //     0 ................アイウエオカキクケコサシスセソタ Xア*00 Z=アイウエオカキクケコサシスセソタ==0
 14294:   //     1 ................イウエオカキクケコサシスセソタア Xイ*0ア Z=アイウエオカキクケコサシスセソタ==0
 14295:   //     :
 14296:   //    15 ................タアイウエオカキクケコサシスセソ Xタ*0ソ Z=アイウエオカキクケコサシスセソタ==0
 14297:   //    16 ................アイウエオカキクケコサシスセソタ Xア*0タ Z=アイウエオカキクケコサシスセソタ==0
 14298:   //  CCR
 14299:   //    X  常に変化しない
 14300:   //    N  結果の最上位ビット
 14301:   //    Z  結果が0のときセット。他はクリア
 14302:   //    V  常にクリア
 14303:   //    C  countが0のときクリア。他は結果の最下位ビット
 14304:   public static void irpRolToMem () throws M68kException {
 14305:     XEiJ.mpuCycleCount++;
 14306:     int ea = XEiJ.regOC & 63;
 14307:     int a = efaMltWord (ea);
 14308:     int x = mmuModifyWordZeroData (a, XEiJ.regSRS);
 14309:     int z = (short) (x << 1 | x >>> 15);
 14310:     mmuWriteWordData (a, z, XEiJ.regSRS);
 14311:     XEiJ.regCCR = (XEiJ.regCCR & XEiJ.REG_CCR_X |  //Xは変化しない
 14312:                    (z < 0 ? XEiJ.REG_CCR_N : 0) |
 14313:                    (z == 0 ? XEiJ.REG_CCR_Z : 0) |
 14314:                    z & 1);  //Cは結果の最下位ビット
 14315:   }  //irpRolToMem
 14316: 
 14317:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 14318:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
 14319:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
 14320:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 14321:   //BFTST <ea>{#o:#w}                               |-|--2346|-|-UUUU|-**00|D M  WXZP |1110_100_011_mmm_rrr-00000ooooo0wwwww
 14322:   //BFTST <ea>{#o:Dw}                               |-|--2346|-|-UUUU|-**00|D M  WXZP |1110_100_011_mmm_rrr-00000ooooo100www
 14323:   //BFTST <ea>{Do:#w}                               |-|--2346|-|-UUUU|-**00|D M  WXZP |1110_100_011_mmm_rrr-0000100ooo0wwwww
 14324:   //BFTST <ea>{Do:Dw}                               |-|--2346|-|-UUUU|-**00|D M  WXZP |1110_100_011_mmm_rrr-0000100ooo100www
 14325:   public static void irpBftst () throws M68kException {
 14326:     int w = mmuReadWordZeroExword ((XEiJ.regPC += 2) - 2, XEiJ.regSRS);  //pcwz。拡張ワード
 14327:     if ((w & ~0b0000_111_111_111_111) != 0 ||
 14328:         (w & 0b0000_111_111_000_000) > 0b0000_100_111_000_000 ||
 14329:         (w & 0b0000_000_000_111_111) > 0b0000_000_000_100_111) {
 14330:       M68kException.m6eNumber = M68kException.M6E_ILLEGAL_INSTRUCTION;
 14331:       throw M68kException.m6eSignal;
 14332:     }
 14333:     int o = w << 31 - 11 >= 0 ? w >> 6 & 31 : XEiJ.regRn[w >> 6 & 7];  //o=offset
 14334:     w = -(w << 31 - 5 >= 0 ? w : XEiJ.regRn[w & 7]) & 31;  //w=32-width。1<=width<=32なので0<=32-width<=31
 14335:     XEiJ.mpuCycleCount += 6;
 14336:     int ea = XEiJ.regOC & 63;
 14337:     int z;
 14338:     if (ea < XEiJ.EA_AR) {  //BFTST Dr{~}
 14339:       z = XEiJ.regRn[ea];
 14340:       z = z << o | z >>> -o;  //下位からはみ出したフィールドは上位に戻る
 14341:     } else {  //BFTST <mem>{~}
 14342:       int a = efaCntLong (ea) + (o >> 3);  //フィールドの最上位ビットを含むバイトのアドレス
 14343:       o &= 7;
 14344:       z = 31 - w + o >> 3;  //フィールドが跨ぐバイト境界の数。0~4
 14345:       z = (z == 0 ? mmuReadByteSignData (a, XEiJ.regSRS) << 24 + o :  //不要なバイトにアクセスしない
 14346:            z == 1 ? mmuReadWordSignData (a, XEiJ.regSRS) << 16 + o :  //020以上なのでアドレスエラーは出ない
 14347:            z == 2 ? (mmuReadWordSignData (a, XEiJ.regSRS) << 8 | mmuReadByteZeroData (a + 2, XEiJ.regSRS)) << 8 + o :
 14348:            z == 3 ? mmuReadLongData (a, XEiJ.regSRS) << o :
 14349:            mmuReadLongData (a, XEiJ.regSRS) << o | mmuReadByteZeroData (a + 4, XEiJ.regSRS) >>> 8 - o);
 14350:     }
 14351:     z >>= w;  //符号拡張。下位のゴミを消す
 14352:     XEiJ.regCCR = z >> 28 & XEiJ.REG_CCR_N | (z == 0 ? XEiJ.regCCR & XEiJ.REG_CCR_X | XEiJ.REG_CCR_Z : XEiJ.regCCR & XEiJ.REG_CCR_X);  //ccr_tst
 14353:   }  //irpBftst
 14354: 
 14355:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 14356:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
 14357:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
 14358:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 14359:   //BFEXTU <ea>{#o:#w},Dn                           |-|--2346|-|-UUUU|-**00|D M  WXZP |1110_100_111_mmm_rrr-0nnn0ooooo0wwwww
 14360:   //BFEXTU <ea>{#o:Dw},Dn                           |-|--2346|-|-UUUU|-**00|D M  WXZP |1110_100_111_mmm_rrr-0nnn0ooooo100www
 14361:   //BFEXTU <ea>{Do:#w},Dn                           |-|--2346|-|-UUUU|-**00|D M  WXZP |1110_100_111_mmm_rrr-0nnn100ooo0wwwww
 14362:   //BFEXTU <ea>{Do:Dw},Dn                           |-|--2346|-|-UUUU|-**00|D M  WXZP |1110_100_111_mmm_rrr-0nnn100ooo100www
 14363:   public static void irpBfextu () throws M68kException {
 14364:     int w = mmuReadWordZeroExword ((XEiJ.regPC += 2) - 2, XEiJ.regSRS);  //pcwz。拡張ワード
 14365:     if ((w & ~0b0111_111_111_111_111) != 0 ||
 14366:         (w & 0b0000_111_111_000_000) > 0b0000_100_111_000_000 ||
 14367:         (w & 0b0000_000_000_111_111) > 0b0000_000_000_100_111) {
 14368:       M68kException.m6eNumber = M68kException.M6E_ILLEGAL_INSTRUCTION;
 14369:       throw M68kException.m6eSignal;
 14370:     }
 14371:     int n = w >> 12;
 14372:     int o = w << 31 - 11 >= 0 ? w >> 6 & 31 : XEiJ.regRn[w >> 6 & 7];  //o=offset
 14373:     w = -(w << 31 - 5 >= 0 ? w : XEiJ.regRn[w & 7]) & 31;  //w=32-width。1<=width<=32なので0<=32-width<=31
 14374:     XEiJ.mpuCycleCount += 6;
 14375:     int ea = XEiJ.regOC & 63;
 14376:     int z;
 14377:     if (ea < XEiJ.EA_AR) {  //BFEXTU Dr{~}
 14378:       z = XEiJ.regRn[ea];
 14379:       z = z << o | z >>> -o;  //下位からはみ出したフィールドは上位に戻る
 14380:     } else {  //BFEXTU <mem>{~}
 14381:       int a = efaCntLong (ea) + (o >> 3);
 14382:       o &= 7;
 14383:       z = 31 - w + o >> 3;
 14384:       z = (z == 0 ? mmuReadByteSignData (a, XEiJ.regSRS) << 24 + o :  //不要なバイトにアクセスしない
 14385:            z == 1 ? mmuReadWordSignData (a, XEiJ.regSRS) << 16 + o :  //020以上なのでアドレスエラーは出ない
 14386:            z == 2 ? (mmuReadWordSignData (a, XEiJ.regSRS) << 8 | mmuReadByteZeroData (a + 2, XEiJ.regSRS)) << 8 + o :
 14387:            z == 3 ? mmuReadLongData (a, XEiJ.regSRS) << o :
 14388:            mmuReadLongData (a, XEiJ.regSRS) << o | mmuReadByteZeroData (a + 4, XEiJ.regSRS) >>> 8 - o);
 14389:     }
 14390:     XEiJ.regRn[n] = z >>> w;  //ゼロ拡張
 14391:     z >>= w;  //符号拡張。下位のゴミを消す
 14392:     XEiJ.regCCR = z >> 28 & XEiJ.REG_CCR_N | (z == 0 ? XEiJ.regCCR & XEiJ.REG_CCR_X | XEiJ.REG_CCR_Z : XEiJ.regCCR & XEiJ.REG_CCR_X);  //ccr_tst
 14393:   }  //irpBfextu
 14394: 
 14395:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 14396:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
 14397:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
 14398:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 14399:   //BFCHG <ea>{#o:#w}                               |-|--2346|-|-UUUU|-**00|D M  WXZ  |1110_101_011_mmm_rrr-00000ooooo0wwwww
 14400:   //BFCHG <ea>{#o:Dw}                               |-|--2346|-|-UUUU|-**00|D M  WXZ  |1110_101_011_mmm_rrr-00000ooooo100www
 14401:   //BFCHG <ea>{Do:#w}                               |-|--2346|-|-UUUU|-**00|D M  WXZ  |1110_101_011_mmm_rrr-0000100ooo0wwwww
 14402:   //BFCHG <ea>{Do:Dw}                               |-|--2346|-|-UUUU|-**00|D M  WXZ  |1110_101_011_mmm_rrr-0000100ooo100www
 14403:   public static void irpBfchg () throws M68kException {
 14404:     int w = mmuReadWordZeroExword ((XEiJ.regPC += 2) - 2, XEiJ.regSRS);  //pcwz。拡張ワード
 14405:     if ((w & ~0b0000_111_111_111_111) != 0 ||
 14406:         (w & 0b0000_111_111_000_000) > 0b0000_100_111_000_000 ||
 14407:         (w & 0b0000_000_000_111_111) > 0b0000_000_000_100_111) {
 14408:       M68kException.m6eNumber = M68kException.M6E_ILLEGAL_INSTRUCTION;
 14409:       throw M68kException.m6eSignal;
 14410:     }
 14411:     int o = w << 31 - 11 >= 0 ? w >> 6 & 31 : XEiJ.regRn[w >> 6 & 7];  //o=offset
 14412:     w = -(w << 31 - 5 >= 0 ? w : XEiJ.regRn[w & 7]) & 31;  //w=32-width。1<=width<=32なので0<=32-width<=31
 14413:     XEiJ.mpuCycleCount += 8;
 14414:     int ea = XEiJ.regOC & 63;
 14415:     int z;
 14416:     if (ea < XEiJ.EA_AR) {  //BFCHG Dr{~}
 14417:       z = XEiJ.regRn[ea];
 14418:       z = z << o | z >>> -o;  //下位からはみ出したフィールドは上位に戻る
 14419:       int t = z ^ -1 << w;  //フィールドの幅だけ反転する
 14420:       XEiJ.regRn[ea] = t << -o | t >>> o;
 14421:     } else {  //BFCHG <mem>{~}
 14422:       int a = efaCltLong (ea) + (o >> 3);  //フィールドの最上位ビットを含むバイトのアドレス
 14423:       o &= 7;
 14424:       z = 31 - w + o >> 3;  //フィールドが跨ぐバイト境界の数。0~4
 14425:       if (z == 0) {
 14426:         //  <ea>{2,5}  o=2,w=32-5=27                        <ea>  --abcde-
 14427:         int t = mmuModifyByteSignData (a, XEiJ.regSRS) << 24;                     //          t  --abcde- 00000000 00000000 00000000  不要なバイトにアクセスしない
 14428:         z = t << o;                                //          z  abcde-00 00000000 00000000 00000000
 14429:         //                                         //      -1<<w  11111000 00000000 00000000 00000000
 14430:         //                                         //  -1<<w>>>o  00111110 00000000 00000000 00000000
 14431:         //                                         //t^-1<<w>>>o  --ABCDE- 00000000 00000000 00000000
 14432:         mmuWriteByteData (a, (t ^ -1 << w >>> o) >>> 24, XEiJ.regSRS);        //       <ea>  --ABCDE-
 14433:       } else if (z == 1) {
 14434:         //  <ea>{7,5}  o=7,w=32-5=27                        <ea>  -------a bcde----
 14435:         int t = mmuModifyWordSignData (a, XEiJ.regSRS) << 16;                     //          t  -------a bcde---- 00000000 00000000  020以上なのでアドレスエラーは出ない
 14436:         z = t << o;                                //          z  abcde--- -0000000 00000000 00000000
 14437:         //                                         //      -1<<w  11111000 00000000 00000000 00000000
 14438:         //                                         //  -1<<w>>>o  00000001 11110000 00000000 00000000
 14439:         //                                         //t^-1<<w>>>o  -------A BCDE---- 00000000 00000000
 14440:         mmuWriteWordData (a, (t ^ -1 << w >>> o) >>> 16, XEiJ.regSRS);       //       <ea>  -------A BCDE----
 14441:       } else if (z == 2) {
 14442:         //  <ea>{7,12}  o=7,w=32-12=20                      <ea>  -------a bcdefghi jkl-----
 14443:         int t = mmuModifyWordSignData (a, XEiJ.regSRS) << 16 | mmuModifyByteZeroData (a + 2, XEiJ.regSRS) << 8;  //          t  -------a bcdefghi jkl----- 00000000
 14444:         z = t << o;                                //          z  abcdefgh ijkl---- -0000000 00000000
 14445:         //                                         //      -1<<w  11111111 11110000 00000000 00000000
 14446:         //                                         //  -1<<w>>>o  00000001 11111111 11100000 00000000
 14447:         t ^= -1 << w >>> o;                        //          t  -------A BCDEFGHI JKL----- 00000000
 14448:         mmuWriteWordData (a, t >>> 16, XEiJ.regSRS);                         //       <ea>  -------A BCDEFGHI jkl-----
 14449:         mmuWriteByteData (a + 2, t >>> 8, XEiJ.regSRS);                       //       <ea>  -------A BCDEFGHI JKL-----
 14450:       } else if (z == 3) {
 14451:         //  <ea>{7,19}  o=7,w=32-19=13                      <ea>  -------a bcdefghi jklmnopq rs------
 14452:         int t = mmuModifyLongData (a, XEiJ.regSRS);                           //          t  -------a bcdefghi jklmnopq rs------
 14453:         z = t << o;                                //          z  abcdefgh ijklmnop qrs----- -0000000
 14454:         //                                         //      -1<<w  11111111 11111111 11100000 00000000
 14455:         //                                         //  -1<<w>>>o  00000001 11111111 11111111 11000000
 14456:         mmuWriteLongData (a, t ^ -1 << w >>> o, XEiJ.regSRS);                //       <ea>  -------A BCDEFGHI JKLMNOPQ RS------
 14457:       } else {
 14458:         //  <ea>{7,26}  o=7,w=32-26=6                       <ea>  -------a bcdefghi jklmnopq rstuvwxy z-------
 14459:         int t = mmuModifyLongData (a, XEiJ.regSRS);                           //          t  -------a bcdefghi jklmnopq rstuvwxy
 14460:         z = t << o;                                //          z  abcdefgh ijklmnop qrstuvwx y0000000
 14461:         //                                                -1>>>o  00000001 11111111 11111111 11111111
 14462:         mmuWriteLongData (a, t ^ -1 >>> o, XEiJ.regSRS);                     //       <ea>  -------A BCDEFGHI JKLMNOPQ RSTUVWXY
 14463:         t = mmuModifyByteZeroData (a + 4, XEiJ.regSRS);                           //          t  00000000 00000000 00000000 z-------
 14464:         //                                         //    t>>>8-o  00000000 00000000 00000000 0z------
 14465:         z |= t >>> 8 - o;                          //          z  abcdefgh ijklmnop qrstuvwx yz------
 14466:         //                                         //  -1<<8-o+w  11111111 11111111 11111111 10000000
 14467:         mmuWriteByteData (a + 4, t ^ -1 << 8 - o + w, XEiJ.regSRS);           //       <ea>  -------A BCDEFGHI JKLMNOPQ RSTUVWXY Z-------
 14468:       }
 14469:     }
 14470:     z >>= w;  //符号拡張。下位のゴミを消す
 14471:     XEiJ.regCCR = z >> 28 & XEiJ.REG_CCR_N | (z == 0 ? XEiJ.regCCR & XEiJ.REG_CCR_X | XEiJ.REG_CCR_Z : XEiJ.regCCR & XEiJ.REG_CCR_X);  //ccr_tst
 14472:   }  //irpBfchg
 14473: 
 14474:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 14475:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
 14476:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
 14477:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 14478:   //BFEXTS <ea>{#o:#w},Dn                           |-|--2346|-|-UUUU|-**00|D M  WXZP |1110_101_111_mmm_rrr-0nnn0ooooo0wwwww
 14479:   //BFEXTS <ea>{#o:Dw},Dn                           |-|--2346|-|-UUUU|-**00|D M  WXZP |1110_101_111_mmm_rrr-0nnn0ooooo100www
 14480:   //BFEXTS <ea>{Do:#w},Dn                           |-|--2346|-|-UUUU|-**00|D M  WXZP |1110_101_111_mmm_rrr-0nnn100ooo0wwwww
 14481:   //BFEXTS <ea>{Do:Dw},Dn                           |-|--2346|-|-UUUU|-**00|D M  WXZP |1110_101_111_mmm_rrr-0nnn100ooo100www
 14482:   public static void irpBfexts () throws M68kException {
 14483:     int w = mmuReadWordZeroExword ((XEiJ.regPC += 2) - 2, XEiJ.regSRS);  //pcwz。拡張ワード
 14484:     if ((w & ~0b0111_111_111_111_111) != 0 ||
 14485:         (w & 0b0000_111_111_000_000) > 0b0000_100_111_000_000 ||
 14486:         (w & 0b0000_000_000_111_111) > 0b0000_000_000_100_111) {
 14487:       M68kException.m6eNumber = M68kException.M6E_ILLEGAL_INSTRUCTION;
 14488:       throw M68kException.m6eSignal;
 14489:     }
 14490:     int n = w >> 12;
 14491:     int o = w << 31 - 11 >= 0 ? w >> 6 & 31 : XEiJ.regRn[w >> 6 & 7];  //o=offset
 14492:     w = -(w << 31 - 5 >= 0 ? w : XEiJ.regRn[w & 7]) & 31;  //w=32-width。1<=width<=32なので0<=32-width<=31
 14493:     XEiJ.mpuCycleCount += 6;
 14494:     int ea = XEiJ.regOC & 63;
 14495:     int z;
 14496:     if (ea < XEiJ.EA_AR) {  //BFEXTS Dr{~}
 14497:       z = XEiJ.regRn[ea];
 14498:       z = z << o | z >>> -o;  //下位からはみ出したフィールドは上位に戻る
 14499:     } else {  //BFEXTS <mem>{~}
 14500:       int a = efaCntLong (ea) + (o >> 3);  //フィールドの最上位ビットを含むバイトのアドレス
 14501:       o &= 7;
 14502:       z = 31 - w + o >> 3;  //フィールドが跨ぐバイト境界の数。0~4
 14503:       z = (z == 0 ? mmuReadByteSignData (a, XEiJ.regSRS) << 24 + o :  //不要なバイトにアクセスしない
 14504:            z == 1 ? mmuReadWordSignData (a, XEiJ.regSRS) << 16 + o :  //020以上なのでアドレスエラーは出ない
 14505:            z == 2 ? (mmuReadWordSignData (a, XEiJ.regSRS) << 8 | mmuReadByteZeroData (a + 2, XEiJ.regSRS)) << 8 + o :
 14506:            z == 3 ? mmuReadLongData (a, XEiJ.regSRS) << o :
 14507:            mmuReadLongData (a, XEiJ.regSRS) << o | mmuReadByteZeroData (a + 4, XEiJ.regSRS) >>> 8 - o);
 14508:     }
 14509:     XEiJ.regRn[n] = z >>= w;  //符号拡張。下位のゴミを消す
 14510:     XEiJ.regCCR = z >> 28 & XEiJ.REG_CCR_N | (z == 0 ? XEiJ.regCCR & XEiJ.REG_CCR_X | XEiJ.REG_CCR_Z : XEiJ.regCCR & XEiJ.REG_CCR_X);  //ccr_tst
 14511:   }  //irpBfexts
 14512: 
 14513:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 14514:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
 14515:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
 14516:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 14517:   //BFCLR <ea>{#o:#w}                               |-|--2346|-|-UUUU|-**00|D M  WXZ  |1110_110_011_mmm_rrr-00000ooooo0wwwww
 14518:   //BFCLR <ea>{#o:Dw}                               |-|--2346|-|-UUUU|-**00|D M  WXZ  |1110_110_011_mmm_rrr-00000ooooo100www
 14519:   //BFCLR <ea>{Do:#w}                               |-|--2346|-|-UUUU|-**00|D M  WXZ  |1110_110_011_mmm_rrr-0000100ooo0wwwww
 14520:   //BFCLR <ea>{Do:Dw}                               |-|--2346|-|-UUUU|-**00|D M  WXZ  |1110_110_011_mmm_rrr-0000100ooo100www
 14521:   public static void irpBfclr () throws M68kException {
 14522:     int w = mmuReadWordZeroExword ((XEiJ.regPC += 2) - 2, XEiJ.regSRS);  //pcwz。拡張ワード
 14523:     if ((w & ~0b0000_111_111_111_111) != 0 ||
 14524:         (w & 0b0000_111_111_000_000) > 0b0000_100_111_000_000 ||
 14525:         (w & 0b0000_000_000_111_111) > 0b0000_000_000_100_111) {
 14526:       M68kException.m6eNumber = M68kException.M6E_ILLEGAL_INSTRUCTION;
 14527:       throw M68kException.m6eSignal;
 14528:     }
 14529:     int o = w << 31 - 11 >= 0 ? w >> 6 & 31 : XEiJ.regRn[w >> 6 & 7];  //o=offset
 14530:     w = -(w << 31 - 5 >= 0 ? w : XEiJ.regRn[w & 7]) & 31;  //w=32-width。1<=width<=32なので0<=32-width<=31
 14531:     XEiJ.mpuCycleCount += 8;
 14532:     int ea = XEiJ.regOC & 63;
 14533:     int z;
 14534:     if (ea < XEiJ.EA_AR) {  //BFCLR Dr{~}
 14535:       z = XEiJ.regRn[ea];
 14536:       z = z << o | z >>> -o;  //下位からはみ出したフィールドは上位に戻る
 14537:       int t = z & ~(-1 << w);  //フィールドの幅だけ0を並べる
 14538:       XEiJ.regRn[ea] = t << -o | t >>> o;
 14539:     } else {  //BFCLR <mem>{~}
 14540:       int a = efaCltLong (ea) + (o >> 3);  //フィールドの最上位ビットを含むバイトのアドレス
 14541:       o &= 7;
 14542:       z = 31 - w + o >> 3;  //フィールドが跨ぐバイト境界の数。0~4
 14543:       if (z == 0) {
 14544:         //  <ea>{2,5}  o=2,w=32-5=27                        <ea>  --abcde-
 14545:         int t = mmuModifyByteSignData (a, XEiJ.regSRS) << 24;                     //          t  --abcde- 00000000 00000000 00000000  不要なバイトにアクセスしない
 14546:         z = t << o;                                //          z  abcde-00 00000000 00000000 00000000
 14547:         //                                         //      -1<<w  11111000 00000000 00000000 00000000
 14548:         //                                         //  -1<<w>>>o  00111110 00000000 00000000 00000000
 14549:         //                                        //~(-1<<w>>>o)  11000001 11111111 11111111 11111111
 14550:         //                                      //t&~(-1<<w>>>o)  --00000- 00000000 00000000 00000000
 14551:         mmuWriteByteData (a, (t & ~(-1 << w >>> o)) >>> 24, XEiJ.regSRS);     //       <ea>  --00000-
 14552:       } else if (z == 1) {
 14553:         //  <ea>{7,5}  o=7,w=32-5=27                        <ea>  -------a bcde----
 14554:         int t = mmuModifyWordSignData (a, XEiJ.regSRS) << 16;                     //          t  -------a bcde---- 00000000 00000000  020以上なのでアドレスエラーは出ない
 14555:         z = t << o;                                //          z  abcde--- -0000000 00000000 00000000
 14556:         //                                         //      -1<<w  11111000 00000000 00000000 00000000
 14557:         //                                         //  -1<<w>>>o  00000001 11110000 00000000 00000000
 14558:         //                                        //~(-1<<w>>>o)  11111110 00001111 11111111 11111111
 14559:         //                                      //t&~(-1<<w>>>o)  -------0 0000---- 00000000 00000000
 14560:         mmuWriteWordData (a, (t & ~(-1 << w >>> o)) >>> 16, XEiJ.regSRS);    //       <ea>  -------0 0000----
 14561:       } else if (z == 2) {
 14562:         //  <ea>{7,12}  o=7,w=32-12=20                      <ea>  -------a bcdefghi jkl-----
 14563:         int t = mmuModifyWordSignData (a, XEiJ.regSRS) << 16 | mmuModifyByteZeroData (a + 2, XEiJ.regSRS) << 8;  //          t  -------a bcdefghi jkl----- 00000000
 14564:         z = t << o;                                //          z  abcdefgh ijkl---- -0000000 00000000
 14565:         //                                         //      -1<<w  11111111 11110000 00000000 00000000
 14566:         //                                         //  -1<<w>>>o  00000001 11111111 11100000 00000000
 14567:         //                                        //~(-1<<w>>>o)  11111110 00000000 00011111 11111111
 14568:         t &= ~(-1 << w >>> o);                     //          t  -------0 00000000 000----- 00000000
 14569:         mmuWriteWordData (a, t >>> 16, XEiJ.regSRS);                         //       <ea>  -------0 00000000 jkl-----
 14570:         mmuWriteByteData (a + 2, t >>> 8, XEiJ.regSRS);                       //       <ea>  -------0 00000000 000-----
 14571:       } else if (z == 3) {
 14572:         //  <ea>{7,19}  o=7,w=32-19=13                      <ea>  -------a bcdefghi jklmnopq rs------
 14573:         int t = mmuModifyLongData (a, XEiJ.regSRS);                           //          t  -------a bcdefghi jklmnopq rs------
 14574:         z = t << o;                                //          z  abcdefgh ijklmnop qrs----- -0000000
 14575:         //                                         //      -1<<w  11111111 11111111 11100000 00000000
 14576:         //                                         //  -1<<w>>>o  00000001 11111111 11111111 11000000
 14577:         //                                        //~(-1<<w>>>o)  11111110 00000000 00000000 00111111
 14578:         mmuWriteLongData (a, t & ~(-1 << w >>> o), XEiJ.regSRS);             //       <ea>  -------0 00000000 00000000 00------
 14579:       } else {
 14580:         //  <ea>{7,26}  o=7,w=32-26=6                       <ea>  -------a bcdefghi jklmnopq rstuvwxy z-------
 14581:         int t = mmuModifyLongData (a, XEiJ.regSRS);                           //          t  -------a bcdefghi jklmnopq rstuvwxy
 14582:         z = t << o;                                //          z  abcdefgh ijklmnop qrstuvwx y0000000
 14583:         //                                                -1>>>o  00000001 11111111 11111111 11111111
 14584:         //                                             ~(-1>>>o)  11111110 00000000 00000000 00000000
 14585:         mmuWriteLongData (a, t & ~(-1 >>> o), XEiJ.regSRS);                  //       <ea>  -------0 00000000 00000000 00000000
 14586:         t = mmuModifyByteZeroData (a + 4, XEiJ.regSRS);                           //          t  00000000 00000000 00000000 z-------
 14587:         //                                         //    t>>>8-o  00000000 00000000 00000000 0z------
 14588:         z |= t >>> 8 - o;                          //          z  abcdefgh ijklmnop qrstuvwx yz------
 14589:         //                                         //  -1<<8-o+w  11111111 11111111 11111111 10000000
 14590:         //                                        //~(-1<<8-o+w)  00000000 00000000 00000000 01111111
 14591:         mmuWriteByteData (a + 4, t & ~(-1 << 8 - o + w), XEiJ.regSRS);        //       <ea>  -------0 00000000 00000000 00000000 0-------
 14592:       }
 14593:     }
 14594:     z >>= w;  //符号拡張。下位のゴミを消す
 14595:     XEiJ.regCCR = z >> 28 & XEiJ.REG_CCR_N | (z == 0 ? XEiJ.regCCR & XEiJ.REG_CCR_X | XEiJ.REG_CCR_Z : XEiJ.regCCR & XEiJ.REG_CCR_X);  //ccr_tst
 14596:   }  //irpBfclr
 14597: 
 14598:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 14599:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
 14600:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
 14601:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 14602:   //BFFFO <ea>{#o:#w},Dn                            |-|--2346|-|-UUUU|-**00|D M  WXZP |1110_110_111_mmm_rrr-0nnn0ooooo0wwwww
 14603:   //BFFFO <ea>{#o:Dw},Dn                            |-|--2346|-|-UUUU|-**00|D M  WXZP |1110_110_111_mmm_rrr-0nnn0ooooo100www
 14604:   //BFFFO <ea>{Do:#w},Dn                            |-|--2346|-|-UUUU|-**00|D M  WXZP |1110_110_111_mmm_rrr-0nnn100ooo0wwwww
 14605:   //BFFFO <ea>{Do:Dw},Dn                            |-|--2346|-|-UUUU|-**00|D M  WXZP |1110_110_111_mmm_rrr-0nnn100ooo100www
 14606:   public static void irpBfffo () throws M68kException {
 14607:     int w = mmuReadWordZeroExword ((XEiJ.regPC += 2) - 2, XEiJ.regSRS);  //pcwz。拡張ワード
 14608:     if ((w & ~0b0111_111_111_111_111) != 0 ||
 14609:         (w & 0b0000_111_111_000_000) > 0b0000_100_111_000_000 ||
 14610:         (w & 0b0000_000_000_111_111) > 0b0000_000_000_100_111) {
 14611:       M68kException.m6eNumber = M68kException.M6E_ILLEGAL_INSTRUCTION;
 14612:       throw M68kException.m6eSignal;
 14613:     }
 14614:     int n = w >> 12;
 14615:     int o = w << 31 - 11 >= 0 ? w >> 6 & 31 : XEiJ.regRn[w >> 6 & 7];  //o=offset
 14616:     w = -(w << 31 - 5 >= 0 ? w : XEiJ.regRn[w & 7]) & 31;  //w=32-width。1<=width<=32なので0<=32-width<=31
 14617:     XEiJ.mpuCycleCount += 9;
 14618:     int ea = XEiJ.regOC & 63;
 14619:     int z;
 14620:     if (ea < XEiJ.EA_AR) {  //BFFFO Dr{~}
 14621:       z = XEiJ.regRn[ea];
 14622:       z = z << o | z >>> -o;  //下位からはみ出したフィールドは上位に戻る
 14623:     } else {  //BFFFO <mem>{~}
 14624:       int a = efaCntLong (ea) + (o >> 3);  //フィールドの最上位ビットを含むバイトのアドレス
 14625:       int o7 = o & 7;
 14626:       z = 31 - w + o7 >> 3;  //フィールドが跨ぐバイト境界の数。0~4
 14627:       z = (z == 0 ? mmuReadByteSignData (a, XEiJ.regSRS) << 24 + o7 :  //不要なバイトにアクセスしない
 14628:            z == 1 ? mmuReadWordSignData (a, XEiJ.regSRS) << 16 + o7 :  //020以上なのでアドレスエラーは出ない
 14629:            z == 2 ? (mmuReadWordSignData (a, XEiJ.regSRS) << 8 | mmuReadByteZeroData (a + 2, XEiJ.regSRS)) << 8 + o7 :
 14630:            z == 3 ? mmuReadLongData (a, XEiJ.regSRS) << o7 :
 14631:            mmuReadLongData (a, XEiJ.regSRS) << o7 | mmuReadByteZeroData (a + 4, XEiJ.regSRS) >>> 8 - o7);
 14632:     }
 14633:     if (true) {
 14634:       XEiJ.regRn[n] = Integer.numberOfLeadingZeros (z >>> w) - w + o;  //ゼロ拡張してから1のビットを探す。見つからないときはoffset+widthになる
 14635:     } else {
 14636:       int t = z >>> w;
 14637:       if (t == 0) {
 14638:         XEiJ.regRn[n] = 32 - w + o;
 14639:       } else {
 14640:         int k = -(t >>> 16) >> 16 & 16;
 14641:         k += -(t >>> k + 8) >> 8 & 8;
 14642:         k += -(t >>> k + 4) >> 4 & 4;
 14643:         //     bit3  1  1  1  1  1  1  1  1  0  0  0  0  0  0  0  0
 14644:         //     bit2  1  1  1  1  0  0  0  0  1  1  1  1  0  0  0  0
 14645:         //     bit1  1  1  0  0  1  1  0  0  1  1  0  0  1  1  0  0
 14646:         //     bit0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0
 14647:         XEiJ.regRn[n] = ((0b11_11_11_11_11_11_11_11_10_10_10_10_01_01_00_00 >>> (t >>> k << 1)) & 3) + k - w + o;  //intのシフトカウントは下位5bitだけが使用される
 14648:       }
 14649:     }
 14650:     z >>= w;  //符号拡張。下位のゴミを消す
 14651:     XEiJ.regCCR = z >> 28 & XEiJ.REG_CCR_N | (z == 0 ? XEiJ.regCCR & XEiJ.REG_CCR_X | XEiJ.REG_CCR_Z : XEiJ.regCCR & XEiJ.REG_CCR_X);  //ccr_tst
 14652:   }  //irpBfffo
 14653: 
 14654:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 14655:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
 14656:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
 14657:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 14658:   //BFSET <ea>{#o:#w}                               |-|--2346|-|-UUUU|-**00|D M  WXZ  |1110_111_011_mmm_rrr-00000ooooo0wwwww
 14659:   //BFSET <ea>{#o:Dw}                               |-|--2346|-|-UUUU|-**00|D M  WXZ  |1110_111_011_mmm_rrr-00000ooooo100www
 14660:   //BFSET <ea>{Do:#w}                               |-|--2346|-|-UUUU|-**00|D M  WXZ  |1110_111_011_mmm_rrr-0000100ooo0wwwww
 14661:   //BFSET <ea>{Do:Dw}                               |-|--2346|-|-UUUU|-**00|D M  WXZ  |1110_111_011_mmm_rrr-0000100ooo100www
 14662:   public static void irpBfset () throws M68kException {
 14663:     int w = mmuReadWordZeroExword ((XEiJ.regPC += 2) - 2, XEiJ.regSRS);  //pcwz。拡張ワード
 14664:     if ((w & ~0b0000_111_111_111_111) != 0 ||
 14665:         (w & 0b0000_111_111_000_000) > 0b0000_100_111_000_000 ||
 14666:         (w & 0b0000_000_000_111_111) > 0b0000_000_000_100_111) {
 14667:       M68kException.m6eNumber = M68kException.M6E_ILLEGAL_INSTRUCTION;
 14668:       throw M68kException.m6eSignal;
 14669:     }
 14670:     int o = w << 31 - 11 >= 0 ? w >> 6 & 31 : XEiJ.regRn[w >> 6 & 7];  //o=offset
 14671:     w = -(w << 31 - 5 >= 0 ? w : XEiJ.regRn[w & 7]) & 31;  //w=32-width。1<=width<=32なので0<=32-width<=31
 14672:     XEiJ.mpuCycleCount += 8;
 14673:     int ea = XEiJ.regOC & 63;
 14674:     int z;
 14675:     if (ea < XEiJ.EA_AR) {  //BFSET Dr{~}
 14676:       z = XEiJ.regRn[ea];
 14677:       z = z << o | z >>> -o;  //下位からはみ出したフィールドは上位に戻る
 14678:       int t = z | -1 << w;  //フィールドの幅だけ1を並べる
 14679:       XEiJ.regRn[ea] = t << -o | t >>> o;
 14680:     } else {  //BFSET <mem>{~}
 14681:       int a = efaCltLong (ea) + (o >> 3);  //フィールドの最上位ビットを含むバイトのアドレス
 14682:       o &= 7;
 14683:       z = 31 - w + o >> 3;  //フィールドが跨ぐバイト境界の数。0~4
 14684:       if (z == 0) {
 14685:         //  <ea>{2,5}  o=2,w=32-5=27                        <ea>  --abcde-
 14686:         int t = mmuModifyByteSignData (a, XEiJ.regSRS) << 24;                     //          t  --abcde- 00000000 00000000 00000000  不要なバイトにアクセスしない
 14687:         z = t << o;                                //          z  abcde-00 00000000 00000000 00000000
 14688:         //                                         //      -1<<w  11111000 00000000 00000000 00000000
 14689:         //                                         //  -1<<w>>>o  00111110 00000000 00000000 00000000
 14690:         //                                         //t|-1<<w>>>o  --11111- 00000000 00000000 00000000
 14691:         mmuWriteByteData (a, (t | -1 << w >>> o) >>> 24, XEiJ.regSRS);        //       <ea>  --11111-
 14692:       } else if (z == 1) {
 14693:         //  <ea>{7,5}  o=7,w=32-5=27                        <ea>  -------a bcde----
 14694:         int t = mmuModifyWordSignData (a, XEiJ.regSRS) << 16;                     //          t  -------a bcde---- 00000000 00000000  020以上なのでアドレスエラーは出ない
 14695:         z = t << o;                                //          z  abcde--- -0000000 00000000 00000000
 14696:         //                                         //      -1<<w  11111000 00000000 00000000 00000000
 14697:         //                                         //  -1<<w>>>o  00000001 11110000 00000000 00000000
 14698:         //                                         //t|-1<<w>>>o  -------1 1111---- 00000000 00000000
 14699:         mmuWriteWordData (a, (t | -1 << w >>> o) >>> 16, XEiJ.regSRS);       //       <ea>  -------1 1111----
 14700:       } else if (z == 2) {
 14701:         //  <ea>{7,12}  o=7,w=32-12=20                      <ea>  -------a bcdefghi jkl-----
 14702:         int t = mmuModifyWordSignData (a, XEiJ.regSRS) << 16 | mmuModifyByteZeroData (a + 2, XEiJ.regSRS) << 8;  //          t  -------a bcdefghi jkl----- 00000000
 14703:         z = t << o;                                //          z  abcdefgh ijkl---- -0000000 00000000
 14704:         //                                         //      -1<<w  11111111 11110000 00000000 00000000
 14705:         //                                         //  -1<<w>>>o  00000001 11111111 11100000 00000000
 14706:         t |= -1 << w >>> o;                        //          t  -------1 11111111 111----- 00000000
 14707:         mmuWriteWordData (a, t >>> 16, XEiJ.regSRS);                         //       <ea>  -------1 11111111 jkl-----
 14708:         mmuWriteByteData (a + 2, t >>> 8, XEiJ.regSRS);                       //       <ea>  -------1 11111111 111-----
 14709:       } else if (z == 3) {
 14710:         //  <ea>{7,19}  o=7,w=32-19=13                      <ea>  -------a bcdefghi jklmnopq rs------
 14711:         int t = mmuModifyLongData (a, XEiJ.regSRS);                           //          t  -------a bcdefghi jklmnopq rs------
 14712:         z = t << o;                                //          z  abcdefgh ijklmnop qrs----- -0000000
 14713:         //                                         //      -1<<w  11111111 11111111 11100000 00000000
 14714:         //                                         //  -1<<w>>>o  00000001 11111111 11111111 11000000
 14715:         mmuWriteLongData (a, t | -1 << w >>> o, XEiJ.regSRS);                //       <ea>  -------1 11111111 11111111 11------
 14716:       } else {
 14717:         //  <ea>{7,26}  o=7,w=32-26=6                       <ea>  -------a bcdefghi jklmnopq rstuvwxy z-------
 14718:         int t = mmuModifyLongData (a, XEiJ.regSRS);                           //          t  -------a bcdefghi jklmnopq rstuvwxy
 14719:         z = t << o;                                //          z  abcdefgh ijklmnop qrstuvwx y0000000
 14720:         //                                                -1>>>o  00000001 11111111 11111111 11111111
 14721:         mmuWriteLongData (a, t | -1 >>> o, XEiJ.regSRS);                     //       <ea>  -------1 11111111 11111111 11111111
 14722:         t = mmuModifyByteZeroData (a + 4, XEiJ.regSRS);                           //          t  00000000 00000000 00000000 z-------
 14723:         //                                         //    t>>>8-o  00000000 00000000 00000000 0z------
 14724:         z |= t >>> 8 - o;                          //          z  abcdefgh ijklmnop qrstuvwx yz------
 14725:         //                                         //  -1<<8-o+w  11111111 11111111 11111111 10000000
 14726:         mmuWriteByteData (a + 4, t | -1 << 8 - o + w, XEiJ.regSRS);           //       <ea>  -------1 11111111 11111111 11111111 1-------
 14727:       }
 14728:     }
 14729:     z >>= w;  //符号拡張。下位のゴミを消す
 14730:     XEiJ.regCCR = z >> 28 & XEiJ.REG_CCR_N | (z == 0 ? XEiJ.regCCR & XEiJ.REG_CCR_X | XEiJ.REG_CCR_Z : XEiJ.regCCR & XEiJ.REG_CCR_X);  //ccr_tst
 14731:   }  //irpBfset
 14732: 
 14733:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 14734:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
 14735:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
 14736:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 14737:   //BFINS Dn,<ea>{#o:#w}                            |-|--2346|-|-UUUU|-**00|D M  WXZ  |1110_111_111_mmm_rrr-0nnn0ooooo0wwwww
 14738:   //BFINS Dn,<ea>{#o:Dw}                            |-|--2346|-|-UUUU|-**00|D M  WXZ  |1110_111_111_mmm_rrr-0nnn0ooooo100www
 14739:   //BFINS Dn,<ea>{Do:#w}                            |-|--2346|-|-UUUU|-**00|D M  WXZ  |1110_111_111_mmm_rrr-0nnn100ooo0wwwww
 14740:   //BFINS Dn,<ea>{Do:Dw}                            |-|--2346|-|-UUUU|-**00|D M  WXZ  |1110_111_111_mmm_rrr-0nnn100ooo100www
 14741:   public static void irpBfins () throws M68kException {
 14742:     int w = mmuReadWordZeroExword ((XEiJ.regPC += 2) - 2, XEiJ.regSRS);  //pcwz。拡張ワード
 14743:     if ((w & ~0b0111_111_111_111_111) != 0 ||
 14744:         (w & 0b0000_111_111_000_000) > 0b0000_100_111_000_000 ||
 14745:         (w & 0b0000_000_000_111_111) > 0b0000_000_000_100_111) {
 14746:       M68kException.m6eNumber = M68kException.M6E_ILLEGAL_INSTRUCTION;
 14747:       throw M68kException.m6eSignal;
 14748:     }
 14749:     int n = w >> 12;
 14750:     int o = w << 31 - 11 >= 0 ? w >> 6 & 31 : XEiJ.regRn[w >> 6 & 7];  //o=offset
 14751:     w = -(w << 31 - 5 >= 0 ? w : XEiJ.regRn[w & 7]) & 31;  //w=32-width。1<=width<=32なので0<=32-width<=31
 14752:     XEiJ.mpuCycleCount += 6;
 14753:     int ea = XEiJ.regOC & 63;
 14754:     int z = XEiJ.regRn[n] << w;  //z=Dn<<-width
 14755:     if (ea < XEiJ.EA_AR) {  //BFINS Dn,Dr{~}
 14756:       //  Dr{30,5}  o=30,w=32-5=27                          t=Dr  cde----- -------- -------- ------ab
 14757:       //                                                    t<<o  ab000000 00000000 00000000 00000000
 14758:       //                                                  t>>>-o  00cde--- -------- -------- --------
 14759:       //                                             t<<o|t>>>-o  abcde--- -------- -------- --------
 14760:       //                                                   -1<<w  11111000 00000000 00000000 00000000
 14761:       //                                                ~(-1<<w)  00000111 11111111 11111111 11111111
 14762:       //                                  (t<<o|t>>>-o)&~(-1<<w)  00000--- -------- -------- --------
 14763:       //                                                    r[n]  -------- -------- -------- ---ABCDE
 14764:       //                                               z=r[n]<<w  ABCDE000 00000000 00000000 00000000
 14765:       //                              t=(t<<o|t>>>-o)&~(-1<<w)|z  ABCDE--- -------- -------- --------
 14766:       //                                                   t<<-o  CDE----- -------- -------- ------00
 14767:       //                                                   t>>>o  00000000 00000000 00000000 000000AB
 14768:       //                                             t<<-o|t>>>o  CDE----- -------- -------- ------AB
 14769:       int t = XEiJ.regRn[ea];
 14770:       t = (t << o | t >>> -o) & ~(-1 << w) | z;
 14771:       XEiJ.regRn[ea] = t << -o | t >>> o;
 14772:     } else {  //BFINS Dn,<mem>{~}
 14773:       int a = efaCltLong (ea) + (o >> 3);  //フィールドの最上位ビットを含むバイトのアドレス
 14774:       o &= 7;
 14775:       n = 31 - w + o >> 3;  //フィールドが跨ぐバイト境界の数。0~4
 14776:       if (n == 0) {
 14777:         //  <ea>{2,5}  o=2,w=32-5=27                        <ea>  --abcde-
 14778:         //                                         XEiJ.busRbs(a)<<24  --abcde- 00000000 00000000 00000000
 14779:         //                                                 -1<<w  11111000 00000000 00000000 00000000
 14780:         //                                             -1<<w>>>o  00111110 00000000 00000000 00000000
 14781:         //                                          ~(-1<<w>>>o)  11000001 11111111 11111111 11111111
 14782:         //                            XEiJ.busRbs(a)<<24&~(-1<<w>>>o)  --00000- 00000000 00000000 00000000
 14783:         //                                                  r[n]  -------- -------- -------- ---ABCDE
 14784:         //                                             z=r[n]<<w  ABCDE000 00000000 00000000 00000000
 14785:         //                                                 z>>>o  00ABCDE0 00000000 00000000 00000000
 14786:         //                      XEiJ.busRbs(a)<<24&~(-1<<w>>>o)|z>>>o  --ABCDE- 00000000 00000000 00000000
 14787:         mmuWriteByteData (a, (mmuModifyByteSignData (a, XEiJ.regSRS) << 24 & ~(-1 << w >>> o) | z >>> o) >>> 24, XEiJ.regSRS);
 14788:       } else if (n == 1) {
 14789:         //  <ea>{3,11}  o=3,w=32-11=21                      <ea>  ---abcde fghijk--
 14790:         //                                            rws(a)<<16  ---abcde fghijk-- 00000000 00000000
 14791:         //                                                 -1<<w  11111111 11100000 00000000 00000000
 14792:         //                                             -1<<w>>>o  00011111 11111100 00000000 00000000
 14793:         //                                          ~(-1<<w>>>o)  11100000 00000011 11111111 11111111
 14794:         //                               rws(a)<<16&~(-1<<w>>>o)  ---00000 000000-- 00000000 00000000
 14795:         //                                                  r[n]  -------- -------- -----ABC DEFGHIJK
 14796:         //                                             z=r[n]<<w  ABCDEFGH IJK00000 00000000 00000000
 14797:         //                                                 z>>>o  000ABCDE FGHIJK00 00000000 00000000
 14798:         //                         rws(a)<<16&~(-1<<w>>>o)|z>>>o  ---ABCDE FGHIJK-- 00000000 00000000
 14799:         mmuWriteWordData (a, (mmuModifyWordSignData (a, XEiJ.regSRS) << 16 & ~(-1 << w >>> o) | z >>> o) >>> 16, XEiJ.regSRS);
 14800:       } else if (n == 2) {
 14801:         //  <ea>{4,17}  o=4,w=32-17=15                      <ea>  ----abcd efghijkl mnopq---
 14802:         //                                rws(a)<<16|rbz(a+2)<<8  ----abcd efghijkl mnopq--- 00000000
 14803:         //                                                 -1<<w  11111111 11111111 10000000 00000000
 14804:         //                                             -1<<w>>>o  00001111 11111111 11111000 00000000
 14805:         //                                          ~(-1<<w>>>o)  11110000 00000000 00000111 11111111
 14806:         //                 (rws(a)<<16|rbz(a+2)<<8)&~(-1<<w>>>o)  ----0000 00000000 00000--- 00000000
 14807:         //                                                  r[n]  -------- -------A BCDEFGHI JKLMNOPQ
 14808:         //                                             z=r[n]<<w  ABCDEFGH IJKLMNOP Q0000000 00000000
 14809:         //                                                 z>>>o  0000ABCD EFGHIJKL MNOPQ000 00000000
 14810:         //           (rws(a)<<16|rbz(a+2)<<8)&~(-1<<w>>>o)|z>>>o  ----ABCD EFGHIJKL MNOPQ--- 00000000
 14811:         int t = (mmuModifyWordSignData (a, XEiJ.regSRS) << 16 | mmuModifyByteZeroData (a + 2, XEiJ.regSRS) << 8) & ~(-1 << w >>> o) | z >>> o;
 14812:         mmuWriteWordData (a, t >>> 16, XEiJ.regSRS);
 14813:         mmuWriteByteData (a + 2, t >>> 8, XEiJ.regSRS);
 14814:       } else if (n == 3) {
 14815:         //  <ea>{5,23}  o=5,w=32-23=9                       <ea>  -----abc defghijk lmnopqrs tuvw----
 14816:         //                                                rls(a)  -----abc defghijk lmnopqrs tuvw----
 14817:         //                                                 -1<<w  11111111 11111111 11111110 00000000
 14818:         //                                             -1<<w>>>o  00000111 11111111 11111111 11110000
 14819:         //                                          ~(-1<<w>>>o)  11111000 00000000 00000000 00001111
 14820:         //                                   rls(a)&~(-1<<w>>>o)  -----000 00000000 00000000 0000----
 14821:         //                                                  r[n]  -------- -ABCDEFG HIJKLMNO PQRSTUVW
 14822:         //                                             z=r[n]<<w  ABCDEFGH IJKLMNOP QRSTUVW0 00000000
 14823:         //                                                 z>>>o  00000ABC DEFGHIJK LMNOPQRS TUVW0000
 14824:         //                             rls(a)&~(-1<<w>>>o)|z>>>o  -----ABC DEFGHIJK LMNOPQRS TUVW----
 14825:         mmuWriteLongData (a, mmuModifyLongData (a, XEiJ.regSRS) & ~(-1 << w >>> o) | z >>> o, XEiJ.regSRS);
 14826:       } else {
 14827:         //  <ea>{6,29}  o=6,w=32-29=3                       <ea>  ------ab cdefghij klmnopqr stuvwxyz abc-----
 14828:         //                                                rls(a)  ------ab cdefghij klmnopqr stuvwxyz
 14829:         //                                                -1>>>o  00000011 11111111 11111111 11111111
 14830:         //                                             ~(-1>>>o)  11111100 00000000 00000000 00000000
 14831:         //                                      rls(a)&~(-1>>>o)  ------00 00000000 00000000 00000000
 14832:         //                                                  r[n]  ---ABCDE FGHIJKLM NOPQRSTU VWXYZABC
 14833:         //                                             z=r[n]<<w  ABCDEFGH IJKLMNOP QRSTUVWX YZABC000
 14834:         //                                                 z>>>o  000000AB CDEFGHIJ KLMNOPQR STUVWXYZ
 14835:         //                                rls(a)&~(-1>>>o)|z>>>o  ------AB CDEFGHIJ KLMNOPQR STUVWXYZ
 14836:         mmuWriteLongData (a, mmuModifyLongData (a, XEiJ.regSRS) & ~(-1 >>> o) | z >>> o, XEiJ.regSRS);
 14837:         //                                              rbz(a+4)  00000000 00000000 00000000 abc-----
 14838:         //                                             -1<<8-o+w  11111111 11111111 11111111 11100000
 14839:         //                                          ~(-1<<8-o+w)  00000000 00000000 00000000 00011111
 14840:         //                                 rbz(a+4)&~(-1<<8-o+w)  00000000 00000000 00000000 000-----
 14841:         //                                                z<<8-o  CDEFGHIJ KLMNOPQR STUVWXYZ ABC00000
 14842:         //                          rbz(a+4)&~(-1<<8-o+w)|z<<8-o  CDEFGHIJ KLMNOPQR STUVWXYZ ABC-----
 14843:         mmuWriteByteData (a + 4, mmuModifyByteZeroData (a + 4, XEiJ.regSRS) & ~(-1 << 8 - o + w) | z << 8 - o, XEiJ.regSRS);
 14844:       }
 14845:     }
 14846:     //zは上位に寄ったままだが下位の空きは0なのでそのままテストする
 14847:     XEiJ.regCCR = z >> 28 & XEiJ.REG_CCR_N | (z == 0 ? XEiJ.regCCR & XEiJ.REG_CCR_X | XEiJ.REG_CCR_Z : XEiJ.regCCR & XEiJ.REG_CCR_X);  //ccr_tst
 14848:   }  //irpBfins
 14849: 
 14850:   //浮動小数点例外
 14851:   //  48  BSUN   FP分岐または比較不能状態でのセット
 14852:   //  49  INEX   FP不正確な結果
 14853:   //  50  DZ     FPゼロによる除算
 14854:   //  51  UNFL   FPアンダーフロー
 14855:   //  52  OPERR  FPオペランドエラー
 14856:   //  53  OVFL   FPオーバーフロー
 14857:   //  54  SNAN   FPシグナリングNAN
 14858:   //  55         FP未実装データ型
 14859:   //FPSRのビットオフセット→例外ベクタ番号
 14860: /*
 14861:   public static final int[] FP_OFFSET_TO_NUMBER = {
 14862:     0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
 14863:     48,  //16  15  BSUN   48  BSUN   FP分岐または比較不能状態でのセット
 14864:     54,  //17  14  SNAN   54  SNAN   FPシグナリングNAN
 14865:     52,  //18  13  OPERR  52  OPERR  FPオペランドエラー
 14866:     53,  //19  12  OVFL   53  OVFL   FPオーバーフロー
 14867:     51,  //20  11  UNFL   51  UNFL   FPアンダーフロー
 14868:     50,  //21  10  DZ     50  DZ     FPゼロによる除算
 14869:     49,  //22   9  INEX2  49  INEX   FP不正確な結果
 14870:     49,  //23   8  INEX1  49  INEX   FP不正確な結果
 14871:     0, 0, 0, 0, 0, 0, 0, 0,
 14872:   };
 14873: */
 14874:   public static final byte[] FP_OFFSET_TO_NUMBER = "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\00006453211\0\0\0\0\0\0\0\0".getBytes (XEiJ.ISO_8859_1);
 14875: 
 14876:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 14877:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
 14878:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
 14879:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 14880:   //FTST.X FPm                                      |-|--CC46|-|-----|-----|          |1111_001_000_000_000-000mmm0000111010
 14881:   //FMOVE.X FPm,FPn                                 |-|--CC46|-|-----|-----|          |1111_001_000_000_000-000mmmnnn0000000
 14882:   //FINT.X FPm,FPn                                  |-|--CCS6|-|-----|-----|          |1111_001_000_000_000-000mmmnnn0000001
 14883:   //FSINH.X FPm,FPn                                 |-|--CCSS|-|-----|-----|          |1111_001_000_000_000-000mmmnnn0000010
 14884:   //FINTRZ.X FPm,FPn                                |-|--CCS6|-|-----|-----|          |1111_001_000_000_000-000mmmnnn0000011
 14885:   //FSQRT.X FPm,FPn                                 |-|--CC46|-|-----|-----|          |1111_001_000_000_000-000mmmnnn0000100
 14886:   //FLOGNP1.X FPm,FPn                               |-|--CCSS|-|-----|-----|          |1111_001_000_000_000-000mmmnnn0000110
 14887:   //FETOXM1.X FPm,FPn                               |-|--CCSS|-|-----|-----|          |1111_001_000_000_000-000mmmnnn0001000
 14888:   //FTANH.X FPm,FPn                                 |-|--CCSS|-|-----|-----|          |1111_001_000_000_000-000mmmnnn0001001
 14889:   //FATAN.X FPm,FPn                                 |-|--CCSS|-|-----|-----|          |1111_001_000_000_000-000mmmnnn0001010
 14890:   //FASIN.X FPm,FPn                                 |-|--CCSS|-|-----|-----|          |1111_001_000_000_000-000mmmnnn0001100
 14891:   //FATANH.X FPm,FPn                                |-|--CCSS|-|-----|-----|          |1111_001_000_000_000-000mmmnnn0001101
 14892:   //FSIN.X FPm,FPn                                  |-|--CCSS|-|-----|-----|          |1111_001_000_000_000-000mmmnnn0001110
 14893:   //FTAN.X FPm,FPn                                  |-|--CCSS|-|-----|-----|          |1111_001_000_000_000-000mmmnnn0001111
 14894:   //FETOX.X FPm,FPn                                 |-|--CCSS|-|-----|-----|          |1111_001_000_000_000-000mmmnnn0010000
 14895:   //FTWOTOX.X FPm,FPn                               |-|--CCSS|-|-----|-----|          |1111_001_000_000_000-000mmmnnn0010001
 14896:   //FTENTOX.X FPm,FPn                               |-|--CCSS|-|-----|-----|          |1111_001_000_000_000-000mmmnnn0010010
 14897:   //FLOGN.X FPm,FPn                                 |-|--CCSS|-|-----|-----|          |1111_001_000_000_000-000mmmnnn0010100
 14898:   //FLOG10.X FPm,FPn                                |-|--CCSS|-|-----|-----|          |1111_001_000_000_000-000mmmnnn0010101
 14899:   //FLOG2.X FPm,FPn                                 |-|--CCSS|-|-----|-----|          |1111_001_000_000_000-000mmmnnn0010110
 14900:   //FABS.X FPm,FPn                                  |-|--CC46|-|-----|-----|          |1111_001_000_000_000-000mmmnnn0011000
 14901:   //FCOSH.X FPm,FPn                                 |-|--CCSS|-|-----|-----|          |1111_001_000_000_000-000mmmnnn0011001
 14902:   //FNEG.X FPm,FPn                                  |-|--CC46|-|-----|-----|          |1111_001_000_000_000-000mmmnnn0011010
 14903:   //FACOS.X FPm,FPn                                 |-|--CCSS|-|-----|-----|          |1111_001_000_000_000-000mmmnnn0011100
 14904:   //FCOS.X FPm,FPn                                  |-|--CCSS|-|-----|-----|          |1111_001_000_000_000-000mmmnnn0011101
 14905:   //FGETEXP.X FPm,FPn                               |-|--CCSS|-|-----|-----|          |1111_001_000_000_000-000mmmnnn0011110
 14906:   //FGETMAN.X FPm,FPn                               |-|--CCSS|-|-----|-----|          |1111_001_000_000_000-000mmmnnn0011111
 14907:   //FDIV.X FPm,FPn                                  |-|--CC46|-|-----|-----|          |1111_001_000_000_000-000mmmnnn0100000
 14908:   //FMOD.X FPm,FPn                                  |-|--CCSS|-|-----|-----|          |1111_001_000_000_000-000mmmnnn0100001
 14909:   //FADD.X FPm,FPn                                  |-|--CC46|-|-----|-----|          |1111_001_000_000_000-000mmmnnn0100010
 14910:   //FMUL.X FPm,FPn                                  |-|--CC46|-|-----|-----|          |1111_001_000_000_000-000mmmnnn0100011
 14911:   //FSGLDIV.X FPm,FPn                               |-|--CCS6|-|-----|-----|          |1111_001_000_000_000-000mmmnnn0100100
 14912:   //FREM.X FPm,FPn                                  |-|--CCSS|-|-----|-----|          |1111_001_000_000_000-000mmmnnn0100101
 14913:   //FSCALE.X FPm,FPn                                |-|--CCSS|-|-----|-----|          |1111_001_000_000_000-000mmmnnn0100110
 14914:   //FSGLMUL.X FPm,FPn                               |-|--CCS6|-|-----|-----|          |1111_001_000_000_000-000mmmnnn0100111
 14915:   //FSUB.X FPm,FPn                                  |-|--CC46|-|-----|-----|          |1111_001_000_000_000-000mmmnnn0101000
 14916:   //FCMP.X FPm,FPn                                  |-|--CC46|-|-----|-----|          |1111_001_000_000_000-000mmmnnn0111000
 14917:   //FSMOVE.X FPm,FPn                                |-|----46|-|-----|-----|          |1111_001_000_000_000-000mmmnnn1000000
 14918:   //FSSQRT.X FPm,FPn                                |-|----46|-|-----|-----|          |1111_001_000_000_000-000mmmnnn1000001
 14919:   //FDMOVE.X FPm,FPn                                |-|----46|-|-----|-----|          |1111_001_000_000_000-000mmmnnn1000100
 14920:   //FDSQRT.X FPm,FPn                                |-|----46|-|-----|-----|          |1111_001_000_000_000-000mmmnnn1000101
 14921:   //FSABS.X FPm,FPn                                 |-|----46|-|-----|-----|          |1111_001_000_000_000-000mmmnnn1011000
 14922:   //FSNEG.X FPm,FPn                                 |-|----46|-|-----|-----|          |1111_001_000_000_000-000mmmnnn1011010
 14923:   //FDABS.X FPm,FPn                                 |-|----46|-|-----|-----|          |1111_001_000_000_000-000mmmnnn1011100
 14924:   //FDNEG.X FPm,FPn                                 |-|----46|-|-----|-----|          |1111_001_000_000_000-000mmmnnn1011110
 14925:   //FSDIV.X FPm,FPn                                 |-|----46|-|-----|-----|          |1111_001_000_000_000-000mmmnnn1100000
 14926:   //FSADD.X FPm,FPn                                 |-|----46|-|-----|-----|          |1111_001_000_000_000-000mmmnnn1100010
 14927:   //FSMUL.X FPm,FPn                                 |-|----46|-|-----|-----|          |1111_001_000_000_000-000mmmnnn1100011
 14928:   //FDDIV.X FPm,FPn                                 |-|----46|-|-----|-----|          |1111_001_000_000_000-000mmmnnn1100100
 14929:   //FDADD.X FPm,FPn                                 |-|----46|-|-----|-----|          |1111_001_000_000_000-000mmmnnn1100110
 14930:   //FDMUL.X FPm,FPn                                 |-|----46|-|-----|-----|          |1111_001_000_000_000-000mmmnnn1100111
 14931:   //FSSUB.X FPm,FPn                                 |-|----46|-|-----|-----|          |1111_001_000_000_000-000mmmnnn1101000
 14932:   //FDSUB.X FPm,FPn                                 |-|----46|-|-----|-----|          |1111_001_000_000_000-000mmmnnn1101100
 14933:   //FSINCOS.X FPm,FPc:FPs                           |-|--CCSS|-|-----|-----|          |1111_001_000_000_000-000mmmsss0110ccc
 14934:   //FMOVECR.X #ccc,FPn                              |-|--CCSS|-|-----|-----|          |1111_001_000_000_000-010111nnn0cccccc
 14935:   //FMOVE.L FPn,<ea>                                |-|--CC46|-|-----|-----|D M+-WXZ  |1111_001_000_mmm_rrr-011000nnn0000000
 14936:   //FMOVE.S FPn,<ea>                                |-|--CC46|-|-----|-----|D M+-WXZ  |1111_001_000_mmm_rrr-011001nnn0000000
 14937:   //FMOVE.W FPn,<ea>                                |-|--CC46|-|-----|-----|D M+-WXZ  |1111_001_000_mmm_rrr-011100nnn0000000
 14938:   //FMOVE.B FPn,<ea>                                |-|--CC46|-|-----|-----|D M+-WXZ  |1111_001_000_mmm_rrr-011110nnn0000000
 14939:   //FMOVE.L FPIAR,<ea>                              |-|--CC46|-|-----|-----|DAM+-WXZ  |1111_001_000_mmm_rrr-1010010000000000
 14940:   //FMOVEM.L FPIAR,<ea>                             |-|--CC46|-|-----|-----|DAM+-WXZ  |1111_001_000_mmm_rrr-1010010000000000
 14941:   //FMOVE.L FPSR,<ea>                               |-|--CC46|-|-----|-----|D M+-WXZ  |1111_001_000_mmm_rrr-1010100000000000
 14942:   //FMOVEM.L FPSR,<ea>                              |-|--CC46|-|-----|-----|D M+-WXZ  |1111_001_000_mmm_rrr-1010100000000000
 14943:   //FMOVE.L FPCR,<ea>                               |-|--CC46|-|-----|-----|D M+-WXZ  |1111_001_000_mmm_rrr-1011000000000000
 14944:   //FMOVEM.L FPCR,<ea>                              |-|--CC46|-|-----|-----|D M+-WXZ  |1111_001_000_mmm_rrr-1011000000000000
 14945:   //FTST.L <ea>                                     |-|--CC46|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-0100000000111010
 14946:   //FMOVE.L <ea>,FPn                                |-|--CC46|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010000nnn0000000
 14947:   //FINT.L <ea>,FPn                                 |-|--CCS6|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010000nnn0000001
 14948:   //FSINH.L <ea>,FPn                                |-|--CCSS|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010000nnn0000010
 14949:   //FINTRZ.L <ea>,FPn                               |-|--CCS6|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010000nnn0000011
 14950:   //FSQRT.L <ea>,FPn                                |-|--CC46|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010000nnn0000100
 14951:   //FLOGNP1.L <ea>,FPn                              |-|--CCSS|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010000nnn0000110
 14952:   //FETOXM1.L <ea>,FPn                              |-|--CCSS|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010000nnn0001000
 14953:   //FTANH.L <ea>,FPn                                |-|--CCSS|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010000nnn0001001
 14954:   //FATAN.L <ea>,FPn                                |-|--CCSS|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010000nnn0001010
 14955:   //FASIN.L <ea>,FPn                                |-|--CCSS|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010000nnn0001100
 14956:   //FATANH.L <ea>,FPn                               |-|--CCSS|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010000nnn0001101
 14957:   //FSIN.L <ea>,FPn                                 |-|--CCSS|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010000nnn0001110
 14958:   //FTAN.L <ea>,FPn                                 |-|--CCSS|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010000nnn0001111
 14959:   //FETOX.L <ea>,FPn                                |-|--CCSS|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010000nnn0010000
 14960:   //FTWOTOX.L <ea>,FPn                              |-|--CCSS|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010000nnn0010001
 14961:   //FTENTOX.L <ea>,FPn                              |-|--CCSS|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010000nnn0010010
 14962:   //FLOGN.L <ea>,FPn                                |-|--CCSS|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010000nnn0010100
 14963:   //FLOG10.L <ea>,FPn                               |-|--CCSS|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010000nnn0010101
 14964:   //FLOG2.L <ea>,FPn                                |-|--CCSS|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010000nnn0010110
 14965:   //FABS.L <ea>,FPn                                 |-|--CC46|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010000nnn0011000
 14966:   //FCOSH.L <ea>,FPn                                |-|--CCSS|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010000nnn0011001
 14967:   //FNEG.L <ea>,FPn                                 |-|--CC46|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010000nnn0011010
 14968:   //FACOS.L <ea>,FPn                                |-|--CCSS|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010000nnn0011100
 14969:   //FCOS.L <ea>,FPn                                 |-|--CCSS|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010000nnn0011101
 14970:   //FGETEXP.L <ea>,FPn                              |-|--CCSS|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010000nnn0011110
 14971:   //FGETMAN.L <ea>,FPn                              |-|--CCSS|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010000nnn0011111
 14972:   //FDIV.L <ea>,FPn                                 |-|--CC46|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010000nnn0100000
 14973:   //FMOD.L <ea>,FPn                                 |-|--CCSS|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010000nnn0100001
 14974:   //FADD.L <ea>,FPn                                 |-|--CC46|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010000nnn0100010
 14975:   //FMUL.L <ea>,FPn                                 |-|--CC46|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010000nnn0100011
 14976:   //FSGLDIV.L <ea>,FPn                              |-|--CCS6|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010000nnn0100100
 14977:   //FREM.L <ea>,FPn                                 |-|--CCSS|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010000nnn0100101
 14978:   //FSCALE.L <ea>,FPn                               |-|--CCSS|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010000nnn0100110
 14979:   //FSGLMUL.L <ea>,FPn                              |-|--CCS6|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010000nnn0100111
 14980:   //FSUB.L <ea>,FPn                                 |-|--CC46|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010000nnn0101000
 14981:   //FCMP.L <ea>,FPn                                 |-|--CC46|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010000nnn0111000
 14982:   //FSMOVE.L <ea>,FPn                               |-|----46|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010000nnn1000000
 14983:   //FSSQRT.L <ea>,FPn                               |-|----46|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010000nnn1000001
 14984:   //FDMOVE.L <ea>,FPn                               |-|----46|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010000nnn1000100
 14985:   //FDSQRT.L <ea>,FPn                               |-|----46|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010000nnn1000101
 14986:   //FSABS.L <ea>,FPn                                |-|----46|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010000nnn1011000
 14987:   //FSNEG.L <ea>,FPn                                |-|----46|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010000nnn1011010
 14988:   //FDABS.L <ea>,FPn                                |-|----46|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010000nnn1011100
 14989:   //FDNEG.L <ea>,FPn                                |-|----46|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010000nnn1011110
 14990:   //FSDIV.L <ea>,FPn                                |-|----46|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010000nnn1100000
 14991:   //FSADD.L <ea>,FPn                                |-|----46|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010000nnn1100010
 14992:   //FSMUL.L <ea>,FPn                                |-|----46|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010000nnn1100011
 14993:   //FDDIV.L <ea>,FPn                                |-|----46|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010000nnn1100100
 14994:   //FDADD.L <ea>,FPn                                |-|----46|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010000nnn1100110
 14995:   //FDMUL.L <ea>,FPn                                |-|----46|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010000nnn1100111
 14996:   //FSSUB.L <ea>,FPn                                |-|----46|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010000nnn1101000
 14997:   //FDSUB.L <ea>,FPn                                |-|----46|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010000nnn1101100
 14998:   //FSINCOS.L <ea>,FPc:FPs                          |-|--CCSS|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010000sss0110ccc
 14999:   //FTST.S <ea>                                     |-|--CC46|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-0100010000111010
 15000:   //FMOVE.S <ea>,FPn                                |-|--CC46|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010001nnn0000000
 15001:   //FINT.S <ea>,FPn                                 |-|--CCS6|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010001nnn0000001
 15002:   //FSINH.S <ea>,FPn                                |-|--CCSS|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010001nnn0000010
 15003:   //FINTRZ.S <ea>,FPn                               |-|--CCS6|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010001nnn0000011
 15004:   //FSQRT.S <ea>,FPn                                |-|--CC46|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010001nnn0000100
 15005:   //FLOGNP1.S <ea>,FPn                              |-|--CCSS|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010001nnn0000110
 15006:   //FETOXM1.S <ea>,FPn                              |-|--CCSS|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010001nnn0001000
 15007:   //FTANH.S <ea>,FPn                                |-|--CCSS|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010001nnn0001001
 15008:   //FATAN.S <ea>,FPn                                |-|--CCSS|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010001nnn0001010
 15009:   //FASIN.S <ea>,FPn                                |-|--CCSS|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010001nnn0001100
 15010:   //FATANH.S <ea>,FPn                               |-|--CCSS|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010001nnn0001101
 15011:   //FSIN.S <ea>,FPn                                 |-|--CCSS|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010001nnn0001110
 15012:   //FTAN.S <ea>,FPn                                 |-|--CCSS|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010001nnn0001111
 15013:   //FETOX.S <ea>,FPn                                |-|--CCSS|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010001nnn0010000
 15014:   //FTWOTOX.S <ea>,FPn                              |-|--CCSS|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010001nnn0010001
 15015:   //FTENTOX.S <ea>,FPn                              |-|--CCSS|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010001nnn0010010
 15016:   //FLOGN.S <ea>,FPn                                |-|--CCSS|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010001nnn0010100
 15017:   //FLOG10.S <ea>,FPn                               |-|--CCSS|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010001nnn0010101
 15018:   //FLOG2.S <ea>,FPn                                |-|--CCSS|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010001nnn0010110
 15019:   //FABS.S <ea>,FPn                                 |-|--CC46|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010001nnn0011000
 15020:   //FCOSH.S <ea>,FPn                                |-|--CCSS|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010001nnn0011001
 15021:   //FNEG.S <ea>,FPn                                 |-|--CC46|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010001nnn0011010
 15022:   //FACOS.S <ea>,FPn                                |-|--CCSS|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010001nnn0011100
 15023:   //FCOS.S <ea>,FPn                                 |-|--CCSS|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010001nnn0011101
 15024:   //FGETEXP.S <ea>,FPn                              |-|--CCSS|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010001nnn0011110
 15025:   //FGETMAN.S <ea>,FPn                              |-|--CCSS|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010001nnn0011111
 15026:   //FDIV.S <ea>,FPn                                 |-|--CC46|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010001nnn0100000
 15027:   //FMOD.S <ea>,FPn                                 |-|--CCSS|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010001nnn0100001
 15028:   //FADD.S <ea>,FPn                                 |-|--CC46|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010001nnn0100010
 15029:   //FMUL.S <ea>,FPn                                 |-|--CC46|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010001nnn0100011
 15030:   //FSGLDIV.S <ea>,FPn                              |-|--CCS6|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010001nnn0100100
 15031:   //FREM.S <ea>,FPn                                 |-|--CCSS|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010001nnn0100101
 15032:   //FSCALE.S <ea>,FPn                               |-|--CCSS|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010001nnn0100110
 15033:   //FSGLMUL.S <ea>,FPn                              |-|--CCS6|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010001nnn0100111
 15034:   //FSUB.S <ea>,FPn                                 |-|--CC46|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010001nnn0101000
 15035:   //FCMP.S <ea>,FPn                                 |-|--CC46|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010001nnn0111000
 15036:   //FSMOVE.S <ea>,FPn                               |-|----46|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010001nnn1000000
 15037:   //FSSQRT.S <ea>,FPn                               |-|----46|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010001nnn1000001
 15038:   //FDMOVE.S <ea>,FPn                               |-|----46|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010001nnn1000100
 15039:   //FDSQRT.S <ea>,FPn                               |-|----46|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010001nnn1000101
 15040:   //FSABS.S <ea>,FPn                                |-|----46|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010001nnn1011000
 15041:   //FSNEG.S <ea>,FPn                                |-|----46|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010001nnn1011010
 15042:   //FDABS.S <ea>,FPn                                |-|----46|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010001nnn1011100
 15043:   //FDNEG.S <ea>,FPn                                |-|----46|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010001nnn1011110
 15044:   //FSDIV.S <ea>,FPn                                |-|----46|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010001nnn1100000
 15045:   //FSADD.S <ea>,FPn                                |-|----46|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010001nnn1100010
 15046:   //FSMUL.S <ea>,FPn                                |-|----46|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010001nnn1100011
 15047:   //FDDIV.S <ea>,FPn                                |-|----46|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010001nnn1100100
 15048:   //FDADD.S <ea>,FPn                                |-|----46|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010001nnn1100110
 15049:   //FDMUL.S <ea>,FPn                                |-|----46|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010001nnn1100111
 15050:   //FSSUB.S <ea>,FPn                                |-|----46|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010001nnn1101000
 15051:   //FDSUB.S <ea>,FPn                                |-|----46|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010001nnn1101100
 15052:   //FSINCOS.S <ea>,FPc:FPs                          |-|--CCSS|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010001sss0110ccc
 15053:   //FTST.W <ea>                                     |-|--CC46|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-0101000000111010
 15054:   //FMOVE.W <ea>,FPn                                |-|--CC46|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010100nnn0000000
 15055:   //FINT.W <ea>,FPn                                 |-|--CCS6|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010100nnn0000001
 15056:   //FSINH.W <ea>,FPn                                |-|--CCSS|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010100nnn0000010
 15057:   //FINTRZ.W <ea>,FPn                               |-|--CCS6|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010100nnn0000011
 15058:   //FSQRT.W <ea>,FPn                                |-|--CC46|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010100nnn0000100
 15059:   //FLOGNP1.W <ea>,FPn                              |-|--CCSS|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010100nnn0000110
 15060:   //FETOXM1.W <ea>,FPn                              |-|--CCSS|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010100nnn0001000
 15061:   //FTANH.W <ea>,FPn                                |-|--CCSS|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010100nnn0001001
 15062:   //FATAN.W <ea>,FPn                                |-|--CCSS|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010100nnn0001010
 15063:   //FASIN.W <ea>,FPn                                |-|--CCSS|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010100nnn0001100
 15064:   //FATANH.W <ea>,FPn                               |-|--CCSS|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010100nnn0001101
 15065:   //FSIN.W <ea>,FPn                                 |-|--CCSS|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010100nnn0001110
 15066:   //FTAN.W <ea>,FPn                                 |-|--CCSS|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010100nnn0001111
 15067:   //FETOX.W <ea>,FPn                                |-|--CCSS|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010100nnn0010000
 15068:   //FTWOTOX.W <ea>,FPn                              |-|--CCSS|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010100nnn0010001
 15069:   //FTENTOX.W <ea>,FPn                              |-|--CCSS|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010100nnn0010010
 15070:   //FLOGN.W <ea>,FPn                                |-|--CCSS|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010100nnn0010100
 15071:   //FLOG10.W <ea>,FPn                               |-|--CCSS|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010100nnn0010101
 15072:   //FLOG2.W <ea>,FPn                                |-|--CCSS|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010100nnn0010110
 15073:   //FABS.W <ea>,FPn                                 |-|--CC46|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010100nnn0011000
 15074:   //FCOSH.W <ea>,FPn                                |-|--CCSS|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010100nnn0011001
 15075:   //FNEG.W <ea>,FPn                                 |-|--CC46|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010100nnn0011010
 15076:   //FACOS.W <ea>,FPn                                |-|--CCSS|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010100nnn0011100
 15077:   //FCOS.W <ea>,FPn                                 |-|--CCSS|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010100nnn0011101
 15078:   //FGETEXP.W <ea>,FPn                              |-|--CCSS|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010100nnn0011110
 15079:   //FGETMAN.W <ea>,FPn                              |-|--CCSS|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010100nnn0011111
 15080:   //FDIV.W <ea>,FPn                                 |-|--CC46|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010100nnn0100000
 15081:   //FMOD.W <ea>,FPn                                 |-|--CCSS|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010100nnn0100001
 15082:   //FADD.W <ea>,FPn                                 |-|--CC46|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010100nnn0100010
 15083:   //FMUL.W <ea>,FPn                                 |-|--CC46|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010100nnn0100011
 15084:   //FSGLDIV.W <ea>,FPn                              |-|--CCS6|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010100nnn0100100
 15085:   //FREM.W <ea>,FPn                                 |-|--CCSS|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010100nnn0100101
 15086:   //FSCALE.W <ea>,FPn                               |-|--CCSS|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010100nnn0100110
 15087:   //FSGLMUL.W <ea>,FPn                              |-|--CCS6|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010100nnn0100111
 15088:   //FSUB.W <ea>,FPn                                 |-|--CC46|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010100nnn0101000
 15089:   //FCMP.W <ea>,FPn                                 |-|--CC46|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010100nnn0111000
 15090:   //FSMOVE.W <ea>,FPn                               |-|----46|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010100nnn1000000
 15091:   //FSSQRT.W <ea>,FPn                               |-|----46|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010100nnn1000001
 15092:   //FDMOVE.W <ea>,FPn                               |-|----46|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010100nnn1000100
 15093:   //FDSQRT.W <ea>,FPn                               |-|----46|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010100nnn1000101
 15094:   //FSABS.W <ea>,FPn                                |-|----46|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010100nnn1011000
 15095:   //FSNEG.W <ea>,FPn                                |-|----46|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010100nnn1011010
 15096:   //FDABS.W <ea>,FPn                                |-|----46|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010100nnn1011100
 15097:   //FDNEG.W <ea>,FPn                                |-|----46|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010100nnn1011110
 15098:   //FSDIV.W <ea>,FPn                                |-|----46|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010100nnn1100000
 15099:   //FSADD.W <ea>,FPn                                |-|----46|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010100nnn1100010
 15100:   //FSMUL.W <ea>,FPn                                |-|----46|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010100nnn1100011
 15101:   //FDDIV.W <ea>,FPn                                |-|----46|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010100nnn1100100
 15102:   //FDADD.W <ea>,FPn                                |-|----46|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010100nnn1100110
 15103:   //FDMUL.W <ea>,FPn                                |-|----46|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010100nnn1100111
 15104:   //FSSUB.W <ea>,FPn                                |-|----46|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010100nnn1101000
 15105:   //FDSUB.W <ea>,FPn                                |-|----46|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010100nnn1101100
 15106:   //FSINCOS.W <ea>,FPc:FPs                          |-|--CCSS|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010100sss0110ccc
 15107:   //FTST.B <ea>                                     |-|--CC46|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-0101100000111010
 15108:   //FMOVE.B <ea>,FPn                                |-|--CC46|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010110nnn0000000
 15109:   //FINT.B <ea>,FPn                                 |-|--CCS6|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010110nnn0000001
 15110:   //FSINH.B <ea>,FPn                                |-|--CCSS|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010110nnn0000010
 15111:   //FINTRZ.B <ea>,FPn                               |-|--CCS6|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010110nnn0000011
 15112:   //FSQRT.B <ea>,FPn                                |-|--CC46|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010110nnn0000100
 15113:   //FLOGNP1.B <ea>,FPn                              |-|--CCSS|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010110nnn0000110
 15114:   //FETOXM1.B <ea>,FPn                              |-|--CCSS|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010110nnn0001000
 15115:   //FTANH.B <ea>,FPn                                |-|--CCSS|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010110nnn0001001
 15116:   //FATAN.B <ea>,FPn                                |-|--CCSS|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010110nnn0001010
 15117:   //FASIN.B <ea>,FPn                                |-|--CCSS|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010110nnn0001100
 15118:   //FATANH.B <ea>,FPn                               |-|--CCSS|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010110nnn0001101
 15119:   //FSIN.B <ea>,FPn                                 |-|--CCSS|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010110nnn0001110
 15120:   //FTAN.B <ea>,FPn                                 |-|--CCSS|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010110nnn0001111
 15121:   //FETOX.B <ea>,FPn                                |-|--CCSS|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010110nnn0010000
 15122:   //FTWOTOX.B <ea>,FPn                              |-|--CCSS|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010110nnn0010001
 15123:   //FTENTOX.B <ea>,FPn                              |-|--CCSS|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010110nnn0010010
 15124:   //FLOGN.B <ea>,FPn                                |-|--CCSS|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010110nnn0010100
 15125:   //FLOG10.B <ea>,FPn                               |-|--CCSS|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010110nnn0010101
 15126:   //FLOG2.B <ea>,FPn                                |-|--CCSS|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010110nnn0010110
 15127:   //FABS.B <ea>,FPn                                 |-|--CC46|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010110nnn0011000
 15128:   //FCOSH.B <ea>,FPn                                |-|--CCSS|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010110nnn0011001
 15129:   //FNEG.B <ea>,FPn                                 |-|--CC46|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010110nnn0011010
 15130:   //FACOS.B <ea>,FPn                                |-|--CCSS|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010110nnn0011100
 15131:   //FCOS.B <ea>,FPn                                 |-|--CCSS|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010110nnn0011101
 15132:   //FGETEXP.B <ea>,FPn                              |-|--CCSS|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010110nnn0011110
 15133:   //FGETMAN.B <ea>,FPn                              |-|--CCSS|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010110nnn0011111
 15134:   //FDIV.B <ea>,FPn                                 |-|--CC46|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010110nnn0100000
 15135:   //FMOD.B <ea>,FPn                                 |-|--CCSS|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010110nnn0100001
 15136:   //FADD.B <ea>,FPn                                 |-|--CC46|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010110nnn0100010
 15137:   //FMUL.B <ea>,FPn                                 |-|--CC46|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010110nnn0100011
 15138:   //FSGLDIV.B <ea>,FPn                              |-|--CCS6|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010110nnn0100100
 15139:   //FREM.B <ea>,FPn                                 |-|--CCSS|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010110nnn0100101
 15140:   //FSCALE.B <ea>,FPn                               |-|--CCSS|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010110nnn0100110
 15141:   //FSGLMUL.B <ea>,FPn                              |-|--CCS6|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010110nnn0100111
 15142:   //FSUB.B <ea>,FPn                                 |-|--CC46|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010110nnn0101000
 15143:   //FCMP.B <ea>,FPn                                 |-|--CC46|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010110nnn0111000
 15144:   //FSMOVE.B <ea>,FPn                               |-|----46|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010110nnn1000000
 15145:   //FSSQRT.B <ea>,FPn                               |-|----46|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010110nnn1000001
 15146:   //FDMOVE.B <ea>,FPn                               |-|----46|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010110nnn1000100
 15147:   //FDSQRT.B <ea>,FPn                               |-|----46|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010110nnn1000101
 15148:   //FSABS.B <ea>,FPn                                |-|----46|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010110nnn1011000
 15149:   //FSNEG.B <ea>,FPn                                |-|----46|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010110nnn1011010
 15150:   //FDABS.B <ea>,FPn                                |-|----46|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010110nnn1011100
 15151:   //FDNEG.B <ea>,FPn                                |-|----46|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010110nnn1011110
 15152:   //FSDIV.B <ea>,FPn                                |-|----46|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010110nnn1100000
 15153:   //FSADD.B <ea>,FPn                                |-|----46|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010110nnn1100010
 15154:   //FSMUL.B <ea>,FPn                                |-|----46|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010110nnn1100011
 15155:   //FDDIV.B <ea>,FPn                                |-|----46|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010110nnn1100100
 15156:   //FDADD.B <ea>,FPn                                |-|----46|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010110nnn1100110
 15157:   //FDMUL.B <ea>,FPn                                |-|----46|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010110nnn1100111
 15158:   //FSSUB.B <ea>,FPn                                |-|----46|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010110nnn1101000
 15159:   //FDSUB.B <ea>,FPn                                |-|----46|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010110nnn1101100
 15160:   //FSINCOS.B <ea>,FPc:FPs                          |-|--CCSS|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-010110sss0110ccc
 15161:   //FMOVE.L <ea>,FPIAR                              |-|--CC46|-|-----|-----|DAM+-WXZPI|1111_001_000_mmm_rrr-1000010000000000
 15162:   //FMOVEM.L <ea>,FPIAR                             |-|--CC46|-|-----|-----|DAM+-WXZPI|1111_001_000_mmm_rrr-1000010000000000
 15163:   //FMOVE.L <ea>,FPSR                               |-|--CC46|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-1000100000000000
 15164:   //FMOVEM.L <ea>,FPSR                              |-|--CC46|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-1000100000000000
 15165:   //FMOVE.L <ea>,FPCR                               |-|--CC46|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-1001000000000000
 15166:   //FMOVEM.L <ea>,FPCR                              |-|--CC46|-|-----|-----|D M+-WXZPI|1111_001_000_mmm_rrr-1001000000000000
 15167:   //FMOVE.X FPn,<ea>                                |-|--CC46|-|-----|-----|  M+-WXZ  |1111_001_000_mmm_rrr-011010nnn0000000
 15168:   //FMOVE.P FPn,<ea>{#k}                            |-|--CCSS|-|-----|-----|  M+-WXZ  |1111_001_000_mmm_rrr-011011nnnkkkkkkk
 15169:   //FMOVE.D FPn,<ea>                                |-|--CC46|-|-----|-----|  M+-WXZ  |1111_001_000_mmm_rrr-011101nnn0000000
 15170:   //FMOVE.P FPn,<ea>{Dk}                            |-|--CCSS|-|-----|-----|  M+-WXZ  |1111_001_000_mmm_rrr-011111nnnkkk0000
 15171:   //FMOVEM.L FPSR/FPIAR,<ea>                        |-|--CC46|-|-----|-----|  M+-WXZ  |1111_001_000_mmm_rrr-1010110000000000
 15172:   //FMOVEM.L FPCR/FPIAR,<ea>                        |-|--CC46|-|-----|-----|  M+-WXZ  |1111_001_000_mmm_rrr-1011010000000000
 15173:   //FMOVEM.L FPCR/FPSR,<ea>                         |-|--CC46|-|-----|-----|  M+-WXZ  |1111_001_000_mmm_rrr-1011100000000000
 15174:   //FMOVEM.L FPCR/FPSR/FPIAR,<ea>                   |-|--CC46|-|-----|-----|  M+-WXZ  |1111_001_000_mmm_rrr-1011110000000000
 15175:   //FMOVEM.X #<data>,<ea>                           |-|--CC46|-|-----|-----|  M  WXZ  |1111_001_000_mmm_rrr-11110000dddddddd
 15176:   //FMOVEM.X <list>,<ea>                            |-|--CC46|-|-----|-----|  M  WXZ  |1111_001_000_mmm_rrr-11110000llllllll
 15177:   //FMOVEM.X Dl,<ea>                                |-|--CC4S|-|-----|-----|  M  WXZ  |1111_001_000_mmm_rrr-111110000lll0000
 15178:   //FMOVEM.L <ea>,FPSR/FPIAR                        |-|--CC46|-|-----|-----|  M+-WXZP |1111_001_000_mmm_rrr-1000110000000000
 15179:   //FMOVEM.L <ea>,FPCR/FPIAR                        |-|--CC46|-|-----|-----|  M+-WXZP |1111_001_000_mmm_rrr-1001010000000000
 15180:   //FMOVEM.L <ea>,FPCR/FPSR                         |-|--CC46|-|-----|-----|  M+-WXZP |1111_001_000_mmm_rrr-1001100000000000
 15181:   //FMOVEM.L <ea>,FPCR/FPSR/FPIAR                   |-|--CC46|-|-----|-----|  M+-WXZP |1111_001_000_mmm_rrr-1001110000000000
 15182:   //FMOVEM.X <ea>,#<data>                           |-|--CC46|-|-----|-----|  M+ WXZP |1111_001_000_mmm_rrr-11010000dddddddd
 15183:   //FMOVEM.X <ea>,<list>                            |-|--CC46|-|-----|-----|  M+ WXZP |1111_001_000_mmm_rrr-11010000llllllll
 15184:   //FMOVEM.X <ea>,Dl                                |-|--CC4S|-|-----|-----|  M+ WXZP |1111_001_000_mmm_rrr-110110000lll0000
 15185:   //FTST.X <ea>                                     |-|--CC46|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-0100100000111010
 15186:   //FMOVE.X <ea>,FPn                                |-|--CC46|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010010nnn0000000
 15187:   //FINT.X <ea>,FPn                                 |-|--CCS6|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010010nnn0000001
 15188:   //FSINH.X <ea>,FPn                                |-|--CCSS|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010010nnn0000010
 15189:   //FINTRZ.X <ea>,FPn                               |-|--CCS6|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010010nnn0000011
 15190:   //FSQRT.X <ea>,FPn                                |-|--CC46|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010010nnn0000100
 15191:   //FLOGNP1.X <ea>,FPn                              |-|--CCSS|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010010nnn0000110
 15192:   //FETOXM1.X <ea>,FPn                              |-|--CCSS|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010010nnn0001000
 15193:   //FTANH.X <ea>,FPn                                |-|--CCSS|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010010nnn0001001
 15194:   //FATAN.X <ea>,FPn                                |-|--CCSS|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010010nnn0001010
 15195:   //FASIN.X <ea>,FPn                                |-|--CCSS|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010010nnn0001100
 15196:   //FATANH.X <ea>,FPn                               |-|--CCSS|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010010nnn0001101
 15197:   //FSIN.X <ea>,FPn                                 |-|--CCSS|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010010nnn0001110
 15198:   //FTAN.X <ea>,FPn                                 |-|--CCSS|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010010nnn0001111
 15199:   //FETOX.X <ea>,FPn                                |-|--CCSS|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010010nnn0010000
 15200:   //FTWOTOX.X <ea>,FPn                              |-|--CCSS|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010010nnn0010001
 15201:   //FTENTOX.X <ea>,FPn                              |-|--CCSS|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010010nnn0010010
 15202:   //FLOGN.X <ea>,FPn                                |-|--CCSS|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010010nnn0010100
 15203:   //FLOG10.X <ea>,FPn                               |-|--CCSS|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010010nnn0010101
 15204:   //FLOG2.X <ea>,FPn                                |-|--CCSS|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010010nnn0010110
 15205:   //FABS.X <ea>,FPn                                 |-|--CC46|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010010nnn0011000
 15206:   //FCOSH.X <ea>,FPn                                |-|--CCSS|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010010nnn0011001
 15207:   //FNEG.X <ea>,FPn                                 |-|--CC46|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010010nnn0011010
 15208:   //FACOS.X <ea>,FPn                                |-|--CCSS|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010010nnn0011100
 15209:   //FCOS.X <ea>,FPn                                 |-|--CCSS|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010010nnn0011101
 15210:   //FGETEXP.X <ea>,FPn                              |-|--CCSS|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010010nnn0011110
 15211:   //FGETMAN.X <ea>,FPn                              |-|--CCSS|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010010nnn0011111
 15212:   //FDIV.X <ea>,FPn                                 |-|--CC46|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010010nnn0100000
 15213:   //FMOD.X <ea>,FPn                                 |-|--CCSS|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010010nnn0100001
 15214:   //FADD.X <ea>,FPn                                 |-|--CC46|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010010nnn0100010
 15215:   //FMUL.X <ea>,FPn                                 |-|--CC46|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010010nnn0100011
 15216:   //FSGLDIV.X <ea>,FPn                              |-|--CCS6|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010010nnn0100100
 15217:   //FREM.X <ea>,FPn                                 |-|--CCSS|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010010nnn0100101
 15218:   //FSCALE.X <ea>,FPn                               |-|--CCSS|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010010nnn0100110
 15219:   //FSGLMUL.X <ea>,FPn                              |-|--CCS6|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010010nnn0100111
 15220:   //FSUB.X <ea>,FPn                                 |-|--CC46|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010010nnn0101000
 15221:   //FCMP.X <ea>,FPn                                 |-|--CC46|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010010nnn0111000
 15222:   //FSMOVE.X <ea>,FPn                               |-|----46|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010010nnn1000000
 15223:   //FSSQRT.X <ea>,FPn                               |-|----46|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010010nnn1000001
 15224:   //FDMOVE.X <ea>,FPn                               |-|----46|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010010nnn1000100
 15225:   //FDSQRT.X <ea>,FPn                               |-|----46|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010010nnn1000101
 15226:   //FSABS.X <ea>,FPn                                |-|----46|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010010nnn1011000
 15227:   //FSNEG.X <ea>,FPn                                |-|----46|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010010nnn1011010
 15228:   //FDABS.X <ea>,FPn                                |-|----46|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010010nnn1011100
 15229:   //FDNEG.X <ea>,FPn                                |-|----46|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010010nnn1011110
 15230:   //FSDIV.X <ea>,FPn                                |-|----46|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010010nnn1100000
 15231:   //FSADD.X <ea>,FPn                                |-|----46|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010010nnn1100010
 15232:   //FSMUL.X <ea>,FPn                                |-|----46|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010010nnn1100011
 15233:   //FDDIV.X <ea>,FPn                                |-|----46|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010010nnn1100100
 15234:   //FDADD.X <ea>,FPn                                |-|----46|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010010nnn1100110
 15235:   //FDMUL.X <ea>,FPn                                |-|----46|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010010nnn1100111
 15236:   //FSSUB.X <ea>,FPn                                |-|----46|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010010nnn1101000
 15237:   //FDSUB.X <ea>,FPn                                |-|----46|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010010nnn1101100
 15238:   //FSINCOS.X <ea>,FPc:FPs                          |-|--CCSS|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010010sss0110ccc
 15239:   //FTST.P <ea>                                     |-|--CCSS|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-0100110000111010
 15240:   //FMOVE.P <ea>,FPn                                |-|--CCSS|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010011nnn0000000
 15241:   //FINT.P <ea>,FPn                                 |-|--CCSS|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010011nnn0000001
 15242:   //FSINH.P <ea>,FPn                                |-|--CCSS|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010011nnn0000010
 15243:   //FINTRZ.P <ea>,FPn                               |-|--CCSS|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010011nnn0000011
 15244:   //FSQRT.P <ea>,FPn                                |-|--CCSS|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010011nnn0000100
 15245:   //FLOGNP1.P <ea>,FPn                              |-|--CCSS|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010011nnn0000110
 15246:   //FETOXM1.P <ea>,FPn                              |-|--CCSS|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010011nnn0001000
 15247:   //FTANH.P <ea>,FPn                                |-|--CCSS|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010011nnn0001001
 15248:   //FATAN.P <ea>,FPn                                |-|--CCSS|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010011nnn0001010
 15249:   //FASIN.P <ea>,FPn                                |-|--CCSS|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010011nnn0001100
 15250:   //FATANH.P <ea>,FPn                               |-|--CCSS|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010011nnn0001101
 15251:   //FSIN.P <ea>,FPn                                 |-|--CCSS|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010011nnn0001110
 15252:   //FTAN.P <ea>,FPn                                 |-|--CCSS|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010011nnn0001111
 15253:   //FETOX.P <ea>,FPn                                |-|--CCSS|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010011nnn0010000
 15254:   //FTWOTOX.P <ea>,FPn                              |-|--CCSS|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010011nnn0010001
 15255:   //FTENTOX.P <ea>,FPn                              |-|--CCSS|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010011nnn0010010
 15256:   //FLOGN.P <ea>,FPn                                |-|--CCSS|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010011nnn0010100
 15257:   //FLOG10.P <ea>,FPn                               |-|--CCSS|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010011nnn0010101
 15258:   //FLOG2.P <ea>,FPn                                |-|--CCSS|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010011nnn0010110
 15259:   //FABS.P <ea>,FPn                                 |-|--CCSS|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010011nnn0011000
 15260:   //FCOSH.P <ea>,FPn                                |-|--CCSS|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010011nnn0011001
 15261:   //FNEG.P <ea>,FPn                                 |-|--CCSS|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010011nnn0011010
 15262:   //FACOS.P <ea>,FPn                                |-|--CCSS|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010011nnn0011100
 15263:   //FCOS.P <ea>,FPn                                 |-|--CCSS|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010011nnn0011101
 15264:   //FGETEXP.P <ea>,FPn                              |-|--CCSS|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010011nnn0011110
 15265:   //FGETMAN.P <ea>,FPn                              |-|--CCSS|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010011nnn0011111
 15266:   //FDIV.P <ea>,FPn                                 |-|--CCSS|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010011nnn0100000
 15267:   //FMOD.P <ea>,FPn                                 |-|--CCSS|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010011nnn0100001
 15268:   //FADD.P <ea>,FPn                                 |-|--CCSS|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010011nnn0100010
 15269:   //FMUL.P <ea>,FPn                                 |-|--CCSS|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010011nnn0100011
 15270:   //FSGLDIV.P <ea>,FPn                              |-|--CCSS|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010011nnn0100100
 15271:   //FREM.P <ea>,FPn                                 |-|--CCSS|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010011nnn0100101
 15272:   //FSCALE.P <ea>,FPn                               |-|--CCSS|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010011nnn0100110
 15273:   //FSGLMUL.P <ea>,FPn                              |-|--CCSS|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010011nnn0100111
 15274:   //FSUB.P <ea>,FPn                                 |-|--CCSS|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010011nnn0101000
 15275:   //FCMP.P <ea>,FPn                                 |-|--CCSS|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010011nnn0111000
 15276:   //FSMOVE.P <ea>,FPn                               |-|----SS|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010011nnn1000000
 15277:   //FSSQRT.P <ea>,FPn                               |-|----SS|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010011nnn1000001
 15278:   //FDMOVE.P <ea>,FPn                               |-|----SS|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010011nnn1000100
 15279:   //FDSQRT.P <ea>,FPn                               |-|----SS|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010011nnn1000101
 15280:   //FSABS.P <ea>,FPn                                |-|----SS|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010011nnn1011000
 15281:   //FSNEG.P <ea>,FPn                                |-|----SS|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010011nnn1011010
 15282:   //FDABS.P <ea>,FPn                                |-|----SS|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010011nnn1011100
 15283:   //FDNEG.P <ea>,FPn                                |-|----SS|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010011nnn1011110
 15284:   //FSDIV.P <ea>,FPn                                |-|----SS|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010011nnn1100000
 15285:   //FSADD.P <ea>,FPn                                |-|----SS|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010011nnn1100010
 15286:   //FSMUL.P <ea>,FPn                                |-|----SS|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010011nnn1100011
 15287:   //FDDIV.P <ea>,FPn                                |-|----SS|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010011nnn1100100
 15288:   //FDADD.P <ea>,FPn                                |-|----SS|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010011nnn1100110
 15289:   //FDMUL.P <ea>,FPn                                |-|----SS|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010011nnn1100111
 15290:   //FSSUB.P <ea>,FPn                                |-|----SS|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010011nnn1101000
 15291:   //FDSUB.P <ea>,FPn                                |-|----SS|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010011nnn1101100
 15292:   //FSINCOS.P <ea>,FPc:FPs                          |-|--CCSS|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010011sss0110ccc
 15293:   //FTST.D <ea>                                     |-|--CC46|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-0101010000111010
 15294:   //FMOVE.D <ea>,FPn                                |-|--CC46|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010101nnn0000000
 15295:   //FINT.D <ea>,FPn                                 |-|--CCS6|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010101nnn0000001
 15296:   //FSINH.D <ea>,FPn                                |-|--CCSS|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010101nnn0000010
 15297:   //FINTRZ.D <ea>,FPn                               |-|--CCS6|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010101nnn0000011
 15298:   //FSQRT.D <ea>,FPn                                |-|--CC46|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010101nnn0000100
 15299:   //FLOGNP1.D <ea>,FPn                              |-|--CCSS|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010101nnn0000110
 15300:   //FETOXM1.D <ea>,FPn                              |-|--CCSS|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010101nnn0001000
 15301:   //FTANH.D <ea>,FPn                                |-|--CCSS|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010101nnn0001001
 15302:   //FATAN.D <ea>,FPn                                |-|--CCSS|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010101nnn0001010
 15303:   //FASIN.D <ea>,FPn                                |-|--CCSS|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010101nnn0001100
 15304:   //FATANH.D <ea>,FPn                               |-|--CCSS|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010101nnn0001101
 15305:   //FSIN.D <ea>,FPn                                 |-|--CCSS|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010101nnn0001110
 15306:   //FTAN.D <ea>,FPn                                 |-|--CCSS|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010101nnn0001111
 15307:   //FETOX.D <ea>,FPn                                |-|--CCSS|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010101nnn0010000
 15308:   //FTWOTOX.D <ea>,FPn                              |-|--CCSS|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010101nnn0010001
 15309:   //FTENTOX.D <ea>,FPn                              |-|--CCSS|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010101nnn0010010
 15310:   //FLOGN.D <ea>,FPn                                |-|--CCSS|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010101nnn0010100
 15311:   //FLOG10.D <ea>,FPn                               |-|--CCSS|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010101nnn0010101
 15312:   //FLOG2.D <ea>,FPn                                |-|--CCSS|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010101nnn0010110
 15313:   //FABS.D <ea>,FPn                                 |-|--CC46|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010101nnn0011000
 15314:   //FCOSH.D <ea>,FPn                                |-|--CCSS|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010101nnn0011001
 15315:   //FNEG.D <ea>,FPn                                 |-|--CC46|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010101nnn0011010
 15316:   //FACOS.D <ea>,FPn                                |-|--CCSS|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010101nnn0011100
 15317:   //FCOS.D <ea>,FPn                                 |-|--CCSS|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010101nnn0011101
 15318:   //FGETEXP.D <ea>,FPn                              |-|--CCSS|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010101nnn0011110
 15319:   //FGETMAN.D <ea>,FPn                              |-|--CCSS|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010101nnn0011111
 15320:   //FDIV.D <ea>,FPn                                 |-|--CC46|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010101nnn0100000
 15321:   //FMOD.D <ea>,FPn                                 |-|--CCSS|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010101nnn0100001
 15322:   //FADD.D <ea>,FPn                                 |-|--CC46|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010101nnn0100010
 15323:   //FMUL.D <ea>,FPn                                 |-|--CC46|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010101nnn0100011
 15324:   //FSGLDIV.D <ea>,FPn                              |-|--CCS6|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010101nnn0100100
 15325:   //FREM.D <ea>,FPn                                 |-|--CCSS|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010101nnn0100101
 15326:   //FSCALE.D <ea>,FPn                               |-|--CCSS|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010101nnn0100110
 15327:   //FSGLMUL.D <ea>,FPn                              |-|--CCS6|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010101nnn0100111
 15328:   //FSUB.D <ea>,FPn                                 |-|--CC46|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010101nnn0101000
 15329:   //FCMP.D <ea>,FPn                                 |-|--CC46|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010101nnn0111000
 15330:   //FSMOVE.D <ea>,FPn                               |-|----46|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010101nnn1000000
 15331:   //FSSQRT.D <ea>,FPn                               |-|----46|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010101nnn1000001
 15332:   //FDMOVE.D <ea>,FPn                               |-|----46|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010101nnn1000100
 15333:   //FDSQRT.D <ea>,FPn                               |-|----46|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010101nnn1000101
 15334:   //FSABS.D <ea>,FPn                                |-|----46|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010101nnn1011000
 15335:   //FSNEG.D <ea>,FPn                                |-|----46|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010101nnn1011010
 15336:   //FDABS.D <ea>,FPn                                |-|----46|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010101nnn1011100
 15337:   //FDNEG.D <ea>,FPn                                |-|----46|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010101nnn1011110
 15338:   //FSDIV.D <ea>,FPn                                |-|----46|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010101nnn1100000
 15339:   //FSADD.D <ea>,FPn                                |-|----46|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010101nnn1100010
 15340:   //FSMUL.D <ea>,FPn                                |-|----46|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010101nnn1100011
 15341:   //FDDIV.D <ea>,FPn                                |-|----46|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010101nnn1100100
 15342:   //FDADD.D <ea>,FPn                                |-|----46|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010101nnn1100110
 15343:   //FDMUL.D <ea>,FPn                                |-|----46|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010101nnn1100111
 15344:   //FSSUB.D <ea>,FPn                                |-|----46|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010101nnn1101000
 15345:   //FDSUB.D <ea>,FPn                                |-|----46|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010101nnn1101100
 15346:   //FSINCOS.D <ea>,FPc:FPs                          |-|--CCSS|-|-----|-----|  M+-WXZPI|1111_001_000_mmm_rrr-010101sss0110ccc
 15347:   //FMOVEM.X #<data>,-(Ar)                          |-|--CC46|-|-----|-----|    -     |1111_001_000_100_rrr-11100000dddddddd
 15348:   //FMOVEM.X <list>,-(Ar)                           |-|--CC46|-|-----|-----|    -     |1111_001_000_100_rrr-11100000llllllll
 15349:   //FMOVEM.X Dl,-(Ar)                               |-|--CC4S|-|-----|-----|    -     |1111_001_000_100_rrr-111010000lll0000
 15350:   //FMOVEM.L #<data>,#<data>,FPSR/FPIAR             |-|--CC4S|-|-----|-----|         I|1111_001_000_111_100-1000110000000000-{data}
 15351:   //FMOVEM.L #<data>,#<data>,FPCR/FPIAR             |-|--CC4S|-|-----|-----|         I|1111_001_000_111_100-1001010000000000-{data}
 15352:   //FMOVEM.L #<data>,#<data>,FPCR/FPSR              |-|--CC4S|-|-----|-----|         I|1111_001_000_111_100-1001100000000000-{data}
 15353:   //FMOVEM.L #<data>,#<data>,#<data>,FPCR/FPSR/FPIAR|-|--CC4S|-|-----|-----|         I|1111_001_000_111_100-1001110000000000-{data}
 15354:   @SuppressWarnings ("fallthrough") public static void irpFgen () throws M68kException {
 15355:   fgen: {
 15356:     if (XEiJ.currentMPU == Model.MPU_MC68LC060) {
 15357:       irpFline ();
 15358:       break fgen;
 15359:     }
 15360:     XEiJ.mpuCycleCount++;
 15361:     int ea = XEiJ.regOC & 63;
 15362:     int a = XEiJ.regPC;
 15363:     XEiJ.regPC = a + 2;
 15364:     int w = mmuReadWordZeroExword (a, XEiJ.regSRS);  //pcwz。拡張ワード
 15365:     int m = w >> 10 & 7;
 15366:     int n = w >> 7 & 7;
 15367:     int c = w & 0x7f;
 15368:     XEiJ.fpuBox.epbSetRoundingPrec (XEiJ.fpuBox.epbFpcr >> 6 & 3);  //丸め桁数
 15369:     XEiJ.fpuBox.epbSetRoundingMode (XEiJ.fpuBox.epbFpcr >> 4 & 3);  //丸めモード
 15370:     a = 0;  //実効アドレス
 15371:     //XEiJ.fpuBox.epbExceptionStatusWord = 0;
 15372: 
 15373: 
 15374:     switch (w >> 13) {
 15375: 
 15376: 
 15377:     case 0b010:  //$4xxx-$5xxx: Fop.* <ea>,FPn
 15378:       XEiJ.fpuBox.epbFpsr &= 0x00ff00ff;
 15379:       XEiJ.fpuBox.epbFpiar = XEiJ.regPC0;  //FPIARはFMOVEM/FMOVE FPcr/FSAVE/FRESTORE以外の命令で例外が発生しなくても更新される
 15380: 
 15381:       switch (m) {
 15382: 
 15383:       case 0b000:  //$40xx-$43xx: Fop.L <ea>,FPn
 15384:         {
 15385:           XEiJ.mpuCycleCount += 3;
 15386:           int i;
 15387:           if (ea < XEiJ.EA_AR) {  //Dr
 15388:             XEiJ.mpuCycleCount += 2;
 15389:             //a = 0;
 15390:             i = XEiJ.regRn[ea];
 15391:           } else if (ea == XEiJ.EA_IM) {  //#<data>
 15392:             a = XEiJ.regPC;
 15393:             XEiJ.regPC = a + 4;
 15394:             i = mmuReadLongExword (a, XEiJ.regSRS);  //pcls
 15395:           } else {  //Dr,#<data>以外
 15396:             a = efaAnyLong (ea);
 15397:             i = mmuReadLongData (a, XEiJ.regSRS);
 15398:           }
 15399:           XEiJ.fpuFPn[m = EFPBox.EPB_SRC_TMP].seti (i);
 15400:         }
 15401:         break;
 15402: 
 15403:       case 0b001:  //$44xx-$47xx: Fop.S <ea>,FPn
 15404:         {
 15405:           int i;
 15406:           if (ea < XEiJ.EA_AR) {  //Dr
 15407:             XEiJ.mpuCycleCount += 2;
 15408:             //a = 0;
 15409:             i = XEiJ.regRn[ea];
 15410:           } else if (ea == XEiJ.EA_IM) {  //#<data>
 15411:             a = XEiJ.regPC;
 15412:             XEiJ.regPC = a + 4;
 15413:             i = mmuReadLongExword (a, XEiJ.regSRS);  //pcls
 15414:           } else {  //Dr,#<data>以外
 15415:             a = efaAnyLong (ea);
 15416:             i = mmuReadLongData (a, XEiJ.regSRS);
 15417:           }
 15418:           XEiJ.fpuFPn[m = EFPBox.EPB_SRC_TMP].setf0 (i);
 15419:         }
 15420:         break;
 15421: 
 15422:       case 0b010:  //$48xx-$4Bxx: Fop.X <ea>,FPn
 15423:         {
 15424:           int i;
 15425:           long l;
 15426:           if (ea == XEiJ.EA_IM) {  //#<data>
 15427:             if (!XEiJ.fpuBox.epbIsFullSpec ()) {  //12バイトのイミディエイト
 15428:               irpExceptionFormat0 (M68kException.M6E_UNIMPLEMENTED_EFFECTIVE << 2, XEiJ.regPC0);  //pcは命令の先頭
 15429:               break fgen;
 15430:             }
 15431:             a = XEiJ.regPC;
 15432:             XEiJ.regPC = a + 12;
 15433:             i = mmuReadLongExword (a, XEiJ.regSRS);
 15434:             l = mmuReadQuadExword (a + 4, XEiJ.regSRS);
 15435:           } else {  //#<data>以外
 15436:             a = efaAnyExtd (ea);
 15437:             i = mmuReadLongData (a, XEiJ.regSRS);
 15438:             l = mmuReadQuadSecond (a + 4, XEiJ.regSRS);
 15439:           }
 15440:           if (XEiJ.fpuBox.epbIsTriple ()) {  //三倍精度
 15441:             XEiJ.fpuFPn[m = EFPBox.EPB_SRC_TMP].sety012 (i, l);
 15442:           } else {  //拡張精度
 15443:             XEiJ.fpuFPn[m = EFPBox.EPB_SRC_TMP].setx012 (i, l);
 15444:           }
 15445:         }
 15446:         break;
 15447: 
 15448:       case 0b011:  //$4Cxx-$4Fxx: Fop.P <ea>,FPn
 15449:         {
 15450:           int i;
 15451:           long l;
 15452:           if (ea == XEiJ.EA_IM) {  //#<data>
 15453:             if (!XEiJ.fpuBox.epbIsFullSpec ()) {  //12バイトのイミディエイト
 15454:               irpExceptionFormat0 (M68kException.M6E_UNIMPLEMENTED_EFFECTIVE << 2, XEiJ.regPC0);  //pcは命令の先頭
 15455:               break fgen;
 15456:             }
 15457:             a = XEiJ.regPC;
 15458:             XEiJ.regPC = a + 12;
 15459:             i = mmuReadLongExword (a, XEiJ.regSRS);
 15460:             l = mmuReadQuadExword (a + 4, XEiJ.regSRS);
 15461:           } else {  //#<data>以外
 15462:             a = efaAnyExtd (ea);
 15463:             i = mmuReadLongData (a, XEiJ.regSRS);
 15464:             l = mmuReadQuadSecond (a + 4, XEiJ.regSRS);
 15465:           }
 15466:           if (!XEiJ.fpuBox.epbIsFullSpec ()) {  //パックトデシマル
 15467:             XEiJ.fpuBox.epbExceptionStatusWord = 0xe000 | M68kException.M6E_FP_UNSUPPORTED_DATA_TYPE & 7;
 15468:             irpExceptionFormat2 (M68kException.M6E_FP_UNSUPPORTED_DATA_TYPE << 2, XEiJ.regPC, a);  //pcは次の命令,アドレスはソースオペランド
 15469:             break fgen;
 15470:           }
 15471:           XEiJ.fpuFPn[m = EFPBox.EPB_SRC_TMP].setp012 (i, l);
 15472:         }
 15473:         break;
 15474: 
 15475:       case 0b100:  //$50xx-$53xx: Fop.W <ea>,FPn
 15476:         {
 15477:           XEiJ.mpuCycleCount += 3;
 15478:           int i;
 15479:           if (ea < XEiJ.EA_AR) {  //Dr
 15480:             XEiJ.mpuCycleCount += 2;
 15481:             //a = 0;
 15482:             i = (short) XEiJ.regRn[ea];
 15483:           } else if (ea == XEiJ.EA_IM) {  //#<data>
 15484:             a = XEiJ.regPC;
 15485:             XEiJ.regPC = a + 2;
 15486:             i = mmuReadWordSignExword (a, XEiJ.regSRS);  //pcws
 15487:           } else {  //Dr,#<data>以外
 15488:             a = efaAnyWord (ea);
 15489:             i = mmuReadWordSignData (a, XEiJ.regSRS);
 15490:           }
 15491:           XEiJ.fpuFPn[m = EFPBox.EPB_SRC_TMP].seti (i);
 15492:         }
 15493:         break;
 15494: 
 15495:       case 0b101:  //$54xx-$57xx: Fop.D <ea>,FPn
 15496:         {
 15497:           long l;
 15498:           if (ea == XEiJ.EA_IM) {  //#<data>
 15499:             a = XEiJ.regPC;
 15500:             XEiJ.regPC = a + 8;
 15501:             l = mmuReadQuadExword (a, XEiJ.regSRS);
 15502:           } else {  //#<data>以外
 15503:             a = efaAnyQuad (ea);
 15504:             l = mmuReadQuadData (a, XEiJ.regSRS);
 15505:           }
 15506:           XEiJ.fpuFPn[m = EFPBox.EPB_SRC_TMP].setd01 (l);
 15507:         }
 15508:         break;
 15509: 
 15510:       case 0b110:  //$58xx-$5Bxx: Fop.B <ea>,FPn
 15511:         {
 15512:           XEiJ.mpuCycleCount += 3;
 15513:           int i;
 15514:           if (ea < XEiJ.EA_AR) {  //Dr
 15515:             XEiJ.mpuCycleCount += 2;
 15516:             //a = 0;
 15517:             i = (byte) XEiJ.regRn[ea];
 15518:           } else if (ea == XEiJ.EA_IM) {  //#<data>
 15519:             a = XEiJ.regPC;
 15520:             XEiJ.regPC = a + 2;
 15521:             i = mmuReadByteSignExword (a + 1, XEiJ.regSRS);  //pcbs
 15522:           } else {  //Dr,#<data>以外
 15523:             a = efaAnyByte (ea);
 15524:             i = mmuReadByteSignData (a, XEiJ.regSRS);
 15525:           }
 15526:           XEiJ.fpuFPn[m = EFPBox.EPB_SRC_TMP].seti (i);
 15527:         }
 15528:         break;
 15529: 
 15530:       case 0b111:  //$5Cxx-$5Fxx: FMOVECR.X #ccc,FPn
 15531:       default:
 15532:         if (!XEiJ.fpuBox.epbIsFullSpec ()) {
 15533:           irpExceptionFormat2 (M68kException.M6E_FP_UNIMPLEMENTED_INSTRUCTION << 2, XEiJ.regPC, M68kException.M6E_FP_UNIMPLEMENTED_INSTRUCTION << 2);  //pcは次の命令,アドレスはベクタオフセット
 15534:           break fgen;
 15535:         }
 15536:         if (0x40 <= c) {
 15537:           //マニュアルにはFMOVECRの命令フォーマットのROMオフセットが7bitあるように書かれているが実際は6bit
 15538:           //MC68882で0x40以上を指定すると命令実行前例外のF-Line Emulator(レスポンス$1C0B)が返る
 15539:           XEiJ.regPC = XEiJ.regPC0 + 2;  //拡張ワードを読まなかったことにする
 15540:           irpFline ();
 15541:           break fgen;
 15542:         }
 15543:         if (false) {
 15544:           m = EFPBox.EPB_CONST_START + c;  //定数
 15545:           c = 0;  //FMOVE
 15546:         } else {
 15547:           //FMOVECR
 15548:           XEiJ.fpuBox.epbFmovecr (XEiJ.fpuFPn[n], c);
 15549:           //FPSRのAEXCを設定する
 15550:           XEiJ.fpuBox.epbFpsr |= XEiJ.FPU_FPSR_EXC_TO_AEXC[XEiJ.fpuBox.epbFpsr >> 8 & 255];
 15551:           //浮動小数点命令実行後例外 floating-point post-instruction exception
 15552:           if (irpFPPostInstruction (a)) {
 15553:             break fgen;
 15554:           }
 15555:           break fgen;
 15556:         }
 15557: 
 15558:       }
 15559:       //浮動小数点命令実行前例外 floating-point pre-instruction exception
 15560:       if (irpFPPreInstruction ()) {
 15561:         break fgen;
 15562:       }
 15563:       //Fop.X <ea>,FPn → Fop.X FP[EFPBox.EPB_SRC_TMP],FPn
 15564:       //FMOVECR.X #ccc,FPn → FMOVE.X FPc,FPn
 15565: 
 15566: 
 15567:       //fallthrough
 15568:     case 0b000:  //$0xxx-$1xxx: Fop.X FPm,FPn
 15569:       if (w >> 13 == 0) {
 15570:         XEiJ.fpuBox.epbFpsr &= 0x00ff00ff;
 15571:       }
 15572:       //Fop.* <ea>,FPnのときFPIARは設定済み
 15573:       XEiJ.fpuBox.epbFpiar = XEiJ.regPC0;  //FPIARはFMOVEM/FMOVE FPcr/FSAVE/FRESTORE以外の命令で例外が発生しなくても更新される
 15574: 
 15575:       switch (c) {
 15576: 
 15577:       case 0b000_0000:  //$xx00: FMOVE.* *m,FPn
 15578:         //  BSUN   常にクリア
 15579:         //  SNAN   引数がシグナリングNaNのときセット、それ以外はクリア
 15580:         //  OPERR  常にクリア
 15581:         //  OVFL   常にクリア
 15582:         //  UNFL   結果が非正規化数のときセット、それ以外はクリア
 15583:         //  DZ     常にクリア
 15584:         //  INEX2  結果に誤差があるときセット、それ以外はクリア
 15585:         //  INEX1  引数がpackedで正確に変換できないときセット、それ以外はクリア
 15586:         XEiJ.fpuFPn[n].sete (XEiJ.fpuFPn[m]).finish ();
 15587:         break;
 15588: 
 15589:       case 0b000_0001:  //$xx01: FINT.* *m,FPn
 15590:         //  BSUN   常にクリア
 15591:         //  SNAN   引数がシグナリングNaNのときセット、それ以外はクリア
 15592:         //  OPERR  常にクリア
 15593:         //  OVFL   常にクリア
 15594:         //         正規化数の最大値は整数なので丸めても大きくなることはない
 15595:         //  UNFL   常にクリア
 15596:         //         結果は整数なので非正規化数にはならない
 15597:         //  DZ     常にクリア
 15598:         //  INEX2  結果に誤差があるときセット、それ以外はクリア
 15599:         //  INEX1  引数がpackedで正確に変換できないときセット、それ以外はクリア
 15600:         XEiJ.mpuCycleCount += 2;
 15601:         //  FINTはsingleとdoubleの丸め処理を行わない
 15602:         XEiJ.fpuBox.epbSetRoundingPrec (EFPBox.EPB_PREC_EXD);
 15603:         XEiJ.fpuFPn[n].round (XEiJ.fpuFPn[m], XEiJ.fpuBox.epbRoundingMode);
 15604:         break;
 15605: 
 15606:       case 0b000_0010:  //$xx02: FSINH.* *m,FPn
 15607:         //  BSUN   常にクリア
 15608:         //  SNAN   引数がシグナリングNaNのときセット、それ以外はクリア
 15609:         //  OPERR  常にクリア
 15610:         //  OVFL   オーバーフローしたときセット、それ以外はクリア
 15611:         //  UNFL   結果が非正規化数のときセット、それ以外はクリア
 15612:         //  DZ     常にクリア
 15613:         //  INEX2  結果に誤差があるときセット、それ以外はクリア
 15614:         //  INEX1  引数がpackedで正確に変換できないときセット、それ以外はクリア
 15615:         if (!XEiJ.fpuBox.epbIsFullSpec ()) {
 15616:           irpExceptionFormat2 (M68kException.M6E_FP_UNIMPLEMENTED_INSTRUCTION << 2, XEiJ.regPC, a);  //pcは次の命令,アドレスは実効アドレス
 15617:           break fgen;
 15618:         }
 15619:         XEiJ.fpuFPn[n].sinh (XEiJ.fpuFPn[m]);
 15620:         break;
 15621: 
 15622:       case 0b000_0011:  //$xx03: FINTRZ.* *m,FPn
 15623:         //  BSUN   常にクリア
 15624:         //  SNAN   引数がシグナリングNaNのときセット、それ以外はクリア
 15625:         //  OPERR  常にクリア
 15626:         //  OVFL   常にクリア
 15627:         //  UNFL   常にクリア
 15628:         //         結果は整数なので非正規化数にはならない
 15629:         //  DZ     常にクリア
 15630:         //  INEX2  結果に誤差があるときセット、それ以外はクリア
 15631:         //  INEX1  引数がpackedで正確に変換できないときセット、それ以外はクリア
 15632:         XEiJ.mpuCycleCount += 2;
 15633:         //  FINTRZはsingleとdoubleの丸め処理を行わない
 15634:         XEiJ.fpuBox.epbSetRoundingPrec (EFPBox.EPB_PREC_EXD);
 15635:         XEiJ.fpuFPn[n].trunc (XEiJ.fpuFPn[m]);
 15636:         break;
 15637: 
 15638:       case 0b000_0100:  //$xx04: FSQRT.* *m,FPn
 15639:       case 0b000_0101:  //$xx05: FSQRT.* *m,FPn (MC68882)
 15640:         //  BSUN   常にクリア
 15641:         //  SNAN   引数がシグナリングNaNのときセット、それ以外はクリア
 15642:         //  OPERR  引数が-0を除く負数のときセット、それ以外はクリア
 15643:         //  OVFL   常にクリア
 15644:         //         1よりも大きい数は小さくなるので溢れることはない
 15645:         //  UNFL   常にクリア
 15646:         //         非正規化数の平方根は正規化数なので結果が非正規化数になることはない
 15647:         //  DZ     常にクリア
 15648:         //  INEX2  結果に誤差があるときセット、それ以外はクリア
 15649:         //  INEX1  引数がpackedで正確に変換できないときセット、それ以外はクリア
 15650:         XEiJ.mpuCycleCount += 67;
 15651:         XEiJ.fpuFPn[n].sqrt (XEiJ.fpuFPn[m]);
 15652:         break;
 15653: 
 15654:       case 0b000_0110:  //$xx06: FLOGNP1.* *m,FPn
 15655:       case 0b000_0111:  //$xx07: FLOGNP1.* *m,FPn (MC68882)
 15656:         //  BSUN   常にクリア
 15657:         //  SNAN   引数がシグナリングNaNのときセット、それ以外はクリア
 15658:         //  OPERR  引数が-1よりも小さいときセット、それ以外はクリア
 15659:         //  OVFL   常にクリア
 15660:         //         log(1+0)=0,log(1+x)<=xなので結果が引数よりも大きくなることはない
 15661:         //  UNFL   結果が非正規化数のときセット、それ以外はクリア
 15662:         //  DZ     引数が-1のときセット、それ以外はクリア
 15663:         //  INEX2  結果に誤差があるときセット、それ以外はクリア
 15664:         //  INEX1  引数がpackedで正確に変換できないときセット、それ以外はクリア
 15665:         if (!XEiJ.fpuBox.epbIsFullSpec ()) {
 15666:           irpExceptionFormat2 (M68kException.M6E_FP_UNIMPLEMENTED_INSTRUCTION << 2, XEiJ.regPC, a);  //pcは次の命令,アドレスは実効アドレス
 15667:           break fgen;
 15668:         }
 15669:         XEiJ.fpuFPn[n].log1p (XEiJ.fpuFPn[m]);
 15670:         break;
 15671: 
 15672:       case 0b000_1000:  //$xx08: FETOXM1.* *m,FPn
 15673:         //  BSUN   常にクリア
 15674:         //  SNAN   引数がシグナリングNaNのときセット、それ以外はクリア
 15675:         //  OPERR  常にクリア
 15676:         //  OVFL   オーバーフローしたときセット、それ以外はクリア
 15677:         //  UNFL   結果が非正規化数のときセット、それ以外はクリア
 15678:         //  DZ     常にクリア
 15679:         //  INEX2  結果に誤差があるときセット、それ以外はクリア
 15680:         //  INEX1  引数がpackedで正確に変換できないときセット、それ以外はクリア
 15681:         if (!XEiJ.fpuBox.epbIsFullSpec ()) {
 15682:           irpExceptionFormat2 (M68kException.M6E_FP_UNIMPLEMENTED_INSTRUCTION << 2, XEiJ.regPC, a);  //pcは次の命令,アドレスは実効アドレス
 15683:           break fgen;
 15684:         }
 15685:         XEiJ.fpuFPn[n].expm1 (XEiJ.fpuFPn[m]);
 15686:         break;
 15687: 
 15688:       case 0b000_1001:  //$xx09: FTANH.* *m,FPn
 15689:         //  BSUN   常にクリア
 15690:         //  SNAN   引数がシグナリングNaNのときセット、それ以外はクリア
 15691:         //  OPERR  常にクリア
 15692:         //  OVFL   常にクリア
 15693:         //  UNFL   結果が非正規化数のときセット、それ以外はクリア
 15694:         //  DZ     常にクリア
 15695:         //  INEX2  結果に誤差があるときセット、それ以外はクリア
 15696:         //  INEX1  引数がpackedで正確に変換できないときセット、それ以外はクリア
 15697:         if (!XEiJ.fpuBox.epbIsFullSpec ()) {
 15698:           irpExceptionFormat2 (M68kException.M6E_FP_UNIMPLEMENTED_INSTRUCTION << 2, XEiJ.regPC, a);  //pcは次の命令,アドレスは実効アドレス
 15699:           break fgen;
 15700:         }
 15701:         XEiJ.fpuFPn[n].tanh (XEiJ.fpuFPn[m]);
 15702:         break;
 15703: 
 15704:       case 0b000_1010:  //$xx0A: FATAN.* *m,FPn
 15705:       case 0b000_1011:  //$xx0B: FATAN.* *m,FPn (MC68882)
 15706:         //  BSUN   常にクリア
 15707:         //  SNAN   引数がシグナリングNaNのときセット、それ以外はクリア
 15708:         //  OPERR  常にクリア
 15709:         //  OVFL   常にクリア
 15710:         //  UNFL   結果が非正規化数のときセット、それ以外はクリア
 15711:         //  DZ     常にクリア
 15712:         //  INEX2  結果に誤差があるときセット、それ以外はクリア
 15713:         //  INEX1  引数がpackedで正確に変換できないときセット、それ以外はクリア
 15714:         if (!XEiJ.fpuBox.epbIsFullSpec ()) {
 15715:           irpExceptionFormat2 (M68kException.M6E_FP_UNIMPLEMENTED_INSTRUCTION << 2, XEiJ.regPC, a);  //pcは次の命令,アドレスは実効アドレス
 15716:           break fgen;
 15717:         }
 15718:         XEiJ.fpuFPn[n].atan (XEiJ.fpuFPn[m]);
 15719:         break;
 15720: 
 15721:       case 0b000_1100:  //$xx0C: FASIN.* *m,FPn
 15722:         //  BSUN   常にクリア
 15723:         //  SNAN   引数がシグナリングNaNのときセット、それ以外はクリア
 15724:         //  OPERR  引数の絶対値が1よりも大きいときセット、それ以外はクリア
 15725:         //  OVFL   常にクリア
 15726:         //  UNFL   結果が非正規化数のときセット、それ以外はクリア
 15727:         //  DZ     常にクリア
 15728:         //  INEX2  結果に誤差があるときセット、それ以外はクリア
 15729:         //  INEX1  引数がpackedで正確に変換できないときセット、それ以外はクリア
 15730:         if (!XEiJ.fpuBox.epbIsFullSpec ()) {
 15731:           irpExceptionFormat2 (M68kException.M6E_FP_UNIMPLEMENTED_INSTRUCTION << 2, XEiJ.regPC, a);  //pcは次の命令,アドレスは実効アドレス
 15732:           break fgen;
 15733:         }
 15734:         XEiJ.fpuFPn[n].asin (XEiJ.fpuFPn[m]);
 15735:         break;
 15736: 
 15737:       case 0b000_1101:  //$xx0D: FATANH.* *m,FPn
 15738:         //  BSUN   常にクリア
 15739:         //  SNAN   引数がシグナリングNaNのときセット、それ以外はクリア
 15740:         //  OPERR  引数の絶対値が1よりも大きいときセット、それ以外はクリア
 15741:         //  OVFL   常にクリア
 15742:         //         1のとき無限大なのだから1の近くでオーバーフローしそうに思えるがatanh(1-2^-80)≒28.07くらい
 15743:         //  UNFL   結果が非正規化数のときセット、それ以外はクリア
 15744:         //  DZ     引数の絶対値が1のときセット、それ以外はクリア
 15745:         //  INEX2  結果に誤差があるときセット、それ以外はクリア
 15746:         //  INEX1  引数がpackedで正確に変換できないときセット、それ以外はクリア
 15747:         if (!XEiJ.fpuBox.epbIsFullSpec ()) {
 15748:           irpExceptionFormat2 (M68kException.M6E_FP_UNIMPLEMENTED_INSTRUCTION << 2, XEiJ.regPC, a);  //pcは次の命令,アドレスは実効アドレス
 15749:           break fgen;
 15750:         }
 15751:         XEiJ.fpuFPn[n].atanh (XEiJ.fpuFPn[m]);
 15752:         break;
 15753: 
 15754:       case 0b000_1110:  //$xx0E: FSIN.* *m,FPn
 15755:         //  BSUN   常にクリア
 15756:         //  SNAN   引数がシグナリングNaNのときセット、それ以外はクリア
 15757:         //  OPERR  引数が無限大のときセット、それ以外はクリア
 15758:         //  OVFL   常にクリア
 15759:         //  UNFL   結果が非正規化数のときセット、それ以外はクリア
 15760:         //  DZ     常にクリア
 15761:         //  INEX2  結果に誤差があるときセット、それ以外はクリア
 15762:         //  INEX1  引数がpackedで正確に変換できないときセット、それ以外はクリア
 15763:         if (!XEiJ.fpuBox.epbIsFullSpec ()) {
 15764:           irpExceptionFormat2 (M68kException.M6E_FP_UNIMPLEMENTED_INSTRUCTION << 2, XEiJ.regPC, a);  //pcは次の命令,アドレスは実効アドレス
 15765:           break fgen;
 15766:         }
 15767:         XEiJ.fpuFPn[n].sin (XEiJ.fpuFPn[m]);
 15768:         break;
 15769: 
 15770:       case 0b000_1111:  //$xx0F: FTAN.* *m,FPn
 15771:         //  BSUN   常にクリア
 15772:         //  SNAN   引数がシグナリングNaNのときセット、それ以外はクリア
 15773:         //  OPERR  引数が無限大のときセット、それ以外はクリア
 15774:         //  OVFL   オーバーフローしたときセット、それ以外はクリア
 15775:         //  UNFL   結果が非正規化数のときセット、それ以外はクリア
 15776:         //  DZ     常にクリア
 15777:         //         cos(x)=0を満たすxは正確に表現できないのだからsin(x)/cos(x)がゼロ除算になるのはおかしい
 15778:         //  INEX2  結果に誤差があるときセット、それ以外はクリア
 15779:         //  INEX1  引数がpackedで正確に変換できないときセット、それ以外はクリア
 15780:         if (!XEiJ.fpuBox.epbIsFullSpec ()) {
 15781:           irpExceptionFormat2 (M68kException.M6E_FP_UNIMPLEMENTED_INSTRUCTION << 2, XEiJ.regPC, a);  //pcは次の命令,アドレスは実効アドレス
 15782:           break fgen;
 15783:         }
 15784:         XEiJ.fpuFPn[n].tan (XEiJ.fpuFPn[m]);
 15785:         break;
 15786: 
 15787:       case 0b001_0000:  //$xx10: FETOX.* *m,FPn
 15788:         //  BSUN   常にクリア
 15789:         //  SNAN   引数がシグナリングNaNのときセット、それ以外はクリア
 15790:         //  OPERR  常にクリア
 15791:         //  OVFL   オーバーフローしたときセット、それ以外はクリア
 15792:         //  UNFL   結果が非正規化数のときセット、それ以外はクリア
 15793:         //  DZ     常にクリア
 15794:         //  INEX2  結果に誤差があるときセット、それ以外はクリア
 15795:         //  INEX1  引数がpackedで正確に変換できないときセット、それ以外はクリア
 15796:         if (!XEiJ.fpuBox.epbIsFullSpec ()) {
 15797:           irpExceptionFormat2 (M68kException.M6E_FP_UNIMPLEMENTED_INSTRUCTION << 2, XEiJ.regPC, a);  //pcは次の命令,アドレスは実効アドレス
 15798:           break fgen;
 15799:         }
 15800:         XEiJ.fpuFPn[n].exp (XEiJ.fpuFPn[m]);
 15801:         break;
 15802: 
 15803:       case 0b001_0001:  //$xx11: FTWOTOX.* *m,FPn
 15804:         //  BSUN   常にクリア
 15805:         //  SNAN   引数がシグナリングNaNのときセット、それ以外はクリア
 15806:         //  OPERR  常にクリア
 15807:         //  OVFL   オーバーフローしたときセット、それ以外はクリア
 15808:         //  UNFL   結果が非正規化数のときセット、それ以外はクリア
 15809:         //  DZ     常にクリア
 15810:         //  INEX2  結果に誤差があるときセット、それ以外はクリア
 15811:         //  INEX1  引数がpackedで正確に変換できないときセット、それ以外はクリア
 15812:         if (!XEiJ.fpuBox.epbIsFullSpec ()) {
 15813:           irpExceptionFormat2 (M68kException.M6E_FP_UNIMPLEMENTED_INSTRUCTION << 2, XEiJ.regPC, a);  //pcは次の命令,アドレスは実効アドレス
 15814:           break fgen;
 15815:         }
 15816:         XEiJ.fpuFPn[n].exp2 (XEiJ.fpuFPn[m]);
 15817:         break;
 15818: 
 15819:       case 0b001_0010:  //$xx12: FTENTOX.* *m,FPn
 15820:       case 0b001_0011:  //$xx13: FTENTOX.* *m,FPn (MC68882)
 15821:         //  BSUN   常にクリア
 15822:         //  SNAN   引数がシグナリングNaNのときセット、それ以外はクリア
 15823:         //  OPERR  常にクリア
 15824:         //  OVFL   オーバーフローしたときセット、それ以外はクリア
 15825:         //  UNFL   結果が非正規化数のときセット、それ以外はクリア
 15826:         //  DZ     常にクリア
 15827:         //  INEX2  結果に誤差があるときセット、それ以外はクリア
 15828:         //  INEX1  引数がpackedで正確に変換できないときセット、それ以外はクリア
 15829:         if (!XEiJ.fpuBox.epbIsFullSpec ()) {
 15830:           irpExceptionFormat2 (M68kException.M6E_FP_UNIMPLEMENTED_INSTRUCTION << 2, XEiJ.regPC, a);  //pcは次の命令,アドレスは実効アドレス
 15831:           break fgen;
 15832:         }
 15833:         XEiJ.fpuFPn[n].exp10 (XEiJ.fpuFPn[m]);
 15834:         break;
 15835: 
 15836:       case 0b001_0100:  //$xx14: FLOGN.* *m,FPn
 15837:         //  BSUN   常にクリア
 15838:         //  SNAN   引数がシグナリングNaNのときセット、それ以外はクリア
 15839:         //  OPERR  引数が0よりも小さいときセット、それ以外はクリア
 15840:         //  OVFL   常にクリア
 15841:         //         log(1)=0,log(x)<=x-1なので結果が引数よりも大きくなることはない
 15842:         //  UNFL   常にクリア
 15843:         //         log(1+2^-80)≒2^-80
 15844:         //  DZ     引数がゼロのときセット、それ以外はクリア
 15845:         //  INEX2  結果に誤差があるときセット、それ以外はクリア
 15846:         //  INEX1  引数がpackedで正確に変換できないときセット、それ以外はクリア
 15847:         if (!XEiJ.fpuBox.epbIsFullSpec ()) {
 15848:           irpExceptionFormat2 (M68kException.M6E_FP_UNIMPLEMENTED_INSTRUCTION << 2, XEiJ.regPC, a);  //pcは次の命令,アドレスは実効アドレス
 15849:           break fgen;
 15850:         }
 15851:         XEiJ.fpuFPn[n].log (XEiJ.fpuFPn[m]);
 15852:         break;
 15853: 
 15854:       case 0b001_0101:  //$xx15: FLOG10.* *m,FPn
 15855:         //  BSUN   常にクリア
 15856:         //  SNAN   引数がシグナリングNaNのときセット、それ以外はクリア
 15857:         //  OPERR  引数が0よりも小さいときセット、それ以外はクリア
 15858:         //  OVFL   常にクリア
 15859:         //  UNFL   常にクリア
 15860:         //  DZ     引数がゼロのときセット、それ以外はクリア
 15861:         //  INEX2  結果に誤差があるときセット、それ以外はクリア
 15862:         //  INEX1  引数がpackedで正確に変換できないときセット、それ以外はクリア
 15863:         if (!XEiJ.fpuBox.epbIsFullSpec ()) {
 15864:           irpExceptionFormat2 (M68kException.M6E_FP_UNIMPLEMENTED_INSTRUCTION << 2, XEiJ.regPC, a);  //pcは次の命令,アドレスは実効アドレス
 15865:           break fgen;
 15866:         }
 15867:         XEiJ.fpuFPn[n].log10 (XEiJ.fpuFPn[m]);
 15868:         break;
 15869: 
 15870:       case 0b001_0110:  //$xx16: FLOG2.* *m,FPn
 15871:       case 0b001_0111:  //$xx17: FLOG2.* *m,FPn (MC68882)
 15872:         //  BSUN   常にクリア
 15873:         //  SNAN   引数がシグナリングNaNのときセット、それ以外はクリア
 15874:         //  OPERR  引数が0よりも小さいときセット、それ以外はクリア
 15875:         //  OVFL   常にクリア
 15876:         //  UNFL   常にクリア
 15877:         //  DZ     引数がゼロのときセット、それ以外はクリア
 15878:         //  INEX2  結果に誤差があるときセット、それ以外はクリア
 15879:         //  INEX1  引数がpackedで正確に変換できないときセット、それ以外はクリア
 15880:         if (!XEiJ.fpuBox.epbIsFullSpec ()) {
 15881:           irpExceptionFormat2 (M68kException.M6E_FP_UNIMPLEMENTED_INSTRUCTION << 2, XEiJ.regPC, a);  //pcは次の命令,アドレスは実効アドレス
 15882:           break fgen;
 15883:         }
 15884:         XEiJ.fpuFPn[n].log2 (XEiJ.fpuFPn[m]);
 15885:         break;
 15886: 
 15887:       case 0b001_1000:  //$xx18: FABS.* *m,FPn
 15888:         //  BSUN   常にクリア
 15889:         //  SNAN   引数がシグナリングNaNのときセット、それ以外はクリア
 15890:         //  OPERR  常にクリア
 15891:         //  OVFL   常にクリア
 15892:         //  UNFL   結果が非正規化数のときセット、それ以外はクリア
 15893:         //  DZ     常にクリア
 15894:         //  INEX2  常にクリア
 15895:         //  INEX1  引数がpackedで正確に変換できないときセット、それ以外はクリア
 15896:         XEiJ.fpuFPn[n].abs (XEiJ.fpuFPn[m]);
 15897:         break;
 15898: 
 15899:       case 0b001_1001:  //$xx19: FCOSH.* *m,FPn
 15900:         //  BSUN   常にクリア
 15901:         //  SNAN   引数がシグナリングNaNのときセット、それ以外はクリア
 15902:         //  OPERR  常にクリア
 15903:         //  OVFL   オーバーフローしたときセット、それ以外はクリア
 15904:         //  UNFL   常にクリア
 15905:         //  DZ     常にクリア
 15906:         //  INEX2  結果に誤差があるときセット、それ以外はクリア
 15907:         //  INEX1  引数がpackedで正確に変換できないときセット、それ以外はクリア
 15908:         if (!XEiJ.fpuBox.epbIsFullSpec ()) {
 15909:           irpExceptionFormat2 (M68kException.M6E_FP_UNIMPLEMENTED_INSTRUCTION << 2, XEiJ.regPC, a);  //pcは次の命令,アドレスは実効アドレス
 15910:           break fgen;
 15911:         }
 15912:         XEiJ.fpuFPn[n].cosh (XEiJ.fpuFPn[m]);
 15913:         break;
 15914: 
 15915:       case 0b001_1010:  //$xx1A: FNEG.* *m,FPn
 15916:       case 0b001_1011:  //$xx1B: FNEG.* *m,FPn (MC68882)
 15917:         //  BSUN   常にクリア
 15918:         //  SNAN   引数がシグナリングNaNのときセット、それ以外はクリア
 15919:         //  OPERR  常にクリア
 15920:         //  OVFL   常にクリア
 15921:         //  UNFL   結果が非正規化数のときセット、それ以外はクリア
 15922:         //  DZ     常にクリア
 15923:         //  INEX2  常にクリア
 15924:         //  INEX1  引数がpackedで正確に変換できないときセット、それ以外はクリア
 15925:         XEiJ.fpuFPn[n].neg (XEiJ.fpuFPn[m]);
 15926:         break;
 15927: 
 15928:       case 0b001_1100:  //$xx1C: FACOS.* *m,FPn
 15929:         //  BSUN   常にクリア
 15930:         //  SNAN   引数がシグナリングNaNのときセット、それ以外はクリア
 15931:         //  OPERR  引数の絶対値が1よりも大きいときセット、それ以外はクリア
 15932:         //  OVFL   常にクリア
 15933:         //  UNFL   常にクリア
 15934:         //         acos(1-ulp(1))はulp(1)よりも大きい
 15935:         //  DZ     常にクリア
 15936:         //  INEX2  結果に誤差があるときセット、それ以外はクリア
 15937:         //         おそらくセットされないのはacos(1)=0だけ
 15938:         //  INEX1  引数がpackedで正確に変換できないときセット、それ以外はクリア
 15939:         if (!XEiJ.fpuBox.epbIsFullSpec ()) {
 15940:           irpExceptionFormat2 (M68kException.M6E_FP_UNIMPLEMENTED_INSTRUCTION << 2, XEiJ.regPC, a);  //pcは次の命令,アドレスは実効アドレス
 15941:           break fgen;
 15942:         }
 15943:         XEiJ.fpuFPn[n].acos (XEiJ.fpuFPn[m]);
 15944:         break;
 15945: 
 15946:       case 0b001_1101:  //$xx1D: FCOS.* *m,FPn
 15947:         //  BSUN   常にクリア
 15948:         //  SNAN   引数がシグナリングNaNのときセット、それ以外はクリア
 15949:         //  OPERR  引数が無限大のときセット、それ以外はクリア
 15950:         //  OVFL   常にクリア
 15951:         //  UNFL   常にクリア
 15952:         //         cos(x)=0を満たすxは正確に表現できず、cos(pi/2)とcos(3*pi/2)が正規化数になってしまう
 15953:         //  DZ     常にクリア
 15954:         //  INEX2  結果に誤差があるときセット、それ以外はクリア
 15955:         //  INEX1  引数がpackedで正確に変換できないときセット、それ以外はクリア
 15956:         if (!XEiJ.fpuBox.epbIsFullSpec ()) {
 15957:           irpExceptionFormat2 (M68kException.M6E_FP_UNIMPLEMENTED_INSTRUCTION << 2, XEiJ.regPC, a);  //pcは次の命令,アドレスは実効アドレス
 15958:           break fgen;
 15959:         }
 15960:         XEiJ.fpuFPn[n].cos (XEiJ.fpuFPn[m]);
 15961:         break;
 15962: 
 15963:       case 0b001_1110:  //$xx1E: FGETEXP.* *m,FPn
 15964:         //  BSUN   常にクリア
 15965:         //  SNAN   引数がシグナリングNaNのときセット、それ以外はクリア
 15966:         //  OPERR  引数が無限大のときセット、それ以外はクリア
 15967:         //  OVFL   常にクリア
 15968:         //  UNFL   常にクリア
 15969:         //  DZ     常にクリア
 15970:         //  INEX2  常にクリア
 15971:         //  INEX1  引数がpackedで正確に変換できないときセット、それ以外はクリア
 15972:         if (!XEiJ.fpuBox.epbIsFullSpec ()) {
 15973:           irpExceptionFormat2 (M68kException.M6E_FP_UNIMPLEMENTED_INSTRUCTION << 2, XEiJ.regPC, a);  //pcは次の命令,アドレスは実効アドレス
 15974:           break fgen;
 15975:         }
 15976:         XEiJ.fpuFPn[n].getexp (XEiJ.fpuFPn[m]);
 15977:         break;
 15978: 
 15979:       case 0b001_1111:  //$xx1F: FGETMAN.* *m,FPn
 15980:         //  BSUN   常にクリア
 15981:         //  SNAN   引数がシグナリングNaNのときセット、それ以外はクリア
 15982:         //  OPERR  引数が無限大のときセット、それ以外はクリア
 15983:         //  OVFL   常にクリア
 15984:         //  UNFL   常にクリア
 15985:         //  DZ     常にクリア
 15986:         //  INEX2  常にクリア
 15987:         //  INEX1  引数がpackedで正確に変換できないときセット、それ以外はクリア
 15988:         if (!XEiJ.fpuBox.epbIsFullSpec ()) {
 15989:           irpExceptionFormat2 (M68kException.M6E_FP_UNIMPLEMENTED_INSTRUCTION << 2, XEiJ.regPC, a);  //pcは次の命令,アドレスは実効アドレス
 15990:           break fgen;
 15991:         }
 15992:         XEiJ.fpuFPn[n].getman (XEiJ.fpuFPn[m]);
 15993:         break;
 15994: 
 15995:       case 0b010_0000:  //$xx20: FDIV.* *m,FPn
 15996:         //  BSUN   常にクリア
 15997:         //  SNAN   引数がシグナリングNaNのときセット、それ以外はクリア
 15998:         //  OPERR  引数が両方ゼロまたは両方無限大のときセット、それ以外はクリア
 15999:         //  OVFL   オーバーフローしたときセット、それ以外はクリア
 16000:         //  UNFL   結果が非正規化数のときセット、それ以外はクリア
 16001:         //  DZ     被除数がゼロ、無限大、NaN以外で除数がゼロのときセット、それ以外はクリア
 16002:         //  INEX2  結果に誤差があるときセット、それ以外はクリア
 16003:         //  INEX1  引数がpackedで正確に変換できないときセット、それ以外はクリア
 16004:         XEiJ.mpuCycleCount += 36;
 16005:         XEiJ.fpuFPn[n].div (XEiJ.fpuFPn[m]);
 16006:         break;
 16007: 
 16008:       case 0b010_0001:  //$xx21: FMOD.* *m,FPn
 16009:         //  BSUN   常にクリア
 16010:         //  SNAN   引数がシグナリングNaNのときセット、それ以外はクリア
 16011:         //  OPERR  除数がゼロまたは被除数が無限大のときセット、それ以外はクリア
 16012:         //  OVFL   常にクリア
 16013:         //  UNFL   結果が非正規化数のときセット、それ以外はクリア
 16014:         //  DZ     常にクリア
 16015:         //         除数がゼロのとき結果は無限大ではなくNaNでありゼロ除算にはならない
 16016:         //  INEX2  結果に誤差があるときセット、それ以外はクリア
 16017:         //  INEX1  引数がpackedで正確に変換できないときセット、それ以外はクリア
 16018:         //  FPSRのquotient byteに符号付き商の下位7bitが入る
 16019:         if (!XEiJ.fpuBox.epbIsFullSpec ()) {
 16020:           irpExceptionFormat2 (M68kException.M6E_FP_UNIMPLEMENTED_INSTRUCTION << 2, XEiJ.regPC, a);  //pcは次の命令,アドレスは実効アドレス
 16021:           break fgen;
 16022:         }
 16023:         XEiJ.fpuFPn[n].rem (XEiJ.fpuFPn[m]);
 16024:         break;
 16025: 
 16026:       case 0b010_0010:  //$xx22: FADD.* *m,FPn
 16027:         //  BSUN   常にクリア
 16028:         //  SNAN   引数がシグナリングNaNのときセット、それ以外はクリア
 16029:         //  OPERR  引数が両方無限大で符号が異なるときセット、それ以外はクリア
 16030:         //  OVFL   オーバーフローしたときセット、それ以外はクリア
 16031:         //  UNFL   結果が非正規化数のときセット、それ以外はクリア
 16032:         //  DZ     常にクリア
 16033:         //  INEX2  結果に誤差があるときセット、それ以外はクリア
 16034:         //  INEX1  引数がpackedで正確に変換できないときセット、それ以外はクリア
 16035:         XEiJ.mpuCycleCount += 2;
 16036:         XEiJ.fpuFPn[n].add (XEiJ.fpuFPn[m]);
 16037:         break;
 16038: 
 16039:       case 0b010_0011:  //$xx23: FMUL.* *m,FPn
 16040:         //  BSUN   常にクリア
 16041:         //  SNAN   引数がシグナリングNaNのときセット、それ以外はクリア
 16042:         //  OPERR  引数の一方がゼロで他方が無限大のときセット、それ以外はクリア
 16043:         //  OVFL   オーバーフローしたときセット、それ以外はクリア
 16044:         //  UNFL   結果が非正規化数のときセット、それ以外はクリア
 16045:         //  DZ     常にクリア
 16046:         //  INEX2  結果に誤差があるときセット、それ以外はクリア
 16047:         //  INEX1  引数がpackedで正確に変換できないときセット、それ以外はクリア
 16048:         XEiJ.mpuCycleCount += 2;
 16049:         XEiJ.fpuFPn[n].mul (XEiJ.fpuFPn[m]);
 16050:         break;
 16051: 
 16052:       case 0b010_0100:  //$xx24: FSGLDIV.* *m,FPn
 16053:         //  BSUN   常にクリア
 16054:         //  SNAN   引数がシグナリングNaNのときセット、それ以外はクリア
 16055:         //  OPERR  引数が両方ゼロまたは両方無限大のときセット、それ以外はクリア
 16056:         //  OVFL   オーバーフローしたときセット、それ以外はクリア
 16057:         //  UNFL   結果が非正規化数のときセット、それ以外はクリア
 16058:         //  DZ     被除数がゼロ、無限大、NaN以外で除数がゼロのときセット、それ以外はクリア
 16059:         //  INEX2  結果に誤差があるときセット、それ以外はクリア
 16060:         //  INEX1  引数がpackedで正確に変換できないときセット、それ以外はクリア
 16061:         XEiJ.mpuCycleCount += 36;
 16062:         XEiJ.fpuBox.epbSetRoundingPrec (EFPBox.EPB_PREC_XSG);
 16063:         XEiJ.fpuFPn[n].div (XEiJ.fpuFPn[m]);
 16064:         break;
 16065: 
 16066:       case 0b010_0101:  //$xx25: FREM.* *m,FPn
 16067:         //  BSUN   常にクリア
 16068:         //  SNAN   引数がシグナリングNaNのときセット、それ以外はクリア
 16069:         //  OPERR  除数がゼロまたは被除数が無限大のときセット、それ以外はクリア
 16070:         //  OVFL   常にクリア
 16071:         //  UNFL   結果が非正規化数のときセット、それ以外はクリア
 16072:         //  DZ     常にクリア
 16073:         //         除数がゼロのとき結果は無限大ではなくNaNでありゼロ除算にはならない
 16074:         //  INEX2  結果に誤差があるときセット、それ以外はクリア
 16075:         //         マニュアルにClearedと書いてあるのは間違い
 16076:         //         除数が無限大で被除数をそのまま返す場合でもサイズが減ればアンダーフローや不正確な結果になることはマニュアルにも書かれている
 16077:         //  INEX1  引数がpackedで正確に変換できないときセット、それ以外はクリア
 16078:         //  FPSRのquotient byteに符号付き商の下位7bitが入る
 16079:         if (!XEiJ.fpuBox.epbIsFullSpec ()) {
 16080:           irpExceptionFormat2 (M68kException.M6E_FP_UNIMPLEMENTED_INSTRUCTION << 2, XEiJ.regPC, a);  //pcは次の命令,アドレスは実効アドレス
 16081:           break fgen;
 16082:         }
 16083:         XEiJ.fpuFPn[n].ieeerem (XEiJ.fpuFPn[m]);
 16084:         break;
 16085: 
 16086:       case 0b010_0110:  //$xx26: FSCALE.* *m,FPn
 16087:         //  BSUN   常にクリア
 16088:         //  SNAN   引数がシグナリングNaNのときセット、それ以外はクリア
 16089:         //  OPERR  引数が無限大のときセット、それ以外はクリア
 16090:         //  OVFL   オーバーフローしたときセット、それ以外はクリア
 16091:         //  UNFL   結果が非正規化数のときセット、それ以外はクリア
 16092:         //  DZ     常にクリア
 16093:         //  INEX2  常にクリア
 16094:         //  INEX1  引数がpackedで正確に変換できないときセット、それ以外はクリア
 16095:         if (!XEiJ.fpuBox.epbIsFullSpec ()) {
 16096:           irpExceptionFormat2 (M68kException.M6E_FP_UNIMPLEMENTED_INSTRUCTION << 2, XEiJ.regPC, a);  //pcは次の命令,アドレスは実効アドレス
 16097:           break fgen;
 16098:         }
 16099:         //! 本来はソースが整数のとき浮動小数点数を経由しないが、これは経由してしまっている。結果は同じだが効率が悪い
 16100:         XEiJ.fpuFPn[n].scale (XEiJ.fpuFPn[m]);
 16101:         break;
 16102: 
 16103:       case 0b010_0111:  //$xx27: FSGLMUL.* *m,FPn
 16104:         //  BSUN   常にクリア
 16105:         //  SNAN   引数がシグナリングNaNのときセット、それ以外はクリア
 16106:         //  OPERR  引数の一方がゼロで他方が無限大のときセット、それ以外はクリア
 16107:         //  OVFL   オーバーフローしたときセット、それ以外はクリア
 16108:         //  UNFL   結果が非正規化数のときセット、それ以外はクリア
 16109:         //  DZ     常にクリア
 16110:         //  INEX2  結果に誤差があるときセット、それ以外はクリア
 16111:         //  INEX1  引数がpackedで正確に変換できないときセット、それ以外はクリア
 16112:         XEiJ.mpuCycleCount += 2;
 16113:         {
 16114:           //引数を24bitに切り捨てるときX2をセットしない
 16115:           int sr = XEiJ.fpuBox.epbFpsr;
 16116:           XEiJ.fpuFPn[EFPBox.EPB_SRC_TMP].roundmanf (XEiJ.fpuFPn[m], EFPBox.EPB_MODE_RZ);
 16117:           XEiJ.fpuFPn[EFPBox.EPB_DST_TMP].roundmanf (XEiJ.fpuFPn[n], EFPBox.EPB_MODE_RZ);
 16118:           XEiJ.fpuBox.epbFpsr = sr;
 16119:         }
 16120:         XEiJ.fpuBox.epbSetRoundingPrec (EFPBox.EPB_PREC_XSG);
 16121:         XEiJ.fpuFPn[n].mul (XEiJ.fpuFPn[EFPBox.EPB_DST_TMP], XEiJ.fpuFPn[EFPBox.EPB_SRC_TMP]);
 16122:         break;
 16123: 
 16124:       case 0b010_1000:  //$xx28: FSUB.* *m,FPn
 16125:       case 0b010_1001:  //$xx29: FSUB.* *m,FPn (MC68882)
 16126:       case 0b010_1010:  //$xx2A: FSUB.* *m,FPn (MC68882)
 16127:       case 0b010_1011:  //$xx2B: FSUB.* *m,FPn (MC68882)
 16128:       case 0b010_1100:  //$xx2C: FSUB.* *m,FPn (MC68882)
 16129:       case 0b010_1101:  //$xx2D: FSUB.* *m,FPn (MC68882)
 16130:       case 0b010_1110:  //$xx2E: FSUB.* *m,FPn (MC68882)
 16131:       case 0b010_1111:  //$xx2F: FSUB.* *m,FPn (MC68882)
 16132:         //  BSUN   常にクリア
 16133:         //  SNAN   引数がシグナリングNaNのときセット、それ以外はクリア
 16134:         //  OPERR  引数が両方無限大で符号が同じときセット、それ以外はクリア
 16135:         //  OVFL   オーバーフローしたときセット、それ以外はクリア
 16136:         //  UNFL   結果が非正規化数のときセット、それ以外はクリア
 16137:         //  DZ     常にクリア
 16138:         //  INEX2  結果に誤差があるときセット、それ以外はクリア
 16139:         //  INEX1  引数がpackedで正確に変換できないときセット、それ以外はクリア
 16140:         XEiJ.mpuCycleCount += 2;
 16141:         XEiJ.fpuFPn[n].sub (XEiJ.fpuFPn[m]);
 16142:         break;
 16143: 
 16144:       case 0b011_0000:  //$xx30: FSINCOS.* *m,FP0:FPn (c=0,s=n)
 16145:       case 0b011_0001:  //$xx31: FSINCOS.* *m,FP1:FPn (c=1,s=n)
 16146:       case 0b011_0010:  //$xx32: FSINCOS.* *m,FP2:FPn (c=2,s=n)
 16147:       case 0b011_0011:  //$xx33: FSINCOS.* *m,FP3:FPn (c=3,s=n)
 16148:       case 0b011_0100:  //$xx34: FSINCOS.* *m,FP4:FPn (c=4,s=n)
 16149:       case 0b011_0101:  //$xx35: FSINCOS.* *m,FP5:FPn (c=5,s=n)
 16150:       case 0b011_0110:  //$xx36: FSINCOS.* *m,FP6:FPn (c=6,s=n)
 16151:       case 0b011_0111:  //$xx37: FSINCOS.* *m,FP7:FPn (c=7,s=n)
 16152:         //  BSUN   常にクリア
 16153:         //  SNAN   引数がシグナリングNaNのときセット、それ以外はクリア
 16154:         //  OPERR  引数が無限大のときセット、それ以外はクリア
 16155:         //  OVFL   常にクリア
 16156:         //  UNFL   sin(x)の結果が非正規化数のときセット、それ以外はクリア
 16157:         //         cos(x)の結果は非正規化数にならない
 16158:         //  DZ     常にクリア
 16159:         //  INEX2  結果に誤差があるときセット、それ以外はクリア
 16160:         //  INEX1  引数がpackedで正確に変換できないときセット、それ以外はクリア
 16161:         if (!XEiJ.fpuBox.epbIsFullSpec ()) {
 16162:           irpExceptionFormat2 (M68kException.M6E_FP_UNIMPLEMENTED_INSTRUCTION << 2, XEiJ.regPC, a);  //pcは次の命令,アドレスは実効アドレス
 16163:           break fgen;
 16164:         }
 16165:         c &= 7;
 16166:         //m==EFPBox.EPB_SRC_TMP||m==n||m==cの場合があることに注意する
 16167:         XEiJ.fpuFPn[EFPBox.EPB_SRC_TMP].sete (XEiJ.fpuFPn[m]);
 16168:         XEiJ.fpuFPn[c].cos (XEiJ.fpuFPn[EFPBox.EPB_SRC_TMP]);
 16169:         XEiJ.fpuFPn[n].sin (XEiJ.fpuFPn[EFPBox.EPB_SRC_TMP]);
 16170:         break;
 16171: 
 16172:       case 0b011_1000:  //$xx38: FCMP.* *m,FPn
 16173:       case 0b011_1001:  //$xx39: FCMP.* *m,FPn (MC68882)
 16174:       case 0b011_1100:  //$xx3C: FCMP.* *m,FPn (MC68882)  コマンドワードの不連続箇所に注意
 16175:       case 0b011_1101:  //$xx3D: FCMP.* *m,FPn (MC68882)
 16176:         //  BSUN   常にクリア
 16177:         //  SNAN   引数がシグナリングNaNのときセット、それ以外はクリア
 16178:         //  OPERR  常にクリア
 16179:         //  OVFL   常にクリア
 16180:         //  UNFL   常にクリア
 16181:         //  DZ     常にクリア
 16182:         //  INEX2  常にクリア
 16183:         //  INEX1  引数がpackedで正確に変換できないときセット、それ以外はクリア
 16184:         //  FCMPはinfinityを常にクリアする
 16185:         //  efp.compareTo(x,y)を使う
 16186:         //    efp.compareTo(x,y)はefp.sub(x,y)よりも速い
 16187:         //    efp.sub(x,y)はINEX2をセットしてしまう
 16188:         //  efp.compareTo(x,y)は-0<+0だがFCMPは-0==+0なのでこれだけ調節する
 16189:         {
 16190:           int xf = XEiJ.fpuFPn[n].flg;
 16191:           int yf = XEiJ.fpuFPn[m].flg;
 16192:           if ((xf | yf) << 3 < 0) {  //どちらかがNaN
 16193:             //XEiJ.fpuFPn[EFPBox.EPB_DST_TMP].setnan ();
 16194:             XEiJ.fpuFPn[EFPBox.EPB_DST_TMP].flg = EFPBox.N;
 16195:           } else {
 16196:             int i = ((xf & yf) << 1 < 0 ? 0 :  //両方±0
 16197:                      XEiJ.fpuFPn[n].compareTo (XEiJ.fpuFPn[m]));  //-Inf==-Inf<-x<-0<+0<+x<+Inf==+Inf<NaN==NaN
 16198:             if (i == 0) {
 16199:               if (xf < 0) {
 16200:                 //XEiJ.fpuFPn[EFPBox.EPB_DST_TMP].negset0 ();
 16201:                 XEiJ.fpuFPn[EFPBox.EPB_DST_TMP].flg = EFPBox.M | EFPBox.Z;
 16202:               } else {
 16203:                 //XEiJ.fpuFPn[EFPBox.EPB_DST_TMP].set0 ();
 16204:                 XEiJ.fpuFPn[EFPBox.EPB_DST_TMP].flg = EFPBox.P | EFPBox.Z;
 16205:               }
 16206:             } else if (i < 0) {
 16207:               XEiJ.fpuFPn[EFPBox.EPB_DST_TMP].negset1 ();
 16208:             } else {
 16209:               XEiJ.fpuFPn[EFPBox.EPB_DST_TMP].set1 ();
 16210:             }
 16211:           }
 16212:           n = EFPBox.EPB_DST_TMP;
 16213:         }
 16214:         break;
 16215: 
 16216:       case 0b011_1010:  //$xx3A: FTST.* *m
 16217:       case 0b011_1011:  //$xx3B: FTST.* *m (MC68882)
 16218:       case 0b011_1110:  //$xx3E: FTST.* *m (MC68882)  コマンドワードの不連続箇所に注意
 16219:       case 0b011_1111:  //$xx3F: FTST.* *m (MC68882)
 16220:         //  BSUN   常にクリア
 16221:         //  SNAN   引数がシグナリングNaNのときセット、それ以外はクリア
 16222:         //  OPERR  常にクリア
 16223:         //  OVFL   常にクリア
 16224:         //  UNFL   常にクリア
 16225:         //  DZ     常にクリア
 16226:         //  INEX2  常にクリア
 16227:         //  INEX1  引数がpackedで正確に変換できないときセット、それ以外はクリア
 16228:         //  ソースオペランドをダミーのデスティネーションオペランドにコピーしてテストする
 16229:         //  デスティネーションオペランドは変化しない
 16230:         //  デスティネーションオペランドにはFP0が指定される場合が多いがFP0である必要はない
 16231:         XEiJ.fpuFPn[EFPBox.EPB_DST_TMP].sete (XEiJ.fpuFPn[m]);
 16232:         n = EFPBox.EPB_DST_TMP;
 16233:         break;
 16234: 
 16235:       case 0b100_0000:  //$xx40: FSMOVE.* *m,FPn
 16236:         //  BSUN   常にクリア
 16237:         //  SNAN   引数がシグナリングNaNのときセット、それ以外はクリア
 16238:         //  OPERR  常にクリア
 16239:         //  OVFL   常にクリア
 16240:         //  UNFL   結果が非正規化数のときセット、それ以外はクリア
 16241:         //  DZ     常にクリア
 16242:         //  INEX2  結果に誤差があるときセット、それ以外はクリア
 16243:         //  INEX1  引数がpackedで正確に変換できないときセット、それ以外はクリア
 16244:         XEiJ.fpuBox.epbSetRoundingPrec (EFPBox.EPB_PREC_SGL);
 16245:         XEiJ.fpuFPn[n].sete (XEiJ.fpuFPn[m]).finish ();
 16246:         break;
 16247: 
 16248:       case 0b100_0001:  //$xx41: FSSQRT.* *m,FPn
 16249:         //  BSUN   常にクリア
 16250:         //  SNAN   引数がシグナリングNaNのときセット、それ以外はクリア
 16251:         //  OPERR  引数が-0を除く負数のときセット、それ以外はクリア
 16252:         //  OVFL   常にクリア
 16253:         //  UNFL   常にクリア
 16254:         //  DZ     常にクリア
 16255:         //  INEX2  結果に誤差があるときセット、それ以外はクリア
 16256:         //  INEX1  引数がpackedで正確に変換できないときセット、それ以外はクリア
 16257:         XEiJ.mpuCycleCount += 67;
 16258:         XEiJ.fpuBox.epbSetRoundingPrec (EFPBox.EPB_PREC_SGL);
 16259:         XEiJ.fpuFPn[n].sqrt (XEiJ.fpuFPn[m]);
 16260:         break;
 16261: 
 16262:         //case 0b100_0010:  //$xx42:
 16263:         //case 0b100_0011:  //$xx43:
 16264: 
 16265:       case 0b100_0100:  //$xx44: FDMOVE.* *m,FPn
 16266:         //  BSUN   常にクリア
 16267:         //  SNAN   引数がシグナリングNaNのときセット、それ以外はクリア
 16268:         //  OPERR  常にクリア
 16269:         //  OVFL   常にクリア
 16270:         //  UNFL   結果が非正規化数のときセット、それ以外はクリア
 16271:         //  DZ     常にクリア
 16272:         //  INEX2  結果に誤差があるときセット、それ以外はクリア
 16273:         //  INEX1  引数がpackedで正確に変換できないときセット、それ以外はクリア
 16274:         XEiJ.fpuBox.epbSetRoundingPrec (EFPBox.EPB_PREC_DBL);
 16275:         XEiJ.fpuFPn[n].sete (XEiJ.fpuFPn[m]).finish ();
 16276:         break;
 16277: 
 16278:       case 0b100_0101:  //$xx45: FDSQRT.* *m,FPn
 16279:         //  BSUN   常にクリア
 16280:         //  SNAN   引数がシグナリングNaNのときセット、それ以外はクリア
 16281:         //  OPERR  引数が-0を除く負数のときセット、それ以外はクリア
 16282:         //  OVFL   常にクリア
 16283:         //  UNFL   常にクリア
 16284:         //  DZ     常にクリア
 16285:         //  INEX2  結果に誤差があるときセット、それ以外はクリア
 16286:         //  INEX1  引数がpackedで正確に変換できないときセット、それ以外はクリア
 16287:         XEiJ.mpuCycleCount += 67;
 16288:         XEiJ.fpuBox.epbSetRoundingPrec (EFPBox.EPB_PREC_DBL);
 16289:         XEiJ.fpuFPn[n].sqrt (XEiJ.fpuFPn[m]);
 16290:         break;
 16291: 
 16292:         //case 0b100_0110:  //$xx46:
 16293:         //case 0b100_0111:  //$xx47:
 16294:         //case 0b100_1000:  //$xx48:
 16295:         //case 0b100_1001:  //$xx49:
 16296:         //case 0b100_1010:  //$xx4A:
 16297:         //case 0b100_1011:  //$xx4B:
 16298:         //case 0b100_1100:  //$xx4C:
 16299:         //case 0b100_1101:  //$xx4D:
 16300:         //case 0b100_1110:  //$xx4E:
 16301:         //case 0b100_1111:  //$xx4F:
 16302:         //case 0b101_0000:  //$xx50:
 16303:         //case 0b101_0001:  //$xx51:
 16304:         //case 0b101_0010:  //$xx52:
 16305:         //case 0b101_0011:  //$xx53:
 16306:         //case 0b101_0100:  //$xx54:
 16307:         //case 0b101_0101:  //$xx55:
 16308:         //case 0b101_0110:  //$xx56:
 16309:         //case 0b101_0111:  //$xx57:
 16310: 
 16311:       case 0b101_1000:  //$xx58: FSABS.* *m,FPn
 16312:         //  BSUN   常にクリア
 16313:         //  SNAN   引数がシグナリングNaNのときセット、それ以外はクリア
 16314:         //  OPERR  常にクリア
 16315:         //  OVFL   常にクリア
 16316:         //  UNFL   結果が非正規化数のときセット、それ以外はクリア
 16317:         //  DZ     常にクリア
 16318:         //  INEX2  常にクリア
 16319:         //  INEX1  引数がpackedで正確に変換できないときセット、それ以外はクリア
 16320:         XEiJ.fpuBox.epbSetRoundingPrec (EFPBox.EPB_PREC_SGL);
 16321:         XEiJ.fpuFPn[n].abs (XEiJ.fpuFPn[m]);
 16322:         break;
 16323: 
 16324:         //case 0b101_1001:  //$xx59:
 16325: 
 16326:       case 0b101_1010:  //$xx5A: FSNEG.* *m,FPn
 16327:         //  BSUN   常にクリア
 16328:         //  SNAN   引数がシグナリングNaNのときセット、それ以外はクリア
 16329:         //  OPERR  常にクリア
 16330:         //  OVFL   常にクリア
 16331:         //  UNFL   結果が非正規化数のときセット、それ以外はクリア
 16332:         //  DZ     常にクリア
 16333:         //  INEX2  常にクリア
 16334:         //  INEX1  引数がpackedで正確に変換できないときセット、それ以外はクリア
 16335:         XEiJ.fpuBox.epbSetRoundingPrec (EFPBox.EPB_PREC_SGL);
 16336:         XEiJ.fpuFPn[n].neg (XEiJ.fpuFPn[m]);
 16337:         break;
 16338: 
 16339:         //case 0b101_1011:  //$xx5B:
 16340: 
 16341:       case 0b101_1100:  //$xx5C: FDABS.* *m,FPn
 16342:         //  BSUN   常にクリア
 16343:         //  SNAN   引数がシグナリングNaNのときセット、それ以外はクリア
 16344:         //  OPERR  常にクリア
 16345:         //  OVFL   常にクリア
 16346:         //  UNFL   結果が非正規化数のときセット、それ以外はクリア
 16347:         //  DZ     常にクリア
 16348:         //  INEX2  常にクリア
 16349:         //  INEX1  引数がpackedで正確に変換できないときセット、それ以外はクリア
 16350:         XEiJ.fpuBox.epbSetRoundingPrec (EFPBox.EPB_PREC_DBL);
 16351:         XEiJ.fpuFPn[n].abs (XEiJ.fpuFPn[m]);
 16352:         break;
 16353: 
 16354:         //case 0b101_1101:  //$xx5D:
 16355: 
 16356:       case 0b101_1110:  //$xx5E: FDNEG.* *m,FPn
 16357:         //  BSUN   常にクリア
 16358:         //  SNAN   引数がシグナリングNaNのときセット、それ以外はクリア
 16359:         //  OPERR  常にクリア
 16360:         //  OVFL   常にクリア
 16361:         //  UNFL   結果が非正規化数のときセット、それ以外はクリア
 16362:         //  DZ     常にクリア
 16363:         //  INEX2  常にクリア
 16364:         //  INEX1  引数がpackedで正確に変換できないときセット、それ以外はクリア
 16365:         XEiJ.fpuBox.epbSetRoundingPrec (EFPBox.EPB_PREC_DBL);
 16366:         XEiJ.fpuFPn[n].neg (XEiJ.fpuFPn[m]);
 16367:         break;
 16368: 
 16369:         //case 0b101_1111:  //$xx5F:
 16370: 
 16371:       case 0b110_0000:  //$xx60: FSDIV.* *m,FPn
 16372:         //  BSUN   常にクリア
 16373:         //  SNAN   引数がシグナリングNaNのときセット、それ以外はクリア
 16374:         //  OPERR  引数が両方ゼロまたは両方無限大のときセット、それ以外はクリア
 16375:         //  OVFL   オーバーフローしたときセット、それ以外はクリア
 16376:         //  UNFL   結果が非正規化数のときセット、それ以外はクリア
 16377:         //  DZ     被除数がゼロ、無限大、NaN以外で除数がゼロのときセット、それ以外はクリア
 16378:         //  INEX2  結果に誤差があるときセット、それ以外はクリア
 16379:         //  INEX1  引数がpackedで正確に変換できないときセット、それ以外はクリア
 16380:         XEiJ.mpuCycleCount += 36;
 16381:         XEiJ.fpuBox.epbSetRoundingPrec (EFPBox.EPB_PREC_SGL);
 16382:         XEiJ.fpuFPn[n].div (XEiJ.fpuFPn[m]);
 16383:         break;
 16384: 
 16385:         //case 0b110_0001:  //$xx61:
 16386: 
 16387:       case 0b110_0010:  //$xx62: FSADD.* *m,FPn
 16388:         //  BSUN   常にクリア
 16389:         //  SNAN   引数がシグナリングNaNのときセット、それ以外はクリア
 16390:         //  OPERR  引数が両方無限大で符号が異なるときセット、それ以外はクリア
 16391:         //  OVFL   オーバーフローしたときセット、それ以外はクリア
 16392:         //  UNFL   結果が非正規化数のときセット、それ以外はクリア
 16393:         //  DZ     常にクリア
 16394:         //  INEX2  結果に誤差があるときセット、それ以外はクリア
 16395:         //  INEX1  引数がpackedで正確に変換できないときセット、それ以外はクリア
 16396:         XEiJ.mpuCycleCount += 2;
 16397:         XEiJ.fpuBox.epbSetRoundingPrec (EFPBox.EPB_PREC_SGL);
 16398:         XEiJ.fpuFPn[n].add (XEiJ.fpuFPn[m]);
 16399:         break;
 16400: 
 16401:       case 0b110_0011:  //$xx63: FSMUL.* *m,FPn
 16402:         //  BSUN   常にクリア
 16403:         //  SNAN   引数がシグナリングNaNのときセット、それ以外はクリア
 16404:         //  OPERR  引数の一方がゼロで他方が無限大のときセット、それ以外はクリア
 16405:         //  OVFL   オーバーフローしたときセット、それ以外はクリア
 16406:         //  UNFL   結果が非正規化数のときセット、それ以外はクリア
 16407:         //  DZ     常にクリア
 16408:         //  INEX2  結果に誤差があるときセット、それ以外はクリア
 16409:         //  INEX1  引数がpackedで正確に変換できないときセット、それ以外はクリア
 16410:         XEiJ.mpuCycleCount += 2;
 16411:         XEiJ.fpuBox.epbSetRoundingPrec (EFPBox.EPB_PREC_SGL);
 16412:         XEiJ.fpuFPn[n].mul (XEiJ.fpuFPn[m]);
 16413:         break;
 16414: 
 16415:       case 0b110_0100:  //$xx64: FDDIV.* *m,FPn
 16416:         //  BSUN   常にクリア
 16417:         //  SNAN   引数がシグナリングNaNのときセット、それ以外はクリア
 16418:         //  OPERR  引数が両方ゼロまたは両方無限大のときセット、それ以外はクリア
 16419:         //  OVFL   オーバーフローしたときセット、それ以外はクリア
 16420:         //  UNFL   結果が非正規化数のときセット、それ以外はクリア
 16421:         //  DZ     被除数がゼロ、無限大、NaN以外で除数がゼロのときセット、それ以外はクリア
 16422:         //  INEX2  結果に誤差があるときセット、それ以外はクリア
 16423:         //  INEX1  引数がpackedで正確に変換できないときセット、それ以外はクリア
 16424:         XEiJ.mpuCycleCount += 36;
 16425:         XEiJ.fpuBox.epbSetRoundingPrec (EFPBox.EPB_PREC_DBL);
 16426:         XEiJ.fpuFPn[n].div (XEiJ.fpuFPn[m]);
 16427:         break;
 16428: 
 16429:         //case 0b110_0101:  //$xx65:
 16430: 
 16431:       case 0b110_0110:  //$xx66: FDADD.* *m,FPn
 16432:         //  BSUN   常にクリア
 16433:         //  SNAN   引数がシグナリングNaNのときセット、それ以外はクリア
 16434:         //  OPERR  引数が両方無限大で符号が異なるときセット、それ以外はクリア
 16435:         //  OVFL   オーバーフローしたときセット、それ以外はクリア
 16436:         //  UNFL   結果が非正規化数のときセット、それ以外はクリア
 16437:         //  DZ     常にクリア
 16438:         //  INEX2  結果に誤差があるときセット、それ以外はクリア
 16439:         //  INEX1  引数がpackedで正確に変換できないときセット、それ以外はクリア
 16440:         XEiJ.mpuCycleCount += 2;
 16441:         XEiJ.fpuBox.epbSetRoundingPrec (EFPBox.EPB_PREC_DBL);
 16442:         XEiJ.fpuFPn[n].add (XEiJ.fpuFPn[m]);
 16443:         break;
 16444: 
 16445:       case 0b110_0111:  //$xx67: FDMUL.* *m,FPn
 16446:         //  BSUN   常にクリア
 16447:         //  SNAN   引数がシグナリングNaNのときセット、それ以外はクリア
 16448:         //  OPERR  引数の一方がゼロで他方が無限大のときセット、それ以外はクリア
 16449:         //  OVFL   オーバーフローしたときセット、それ以外はクリア
 16450:         //  UNFL   結果が非正規化数のときセット、それ以外はクリア
 16451:         //  DZ     常にクリア
 16452:         //  INEX2  結果に誤差があるときセット、それ以外はクリア
 16453:         //  INEX1  引数がpackedで正確に変換できないときセット、それ以外はクリア
 16454:         XEiJ.mpuCycleCount += 2;
 16455:         XEiJ.fpuBox.epbSetRoundingPrec (EFPBox.EPB_PREC_DBL);
 16456:         XEiJ.fpuFPn[n].mul (XEiJ.fpuFPn[m]);
 16457:         break;
 16458: 
 16459:       case 0b110_1000:  //$xx68: FSSUB.* *m,FPn
 16460:         //  BSUN   常にクリア
 16461:         //  SNAN   引数がシグナリングNaNのときセット、それ以外はクリア
 16462:         //  OPERR  引数が両方無限大で符号が同じときセット、それ以外はクリア
 16463:         //  OVFL   オーバーフローしたときセット、それ以外はクリア
 16464:         //  UNFL   結果が非正規化数のときセット、それ以外はクリア
 16465:         //  DZ     常にクリア
 16466:         //  INEX2  結果に誤差があるときセット、それ以外はクリア
 16467:         //  INEX1  引数がpackedで正確に変換できないときセット、それ以外はクリア
 16468:         XEiJ.mpuCycleCount += 2;
 16469:         XEiJ.fpuBox.epbSetRoundingPrec (EFPBox.EPB_PREC_SGL);
 16470:         XEiJ.fpuFPn[n].sub (XEiJ.fpuFPn[m]);
 16471:         break;
 16472: 
 16473:         //case 0b110_1001:  //$xx69:
 16474:         //case 0b110_1010:  //$xx6A:
 16475:         //case 0b110_1011:  //$xx6B:
 16476: 
 16477:       case 0b110_1100:  //$xx6C: FDSUB.* *m,FPn
 16478:         //  BSUN   常にクリア
 16479:         //  SNAN   引数がシグナリングNaNのときセット、それ以外はクリア
 16480:         //  OPERR  引数が両方無限大で符号が同じときセット、それ以外はクリア
 16481:         //  OVFL   オーバーフローしたときセット、それ以外はクリア
 16482:         //  UNFL   結果が非正規化数のときセット、それ以外はクリア
 16483:         //  DZ     常にクリア
 16484:         //  INEX2  結果に誤差があるときセット、それ以外はクリア
 16485:         //  INEX1  引数がpackedで正確に変換できないときセット、それ以外はクリア
 16486:         XEiJ.mpuCycleCount += 2;
 16487:         XEiJ.fpuBox.epbSetRoundingPrec (EFPBox.EPB_PREC_DBL);
 16488:         XEiJ.fpuFPn[n].sub (XEiJ.fpuFPn[m]);
 16489:         break;
 16490: 
 16491:         //case 0b110_1101:  //$xx6D:
 16492:         //case 0b110_1110:  //$xx6E:
 16493:         //case 0b110_1111:  //$xx6F:
 16494: 
 16495:       case 0b111_0000:  //$xx70: FLGAMMA *m,FPn
 16496:         if (EFPBox.EPB_EXTRA_OPERATION) {
 16497:           XEiJ.fpuFPn[n].lgamma (XEiJ.fpuFPn[m]);
 16498:           break;
 16499:         } else {
 16500:           XEiJ.regPC = XEiJ.regPC0 + 2;  //拡張ワードを読まなかったことにする
 16501:           irpFline ();
 16502:           break fgen;
 16503:         }
 16504: 
 16505:       case 0b111_0001:  //$xx71: FTGAMMA *m,FPn
 16506:         if (EFPBox.EPB_EXTRA_OPERATION) {
 16507:           XEiJ.fpuFPn[n].tgamma (XEiJ.fpuFPn[m]);
 16508:           break;
 16509:         } else {
 16510:           XEiJ.regPC = XEiJ.regPC0 + 2;  //拡張ワードを読まなかったことにする
 16511:           irpFline ();
 16512:           break fgen;
 16513:         }
 16514: 
 16515:         //case 0b111_0010:  //$xx72:
 16516:         //case 0b111_0011:  //$xx73:
 16517:         //case 0b111_0100:  //$xx74:
 16518:         //case 0b111_0101:  //$xx75:
 16519:         //case 0b111_0110:  //$xx76:
 16520:         //case 0b111_0111:  //$xx77:
 16521:         //case 0b111_1000:  //$xx78:
 16522:         //case 0b111_1001:  //$xx79:
 16523:         //case 0b111_1010:  //$xx7A:
 16524:         //case 0b111_1011:  //$xx7B:
 16525:         //case 0b111_1100:  //$xx7C:
 16526:         //case 0b111_1101:  //$xx7D:
 16527:         //case 0b111_1110:  //$xx7E:
 16528:         //case 0b111_1111:  //$xx7F:
 16529: 
 16530:       default:  //未定義
 16531:         XEiJ.regPC = XEiJ.regPC0 + 2;  //拡張ワードを読まなかったことにする
 16532:         irpFline ();
 16533:         break fgen;
 16534:       }
 16535:       //FPSRのFPCCを設定する
 16536:       XEiJ.fpuBox.epbFpsr |= XEiJ.fpuFPn[n].flg >>> 4;
 16537:       //FPSRのAEXCを設定する
 16538:       XEiJ.fpuBox.epbFpsr |= XEiJ.FPU_FPSR_EXC_TO_AEXC[XEiJ.fpuBox.epbFpsr >> 8 & 255];
 16539:       //浮動小数点命令実行後例外 floating-point post-instruction exception
 16540:       if (irpFPPostInstruction (a)) {
 16541:         break fgen;
 16542:       }
 16543:       break fgen;
 16544: 
 16545: 
 16546:     case 0b011:  //$6xxx-$7xxx: FMOVE.* FPn,<ea>
 16547:       //  BSUN   常にクリア
 16548:       //  SNAN   引数がシグナリングNaNのときセット、それ以外はクリア
 16549:       //  OPERR  byte,word,longで無限大または指定されたサイズに収まらないとき、packedでk-factorが17よりも大きいか指数部が3桁に収まらないときセット、それ以外はクリア
 16550:       //  OVFL   packedではなくてオーバーフローしたときセット、それ以外はクリア
 16551:       //  UNFL   packedではなくて結果が非正規化数のときセット、それ以外はクリア
 16552:       //  DZ     常にクリア
 16553:       //  INEX2  結果に誤差があるときセット、それ以外はクリア
 16554:       //  INEX1  常にクリア
 16555:       XEiJ.fpuBox.epbFpsr &= 0xffff00ff;  //FMOVE.* FPn,<ea>でFPSRのコンディションコードバイトは変化しない
 16556:       XEiJ.fpuBox.epbFpiar = XEiJ.regPC0;  //FPIARはFMOVEM/FMOVE FPcr/FSAVE/FRESTORE以外の命令で例外が発生しなくても更新される
 16557: 
 16558:       switch (m) {
 16559: 
 16560:       case 0b000:  //$60xx-$63xx: FMOVE.L FPn,<ea>
 16561:         {
 16562:           int i = XEiJ.fpuFPn[n].geti (XEiJ.fpuBox.epbRoundingMode);
 16563:           if (ea < XEiJ.EA_AR) {  //Dr。Ar不可
 16564:             XEiJ.regRn[ea] = i;
 16565:           } else {  //Dr以外
 16566:             a = efaMltLong (ea);
 16567:             mmuWriteLongData (a, i, XEiJ.regSRS);
 16568:           }
 16569:         }
 16570:         break;
 16571: 
 16572:       case 0b001:  //$64xx-$67xx: FMOVE.S FPn,<ea>
 16573:         {
 16574:           int i = XEiJ.fpuFPn[n].getf0 (XEiJ.fpuBox.epbRoundingMode);
 16575:           if (ea < XEiJ.EA_AR) {  //Dr。Ar不可
 16576:             XEiJ.regRn[ea] = i;
 16577:           } else {  //Dr以外
 16578:             a = efaMltLong (ea);
 16579:             mmuWriteLongData (a, i, XEiJ.regSRS);
 16580:           }
 16581:         }
 16582:         break;
 16583: 
 16584:       case 0b010:  //$68xx-$6Bxx: FMOVE.X FPn,<ea>
 16585:         {
 16586:           byte[] b = new byte[12];
 16587:           if (XEiJ.fpuBox.epbIsTriple ()) {  //三倍精度
 16588:             XEiJ.fpuFPn[n].gety012 (b, 0, XEiJ.fpuBox.epbRoundingMode);
 16589:           } else {  //拡張精度
 16590:             XEiJ.fpuFPn[n].getx012 (b, 0, XEiJ.fpuBox.epbRoundingMode);
 16591:           }
 16592:           a = efaMltExtd (ea);
 16593:           mmuWriteByteArray (a, b, 0, 12, XEiJ.regSRS);
 16594:         }
 16595:         break;
 16596: 
 16597:       case 0b011:  //$6Cxx-$6Fxx: FMOVE.P FPn,<ea>{#k}
 16598:         {
 16599:           a = efaMltExtd (ea);
 16600:           if (!XEiJ.fpuBox.epbIsFullSpec ()) {  //パックトデシマル
 16601:             XEiJ.fpuBox.epbExceptionStatusWord = 0xe000 | M68kException.M6E_FP_UNSUPPORTED_DATA_TYPE & 7;
 16602:             irpExceptionFormat3 (M68kException.M6E_FP_UNSUPPORTED_DATA_TYPE << 2, XEiJ.regPC, a);  //pcは次の命令,アドレスはデスティネーションオペランド
 16603:             break fgen;
 16604:           }
 16605:           byte[] b = new byte[12];
 16606:           XEiJ.fpuFPn[n].getp012 (b, 0, w);  //k-factor付き
 16607:           mmuWriteByteArray (a, b, 0, 12, XEiJ.regSRS);
 16608:         }
 16609:         break;
 16610: 
 16611:       case 0b100:  //$70xx-$73xx: FMOVE.W FPn,<ea>
 16612:         {
 16613:           int i = XEiJ.fpuFPn[n].gets (XEiJ.fpuBox.epbRoundingMode);
 16614:           if (ea < XEiJ.EA_AR) {  //Dr。Ar不可
 16615:             XEiJ.regRn[ea] = XEiJ.regRn[ea] & ~65535 | (char) i;
 16616:           } else {  //Dr以外
 16617:             a = efaMltWord (ea);
 16618:             mmuWriteWordData (a, i, XEiJ.regSRS);
 16619:           }
 16620:         }
 16621:         break;
 16622: 
 16623:       case 0b101:  //$74xx-$77xx: FMOVE.D FPn,<ea>
 16624:         {
 16625:           long l = XEiJ.fpuFPn[n].getd01 (XEiJ.fpuBox.epbRoundingMode);
 16626:           a = efaMltQuad (ea);
 16627:           mmuWriteQuadData (a, l, XEiJ.regSRS);
 16628:         }
 16629:         break;
 16630: 
 16631:       case 0b110:  //$78xx-$7Bxx: FMOVE.B FPn,<ea>
 16632:         {
 16633:           int i = XEiJ.fpuFPn[n].getb (XEiJ.fpuBox.epbRoundingMode);
 16634:           if (ea < XEiJ.EA_AR) {  //Dr。Ar不可
 16635:             XEiJ.regRn[ea] = XEiJ.regRn[ea] & ~255 | i & 255;
 16636:           } else {  //Dr以外
 16637:             a = efaMltByte (ea);
 16638:             mmuWriteByteData (a, i, XEiJ.regSRS);
 16639:           }
 16640:         }
 16641:         break;
 16642: 
 16643:       case 0b111:  //$7Cxx-$7Fxx: FMOVE.P FPn,<ea>{Dl}
 16644:       default:
 16645:         {
 16646:           a = efaMltExtd (ea);
 16647:           if (!XEiJ.fpuBox.epbIsFullSpec ()) {  //パックトデシマル
 16648:             XEiJ.fpuBox.epbExceptionStatusWord = 0xe000 | M68kException.M6E_FP_UNSUPPORTED_DATA_TYPE & 7;
 16649:             irpExceptionFormat3 (M68kException.M6E_FP_UNSUPPORTED_DATA_TYPE << 2, XEiJ.regPC, a);  //pcは次の命令,アドレスはデスティネーションオペランド
 16650:             break fgen;
 16651:           }
 16652:           byte[] b = new byte[12];
 16653:           XEiJ.fpuFPn[n].getp012 (b, 0, XEiJ.regRn[w >> 4 & 7]);  //k-factor付き
 16654:           mmuWriteByteArray (a, b, 0, 12, XEiJ.regSRS);
 16655:         }
 16656:       }
 16657:       //FPSRのAEXCを設定する
 16658:       XEiJ.fpuBox.epbFpsr |= XEiJ.FPU_FPSR_EXC_TO_AEXC[XEiJ.fpuBox.epbFpsr >> 8 & 255];
 16659:       //浮動小数点命令実行後例外 floating-point post-instruction exception
 16660:       if (irpFPPostInstruction (a)) {
 16661:         break fgen;
 16662:       }
 16663:       break fgen;
 16664: 
 16665: 
 16666:     case 0b100:  //$8xxx-$9xxx: FMOVEM.L <ea>,FPCR/FPSR/FPIAR
 16667:       XEiJ.mpuCycleCount += 6;
 16668:       //  FMOVEM命令は例外を発生させずFPCR/FPSR/FPIARも(デスティネーションに書かれたもの以外)変化しない
 16669:       //  格納順序はFPCRが下位アドレス(連結したとき上位),FPIARが上位アドレス(連結したとき下位)
 16670: 
 16671:       switch (m) {
 16672: 
 16673:       case 0b000:  //$8000: FMOVE.L <ea>,<>
 16674:         //  レジスタを1個も指定しないとFPIARが指定されたものとみなされる
 16675: 
 16676:       case 0b001:  //$8400: FMOVE.L <ea>,FPIAR
 16677:         {
 16678:           int i;
 16679:           if (ea < XEiJ.EA_MM) {  //Dr,Ar。Ar可
 16680:             //a = 0;
 16681:             i = XEiJ.regRn[ea];
 16682:           } else if (ea == XEiJ.EA_IM) {  //#<data>
 16683:             a = XEiJ.regPC;
 16684:             XEiJ.regPC = a + 4;
 16685:             i = mmuReadLongExword (a, XEiJ.regSRS);  //pcls
 16686:           } else {  //Dr,Ar,#<data>以外
 16687:             a = efaAnyLong (ea);
 16688:             i = mmuReadLongData (a, XEiJ.regSRS);
 16689:           }
 16690:           XEiJ.fpuBox.epbFpiar = i;
 16691:         }
 16692:         break;
 16693: 
 16694:       case 0b010:  //$8800: FMOVE.L <ea>,FPSR
 16695:         {
 16696:           int i;
 16697:           if (ea < XEiJ.EA_AR) {  //Dr。Ar不可
 16698:             //a = 0;
 16699:             i = XEiJ.regRn[ea];
 16700:           } else if (ea == XEiJ.EA_IM) {  //#<data>
 16701:             a = XEiJ.regPC;
 16702:             XEiJ.regPC = a + 4;
 16703:             i = mmuReadLongExword (a, XEiJ.regSRS);  //pcls
 16704:           } else {  //Dr,#<data>以外
 16705:             a = efaAnyLong (ea);
 16706:             i = mmuReadLongData (a, XEiJ.regSRS);
 16707:           }
 16708:           XEiJ.fpuBox.epbFpsr = i & EFPBox.EPB_FPSR_ALL;
 16709:           //  fmove.lでfpsrのEXCに書き込んだだけではAEXCは更新されない
 16710:           //  fmove.lでfpsrに0x0000ff00を書き込んですぐに読み出しても0x0000ff00のまま
 16711:         }
 16712:         break;
 16713: 
 16714:       case 0b011:  //$8C00: FMOVEM.L <ea>,FPSR/FPIAR
 16715:         {
 16716:           long l;
 16717:           if (ea == XEiJ.EA_IM) {  //#<data>
 16718:             if (!XEiJ.fpuBox.epbIsFullSpec ()) {  //8バイトのイミディエイト
 16719:               irpExceptionFormat0 (M68kException.M6E_UNIMPLEMENTED_EFFECTIVE << 2, XEiJ.regPC0);  //pcは命令の先頭
 16720:               break fgen;
 16721:             }
 16722:             a = XEiJ.regPC;
 16723:             XEiJ.regPC = a + 8;
 16724:             l = mmuReadQuadExword (a, XEiJ.regSRS);
 16725:           } else {  //#<data>以外
 16726:             a = efaAnyQuad (ea);
 16727:             l = mmuReadQuadData (a, XEiJ.regSRS);
 16728:           }
 16729:           XEiJ.fpuBox.epbFpsr = (int) (l >>> 32) & EFPBox.EPB_FPSR_ALL;
 16730:           XEiJ.fpuBox.epbFpiar = (int) l;
 16731:         }
 16732:         break;
 16733: 
 16734:       case 0b100:  //$9000: FMOVE.L <ea>,FPCR
 16735:         {
 16736:           int i;
 16737:           if (ea < XEiJ.EA_AR) {  //Dr。Ar不可
 16738:             a = 0;
 16739:             i = XEiJ.regRn[ea];
 16740:           } else if (ea == XEiJ.EA_IM) {  //#<data>
 16741:             a = XEiJ.regPC;
 16742:             XEiJ.regPC = a + 4;
 16743:             i = mmuReadLongExword (a, XEiJ.regSRS);  //pcls
 16744:           } else {  //Dr,#<data>以外
 16745:             a = efaAnyLong (ea);
 16746:             i = mmuReadLongData (a, XEiJ.regSRS);
 16747:           }
 16748:           XEiJ.fpuBox.epbFpcr = i & EFPBox.EPB_FPCR_ALL;
 16749:         }
 16750:         break;
 16751: 
 16752:       case 0b101:  //$9400: FMOVEM.L <ea>,FPCR/FPIAR
 16753:         {
 16754:           long l;
 16755:           if (ea == XEiJ.EA_IM) {  //#<data>
 16756:             if (!XEiJ.fpuBox.epbIsFullSpec ()) {  //8バイトのイミディエイト
 16757:               irpExceptionFormat0 (M68kException.M6E_UNIMPLEMENTED_EFFECTIVE << 2, XEiJ.regPC0);  //pcは命令の先頭
 16758:               break fgen;
 16759:             }
 16760:             a = XEiJ.regPC;
 16761:             XEiJ.regPC = a + 8;
 16762:             l = mmuReadQuadExword (a, XEiJ.regSRS);
 16763:           } else {  //#<data>以外
 16764:             a = efaAnyQuad (ea);
 16765:             l = mmuReadQuadData (a, XEiJ.regSRS);
 16766:           }
 16767:           XEiJ.fpuBox.epbFpcr = (int) (l >>> 32) & EFPBox.EPB_FPCR_ALL;
 16768:           XEiJ.fpuBox.epbFpiar = (int) l;
 16769:         }
 16770:         break;
 16771: 
 16772:       case 0b110:  //$9800: FMOVEM.L <ea>,FPCR/FPSR
 16773:         {
 16774:           long l;
 16775:           if (ea == XEiJ.EA_IM) {  //#<data>
 16776:             if (!XEiJ.fpuBox.epbIsFullSpec ()) {  //8バイトのイミディエイト
 16777:               irpExceptionFormat0 (M68kException.M6E_UNIMPLEMENTED_EFFECTIVE << 2, XEiJ.regPC0);  //pcは命令の先頭
 16778:               break fgen;
 16779:             }
 16780:             a = XEiJ.regPC;
 16781:             XEiJ.regPC = a + 8;
 16782:             l = mmuReadQuadExword (a, XEiJ.regSRS);
 16783:           } else {  //#<data>以外
 16784:             a = efaAnyQuad (ea);
 16785:             l = mmuReadQuadData (a, XEiJ.regSRS);
 16786:           }
 16787:           XEiJ.fpuBox.epbFpcr = (int) (l >>> 32) & EFPBox.EPB_FPCR_ALL;
 16788:           XEiJ.fpuBox.epbFpsr = (int) l & EFPBox.EPB_FPSR_ALL;
 16789:         }
 16790:         break;
 16791: 
 16792:       case 0b111:  //$9C00: FMOVEM.L <ea>,FPCR/FPSR/FPIAR
 16793:       default:
 16794:         {
 16795:           int i;
 16796:           long l;
 16797:           if (ea == XEiJ.EA_IM) {  //#<data>
 16798:             if (!XEiJ.fpuBox.epbIsFullSpec ()) {  //12バイトのイミディエイト
 16799:               irpExceptionFormat0 (M68kException.M6E_UNIMPLEMENTED_EFFECTIVE << 2, XEiJ.regPC0);  //pcは命令の先頭
 16800:               break fgen;
 16801:             }
 16802:             a = XEiJ.regPC;
 16803:             XEiJ.regPC = a + 12;
 16804:             i = mmuReadLongExword (a, XEiJ.regSRS);
 16805:             l = mmuReadQuadExword (a + 4, XEiJ.regSRS);
 16806:           } else {  //#<data>以外
 16807:             a = efaAnyExtd (ea);
 16808:             i = mmuReadLongData (a, XEiJ.regSRS);
 16809:             l = mmuReadQuadSecond (a + 4, XEiJ.regSRS);
 16810:           }
 16811:           XEiJ.fpuBox.epbFpcr = i & EFPBox.EPB_FPCR_ALL;
 16812:           XEiJ.fpuBox.epbFpsr = (int) (l >>> 32) & EFPBox.EPB_FPSR_ALL;
 16813:           XEiJ.fpuBox.epbFpiar = (int) l;
 16814:         }
 16815:         break;
 16816:       }
 16817:       break fgen;
 16818: 
 16819: 
 16820:     case 0b101:  //$Axxx-$Bxxx: FMOVEM.L FPCR/FPSR/FPIAR,<ea>
 16821:       //  FMOVEM命令は例外を発生させずFPCR/FPSR/FPIARも(デスティネーションに書かれたもの以外)変化しない
 16822:       XEiJ.mpuCycleCount += 4;
 16823: 
 16824:       switch (m) {
 16825: 
 16826:       case 0b000:  //$A000: FMOVE.L <>,<ea>
 16827:         //  レジスタを1個も指定しないとFPIARが指定されたものとみなされる
 16828: 
 16829:       case 0b001:  //$A400: FMOVE.L FPIAR,<ea>
 16830:         {
 16831:           int i = XEiJ.fpuBox.epbFpiar;
 16832:           if (ea < XEiJ.EA_MM) {  //Dr,Ar。Ar可
 16833:             //a = 0;
 16834:             XEiJ.regRn[ea] = i;
 16835:           } else {  //Dr,Ar以外
 16836:             a = efaMltLong (ea);
 16837:             mmuWriteLongData (a, i, XEiJ.regSRS);
 16838:           }
 16839:         }
 16840:         break;
 16841: 
 16842:       case 0b010:  //$A800: FMOVE.L FPSR,<ea>
 16843:         {
 16844:           int i = XEiJ.fpuBox.epbFpsr;
 16845:           if (ea < XEiJ.EA_AR) {  //Dr。Ar不可
 16846:             //a = 0;
 16847:             XEiJ.regRn[ea] = i;
 16848:           } else {  //Dr以外
 16849:             a = efaMltLong (ea);
 16850:             mmuWriteLongData (a, i, XEiJ.regSRS);
 16851:           }
 16852:         }
 16853:         break;
 16854: 
 16855:       case 0b011:  //$AC00: FMOVEM.L FPSR/FPIAR,<ea>
 16856:         {
 16857:           long l = (long) XEiJ.fpuBox.epbFpsr << 32 | XEiJ.fpuBox.epbFpiar & 0xffffffffL;
 16858:           a = efaMltQuad (ea);
 16859:           mmuWriteQuadData (a, l, XEiJ.regSRS);
 16860:         }
 16861:         break;
 16862: 
 16863:       case 0b100:  //$B000: FMOVE.L FPCR,<ea>
 16864:         {
 16865:           int i = XEiJ.fpuBox.epbFpcr;
 16866:           if (ea < XEiJ.EA_AR) {  //Dr。Ar不可
 16867:             //a = 0;
 16868:             XEiJ.regRn[ea] = i;
 16869:           } else {  //Dr以外
 16870:             a = efaMltLong (ea);
 16871:             mmuWriteLongData (a, i, XEiJ.regSRS);
 16872:           }
 16873:         }
 16874:         break;
 16875: 
 16876:       case 0b101:  //$B400: FMOVEM.L FPCR/FPIAR,<ea>
 16877:         {
 16878:           long l = (long) XEiJ.fpuBox.epbFpcr << 32 | XEiJ.fpuBox.epbFpiar & 0xffffffffL;
 16879:           a = efaMltQuad (ea);
 16880:           mmuWriteQuadData (a, l, XEiJ.regSRS);
 16881:         }
 16882:         break;
 16883: 
 16884:       case 0b110:  //$B800: FMOVEM.L FPCR/FPSR,<ea>
 16885:         {
 16886:           long l = (long) XEiJ.fpuBox.epbFpcr << 32 | XEiJ.fpuBox.epbFpsr & 0xffffffffL;
 16887:           a = efaMltQuad (ea);
 16888:           mmuWriteQuadData (a, l, XEiJ.regSRS);
 16889:         }
 16890:         break;
 16891: 
 16892:       case 0b111:  //$BC00: FMOVEM.L FPCR/FPSR/FPIAR,<ea>
 16893:       default:
 16894:         {
 16895:           int i = XEiJ.fpuBox.epbFpcr;
 16896:           long l = (long) XEiJ.fpuBox.epbFpsr << 32 | XEiJ.fpuBox.epbFpiar & 0xffffffffL;
 16897:           a = efaMltExtd (ea);
 16898:           mmuWriteLongData (a, i, XEiJ.regSRS);
 16899:           mmuWriteQuadSecond (a + 4, l, XEiJ.regSRS);
 16900:         }
 16901:         break;
 16902:       }
 16903:       break fgen;
 16904: 
 16905: 
 16906:     case 0b110:  //$Cxxx-$Dxxx: FMOVEM.X <ea>,<list>
 16907:       //  FMOVEM命令は例外を発生させずFPCR/FPSR/FPIARも(デスティネーションに書かれたもの以外)変化しない
 16908:       {
 16909:         if ((m & 2) != 0 && !XEiJ.fpuBox.epbIsFullSpec ()) {  //動的レジスタリスト
 16910:           irpExceptionFormat0 (M68kException.M6E_UNIMPLEMENTED_EFFECTIVE << 2, XEiJ.regPC0);  //pcは命令の先頭
 16911:           break fgen;
 16912:         }
 16913:         byte[] b = new byte[12];
 16914:         int list = ((m & 2) == 0 ? w : XEiJ.regRn[w >> 4 & 7]) << 24;
 16915:         if (ea >> 3 == XEiJ.MMM_MP) {  //(Ar)+
 16916:           int arr = XEiJ.regOC & 7 | 8;
 16917:           a = XEiJ.regRn[arr];
 16918:           for (n = 0; list != 0; n++, list <<= 1) {
 16919:             if (list < 0) {
 16920:               XEiJ.mpuCycleCount += 3;
 16921:               mmuReadByteArray (a, b, 0, 12, XEiJ.regSRS);
 16922:               if (XEiJ.fpuBox.epbIsTriple ()) {  //三倍精度
 16923:                 XEiJ.fpuFPn[n].sety012 (b, 0);
 16924:               } else {  //拡張精度
 16925:                 XEiJ.fpuFPn[n].setx012 (b, 0);
 16926:               }
 16927:               a += 12;
 16928:             }
 16929:           }
 16930:           XEiJ.regRn[arr] = a;
 16931:         } else {  //(Ar)+以外
 16932:           a = efaCntLong (ea);
 16933:           for (n = 0; list != 0; n++, list <<= 1) {
 16934:             if (list < 0) {
 16935:               XEiJ.mpuCycleCount += 3;
 16936:               mmuReadByteArray (a, b, 0, 12, XEiJ.regSRS);
 16937:               if (XEiJ.fpuBox.epbIsTriple ()) {  //三倍精度
 16938:                 XEiJ.fpuFPn[n].sety012 (b, 0);
 16939:               } else {  //拡張精度
 16940:                 XEiJ.fpuFPn[n].setx012 (b, 0);
 16941:               }
 16942:               a += 12;
 16943:             }
 16944:           }
 16945:         }
 16946:       }
 16947:       break fgen;
 16948: 
 16949: 
 16950:     case 0b111:  //$Exxx-$Fxxx: FMOVEM.X <list>,<ea>
 16951:       //  FMOVEM命令は例外を発生させずFPCR/FPSR/FPIARも(デスティネーションに書かれたもの以外)変化しない
 16952:       {
 16953:         if ((m & 2) != 0 && !XEiJ.fpuBox.epbIsFullSpec ()) {  //動的レジスタリスト
 16954:           irpExceptionFormat0 (M68kException.M6E_UNIMPLEMENTED_EFFECTIVE << 2, XEiJ.regPC0);  //pcは命令の先頭
 16955:           break fgen;
 16956:         }
 16957:         byte[] b = new byte[12];
 16958:         int list = ((m & 2) == 0 ? w : XEiJ.regRn[w >> 4 & 7]) << 24;
 16959:         if (ea >> 3 == XEiJ.MMM_MN) {  //-(Ar)
 16960:           int arr = XEiJ.regOC & 7 | 8;
 16961:           a = XEiJ.regRn[arr];
 16962:           for (n = 7; list != 0; n--, list <<= 1) {
 16963:             if (list < 0) {
 16964:               XEiJ.mpuCycleCount += 3;
 16965:               a -= 12;
 16966:               if (XEiJ.fpuBox.epbIsTriple ()) {  //三倍精度
 16967:                 XEiJ.fpuFPn[n].gety012 (b, 0, XEiJ.fpuBox.epbRoundingMode);
 16968:               } else {  //拡張精度
 16969:                 XEiJ.fpuFPn[n].getx012 (b, 0, XEiJ.fpuBox.epbRoundingMode);
 16970:               }
 16971:               mmuWriteByteArray (a, b, 0, 12, XEiJ.regSRS);
 16972:             }
 16973:           }
 16974:           XEiJ.regRn[arr] = a;
 16975:         } else {  //-(Ar)以外
 16976:           a = efaCltLong (ea);
 16977:           for (n = 0; list != 0; n++, list <<= 1) {
 16978:             if (list < 0) {
 16979:               XEiJ.mpuCycleCount += 3;
 16980:               if (XEiJ.fpuBox.epbIsTriple ()) {  //三倍精度
 16981:                 XEiJ.fpuFPn[n].gety012 (b, 0, XEiJ.fpuBox.epbRoundingMode);
 16982:               } else {  //拡張精度
 16983:                 XEiJ.fpuFPn[n].getx012 (b, 0, XEiJ.fpuBox.epbRoundingMode);
 16984:               }
 16985:               mmuWriteByteArray (a, b, 0, 12, XEiJ.regSRS);
 16986:               a += 12;
 16987:             }
 16988:           }
 16989:         }
 16990:       }
 16991:       break fgen;
 16992: 
 16993: 
 16994:     case 0b001:  //$2xxx-$3xxx: 未定義
 16995:     default:  //未定義
 16996:       XEiJ.fpuBox.epbFpiar = XEiJ.regPC0;  //FPIARはFMOVEM/FMOVE FPcr/FSAVE/FRESTORE以外の命令で例外が発生しなくても更新される
 16997:       XEiJ.regPC = XEiJ.regPC0 + 2;  //拡張ワードを読まなかったことにする
 16998:       irpFline ();
 16999:       break fgen;
 17000:     }
 17001:   }  //fgen
 17002:   }  //irpFgen
 17003: 
 17004: 
 17005:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 17006:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
 17007:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
 17008:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 17009:   //FSF.B <ea>                                      |-|--CC4S|-|-----|-----|D M+-WXZ  |1111_001_001_mmm_rrr-0000000000000000
 17010:   //FSEQ.B <ea>                                     |-|--CC4S|-|-----|-----|D M+-WXZ  |1111_001_001_mmm_rrr-0000000000000001
 17011:   //FSOGT.B <ea>                                    |-|--CC4S|-|-----|-----|D M+-WXZ  |1111_001_001_mmm_rrr-0000000000000010
 17012:   //FSOGE.B <ea>                                    |-|--CC4S|-|-----|-----|D M+-WXZ  |1111_001_001_mmm_rrr-0000000000000011
 17013:   //FSOLT.B <ea>                                    |-|--CC4S|-|-----|-----|D M+-WXZ  |1111_001_001_mmm_rrr-0000000000000100
 17014:   //FSOLE.B <ea>                                    |-|--CC4S|-|-----|-----|D M+-WXZ  |1111_001_001_mmm_rrr-0000000000000101
 17015:   //FSOGL.B <ea>                                    |-|--CC4S|-|-----|-----|D M+-WXZ  |1111_001_001_mmm_rrr-0000000000000110
 17016:   //FSOR.B <ea>                                     |-|--CC4S|-|-----|-----|D M+-WXZ  |1111_001_001_mmm_rrr-0000000000000111
 17017:   //FSUN.B <ea>                                     |-|--CC4S|-|-----|-----|D M+-WXZ  |1111_001_001_mmm_rrr-0000000000001000
 17018:   //FSUEQ.B <ea>                                    |-|--CC4S|-|-----|-----|D M+-WXZ  |1111_001_001_mmm_rrr-0000000000001001
 17019:   //FSUGT.B <ea>                                    |-|--CC4S|-|-----|-----|D M+-WXZ  |1111_001_001_mmm_rrr-0000000000001010
 17020:   //FSUGE.B <ea>                                    |-|--CC4S|-|-----|-----|D M+-WXZ  |1111_001_001_mmm_rrr-0000000000001011
 17021:   //FSULT.B <ea>                                    |-|--CC4S|-|-----|-----|D M+-WXZ  |1111_001_001_mmm_rrr-0000000000001100
 17022:   //FSULE.B <ea>                                    |-|--CC4S|-|-----|-----|D M+-WXZ  |1111_001_001_mmm_rrr-0000000000001101
 17023:   //FSNE.B <ea>                                     |-|--CC4S|-|-----|-----|D M+-WXZ  |1111_001_001_mmm_rrr-0000000000001110
 17024:   //FST.B <ea>                                      |-|--CC4S|-|-----|-----|D M+-WXZ  |1111_001_001_mmm_rrr-0000000000001111
 17025:   //FSSF.B <ea>                                     |-|--CC4S|-|-----|-----|D M+-WXZ  |1111_001_001_mmm_rrr-0000000000010000
 17026:   //FSSEQ.B <ea>                                    |-|--CC4S|-|-----|-----|D M+-WXZ  |1111_001_001_mmm_rrr-0000000000010001
 17027:   //FSGT.B <ea>                                     |-|--CC4S|-|-----|-----|D M+-WXZ  |1111_001_001_mmm_rrr-0000000000010010
 17028:   //FSGE.B <ea>                                     |-|--CC4S|-|-----|-----|D M+-WXZ  |1111_001_001_mmm_rrr-0000000000010011
 17029:   //FSLT.B <ea>                                     |-|--CC4S|-|-----|-----|D M+-WXZ  |1111_001_001_mmm_rrr-0000000000010100
 17030:   //FSLE.B <ea>                                     |-|--CC4S|-|-----|-----|D M+-WXZ  |1111_001_001_mmm_rrr-0000000000010101
 17031:   //FSGL.B <ea>                                     |-|--CC4S|-|-----|-----|D M+-WXZ  |1111_001_001_mmm_rrr-0000000000010110
 17032:   //FSGLE.B <ea>                                    |-|--CC4S|-|-----|-----|D M+-WXZ  |1111_001_001_mmm_rrr-0000000000010111
 17033:   //FSNGLE.B <ea>                                   |-|--CC4S|-|-----|-----|D M+-WXZ  |1111_001_001_mmm_rrr-0000000000011000
 17034:   //FSNGL.B <ea>                                    |-|--CC4S|-|-----|-----|D M+-WXZ  |1111_001_001_mmm_rrr-0000000000011001
 17035:   //FSNLE.B <ea>                                    |-|--CC4S|-|-----|-----|D M+-WXZ  |1111_001_001_mmm_rrr-0000000000011010
 17036:   //FSNLT.B <ea>                                    |-|--CC4S|-|-----|-----|D M+-WXZ  |1111_001_001_mmm_rrr-0000000000011011
 17037:   //FSNGE.B <ea>                                    |-|--CC4S|-|-----|-----|D M+-WXZ  |1111_001_001_mmm_rrr-0000000000011100
 17038:   //FSNGT.B <ea>                                    |-|--CC4S|-|-----|-----|D M+-WXZ  |1111_001_001_mmm_rrr-0000000000011101
 17039:   //FSSNE.B <ea>                                    |-|--CC4S|-|-----|-----|D M+-WXZ  |1111_001_001_mmm_rrr-0000000000011110
 17040:   //FSST.B <ea>                                     |-|--CC4S|-|-----|-----|D M+-WXZ  |1111_001_001_mmm_rrr-0000000000011111
 17041:   //FDBF Dr,<label>                                 |-|--CC4S|-|-----|-----|          |1111_001_001_001_rrr-0000000000000000-{offset}
 17042:   //FDBRA Dr,<label>                                |A|--CC4S|-|-----|-----|          |1111_001_001_001_rrr-0000000000000000-{offset}       [FDBF Dr,<label>]
 17043:   //FDBEQ Dr,<label>                                |-|--CC4S|-|-----|-----|          |1111_001_001_001_rrr-0000000000000001-{offset}
 17044:   //FDBOGT Dr,<label>                               |-|--CC4S|-|-----|-----|          |1111_001_001_001_rrr-0000000000000010-{offset}
 17045:   //FDBOGE Dr,<label>                               |-|--CC4S|-|-----|-----|          |1111_001_001_001_rrr-0000000000000011-{offset}
 17046:   //FDBOLT Dr,<label>                               |-|--CC4S|-|-----|-----|          |1111_001_001_001_rrr-0000000000000100-{offset}
 17047:   //FDBOLE Dr,<label>                               |-|--CC4S|-|-----|-----|          |1111_001_001_001_rrr-0000000000000101-{offset}
 17048:   //FDBOGL Dr,<label>                               |-|--CC4S|-|-----|-----|          |1111_001_001_001_rrr-0000000000000110-{offset}
 17049:   //FDBOR Dr,<label>                                |-|--CC4S|-|-----|-----|          |1111_001_001_001_rrr-0000000000000111-{offset}
 17050:   //FDBUN Dr,<label>                                |-|--CC4S|-|-----|-----|          |1111_001_001_001_rrr-0000000000001000-{offset}
 17051:   //FDBUEQ Dr,<label>                               |-|--CC4S|-|-----|-----|          |1111_001_001_001_rrr-0000000000001001-{offset}
 17052:   //FDBUGT Dr,<label>                               |-|--CC4S|-|-----|-----|          |1111_001_001_001_rrr-0000000000001010-{offset}
 17053:   //FDBUGE Dr,<label>                               |-|--CC4S|-|-----|-----|          |1111_001_001_001_rrr-0000000000001011-{offset}
 17054:   //FDBULT Dr,<label>                               |-|--CC4S|-|-----|-----|          |1111_001_001_001_rrr-0000000000001100-{offset}
 17055:   //FDBULE Dr,<label>                               |-|--CC4S|-|-----|-----|          |1111_001_001_001_rrr-0000000000001101-{offset}
 17056:   //FDBNE Dr,<label>                                |-|--CC4S|-|-----|-----|          |1111_001_001_001_rrr-0000000000001110-{offset}
 17057:   //FDBT Dr,<label>                                 |-|--CC4S|-|-----|-----|          |1111_001_001_001_rrr-0000000000001111-{offset}
 17058:   //FDBSF Dr,<label>                                |-|--CC4S|-|-----|-----|          |1111_001_001_001_rrr-0000000000010000-{offset}
 17059:   //FDBSEQ Dr,<label>                               |-|--CC4S|-|-----|-----|          |1111_001_001_001_rrr-0000000000010001-{offset}
 17060:   //FDBGT Dr,<label>                                |-|--CC4S|-|-----|-----|          |1111_001_001_001_rrr-0000000000010010-{offset}
 17061:   //FDBGE Dr,<label>                                |-|--CC4S|-|-----|-----|          |1111_001_001_001_rrr-0000000000010011-{offset}
 17062:   //FDBLT Dr,<label>                                |-|--CC4S|-|-----|-----|          |1111_001_001_001_rrr-0000000000010100-{offset}
 17063:   //FDBLE Dr,<label>                                |-|--CC4S|-|-----|-----|          |1111_001_001_001_rrr-0000000000010101-{offset}
 17064:   //FDBGL Dr,<label>                                |-|--CC4S|-|-----|-----|          |1111_001_001_001_rrr-0000000000010110-{offset}
 17065:   //FDBGLE Dr,<label>                               |-|--CC4S|-|-----|-----|          |1111_001_001_001_rrr-0000000000010111-{offset}
 17066:   //FDBNGLE Dr,<label>                              |-|--CC4S|-|-----|-----|          |1111_001_001_001_rrr-0000000000011000-{offset}
 17067:   //FDBNGL Dr,<label>                               |-|--CC4S|-|-----|-----|          |1111_001_001_001_rrr-0000000000011001-{offset}
 17068:   //FDBNLE Dr,<label>                               |-|--CC4S|-|-----|-----|          |1111_001_001_001_rrr-0000000000011010-{offset}
 17069:   //FDBNLT Dr,<label>                               |-|--CC4S|-|-----|-----|          |1111_001_001_001_rrr-0000000000011011-{offset}
 17070:   //FDBNGE Dr,<label>                               |-|--CC4S|-|-----|-----|          |1111_001_001_001_rrr-0000000000011100-{offset}
 17071:   //FDBNGT Dr,<label>                               |-|--CC4S|-|-----|-----|          |1111_001_001_001_rrr-0000000000011101-{offset}
 17072:   //FDBSNE Dr,<label>                               |-|--CC4S|-|-----|-----|          |1111_001_001_001_rrr-0000000000011110-{offset}
 17073:   //FDBST Dr,<label>                                |-|--CC4S|-|-----|-----|          |1111_001_001_001_rrr-0000000000011111-{offset}
 17074:   //FTRAPF.W #<data>                                |-|--CC4S|-|-----|-----|          |1111_001_001_111_010-0000000000000000-{data}
 17075:   //FTRAPEQ.W #<data>                               |-|--CC4S|-|-----|-----|          |1111_001_001_111_010-0000000000000001-{data}
 17076:   //FTRAPOGT.W #<data>                              |-|--CC4S|-|-----|-----|          |1111_001_001_111_010-0000000000000010-{data}
 17077:   //FTRAPOGE.W #<data>                              |-|--CC4S|-|-----|-----|          |1111_001_001_111_010-0000000000000011-{data}
 17078:   //FTRAPOLT.W #<data>                              |-|--CC4S|-|-----|-----|          |1111_001_001_111_010-0000000000000100-{data}
 17079:   //FTRAPOLE.W #<data>                              |-|--CC4S|-|-----|-----|          |1111_001_001_111_010-0000000000000101-{data}
 17080:   //FTRAPOGL.W #<data>                              |-|--CC4S|-|-----|-----|          |1111_001_001_111_010-0000000000000110-{data}
 17081:   //FTRAPOR.W #<data>                               |-|--CC4S|-|-----|-----|          |1111_001_001_111_010-0000000000000111-{data}
 17082:   //FTRAPUN.W #<data>                               |-|--CC4S|-|-----|-----|          |1111_001_001_111_010-0000000000001000-{data}
 17083:   //FTRAPUEQ.W #<data>                              |-|--CC4S|-|-----|-----|          |1111_001_001_111_010-0000000000001001-{data}
 17084:   //FTRAPUGT.W #<data>                              |-|--CC4S|-|-----|-----|          |1111_001_001_111_010-0000000000001010-{data}
 17085:   //FTRAPUGE.W #<data>                              |-|--CC4S|-|-----|-----|          |1111_001_001_111_010-0000000000001011-{data}
 17086:   //FTRAPULT.W #<data>                              |-|--CC4S|-|-----|-----|          |1111_001_001_111_010-0000000000001100-{data}
 17087:   //FTRAPULE.W #<data>                              |-|--CC4S|-|-----|-----|          |1111_001_001_111_010-0000000000001101-{data}
 17088:   //FTRAPNE.W #<data>                               |-|--CC4S|-|-----|-----|          |1111_001_001_111_010-0000000000001110-{data}
 17089:   //FTRAPT.W #<data>                                |-|--CC4S|-|-----|-----|          |1111_001_001_111_010-0000000000001111-{data}
 17090:   //FTRAPSF.W #<data>                               |-|--CC4S|-|-----|-----|          |1111_001_001_111_010-0000000000010000-{data}
 17091:   //FTRAPSEQ.W #<data>                              |-|--CC4S|-|-----|-----|          |1111_001_001_111_010-0000000000010001-{data}
 17092:   //FTRAPGT.W #<data>                               |-|--CC4S|-|-----|-----|          |1111_001_001_111_010-0000000000010010-{data}
 17093:   //FTRAPGE.W #<data>                               |-|--CC4S|-|-----|-----|          |1111_001_001_111_010-0000000000010011-{data}
 17094:   //FTRAPLT.W #<data>                               |-|--CC4S|-|-----|-----|          |1111_001_001_111_010-0000000000010100-{data}
 17095:   //FTRAPLE.W #<data>                               |-|--CC4S|-|-----|-----|          |1111_001_001_111_010-0000000000010101-{data}
 17096:   //FTRAPGL.W #<data>                               |-|--CC4S|-|-----|-----|          |1111_001_001_111_010-0000000000010110-{data}
 17097:   //FTRAPGLE.W #<data>                              |-|--CC4S|-|-----|-----|          |1111_001_001_111_010-0000000000010111-{data}
 17098:   //FTRAPNGLE.W #<data>                             |-|--CC4S|-|-----|-----|          |1111_001_001_111_010-0000000000011000-{data}
 17099:   //FTRAPNGL.W #<data>                              |-|--CC4S|-|-----|-----|          |1111_001_001_111_010-0000000000011001-{data}
 17100:   //FTRAPNLE.W #<data>                              |-|--CC4S|-|-----|-----|          |1111_001_001_111_010-0000000000011010-{data}
 17101:   //FTRAPNLT.W #<data>                              |-|--CC4S|-|-----|-----|          |1111_001_001_111_010-0000000000011011-{data}
 17102:   //FTRAPNGE.W #<data>                              |-|--CC4S|-|-----|-----|          |1111_001_001_111_010-0000000000011100-{data}
 17103:   //FTRAPNGT.W #<data>                              |-|--CC4S|-|-----|-----|          |1111_001_001_111_010-0000000000011101-{data}
 17104:   //FTRAPSNE.W #<data>                              |-|--CC4S|-|-----|-----|          |1111_001_001_111_010-0000000000011110-{data}
 17105:   //FTRAPST.W #<data>                               |-|--CC4S|-|-----|-----|          |1111_001_001_111_010-0000000000011111-{data}
 17106:   //FTRAPF.L #<data>                                |-|--CC4S|-|-----|-----|          |1111_001_001_111_011-0000000000000000-{data}
 17107:   //FTRAPEQ.L #<data>                               |-|--CC4S|-|-----|-----|          |1111_001_001_111_011-0000000000000001-{data}
 17108:   //FTRAPOGT.L #<data>                              |-|--CC4S|-|-----|-----|          |1111_001_001_111_011-0000000000000010-{data}
 17109:   //FTRAPOGE.L #<data>                              |-|--CC4S|-|-----|-----|          |1111_001_001_111_011-0000000000000011-{data}
 17110:   //FTRAPOLT.L #<data>                              |-|--CC4S|-|-----|-----|          |1111_001_001_111_011-0000000000000100-{data}
 17111:   //FTRAPOLE.L #<data>                              |-|--CC4S|-|-----|-----|          |1111_001_001_111_011-0000000000000101-{data}
 17112:   //FTRAPOGL.L #<data>                              |-|--CC4S|-|-----|-----|          |1111_001_001_111_011-0000000000000110-{data}
 17113:   //FTRAPOR.L #<data>                               |-|--CC4S|-|-----|-----|          |1111_001_001_111_011-0000000000000111-{data}
 17114:   //FTRAPUN.L #<data>                               |-|--CC4S|-|-----|-----|          |1111_001_001_111_011-0000000000001000-{data}
 17115:   //FTRAPUEQ.L #<data>                              |-|--CC4S|-|-----|-----|          |1111_001_001_111_011-0000000000001001-{data}
 17116:   //FTRAPUGT.L #<data>                              |-|--CC4S|-|-----|-----|          |1111_001_001_111_011-0000000000001010-{data}
 17117:   //FTRAPUGE.L #<data>                              |-|--CC4S|-|-----|-----|          |1111_001_001_111_011-0000000000001011-{data}
 17118:   //FTRAPULT.L #<data>                              |-|--CC4S|-|-----|-----|          |1111_001_001_111_011-0000000000001100-{data}
 17119:   //FTRAPULE.L #<data>                              |-|--CC4S|-|-----|-----|          |1111_001_001_111_011-0000000000001101-{data}
 17120:   //FTRAPNE.L #<data>                               |-|--CC4S|-|-----|-----|          |1111_001_001_111_011-0000000000001110-{data}
 17121:   //FTRAPT.L #<data>                                |-|--CC4S|-|-----|-----|          |1111_001_001_111_011-0000000000001111-{data}
 17122:   //FTRAPSF.L #<data>                               |-|--CC4S|-|-----|-----|          |1111_001_001_111_011-0000000000010000-{data}
 17123:   //FTRAPSEQ.L #<data>                              |-|--CC4S|-|-----|-----|          |1111_001_001_111_011-0000000000010001-{data}
 17124:   //FTRAPGT.L #<data>                               |-|--CC4S|-|-----|-----|          |1111_001_001_111_011-0000000000010010-{data}
 17125:   //FTRAPGE.L #<data>                               |-|--CC4S|-|-----|-----|          |1111_001_001_111_011-0000000000010011-{data}
 17126:   //FTRAPLT.L #<data>                               |-|--CC4S|-|-----|-----|          |1111_001_001_111_011-0000000000010100-{data}
 17127:   //FTRAPLE.L #<data>                               |-|--CC4S|-|-----|-----|          |1111_001_001_111_011-0000000000010101-{data}
 17128:   //FTRAPGL.L #<data>                               |-|--CC4S|-|-----|-----|          |1111_001_001_111_011-0000000000010110-{data}
 17129:   //FTRAPGLE.L #<data>                              |-|--CC4S|-|-----|-----|          |1111_001_001_111_011-0000000000010111-{data}
 17130:   //FTRAPNGLE.L #<data>                             |-|--CC4S|-|-----|-----|          |1111_001_001_111_011-0000000000011000-{data}
 17131:   //FTRAPNGL.L #<data>                              |-|--CC4S|-|-----|-----|          |1111_001_001_111_011-0000000000011001-{data}
 17132:   //FTRAPNLE.L #<data>                              |-|--CC4S|-|-----|-----|          |1111_001_001_111_011-0000000000011010-{data}
 17133:   //FTRAPNLT.L #<data>                              |-|--CC4S|-|-----|-----|          |1111_001_001_111_011-0000000000011011-{data}
 17134:   //FTRAPNGE.L #<data>                              |-|--CC4S|-|-----|-----|          |1111_001_001_111_011-0000000000011100-{data}
 17135:   //FTRAPNGT.L #<data>                              |-|--CC4S|-|-----|-----|          |1111_001_001_111_011-0000000000011101-{data}
 17136:   //FTRAPSNE.L #<data>                              |-|--CC4S|-|-----|-----|          |1111_001_001_111_011-0000000000011110-{data}
 17137:   //FTRAPST.L #<data>                               |-|--CC4S|-|-----|-----|          |1111_001_001_111_011-0000000000011111-{data}
 17138:   //FTRAPF                                          |-|--CC4S|-|-----|-----|          |1111_001_001_111_100-0000000000000000
 17139:   //FTRAPEQ                                         |-|--CC4S|-|-----|-----|          |1111_001_001_111_100-0000000000000001
 17140:   //FTRAPOGT                                        |-|--CC4S|-|-----|-----|          |1111_001_001_111_100-0000000000000010
 17141:   //FTRAPOGE                                        |-|--CC4S|-|-----|-----|          |1111_001_001_111_100-0000000000000011
 17142:   //FTRAPOLT                                        |-|--CC4S|-|-----|-----|          |1111_001_001_111_100-0000000000000100
 17143:   //FTRAPOLE                                        |-|--CC4S|-|-----|-----|          |1111_001_001_111_100-0000000000000101
 17144:   //FTRAPOGL                                        |-|--CC4S|-|-----|-----|          |1111_001_001_111_100-0000000000000110
 17145:   //FTRAPOR                                         |-|--CC4S|-|-----|-----|          |1111_001_001_111_100-0000000000000111
 17146:   //FTRAPUN                                         |-|--CC4S|-|-----|-----|          |1111_001_001_111_100-0000000000001000
 17147:   //FTRAPUEQ                                        |-|--CC4S|-|-----|-----|          |1111_001_001_111_100-0000000000001001
 17148:   //FTRAPUGT                                        |-|--CC4S|-|-----|-----|          |1111_001_001_111_100-0000000000001010
 17149:   //FTRAPUGE                                        |-|--CC4S|-|-----|-----|          |1111_001_001_111_100-0000000000001011
 17150:   //FTRAPULT                                        |-|--CC4S|-|-----|-----|          |1111_001_001_111_100-0000000000001100
 17151:   //FTRAPULE                                        |-|--CC4S|-|-----|-----|          |1111_001_001_111_100-0000000000001101
 17152:   //FTRAPNE                                         |-|--CC4S|-|-----|-----|          |1111_001_001_111_100-0000000000001110
 17153:   //FTRAPT                                          |-|--CC4S|-|-----|-----|          |1111_001_001_111_100-0000000000001111
 17154:   //FTRAPSF                                         |-|--CC4S|-|-----|-----|          |1111_001_001_111_100-0000000000010000
 17155:   //FTRAPSEQ                                        |-|--CC4S|-|-----|-----|          |1111_001_001_111_100-0000000000010001
 17156:   //FTRAPGT                                         |-|--CC4S|-|-----|-----|          |1111_001_001_111_100-0000000000010010
 17157:   //FTRAPGE                                         |-|--CC4S|-|-----|-----|          |1111_001_001_111_100-0000000000010011
 17158:   //FTRAPLT                                         |-|--CC4S|-|-----|-----|          |1111_001_001_111_100-0000000000010100
 17159:   //FTRAPLE                                         |-|--CC4S|-|-----|-----|          |1111_001_001_111_100-0000000000010101
 17160:   //FTRAPGL                                         |-|--CC4S|-|-----|-----|          |1111_001_001_111_100-0000000000010110
 17161:   //FTRAPGLE                                        |-|--CC4S|-|-----|-----|          |1111_001_001_111_100-0000000000010111
 17162:   //FTRAPNGLE                                       |-|--CC4S|-|-----|-----|          |1111_001_001_111_100-0000000000011000
 17163:   //FTRAPNGL                                        |-|--CC4S|-|-----|-----|          |1111_001_001_111_100-0000000000011001
 17164:   //FTRAPNLE                                        |-|--CC4S|-|-----|-----|          |1111_001_001_111_100-0000000000011010
 17165:   //FTRAPNLT                                        |-|--CC4S|-|-----|-----|          |1111_001_001_111_100-0000000000011011
 17166:   //FTRAPNGE                                        |-|--CC4S|-|-----|-----|          |1111_001_001_111_100-0000000000011100
 17167:   //FTRAPNGT                                        |-|--CC4S|-|-----|-----|          |1111_001_001_111_100-0000000000011101
 17168:   //FTRAPSNE                                        |-|--CC4S|-|-----|-----|          |1111_001_001_111_100-0000000000011110
 17169:   //FTRAPST                                         |-|--CC4S|-|-----|-----|          |1111_001_001_111_100-0000000000011111
 17170:   public static void irpFscc () throws M68kException {
 17171:   fscc: {
 17172:     //XEiJ.fpuBox.epbExceptionStatusWord = 0;
 17173:     if (XEiJ.currentMPU == Model.MPU_MC68LC060) {
 17174:       irpFline ();
 17175:       break fscc;
 17176:     }
 17177:     XEiJ.fpuBox.epbFpiar = XEiJ.regPC0;  //FPIARはFMOVEM/FMOVE FPcr/FSAVE/FRESTORE以外の命令で例外が発生しなくても更新される
 17178:     int w = mmuReadWordZeroExword ((XEiJ.regPC += 2) - 2, XEiJ.regSRS);  //pcwz。拡張ワード
 17179:     if ((w & 0b010000) != 0 && (XEiJ.fpuBox.epbFpsr & XEiJ.FPU_FPSR_NAN) != 0) {  //IEEEノンアウェアテストでNANがセットされているとき
 17180:       XEiJ.fpuBox.epbFpsr |= XEiJ.FPU_FPSR_EXC_BSUN;  //BSUNをセット
 17181:       XEiJ.fpuBox.epbFpsr |= XEiJ.FPU_FPSR_EXC_TO_AEXC[XEiJ.fpuBox.epbFpsr >> 8 & 255];
 17182:       if ((XEiJ.fpuBox.epbFpcr & XEiJ.FPU_FPCR_BSUN) != 0) {  //BSUN例外許可
 17183:         XEiJ.fpuBox.epbExceptionStatusWord = 0xe000 | M68kException.M6E_FP_BRANCH_SET_UNORDERED & 7;
 17184:         irpExceptionFormat0 (M68kException.M6E_FP_BRANCH_SET_UNORDERED << 2, XEiJ.regPC0);  //pcは命令の先頭
 17185:         break fscc;
 17186:       }
 17187:     }
 17188:     int ea = XEiJ.regOC & 63;
 17189:     if (ea < XEiJ.EA_AR) {  //FScc.B Dr
 17190:       if (!XEiJ.fpuBox.epbIsFullSpec ()) {
 17191:         irpExceptionFormat2 (M68kException.M6E_FP_UNIMPLEMENTED_INSTRUCTION << 2, XEiJ.regPC, 0);  //pcは次の命令,アドレスは実効アドレス
 17192:         break fscc;
 17193:       }
 17194:       if (XEiJ.FPU_CCMAP_060[(w & 63) << 4 | XEiJ.fpuBox.epbFpsr >> 24 & 15]) {  //セット
 17195:         XEiJ.mpuCycleCount++;
 17196:         XEiJ.regRn[ea] |= 0xff;
 17197:       } else {  //クリア
 17198:         XEiJ.mpuCycleCount++;
 17199:         XEiJ.regRn[ea] &= ~0xff;
 17200:       }
 17201:     } else if (ea < XEiJ.EA_MM) {  //FDBcc Dr,<label>
 17202:       if (!XEiJ.fpuBox.epbIsFullSpec ()) {
 17203:         XEiJ.regPC += 2;  //オフセットを読み飛ばす
 17204:         irpExceptionFormat2 (M68kException.M6E_FP_UNIMPLEMENTED_INSTRUCTION << 2, XEiJ.regPC, 0);  //pcは次の命令,アドレスは実効アドレス
 17205:         break fscc;
 17206:       }
 17207:       if (XEiJ.FPU_CCMAP_060[(w & 63) << 4 | XEiJ.fpuBox.epbFpsr >> 24 & 15]) {  //条件が成立しているので通過
 17208:         XEiJ.mpuCycleCount += 2;
 17209:         XEiJ.regPC += 2;  //オフセットを読み飛ばす
 17210:       } else {
 17211:         int rrr = XEiJ.regOC & 7;
 17212:         int t = XEiJ.regRn[rrr];
 17213:         if ((short) t == 0) {  //Drの下位16bitが0なので通過
 17214:           XEiJ.mpuCycleCount += 2;
 17215:           XEiJ.regRn[rrr] = t + 65535;
 17216:           XEiJ.regPC += 2;  //オフセットを読み飛ばす
 17217:         } else {  //Drの下位16bitが0でないのでジャンプ
 17218:           XEiJ.mpuCycleCount++;
 17219:           XEiJ.regRn[rrr] = t - 1;  //下位16bitが0でないので上位16bitは変化しない
 17220:           irpSetPC (XEiJ.regPC + mmuReadWordSignExword (XEiJ.regPC, XEiJ.regSRS));  //pc==pc0+2
 17221:         }
 17222:       }
 17223:     } else if (ea < XEiJ.EA_PW) {  //FScc.B <mem>
 17224:       int a = efaMltByte (ea);
 17225:       if (!XEiJ.fpuBox.epbIsFullSpec ()) {
 17226:         irpExceptionFormat2 (M68kException.M6E_FP_UNIMPLEMENTED_INSTRUCTION << 2, XEiJ.regPC, a);  //pcは次の命令,アドレスは実効アドレス
 17227:         break fscc;
 17228:       }
 17229:       XEiJ.mpuCycleCount++;
 17230:       mmuWriteByteData (a, XEiJ.FPU_CCMAP_060[(w & 63) << 4 | XEiJ.fpuBox.epbFpsr >> 24 & 15] ? 0xff : 0x00, XEiJ.regSRS);
 17231:     } else if (ea <= XEiJ.EA_IM) {  //FTRAPcc.W/FTRAPcc.L/FTRAPcc
 17232:       XEiJ.regPC += (ea & 3) + (ea & 1);  //111_010→2,111_011→4,111_100→0
 17233:       if (!XEiJ.fpuBox.epbIsFullSpec ()) {
 17234:         irpExceptionFormat2 (M68kException.M6E_FP_UNIMPLEMENTED_INSTRUCTION << 2, XEiJ.regPC, 0);  //pcは次の命令,アドレスは実効アドレス
 17235:         break fscc;
 17236:       }
 17237:       if (!XEiJ.FPU_CCMAP_060[(w & 63) << 4 | XEiJ.fpuBox.epbFpsr >> 24 & 15]) {  //通過
 17238:         XEiJ.mpuCycleCount += 2;
 17239:       } else {
 17240:         M68kException.m6eAddress = XEiJ.regPC0;  //アドレスは命令の先頭
 17241:         M68kException.m6eNumber = M68kException.M6E_TRAPV_INSTRUCTION;
 17242:         throw M68kException.m6eSignal;
 17243:       }
 17244:     } else {
 17245:       XEiJ.regPC = XEiJ.regPC0 + 2;  //拡張ワードを読まなかったことにする
 17246:       irpFline ();
 17247:       break fscc;
 17248:     }
 17249:   }  //fscc
 17250:   }  //irpFscc
 17251: 
 17252:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 17253:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
 17254:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
 17255:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 17256:   //FNOP                                            |A|--CC46|-|-----|-----|          |1111_001_010_000_000-0000000000000000        [FBF.W (*)+2]
 17257:   //FBF.W <label>                                   |-|--CC46|-|-----|-----|          |1111_001_010_000_000-{offset}
 17258:   //FBEQ.W <label>                                  |-|--CC46|-|-----|-----|          |1111_001_010_000_001-{offset}
 17259:   //FBOGT.W <label>                                 |-|--CC46|-|-----|-----|          |1111_001_010_000_010-{offset}
 17260:   //FBOGE.W <label>                                 |-|--CC46|-|-----|-----|          |1111_001_010_000_011-{offset}
 17261:   //FBOLT.W <label>                                 |-|--CC46|-|-----|-----|          |1111_001_010_000_100-{offset}
 17262:   //FBOLE.W <label>                                 |-|--CC46|-|-----|-----|          |1111_001_010_000_101-{offset}
 17263:   //FBOGL.W <label>                                 |-|--CC46|-|-----|-----|          |1111_001_010_000_110-{offset}
 17264:   //FBOR.W <label>                                  |-|--CC46|-|-----|-----|          |1111_001_010_000_111-{offset}
 17265:   //FBUN.W <label>                                  |-|--CC46|-|-----|-----|          |1111_001_010_001_000-{offset}
 17266:   //FBUEQ.W <label>                                 |-|--CC46|-|-----|-----|          |1111_001_010_001_001-{offset}
 17267:   //FBUGT.W <label>                                 |-|--CC46|-|-----|-----|          |1111_001_010_001_010-{offset}
 17268:   //FBUGE.W <label>                                 |-|--CC46|-|-----|-----|          |1111_001_010_001_011-{offset}
 17269:   //FBULT.W <label>                                 |-|--CC46|-|-----|-----|          |1111_001_010_001_100-{offset}
 17270:   //FBULE.W <label>                                 |-|--CC46|-|-----|-----|          |1111_001_010_001_101-{offset}
 17271:   //FBNE.W <label>                                  |-|--CC46|-|-----|-----|          |1111_001_010_001_110-{offset}
 17272:   //FBT.W <label>                                   |-|--CC46|-|-----|-----|          |1111_001_010_001_111-{offset}
 17273:   //FBRA.W <label>                                  |A|--CC46|-|-----|-----|          |1111_001_010_001_111-{offset}        [FBT.W <label>]
 17274:   //FBSF.W <label>                                  |-|--CC46|-|-----|-----|          |1111_001_010_010_000-{offset}
 17275:   //FBSEQ.W <label>                                 |-|--CC46|-|-----|-----|          |1111_001_010_010_001-{offset}
 17276:   //FBGT.W <label>                                  |-|--CC46|-|-----|-----|          |1111_001_010_010_010-{offset}
 17277:   //FBGE.W <label>                                  |-|--CC46|-|-----|-----|          |1111_001_010_010_011-{offset}
 17278:   //FBLT.W <label>                                  |-|--CC46|-|-----|-----|          |1111_001_010_010_100-{offset}
 17279:   //FBLE.W <label>                                  |-|--CC46|-|-----|-----|          |1111_001_010_010_101-{offset}
 17280:   //FBGL.W <label>                                  |-|--CC46|-|-----|-----|          |1111_001_010_010_110-{offset}
 17281:   //FBGLE.W <label>                                 |-|--CC46|-|-----|-----|          |1111_001_010_010_111-{offset}
 17282:   //FBNGLE.W <label>                                |-|--CC46|-|-----|-----|          |1111_001_010_011_000-{offset}
 17283:   //FBNGL.W <label>                                 |-|--CC46|-|-----|-----|          |1111_001_010_011_001-{offset}
 17284:   //FBNLE.W <label>                                 |-|--CC46|-|-----|-----|          |1111_001_010_011_010-{offset}
 17285:   //FBNLT.W <label>                                 |-|--CC46|-|-----|-----|          |1111_001_010_011_011-{offset}
 17286:   //FBNGE.W <label>                                 |-|--CC46|-|-----|-----|          |1111_001_010_011_100-{offset}
 17287:   //FBNGT.W <label>                                 |-|--CC46|-|-----|-----|          |1111_001_010_011_101-{offset}
 17288:   //FBSNE.W <label>                                 |-|--CC46|-|-----|-----|          |1111_001_010_011_110-{offset}
 17289:   //FBST.W <label>                                  |-|--CC46|-|-----|-----|          |1111_001_010_011_111-{offset}
 17290:   public static void irpFbccWord () throws M68kException {
 17291:   fbcc: {
 17292:     //XEiJ.fpuBox.epbExceptionStatusWord = 0;
 17293:     if (XEiJ.currentMPU == Model.MPU_MC68LC060) {
 17294:       irpFline ();
 17295:       break fbcc;
 17296:     }
 17297:     XEiJ.fpuBox.epbFpiar = XEiJ.regPC0;  //FPIARはFMOVEM/FMOVE FPcr/FSAVE/FRESTORE以外の命令で例外が発生しなくても更新される
 17298:     if ((XEiJ.regOC & 0b010000) != 0 && (XEiJ.fpuBox.epbFpsr & XEiJ.FPU_FPSR_NAN) != 0) {  //IEEEノンアウェアテストでNANがセットされているとき
 17299:       XEiJ.fpuBox.epbFpsr |= XEiJ.FPU_FPSR_EXC_BSUN;  //BSUNをセット
 17300:       XEiJ.fpuBox.epbFpsr |= XEiJ.FPU_FPSR_EXC_TO_AEXC[XEiJ.fpuBox.epbFpsr >> 8 & 255];
 17301:       if ((XEiJ.fpuBox.epbFpcr & XEiJ.FPU_FPCR_BSUN) != 0) {  //BSUN例外許可
 17302:         XEiJ.fpuBox.epbExceptionStatusWord = 0xe000 | M68kException.M6E_FP_BRANCH_SET_UNORDERED & 7;
 17303:         irpExceptionFormat0 (M68kException.M6E_FP_BRANCH_SET_UNORDERED << 2, XEiJ.regPC0);  //pcは命令の先頭
 17304:         break fbcc;
 17305:       }
 17306:     }
 17307:     XEiJ.mpuCycleCount++;
 17308:     int t = XEiJ.regPC;  //pc0+2
 17309:     XEiJ.regPC = t + 2;  //pc0+4
 17310:     t += mmuReadWordSignExword (t, XEiJ.regSRS);  //pc0+2+16bitディスプレースメント
 17311:     if ((t & 1) != 0) {  //分岐先のアドレスが奇数
 17312:       //MC68060のBcc/DBcc/FBccは分岐先のアドレスが奇数のとき分岐しなくてもアドレスエラーになる。FDBccは分岐するときだけ
 17313:       irpBccAddressError (t);
 17314:     }
 17315:     if (XEiJ.FPU_CCMAP_060[(XEiJ.regOC & 63) << 4 | XEiJ.fpuBox.epbFpsr >> 24 & 15]) {  //分岐する
 17316:       irpSetPC (t);
 17317:     }
 17318:   }  //fbcc
 17319:   }  //irpFbccWord
 17320: 
 17321:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 17322:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
 17323:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
 17324:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 17325:   //FBF.L <label>                                   |-|--CC46|-|-----|-----|          |1111_001_011_000_000-{offset}
 17326:   //FBEQ.L <label>                                  |-|--CC46|-|-----|-----|          |1111_001_011_000_001-{offset}
 17327:   //FBOGT.L <label>                                 |-|--CC46|-|-----|-----|          |1111_001_011_000_010-{offset}
 17328:   //FBOGE.L <label>                                 |-|--CC46|-|-----|-----|          |1111_001_011_000_011-{offset}
 17329:   //FBOLT.L <label>                                 |-|--CC46|-|-----|-----|          |1111_001_011_000_100-{offset}
 17330:   //FBOLE.L <label>                                 |-|--CC46|-|-----|-----|          |1111_001_011_000_101-{offset}
 17331:   //FBOGL.L <label>                                 |-|--CC46|-|-----|-----|          |1111_001_011_000_110-{offset}
 17332:   //FBOR.L <label>                                  |-|--CC46|-|-----|-----|          |1111_001_011_000_111-{offset}
 17333:   //FBUN.L <label>                                  |-|--CC46|-|-----|-----|          |1111_001_011_001_000-{offset}
 17334:   //FBUEQ.L <label>                                 |-|--CC46|-|-----|-----|          |1111_001_011_001_001-{offset}
 17335:   //FBUGT.L <label>                                 |-|--CC46|-|-----|-----|          |1111_001_011_001_010-{offset}
 17336:   //FBUGE.L <label>                                 |-|--CC46|-|-----|-----|          |1111_001_011_001_011-{offset}
 17337:   //FBULT.L <label>                                 |-|--CC46|-|-----|-----|          |1111_001_011_001_100-{offset}
 17338:   //FBULE.L <label>                                 |-|--CC46|-|-----|-----|          |1111_001_011_001_101-{offset}
 17339:   //FBNE.L <label>                                  |-|--CC46|-|-----|-----|          |1111_001_011_001_110-{offset}
 17340:   //FBT.L <label>                                   |-|--CC46|-|-----|-----|          |1111_001_011_001_111-{offset}
 17341:   //FBRA.L <label>                                  |A|--CC46|-|-----|-----|          |1111_001_011_001_111-{offset}        [FBT.L <label>]
 17342:   //FBSF.L <label>                                  |-|--CC46|-|-----|-----|          |1111_001_011_010_000-{offset}
 17343:   //FBSEQ.L <label>                                 |-|--CC46|-|-----|-----|          |1111_001_011_010_001-{offset}
 17344:   //FBGT.L <label>                                  |-|--CC46|-|-----|-----|          |1111_001_011_010_010-{offset}
 17345:   //FBGE.L <label>                                  |-|--CC46|-|-----|-----|          |1111_001_011_010_011-{offset}
 17346:   //FBLT.L <label>                                  |-|--CC46|-|-----|-----|          |1111_001_011_010_100-{offset}
 17347:   //FBLE.L <label>                                  |-|--CC46|-|-----|-----|          |1111_001_011_010_101-{offset}
 17348:   //FBGL.L <label>                                  |-|--CC46|-|-----|-----|          |1111_001_011_010_110-{offset}
 17349:   //FBGLE.L <label>                                 |-|--CC46|-|-----|-----|          |1111_001_011_010_111-{offset}
 17350:   //FBNGLE.L <label>                                |-|--CC46|-|-----|-----|          |1111_001_011_011_000-{offset}
 17351:   //FBNGL.L <label>                                 |-|--CC46|-|-----|-----|          |1111_001_011_011_001-{offset}
 17352:   //FBNLE.L <label>                                 |-|--CC46|-|-----|-----|          |1111_001_011_011_010-{offset}
 17353:   //FBNLT.L <label>                                 |-|--CC46|-|-----|-----|          |1111_001_011_011_011-{offset}
 17354:   //FBNGE.L <label>                                 |-|--CC46|-|-----|-----|          |1111_001_011_011_100-{offset}
 17355:   //FBNGT.L <label>                                 |-|--CC46|-|-----|-----|          |1111_001_011_011_101-{offset}
 17356:   //FBSNE.L <label>                                 |-|--CC46|-|-----|-----|          |1111_001_011_011_110-{offset}
 17357:   //FBST.L <label>                                  |-|--CC46|-|-----|-----|          |1111_001_011_011_111-{offset}
 17358:   public static void irpFbccLong () throws M68kException {
 17359:   fbcc: {
 17360:     //XEiJ.fpuBox.epbExceptionStatusWord = 0;
 17361:     if (XEiJ.currentMPU == Model.MPU_MC68LC060) {
 17362:       irpFline ();
 17363:       break fbcc;
 17364:     }
 17365:     XEiJ.fpuBox.epbFpiar = XEiJ.regPC0;  //FPIARはFMOVEM/FMOVE FPcr/FSAVE/FRESTORE以外の命令で例外が発生しなくても更新される
 17366:     if ((XEiJ.regOC & 0b010000) != 0 && (XEiJ.fpuBox.epbFpsr & XEiJ.FPU_FPSR_NAN) != 0) {  //IEEEノンアウェアテストでNANがセットされているとき
 17367:       XEiJ.fpuBox.epbFpsr |= XEiJ.FPU_FPSR_EXC_BSUN;  //BSUNをセット
 17368:       XEiJ.fpuBox.epbFpsr |= XEiJ.FPU_FPSR_EXC_TO_AEXC[XEiJ.fpuBox.epbFpsr >> 8 & 255];
 17369:       if ((XEiJ.fpuBox.epbFpcr & XEiJ.FPU_FPCR_BSUN) != 0) {  //BSUN例外許可
 17370:         XEiJ.fpuBox.epbExceptionStatusWord = 0xe000 | M68kException.M6E_FP_BRANCH_SET_UNORDERED & 7;
 17371:         irpExceptionFormat0 (M68kException.M6E_FP_BRANCH_SET_UNORDERED << 2, XEiJ.regPC0);  //pcは命令の先頭
 17372:         break fbcc;
 17373:       }
 17374:     }
 17375:     XEiJ.mpuCycleCount++;
 17376:     int t = XEiJ.regPC;  //pc0+2
 17377:     XEiJ.regPC = t + 4;  //pc0+6
 17378:     t += mmuReadLongExword (t, XEiJ.regSRS);  //pc0+2+32bitディスプレースメント
 17379:     if ((t & 1) != 0) {  //分岐先のアドレスが奇数
 17380:       //MC68060のBcc/DBcc/FBccは分岐先のアドレスが奇数のとき分岐しなくてもアドレスエラーになる。FDBccは分岐するときだけ
 17381:       irpBccAddressError (t);
 17382:     }
 17383:     if (XEiJ.FPU_CCMAP_060[(XEiJ.regOC & 63) << 4 | XEiJ.fpuBox.epbFpsr >> 24 & 15]) {  //分岐する
 17384:       irpSetPC (t);
 17385:     }
 17386:   }  //fbcc
 17387:   }  //irpFbccLong
 17388: 
 17389:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 17390:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
 17391:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
 17392:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 17393:   //FSAVE <ea>                                      |-|--CC46|P|-----|-----|  M -WXZ  |1111_001_100_mmm_rrr
 17394:   public static void irpFsave () throws M68kException {
 17395:     if (XEiJ.currentMPU == Model.MPU_MC68LC060) {
 17396:       irpFline ();
 17397:       return;
 17398:     }
 17399:     if (XEiJ.regSRS == 0) {  //ユーザモードのとき
 17400:       M68kException.m6eNumber = M68kException.M6E_PRIVILEGE_VIOLATION;
 17401:       throw M68kException.m6eSignal;
 17402:     }
 17403:     //以下はスーパーバイザモード
 17404:     XEiJ.mpuCycleCount += 3;
 17405:     int ea = XEiJ.regOC & 63;
 17406:     int a;
 17407:     if (ea >> 3 == XEiJ.MMM_MN) {  //-(Ar)
 17408:       int arr = XEiJ.regOC & 7 | 8;
 17409:       M68kException.m6eIncremented -= 12L << (arr << 3);
 17410:       a = XEiJ.regRn[arr] -= 12;
 17411:     } else {  //-(Ar)以外
 17412:       a = efaCltWord (ea);
 17413:     }
 17414:     if (XEiJ.fpuBox.epbExceptionStatusWord == 0) {  //例外なし
 17415:       mmuWriteLongData (a, 0x00006000, 1);  //アイドルフレーム
 17416:       mmuWriteQuadSecond (a + 4, 0L, 1);
 17417:     } else {  //例外あり
 17418:       mmuWriteLongData (a, XEiJ.fpuBox.epbExceptionOperandExponent | XEiJ.fpuBox.epbExceptionStatusWord, 1);  //例外フレーム
 17419:       mmuWriteQuadSecond (a + 4, XEiJ.fpuBox.epbExceptionOperandMantissa, 1);
 17420:       XEiJ.fpuBox.epbExceptionStatusWord = 0;
 17421:     }
 17422:   }  //irpFsave
 17423: 
 17424:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 17425:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
 17426:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
 17427:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 17428:   //FRESTORE <ea>                                   |-|--CC46|P|-----|-----|  M+ WXZP |1111_001_101_mmm_rrr
 17429:   public static void irpFrestore () throws M68kException {
 17430:     if (XEiJ.currentMPU == Model.MPU_MC68LC060) {
 17431:       irpFline ();
 17432:       return;
 17433:     }
 17434:     if (XEiJ.regSRS == 0) {  //ユーザモードのとき
 17435:       M68kException.m6eNumber = M68kException.M6E_PRIVILEGE_VIOLATION;
 17436:       throw M68kException.m6eSignal;
 17437:     }
 17438:     //以下はスーパーバイザモード
 17439:     XEiJ.mpuCycleCount += 6;
 17440:     int ea = XEiJ.regOC & 63;
 17441:     int a;
 17442:     if (ea >> 3 == XEiJ.MMM_MP) {  //(Ar)+
 17443:       int arr = XEiJ.regOC & 7 | 8;
 17444:       M68kException.m6eIncremented += 12L << (arr << 3);
 17445:       a = XEiJ.regRn[arr] += 12;
 17446:     } else {  //(Ar)+以外
 17447:       a = efaCntWord (ea);
 17448:     }
 17449:     int i = mmuReadLongData (a, 1);
 17450:     long l = mmuReadQuadData (a + 4, 1);
 17451:     if ((i & 0xff00) == 0xe000) {  //例外フレーム
 17452:       //例外ハンドラが0xe0xxを0x60xxに変更してFRESTOREする場合がある
 17453:       XEiJ.fpuBox.epbExceptionStatusWord = (char) i;
 17454:       XEiJ.fpuBox.epbExceptionOperandExponent = i & 0xffff0000;
 17455:       XEiJ.fpuBox.epbExceptionOperandMantissa = l;
 17456:     } else {
 17457:       XEiJ.fpuBox.epbExceptionStatusWord = 0;
 17458:       XEiJ.fpuBox.epbExceptionOperandExponent = 0;
 17459:       XEiJ.fpuBox.epbExceptionOperandMantissa = 0x0000000000000000L;
 17460:     }
 17461:     //FPSRのAEXCをクリアする
 17462:     XEiJ.fpuBox.epbFpsr = 0;
 17463:     //FPIARをクリアする
 17464:     XEiJ.fpuBox.epbFpiar = 0;
 17465:   }  //irpFrestore
 17466: 
 17467:   //irpFPPreInstruction ()
 17468:   //  浮動小数点命令実行前例外 floating-point pre-instruction exception
 17469:   //  優先順位はBSUN>SNAN>OPERR>OVFL>UNFL>DZ>INEX2/INEX1
 17470:   //  複数の例外が同時に発生したときは最上位の例外ハンドラだけが呼び出される
 17471:   //  浮動小数点例外ハンドラは自分よりも下位の浮動小数点例外が発生していないか確認しなければならない
 17472:   public static boolean irpFPPreInstruction () throws M68kException {
 17473:     int mask = XEiJ.fpuBox.epbFpcr & XEiJ.fpuBox.epbFpsr & 0x0000ff00;
 17474:     if (mask == 0) {
 17475:       return false;
 17476:     }
 17477:     int number = FP_OFFSET_TO_NUMBER[Integer.numberOfLeadingZeros (mask)];
 17478:     XEiJ.fpuBox.epbExceptionStatusWord = 0xe000 | number & 7;
 17479:     irpExceptionFormat0 (number << 2, XEiJ.regPC0);  //pcは命令の先頭
 17480:     return true;
 17481:   }  //irpFPPreInstruction()
 17482: 
 17483:   //irpFPPostInstruction (a)
 17484:   //  浮動小数点命令実行後例外 floating-point post-instruction exception
 17485:   //  優先順位はBSUN>SNAN>OPERR>OVFL>UNFL>DZ>INEX2/INEX1
 17486:   //  複数の例外が同時に発生したときは最上位の例外ハンドラだけが呼び出される
 17487:   //  浮動小数点例外ハンドラは自分よりも下位の浮動小数点例外が発生していないか確認しなければならない
 17488:   public static boolean irpFPPostInstruction (int a) throws M68kException {
 17489:     int mask = XEiJ.fpuBox.epbFpcr & XEiJ.fpuBox.epbFpsr & 0x0000ff00;
 17490:     if (mask == 0) {
 17491:       return false;
 17492:     }
 17493:     int number = FP_OFFSET_TO_NUMBER[Integer.numberOfLeadingZeros (mask)];
 17494:     XEiJ.fpuBox.epbExceptionStatusWord = 0xe000 | number & 7;
 17495:     irpExceptionFormat3 (number << 2, XEiJ.regPC, a);  //pcは次の命令,アドレスはデスティネーションオペランド
 17496:     return true;
 17497:   }  //irpFPPostInstruction(int)
 17498: 
 17499:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 17500:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
 17501:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
 17502:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 17503:   //CINVL NC,(Ar)                                   |-|----46|P|-----|-----|          |1111_010_000_001_rrr
 17504:   //CINVP NC,(Ar)                                   |-|----46|P|-----|-----|          |1111_010_000_010_rrr
 17505:   //CINVA NC                                        |-|----46|P|-----|-----|          |1111_010_000_011_000
 17506:   //CPUSHL NC,(Ar)                                  |-|----46|P|-----|-----|          |1111_010_000_101_rrr
 17507:   //CPUSHP NC,(Ar)                                  |-|----46|P|-----|-----|          |1111_010_000_110_rrr
 17508:   //CPUSHA NC                                       |-|----46|P|-----|-----|          |1111_010_000_111_000
 17509:   public static void irpCinvCpushNC () throws M68kException {
 17510:     if (XEiJ.regSRS == 0) {  //ユーザモードのとき
 17511:       M68kException.m6eNumber = M68kException.M6E_PRIVILEGE_VIOLATION;
 17512:       throw M68kException.m6eSignal;
 17513:     }
 17514:     //以下はスーパーバイザモード
 17515:     XEiJ.mpuCycleCount++;
 17516:   }  //irpCinvCpushNC
 17517: 
 17518:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 17519:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
 17520:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
 17521:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 17522:   //CINVL DC,(Ar)                                   |-|----46|P|-----|-----|          |1111_010_001_001_rrr
 17523:   //CINVP DC,(Ar)                                   |-|----46|P|-----|-----|          |1111_010_001_010_rrr
 17524:   //CINVA DC                                        |-|----46|P|-----|-----|          |1111_010_001_011_000
 17525:   //CPUSHL DC,(Ar)                                  |-|----46|P|-----|-----|          |1111_010_001_101_rrr
 17526:   //CPUSHP DC,(Ar)                                  |-|----46|P|-----|-----|          |1111_010_001_110_rrr
 17527:   //CPUSHA DC                                       |-|----46|P|-----|-----|          |1111_010_001_111_000
 17528:   public static void irpCinvCpushDC () throws M68kException {
 17529:     if (XEiJ.regSRS == 0) {  //ユーザモードのとき
 17530:       M68kException.m6eNumber = M68kException.M6E_PRIVILEGE_VIOLATION;
 17531:       throw M68kException.m6eSignal;
 17532:     }
 17533:     //以下はスーパーバイザモード
 17534:     XEiJ.mpuCycleCount++;
 17535:   }  //irpCinvCpushDC
 17536: 
 17537:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 17538:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
 17539:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
 17540:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 17541:   //CINVL IC,(Ar)                                   |-|----46|P|-----|-----|          |1111_010_010_001_rrr
 17542:   //CINVP IC,(Ar)                                   |-|----46|P|-----|-----|          |1111_010_010_010_rrr
 17543:   //CINVA IC                                        |-|----46|P|-----|-----|          |1111_010_010_011_000
 17544:   //CPUSHL IC,(Ar)                                  |-|----46|P|-----|-----|          |1111_010_010_101_rrr
 17545:   //CPUSHP IC,(Ar)                                  |-|----46|P|-----|-----|          |1111_010_010_110_rrr
 17546:   //CPUSHA IC                                       |-|----46|P|-----|-----|          |1111_010_010_111_000
 17547:   public static void irpCinvCpushIC () throws M68kException {
 17548:     if (XEiJ.regSRS == 0) {  //ユーザモードのとき
 17549:       M68kException.m6eNumber = M68kException.M6E_PRIVILEGE_VIOLATION;
 17550:       throw M68kException.m6eSignal;
 17551:     }
 17552:     //以下はスーパーバイザモード
 17553:     XEiJ.mpuCycleCount++;
 17554:   }  //irpCinvCpushIC
 17555: 
 17556:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 17557:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
 17558:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
 17559:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 17560:   //CINVL BC,(Ar)                                   |-|----46|P|-----|-----|          |1111_010_011_001_rrr
 17561:   //CINVP BC,(Ar)                                   |-|----46|P|-----|-----|          |1111_010_011_010_rrr
 17562:   //CINVA BC                                        |-|----46|P|-----|-----|          |1111_010_011_011_000
 17563:   //CPUSHL BC,(Ar)                                  |-|----46|P|-----|-----|          |1111_010_011_101_rrr
 17564:   //CPUSHP BC,(Ar)                                  |-|----46|P|-----|-----|          |1111_010_011_110_rrr
 17565:   //CPUSHA BC                                       |-|----46|P|-----|-----|          |1111_010_011_111_000
 17566:   public static void irpCinvCpushBC () throws M68kException {
 17567:     if (XEiJ.regSRS == 0) {  //ユーザモードのとき
 17568:       M68kException.m6eNumber = M68kException.M6E_PRIVILEGE_VIOLATION;
 17569:       throw M68kException.m6eSignal;
 17570:     }
 17571:     //以下はスーパーバイザモード
 17572:     XEiJ.mpuCycleCount++;
 17573:   }  //irpCinvCpushBC
 17574: 
 17575:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 17576:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
 17577:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
 17578:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 17579:   //PFLUSHN (Ar)                                    |-|----46|P|-----|-----|          |1111_010_100_000_rrr
 17580:   //PFLUSH (Ar)                                     |-|----46|P|-----|-----|          |1111_010_100_001_rrr
 17581:   //PFLUSHAN                                        |-|----46|P|-----|-----|          |1111_010_100_010_000
 17582:   //PFLUSHA                                         |-|----46|P|-----|-----|          |1111_010_100_011_000
 17583:   public static void irpPflush () throws M68kException {
 17584:     if (XEiJ.regSRS == 0) {  //ユーザモードのとき
 17585:       M68kException.m6eNumber = M68kException.M6E_PRIVILEGE_VIOLATION;
 17586:       throw M68kException.m6eSignal;
 17587:     }
 17588:     //以下はスーパーバイザモード
 17589:     if (XEiJ.regOC <= 0b1111_010_100_000_111) {  //PFLUSHN (An)
 17590:       XEiJ.mpuCycleCount += 18;
 17591:       mmuInvalidateNonGlobalCache (XEiJ.regRn[XEiJ.regOC - (0b1111_010_100_000_000 - 8)]);
 17592:     } else if (XEiJ.regOC <= 0b1111_010_100_001_111) {  //PFLUSH (An)
 17593:       XEiJ.mpuCycleCount += 18;
 17594:       mmuInvalidateCache (XEiJ.regRn[XEiJ.regOC - (0b1111_010_100_001_000 - 8)]);
 17595:     } else if (XEiJ.regOC == 0b1111_010_100_010_000) {  //PFLUSHAN
 17596:       XEiJ.mpuCycleCount += 33;
 17597:       mmuInvalidateAllNonGlobalCache ();
 17598:     } else if (XEiJ.regOC == 0b1111_010_100_011_000) {  //PFLUSHA
 17599:       XEiJ.mpuCycleCount += 33;
 17600:       mmuInvalidateAllCache ();
 17601:     } else {
 17602:       M68kException.m6eNumber = M68kException.M6E_ILLEGAL_INSTRUCTION;
 17603:       throw M68kException.m6eSignal;
 17604:     }
 17605:   }  //irpPflush
 17606: 
 17607:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 17608:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
 17609:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
 17610:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 17611:   //PLPAW (Ar)                                      |-|-----6|P|-----|-----|          |1111_010_110_001_rrr
 17612:   public static void irpPlpaw () throws M68kException {
 17613:     if (XEiJ.regSRS == 0) {  //ユーザモードのとき
 17614:       M68kException.m6eNumber = M68kException.M6E_PRIVILEGE_VIOLATION;
 17615:       throw M68kException.m6eSignal;
 17616:     }
 17617:     //以下はスーパーバイザモード
 17618:     XEiJ.mpuCycleCount += 15;
 17619:     int ann = XEiJ.regOC - (0b1111_010_110_001_000 - 8);  //8+nnn
 17620:     XEiJ.regRn[ann] = mmuLoadPhysicalAddressWrite (XEiJ.regRn[ann]);
 17621:   }  //irpPlpaw
 17622: 
 17623:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 17624:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
 17625:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
 17626:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 17627:   //PLPAR (Ar)                                      |-|-----6|P|-----|-----|          |1111_010_111_001_rrr
 17628:   //
 17629:   //PLPAR (Ar)
 17630:   //  ReadだがSFCではなくDFCを使う
 17631:   public static void irpPlpar () throws M68kException {
 17632:     if (XEiJ.regSRS == 0) {  //ユーザモードのとき
 17633:       M68kException.m6eNumber = M68kException.M6E_PRIVILEGE_VIOLATION;
 17634:       throw M68kException.m6eSignal;
 17635:     }
 17636:     //以下はスーパーバイザモード
 17637:     XEiJ.mpuCycleCount += 15;
 17638:     int ann = XEiJ.regOC - (0b1111_010_111_001_000 - 8);  //8+nnn
 17639:     XEiJ.regRn[ann] = mmuLoadPhysicalAddressRead (XEiJ.regRn[ann]);
 17640:   }  //irpPlpar
 17641: 
 17642:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 17643:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
 17644:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
 17645:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 17646:   //MOVE16 (Ar)+,xxx.L                              |-|----46|-|-----|-----|          |1111_011_000_000_rrr-{address}
 17647:   //MOVE16 xxx.L,(Ar)+                              |-|----46|-|-----|-----|          |1111_011_000_001_rrr-{address}
 17648:   //MOVE16 (Ar),xxx.L                               |-|----46|-|-----|-----|          |1111_011_000_010_rrr-{address}
 17649:   //MOVE16 xxx.L,(Ar)                               |-|----46|-|-----|-----|          |1111_011_000_011_rrr-{address}
 17650:   //MOVE16 (Ar)+,(An)+                              |-|----46|-|-----|-----|          |1111_011_000_100_rrr-1nnn000000000000
 17651:   //
 17652:   //MOVE16 (Ar)+,xxx.L
 17653:   //MOVE16 xxx.L,(Ar)+
 17654:   //MOVE16 (Ar),xxx.L
 17655:   //MOVE16 xxx.L,(Ar)
 17656:   //MOVE16 (Ar)+,(An)+
 17657:   //  アドレスの下位4bitは無視される
 17658:   //  ポストインクリメントで16増えるとき下位4bitは変化しない
 17659:   //  r==nのときMOVE16 (Ar)+,(Ar)+はMOVE16 (Ar),(Ar)+のような動作になる。データは動かずArは16だけ増える(M68060UM 1-21)
 17660:   public static void irpMove16 () throws M68kException {
 17661:     if (XEiJ.regOC <= 0b1111_011_000_011_111) {  //どちらかがxxx.L
 17662:       XEiJ.mpuCycleCount += 18;
 17663:       int arr = XEiJ.regOC - (0b1111_011_000_000_000 - 8);  //8+rrr
 17664:       int a = XEiJ.regRn[arr] & -16;
 17665:       int x = mmuReadLongExword ((XEiJ.regPC += 4) - 4, XEiJ.regSRS) & -16;  //pcls
 17666:       if ((XEiJ.regOC & 0b001_000) == 0) {  //(Ar)→xxx.L
 17667:         long l = mmuReadQuadData (a, XEiJ.regSRS);
 17668:         long m = mmuReadQuadSecond (a + 8, XEiJ.regSRS);
 17669:         mmuWriteQuadData (x, l, XEiJ.regSRS);
 17670:         mmuWriteQuadSecond (x + 8, m, XEiJ.regSRS);
 17671:       } else {  //xxx.L→(An)
 17672:         long l = mmuReadQuadData (x, XEiJ.regSRS);
 17673:         long m = mmuReadQuadSecond (x + 8, XEiJ.regSRS);
 17674:         mmuWriteQuadData (a, l, XEiJ.regSRS);
 17675:         mmuWriteQuadSecond (a + 8, m, XEiJ.regSRS);
 17676:       }
 17677:       if ((XEiJ.regOC & 0b010_000) == 0) {  //(Ar)+
 17678:         XEiJ.regRn[arr] += 16;  //aはマスクされているのでa+16は不可
 17679:       }
 17680:     } else if (XEiJ.regOC <= 0b1111_011_000_100_111) {
 17681:       int w = mmuReadWordZeroExword ((XEiJ.regPC += 2) - 2, XEiJ.regSRS);  //pcwz
 17682:       if ((w & 0b1000111111111111) == 0b1000000000000000) {  //MOVE16 (Ar)+,(As)+
 17683:         XEiJ.mpuCycleCount += 18;
 17684:         int arr = XEiJ.regOC - (0b1111_011_000_100_000 - 8);  //8+rrr
 17685:         int a = XEiJ.regRn[arr] & -16;
 17686:         int ass = w >> 12;  //8+sss
 17687:         int x = XEiJ.regRn[ass] & -16;
 17688:         long l = mmuReadQuadData (a, XEiJ.regSRS);
 17689:         long m = mmuReadQuadSecond (a + 8, XEiJ.regSRS);
 17690:         mmuWriteQuadData (x, l, XEiJ.regSRS);
 17691:         mmuWriteQuadSecond (x + 8, m, XEiJ.regSRS);
 17692:         XEiJ.regRn[arr] += 16;  //aはマスクされているのでa+16は不可
 17693:         if (arr != ass) {
 17694:           XEiJ.regRn[ass] += 16;  //xはマスクされているのでx+16は不可
 17695:         }
 17696:       } else {
 17697:         M68kException.m6eNumber = M68kException.M6E_ILLEGAL_INSTRUCTION;
 17698:         throw M68kException.m6eSignal;
 17699:       }
 17700:     } else {
 17701:       M68kException.m6eNumber = M68kException.M6E_ILLEGAL_INSTRUCTION;
 17702:       throw M68kException.m6eSignal;
 17703:     }
 17704:   }  //irpMove16
 17705: 
 17706:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 17707:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
 17708:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
 17709:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 17710:   //LPSTOP.W #<data>                                |-|-----6|P|-----|-----|          |1111_100_000_000_000-0000000111000000-{data}
 17711:   public static void irpLpstop () throws M68kException {
 17712:     if (XEiJ.regSRS == 0) {  //ユーザモードのとき
 17713:       M68kException.m6eNumber = M68kException.M6E_PRIVILEGE_VIOLATION;
 17714:       throw M68kException.m6eSignal;
 17715:     }
 17716:     //以下はスーパーバイザモード
 17717:     //!!! 非対応
 17718:   }  //irpLpstop
 17719: 
 17720:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 17721:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
 17722:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
 17723:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 17724:   //FPACK <data>                                    |A|012346|-|UUUUU|*****|          |1111_111_0dd_ddd_ddd [FLINE #<data>]
 17725:   public static void irpFpack () throws M68kException {
 17726:     if (!MainMemory.mmrFEfuncActivated) {
 17727:       irpFline ();
 17728:       return;
 17729:     }
 17730:     StringBuilder sb;
 17731:     int a0;
 17732:     if (FEFunction.FPK_DEBUG_TRACE) {
 17733:       sb = new StringBuilder ();
 17734:       String name = Disassembler.DIS_FPACK_NAME[XEiJ.regOC & 255];
 17735:       if (name.length () == 0) {
 17736:         XEiJ.fmtHex4 (sb.append ('$'), XEiJ.regOC);
 17737:       } else {
 17738:         sb.append (name);
 17739:       }
 17740:       sb.append ('\n');
 17741:       XEiJ.fmtHex8 (XEiJ.fmtHex8 (XEiJ.fmtHex8 (XEiJ.fmtHex8 (sb.append ("  D0="), XEiJ.regRn[0]).append (" D1="), XEiJ.regRn[1]).append (" D2="), XEiJ.regRn[2]).append (" D3="), XEiJ.regRn[3]);
 17742:       a0 = XEiJ.regRn[8];
 17743:       MainMemory.mmrRstr (sb.append (" (A0)=\""), a0, MainMemory.mmrStrlen (a0, 20)).append ("\"\n");
 17744:     }
 17745:     XEiJ.mpuCycleCount += FEFunction.FPK_CLOCK;  //一律にFEFunction.FPK_CLOCKサイクルかかることにする
 17746:     switch (XEiJ.regOC & 255) {
 17747:     case 0x00: FEFunction.fpkLMUL (); break;
 17748:     case 0x01: FEFunction.fpkLDIV (); break;
 17749:     case 0x02: FEFunction.fpkLMOD (); break;
 17750:       //case 0x03: break;
 17751:     case 0x04: FEFunction.fpkUMUL (); break;
 17752:     case 0x05: FEFunction.fpkUDIV (); break;
 17753:     case 0x06: FEFunction.fpkUMOD (); break;
 17754:       //case 0x07: break;
 17755:     case 0x08: FEFunction.fpkIMUL (); break;
 17756:     case 0x09: FEFunction.fpkIDIV (); break;
 17757:       //case 0x0a: break;
 17758:       //case 0x0b: break;
 17759:     case 0x0c: FEFunction.fpkRANDOMIZE (); break;
 17760:     case 0x0d: FEFunction.fpkSRAND (); break;
 17761:     case 0x0e: FEFunction.fpkRAND (); break;
 17762:       //case 0x0f: break;
 17763:     case 0x10: fpkSTOL (); break;
 17764:     case 0x11: fpkLTOS (); break;
 17765:     case 0x12: fpkSTOH (); break;
 17766:     case 0x13: fpkHTOS (); break;
 17767:     case 0x14: fpkSTOO (); break;
 17768:     case 0x15: fpkOTOS (); break;
 17769:     case 0x16: fpkSTOB (); break;
 17770:     case 0x17: fpkBTOS (); break;
 17771:     case 0x18: fpkIUSING (); break;
 17772:       //case 0x19: break;
 17773:     case 0x1a: FEFunction.fpkLTOD (); break;
 17774:     case 0x1b: FEFunction.fpkDTOL (); break;
 17775:     case 0x1c: FEFunction.fpkLTOF (); break;
 17776:     case 0x1d: FEFunction.fpkFTOL (); break;
 17777:     case 0x1e: FEFunction.fpkFTOD (); break;
 17778:     case 0x1f: FEFunction.fpkDTOF (); break;
 17779:     case 0x20: fpkVAL (); break;
 17780:     case 0x21: fpkUSING (); break;
 17781:     case 0x22: fpkSTOD (); break;
 17782:     case 0x23: fpkDTOS (); break;
 17783:     case 0x24: fpkECVT (); break;
 17784:     case 0x25: fpkFCVT (); break;
 17785:     case 0x26: fpkGCVT (); break;
 17786:       //case 0x27: break;
 17787:     case 0x28: FEFunction.fpkDTST (); break;
 17788:     case 0x29: FEFunction.fpkDCMP (); break;
 17789:     case 0x2a: FEFunction.fpkDNEG (); break;
 17790:     case 0x2b: FEFunction.fpkDADD (); break;
 17791:     case 0x2c: FEFunction.fpkDSUB (); break;
 17792:     case 0x2d: FEFunction.fpkDMUL (); break;
 17793:     case 0x2e: FEFunction.fpkDDIV (); break;
 17794:     case 0x2f: FEFunction.fpkDMOD (); break;
 17795:     case 0x30: FEFunction.fpkDABS (); break;
 17796:     case 0x31: FEFunction.fpkDCEIL (); break;
 17797:     case 0x32: FEFunction.fpkDFIX (); break;
 17798:     case 0x33: FEFunction.fpkDFLOOR (); break;
 17799:     case 0x34: FEFunction.fpkDFRAC (); break;
 17800:     case 0x35: FEFunction.fpkDSGN (); break;
 17801:     case 0x36: FEFunction.fpkSIN (); break;
 17802:     case 0x37: FEFunction.fpkCOS (); break;
 17803:     case 0x38: FEFunction.fpkTAN (); break;
 17804:     case 0x39: FEFunction.fpkATAN (); break;
 17805:     case 0x3a: FEFunction.fpkLOG (); break;
 17806:     case 0x3b: FEFunction.fpkEXP (); break;
 17807:     case 0x3c: FEFunction.fpkSQR (); break;
 17808:     case 0x3d: FEFunction.fpkPI (); break;
 17809:     case 0x3e: FEFunction.fpkNPI (); break;
 17810:     case 0x3f: FEFunction.fpkPOWER (); break;
 17811:     case 0x40: FEFunction.fpkRND (); break;
 17812:     case 0x41: FEFunction.fpkSINH (); break;
 17813:     case 0x42: FEFunction.fpkCOSH (); break;
 17814:     case 0x43: FEFunction.fpkTANH (); break;
 17815:     case 0x44: FEFunction.fpkATANH (); break;
 17816:     case 0x45: FEFunction.fpkASIN (); break;
 17817:     case 0x46: FEFunction.fpkACOS (); break;
 17818:     case 0x47: FEFunction.fpkLOG10 (); break;
 17819:     case 0x48: FEFunction.fpkLOG2 (); break;
 17820:     case 0x49: FEFunction.fpkDFREXP (); break;
 17821:     case 0x4a: FEFunction.fpkDLDEXP (); break;
 17822:     case 0x4b: FEFunction.fpkDADDONE (); break;
 17823:     case 0x4c: FEFunction.fpkDSUBONE (); break;
 17824:     case 0x4d: FEFunction.fpkDDIVTWO (); break;
 17825:     case 0x4e: FEFunction.fpkDIEECNV (); break;
 17826:     case 0x4f: FEFunction.fpkIEEDCNV (); break;
 17827:     case 0x50: fpkFVAL (); break;
 17828:     case 0x51: FEFunction.fpkFUSING (); break;
 17829:     case 0x52: FEFunction.fpkSTOF (); break;
 17830:     case 0x53: FEFunction.fpkFTOS (); break;
 17831:     case 0x54: FEFunction.fpkFECVT (); break;
 17832:     case 0x55: FEFunction.fpkFFCVT (); break;
 17833:     case 0x56: FEFunction.fpkFGCVT (); break;
 17834:       //case 0x57: break;
 17835:     case 0x58: FEFunction.fpkFTST (); break;
 17836:     case 0x59: FEFunction.fpkFCMP (); break;
 17837:     case 0x5a: FEFunction.fpkFNEG (); break;
 17838:     case 0x5b: FEFunction.fpkFADD (); break;
 17839:     case 0x5c: FEFunction.fpkFSUB (); break;
 17840:     case 0x5d: FEFunction.fpkFMUL (); break;
 17841:     case 0x5e: FEFunction.fpkFDIV (); break;
 17842:     case 0x5f: FEFunction.fpkFMOD (); break;
 17843:     case 0x60: FEFunction.fpkFABS (); break;
 17844:     case 0x61: FEFunction.fpkFCEIL (); break;
 17845:     case 0x62: FEFunction.fpkFFIX (); break;
 17846:     case 0x63: FEFunction.fpkFFLOOR (); break;
 17847:     case 0x64: FEFunction.fpkFFRAC (); break;
 17848:     case 0x65: FEFunction.fpkFSGN (); break;
 17849:     case 0x66: FEFunction.fpkFSIN (); break;
 17850:     case 0x67: FEFunction.fpkFCOS (); break;
 17851:     case 0x68: FEFunction.fpkFTAN (); break;
 17852:     case 0x69: FEFunction.fpkFATAN (); break;
 17853:     case 0x6a: FEFunction.fpkFLOG (); break;
 17854:     case 0x6b: FEFunction.fpkFEXP (); break;
 17855:     case 0x6c: FEFunction.fpkFSQR (); break;
 17856:     case 0x6d: FEFunction.fpkFPI (); break;
 17857:     case 0x6e: FEFunction.fpkFNPI (); break;
 17858:     case 0x6f: FEFunction.fpkFPOWER (); break;
 17859:     case 0x70: FEFunction.fpkFRND (); break;
 17860:     case 0x71: FEFunction.fpkFSINH (); break;
 17861:     case 0x72: FEFunction.fpkFCOSH (); break;
 17862:     case 0x73: FEFunction.fpkFTANH (); break;
 17863:     case 0x74: FEFunction.fpkFATANH (); break;
 17864:     case 0x75: FEFunction.fpkFASIN (); break;
 17865:     case 0x76: FEFunction.fpkFACOS (); break;
 17866:     case 0x77: FEFunction.fpkFLOG10 (); break;
 17867:     case 0x78: FEFunction.fpkFLOG2 (); break;
 17868:     case 0x79: FEFunction.fpkFFREXP (); break;
 17869:     case 0x7a: FEFunction.fpkFLDEXP (); break;
 17870:     case 0x7b: FEFunction.fpkFADDONE (); break;
 17871:     case 0x7c: FEFunction.fpkFSUBONE (); break;
 17872:     case 0x7d: FEFunction.fpkFDIVTWO (); break;
 17873:     case 0x7e: FEFunction.fpkFIEECNV (); break;
 17874:     case 0x7f: FEFunction.fpkIEEFCNV (); break;
 17875:       //case 0x80: break;
 17876:       //case 0x81: break;
 17877:       //case 0x82: break;
 17878:       //case 0x83: break;
 17879:       //case 0x84: break;
 17880:       //case 0x85: break;
 17881:       //case 0x86: break;
 17882:       //case 0x87: break;
 17883:       //case 0x88: break;
 17884:       //case 0x89: break;
 17885:       //case 0x8a: break;
 17886:       //case 0x8b: break;
 17887:       //case 0x8c: break;
 17888:       //case 0x8d: break;
 17889:       //case 0x8e: break;
 17890:       //case 0x8f: break;
 17891:       //case 0x90: break;
 17892:       //case 0x91: break;
 17893:       //case 0x92: break;
 17894:       //case 0x93: break;
 17895:       //case 0x94: break;
 17896:       //case 0x95: break;
 17897:       //case 0x96: break;
 17898:       //case 0x97: break;
 17899:       //case 0x98: break;
 17900:       //case 0x99: break;
 17901:       //case 0x9a: break;
 17902:       //case 0x9b: break;
 17903:       //case 0x9c: break;
 17904:       //case 0x9d: break;
 17905:       //case 0x9e: break;
 17906:       //case 0x9f: break;
 17907:       //case 0xa0: break;
 17908:       //case 0xa1: break;
 17909:       //case 0xa2: break;
 17910:       //case 0xa3: break;
 17911:       //case 0xa4: break;
 17912:       //case 0xa5: break;
 17913:       //case 0xa6: break;
 17914:       //case 0xa7: break;
 17915:       //case 0xa8: break;
 17916:       //case 0xa9: break;
 17917:       //case 0xaa: break;
 17918:       //case 0xab: break;
 17919:       //case 0xac: break;
 17920:       //case 0xad: break;
 17921:       //case 0xae: break;
 17922:       //case 0xaf: break;
 17923:       //case 0xb0: break;
 17924:       //case 0xb1: break;
 17925:       //case 0xb2: break;
 17926:       //case 0xb3: break;
 17927:       //case 0xb4: break;
 17928:       //case 0xb5: break;
 17929:       //case 0xb6: break;
 17930:       //case 0xb7: break;
 17931:       //case 0xb8: break;
 17932:       //case 0xb9: break;
 17933:       //case 0xba: break;
 17934:       //case 0xbb: break;
 17935:       //case 0xbc: break;
 17936:       //case 0xbd: break;
 17937:       //case 0xbe: break;
 17938:       //case 0xbf: break;
 17939:       //case 0xc0: break;
 17940:       //case 0xc1: break;
 17941:       //case 0xc2: break;
 17942:       //case 0xc3: break;
 17943:       //case 0xc4: break;
 17944:       //case 0xc5: break;
 17945:       //case 0xc6: break;
 17946:       //case 0xc7: break;
 17947:       //case 0xc8: break;
 17948:       //case 0xc9: break;
 17949:       //case 0xca: break;
 17950:       //case 0xcb: break;
 17951:       //case 0xcc: break;
 17952:       //case 0xcd: break;
 17953:       //case 0xce: break;
 17954:       //case 0xcf: break;
 17955:       //case 0xd0: break;
 17956:       //case 0xd1: break;
 17957:       //case 0xd2: break;
 17958:       //case 0xd3: break;
 17959:       //case 0xd4: break;
 17960:       //case 0xd5: break;
 17961:       //case 0xd6: break;
 17962:       //case 0xd7: break;
 17963:       //case 0xd8: break;
 17964:       //case 0xd9: break;
 17965:       //case 0xda: break;
 17966:       //case 0xdb: break;
 17967:       //case 0xdc: break;
 17968:       //case 0xdd: break;
 17969:       //case 0xde: break;
 17970:       //case 0xdf: break;
 17971:     case 0xe0: fpkCLMUL (); break;
 17972:     case 0xe1: fpkCLDIV (); break;
 17973:     case 0xe2: fpkCLMOD (); break;
 17974:     case 0xe3: fpkCUMUL (); break;
 17975:     case 0xe4: fpkCUDIV (); break;
 17976:     case 0xe5: fpkCUMOD (); break;
 17977:     case 0xe6: fpkCLTOD (); break;
 17978:     case 0xe7: fpkCDTOL (); break;
 17979:     case 0xe8: fpkCLTOF (); break;
 17980:     case 0xe9: fpkCFTOL (); break;
 17981:     case 0xea: fpkCFTOD (); break;
 17982:     case 0xeb: fpkCDTOF (); break;
 17983:     case 0xec: fpkCDCMP (); break;
 17984:     case 0xed: fpkCDADD (); break;
 17985:     case 0xee: fpkCDSUB (); break;
 17986:     case 0xef: fpkCDMUL (); break;
 17987:     case 0xf0: fpkCDDIV (); break;
 17988:     case 0xf1: fpkCDMOD (); break;
 17989:     case 0xf2: fpkCFCMP (); break;
 17990:     case 0xf3: fpkCFADD (); break;
 17991:     case 0xf4: fpkCFSUB (); break;
 17992:     case 0xf5: fpkCFMUL (); break;
 17993:     case 0xf6: fpkCFDIV (); break;
 17994:     case 0xf7: fpkCFMOD (); break;
 17995:     case 0xf8: fpkCDTST (); break;
 17996:     case 0xf9: fpkCFTST (); break;
 17997:     case 0xfa: fpkCDINC (); break;
 17998:     case 0xfb: fpkCFINC (); break;
 17999:     case 0xfc: fpkCDDEC (); break;
 18000:     case 0xfd: fpkCFDEC (); break;
 18001:     case 0xfe: FEFunction.fpkFEVARG (); break;
 18002:     //case 0xff: FEFunction.fpkFEVECS (); break;  //FLOATn.Xに処理させる
 18003:     default:
 18004:       XEiJ.mpuCycleCount -= FEFunction.FPK_CLOCK;  //戻す
 18005:       irpFline ();
 18006:     }
 18007:     if (FEFunction.FPK_DEBUG_TRACE) {
 18008:       int i = sb.length ();
 18009:       XEiJ.fmtHex8 (XEiJ.fmtHex8 (XEiJ.fmtHex8 (XEiJ.fmtHex8 (sb.append ("  D0="), XEiJ.regRn[0]).append (" D1="), XEiJ.regRn[1]).append (" D2="), XEiJ.regRn[2]).append (" D3="), XEiJ.regRn[3]);
 18010:       int l = MainMemory.mmrStrlen (a0, 20);
 18011:       sb.append (" (A0)=\"");
 18012:       i = sb.length () - i;
 18013:       MainMemory.mmrRstr (sb, a0, l).append ("\"\n");
 18014:       if (a0 <= XEiJ.regRn[8] && XEiJ.regRn[8] <= a0 + l) {
 18015:         for (i += sb.length () + XEiJ.regRn[8] - a0; sb.length () < i; ) {
 18016:           sb.append (' ');
 18017:         }
 18018:         sb.append ('^');
 18019:       }
 18020:       System.out.println (sb.toString ());
 18021:     }
 18022:   }  //irpFpack
 18023: 
 18024:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 18025:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
 18026:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
 18027:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 18028:   //DOS <data>                                      |A|012346|-|UUUUU|UUUUU|          |1111_111_1dd_ddd_ddd [FLINE #<data>]
 18029:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 18030:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
 18031:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
 18032:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 18033:   //FLINE #<data>                                   |-|012346|-|UUUUU|UUUUU|          |1111_ddd_ddd_ddd_ddd (line 1111 emulator)
 18034:   public static void irpFline () throws M68kException {
 18035:     irpExceptionFormat0 (M68kException.M6E_LINE_1111_EMULATOR << 2, XEiJ.regPC0);  //pcは命令の先頭
 18036:   }  //irpFline
 18037: 
 18038:   //irpIllegal ()
 18039:   //  オペコードの上位10bitで分類されなかった未実装命令
 18040:   //  命令実行回数をカウントするために分けてある
 18041:   //  0x4afcのILLEGAL命令はTASに分類されて未実装実効アドレスで処理されるのでここには来ない
 18042:   public static void irpIllegal () throws M68kException {
 18043:     if (true) {
 18044:       M68kException.m6eNumber = M68kException.M6E_ILLEGAL_INSTRUCTION;
 18045:       throw M68kException.m6eSignal;
 18046:     }
 18047:   }  //irpIllegal
 18048: 
 18049:   //z = irpAbcd (x, y)
 18050:   //  ABCD
 18051:   public static int irpAbcd (int x, int y) {
 18052:     int c = XEiJ.regCCR >> 4;
 18053:     int t = (x & 0xff) + (y & 0xff) + c;  //仮の結果
 18054:     int z = t;  //結果
 18055:     if (0x0a <= (x & 0x0f) + (y & 0x0f) + c) {  //ハーフキャリー
 18056:       z += 0x10 - 0x0a;
 18057:     }
 18058:     //XとCはキャリーがあるときセット、さもなくばクリア
 18059:     if (0xa0 <= z) {  //キャリー
 18060:       z += 0x100 - 0xa0;
 18061:       XEiJ.regCCR |= XEiJ.REG_CCR_X | XEiJ.REG_CCR_C;
 18062:     } else {
 18063:       XEiJ.regCCR &= ~(XEiJ.REG_CCR_X | XEiJ.REG_CCR_C);
 18064:     }
 18065:     //Zは結果が0でないときクリア、さもなくば変化しない
 18066:     z &= 0xff;
 18067:     if (z != 0x00) {
 18068:       XEiJ.regCCR &= ~XEiJ.REG_CCR_Z;
 18069:     }
 18070:     if (false) {
 18071:       //000/030のときNは結果の最上位ビット
 18072:       if ((z & 0x80) != 0) {
 18073:         XEiJ.regCCR |= XEiJ.REG_CCR_N;
 18074:       } else {
 18075:         XEiJ.regCCR &= ~XEiJ.REG_CCR_N;
 18076:       }
 18077:       //000のときVは補正値の加算でオーバーフローしたときセット、さもなくばクリア
 18078:       int a = z - t;  //補正値
 18079:       if ((((t ^ z) & (a ^ z)) & 0x80) != 0) {
 18080:         XEiJ.regCCR |= XEiJ.REG_CCR_V;
 18081:       } else {
 18082:         XEiJ.regCCR &= ~XEiJ.REG_CCR_V;
 18083:       }
 18084:     } else if (false) {
 18085:       //000/030のときNは結果の最上位ビット
 18086:       if ((z & 0x80) != 0) {
 18087:         XEiJ.regCCR |= XEiJ.REG_CCR_N;
 18088:       } else {
 18089:         XEiJ.regCCR &= ~XEiJ.REG_CCR_N;
 18090:       }
 18091:       //030のときVはクリア
 18092:       XEiJ.regCCR &= ~XEiJ.REG_CCR_V;
 18093:     } else {
 18094:       //060のときNとVは変化しない
 18095:     }
 18096:     return z;
 18097:   }  //irpAbcd
 18098: 
 18099:   //z = irpSbcd (x, y)
 18100:   //  SBCD
 18101:   public static int irpSbcd (int x, int y) {
 18102:     int b = XEiJ.regCCR >> 4;
 18103:     int t = (x & 0xff) - (y & 0xff) - b;  //仮の結果
 18104:     int z = t;  //結果
 18105:     if ((x & 0x0f) - (y & 0x0f) - b < 0) {  //ハーフボロー
 18106:       z -= 0x10 - 0x0a;
 18107:     }
 18108:     //XとCはボローがあるときセット、さもなくばクリア
 18109:     if (z < 0) {  //ボロー
 18110:       if (t < 0) {
 18111:         z -= 0x100 - 0xa0;
 18112:       }
 18113:       XEiJ.regCCR |= XEiJ.REG_CCR_X | XEiJ.REG_CCR_C;
 18114:     } else {
 18115:       XEiJ.regCCR &= ~(XEiJ.REG_CCR_X | XEiJ.REG_CCR_C);
 18116:     }
 18117:     //Zは結果が0でないときクリア、さもなくば変化しない
 18118:     z &= 0xff;
 18119:     if (z != 0x00) {
 18120:       XEiJ.regCCR &= ~XEiJ.REG_CCR_Z;
 18121:     }
 18122:     if (false) {
 18123:       //000/030のときNは結果の最上位ビット
 18124:       if ((z & 0x80) != 0) {
 18125:         XEiJ.regCCR |= XEiJ.REG_CCR_N;
 18126:       } else {
 18127:         XEiJ.regCCR &= ~XEiJ.REG_CCR_N;
 18128:       }
 18129:       //000のときVは補正値の加算でオーバーフローしたときセット、さもなくばクリア
 18130:       int a = z - t;  //補正値
 18131:       if ((((t ^ z) & (a ^ z)) & 0x80) != 0) {
 18132:         XEiJ.regCCR |= XEiJ.REG_CCR_V;
 18133:       } else {
 18134:         XEiJ.regCCR &= ~XEiJ.REG_CCR_V;
 18135:       }
 18136:     } else if (false) {
 18137:       //000/030のときNは結果の最上位ビット
 18138:       if ((z & 0x80) != 0) {
 18139:         XEiJ.regCCR |= XEiJ.REG_CCR_N;
 18140:       } else {
 18141:         XEiJ.regCCR &= ~XEiJ.REG_CCR_N;
 18142:       }
 18143:       //030のときVはクリア
 18144:       XEiJ.regCCR &= ~XEiJ.REG_CCR_V;
 18145:     } else {
 18146:       //060のときNとVは変化しない
 18147:     }
 18148:     return z;
 18149:   }  //irpSbcd
 18150: 
 18151: 
 18152: 
 18153:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 18154:   //                                                | |  MPU | |CCin |CCout|addressing|     1st opcode         2nd opcode
 18155:   //                           A:alias P:privileged |A|012346|P|XNZVC|XNZVC|DAM+-WXZPI|bbbb_bbb_bbb_bbb_bbb-bbbbbbbbbbbbbbbb
 18156:   //------------------------------------------------+-+------+-+-----+-----+----------+-------------------------------------
 18157:   //HFSBOOT                                         |-|012346|-|-----|-----|          |0100_111_000_000_000
 18158:   //HFSINST                                         |-|012346|-|-----|-----|          |0100_111_000_000_001
 18159:   //HFSSTR                                          |-|012346|-|-----|-----|          |0100_111_000_000_010
 18160:   //HFSINT                                          |-|012346|-|-----|-----|          |0100_111_000_000_011
 18161:   //EMXNOP                                          |-|012346|-|-----|-----|          |0100_111_000_000_100
 18162:   //  エミュレータ拡張命令
 18163:   public static void irpEmx () throws M68kException {
 18164:     switch (XEiJ.regOC & 63) {
 18165:     case XEiJ.EMX_OPCODE_HFSBOOT & 63:
 18166:       XEiJ.mpuCycleCount += 19;
 18167:       if (HFS.hfsIPLBoot ()) {
 18168:         //JMP $6800.W
 18169:         irpSetPC (0x00006800);
 18170:       }
 18171:       break;
 18172:     case XEiJ.EMX_OPCODE_HFSINST & 63:
 18173:       XEiJ.mpuCycleCount += 19;
 18174:       HFS.hfsInstall ();
 18175:       break;
 18176:     case XEiJ.EMX_OPCODE_HFSSTR & 63:
 18177:       XEiJ.mpuCycleCount += 19;
 18178:       HFS.hfsStrategy ();
 18179:       break;
 18180:     case XEiJ.EMX_OPCODE_HFSINT & 63:
 18181:       XEiJ.mpuCycleCount += 19;
 18182:       //XEiJ.mpuClockTime += TMR_FREQ / 100000L;  //0.01ms
 18183:       if (HFS.hfsInterrupt ()) {
 18184:         //WAIT
 18185:         XEiJ.mpuTraceFlag = 0;  //トレース例外を発生させない
 18186:         XEiJ.regPC = XEiJ.regPC0;  //ループ
 18187:         XEiJ.mpuClockTime += XEiJ.TMR_FREQ * 4 / 1000000;  //4μs。10MHzのとき40clk
 18188:         XEiJ.mpuLastNano += 4000L;
 18189:       }
 18190:       break;
 18191:     case XEiJ.EMX_OPCODE_EMXNOP & 63:
 18192:       XEiJ.emxNop ();
 18193:       break;
 18194:     case XEiJ.EMX_OPCODE_EMXWAIT & 63:
 18195:       WaitInstruction.execute ();  //待機命令を実行する
 18196:       break;
 18197:     default:
 18198:       M68kException.m6eNumber = M68kException.M6E_ILLEGAL_INSTRUCTION;
 18199:       throw M68kException.m6eSignal;
 18200:     }
 18201:   }  //irpEmx
 18202: 
 18203: 
 18204: 
 18205:   //irpSetPC (a)
 18206:   //  pcへデータを書き込む
 18207:   //  奇数のときはアドレスエラーが発生する
 18208:   public static void irpSetPC (int a) throws M68kException {
 18209:     if (XEiJ.TEST_BIT_0_SHIFT ? a << 31 - 0 < 0 : (a & 1) != 0) {
 18210:       M68kException.m6eNumber = M68kException.M6E_ADDRESS_ERROR;
 18211:       M68kException.m6eAddress = a & -2;  //アドレスを偶数にする
 18212:       M68kException.m6eDirection = XEiJ.MPU_WR_READ;
 18213:       M68kException.m6eSize = XEiJ.MPU_SS_LONG;
 18214:       throw M68kException.m6eSignal;
 18215:     }
 18216:     if (BranchLog.BLG_ON) {
 18217:       //BranchLog.blgJump (a);  //分岐ログに分岐レコードを追加する
 18218:       if (BranchLog.blgPrevHeadSuper != (BranchLog.blgHead | BranchLog.blgSuper) || BranchLog.blgPrevTail != XEiJ.regPC0) {  //前回のレコードと異なるとき
 18219:         int i = (char) BranchLog.blgNewestRecord++ << BranchLog.BLG_RECORD_SHIFT;
 18220:         BranchLog.blgArray[i] = BranchLog.blgPrevHeadSuper = BranchLog.blgHead | BranchLog.blgSuper;
 18221:         BranchLog.blgArray[i + 1] = BranchLog.blgPrevTail = XEiJ.regPC0;
 18222:       }
 18223:       BranchLog.blgHead = XEiJ.regPC = a;
 18224:       BranchLog.blgSuper = XEiJ.regSRS >>> 13;
 18225:     } else {
 18226:       XEiJ.regPC = a;
 18227:     }
 18228:   }  //irpSetPC
 18229: 
 18230:   //irpSetSR (newSr)
 18231:   //  srへデータを書き込む
 18232:   //  ori to sr/andi to sr/eori to sr/move to sr/stop/rteで使用される
 18233:   //  スーパーバイザモードになっていることを確認してから呼び出すこと
 18234:   //  rteではr[15]が指すアドレスからsrとpcを取り出してr[15]を更新してから呼び出すこと
 18235:   //  スーパーバイザモード→ユーザモードのときは移行のための処理を行う
 18236:   //  新しい割り込みマスクレベルよりも高い割り込み処理の終了をデバイスに通知する
 18237:   public static void irpSetSR (int newSr) {
 18238:     XEiJ.regSRT1 = XEiJ.REG_SR_T1 & newSr;
 18239:     XEiJ.regSRM = XEiJ.REG_SR_M & newSr;
 18240:     if ((XEiJ.regSRS = XEiJ.REG_SR_S & newSr) == 0) {  //スーパーバイザモード→ユーザモード
 18241:       XEiJ.mpuISP = XEiJ.regRn[15];  //SSPを保存
 18242:       XEiJ.regRn[15] = XEiJ.mpuUSP;  //USPを復元
 18243:       if (DataBreakPoint.DBP_ON) {
 18244:         DataBreakPoint.dbpMemoryMap = DataBreakPoint.dbpUserMap;  //ユーザメモリマップに切り替える
 18245:       } else {
 18246:         XEiJ.busMemoryMap = XEiJ.busUserMap;  //ユーザメモリマップに切り替える
 18247:       }
 18248:       if (InstructionBreakPoint.IBP_ON) {
 18249:         InstructionBreakPoint.ibpOp1MemoryMap = InstructionBreakPoint.ibpOp1UserMap;
 18250:       }
 18251:     }
 18252:     int t = (XEiJ.mpuIMR = 0x7f >> ((XEiJ.regSRI = XEiJ.REG_SR_I & newSr) >> 8)) & XEiJ.mpuISR;  //XEiJ.mpuISRで1→0とするビット
 18253:     if (t != 0) {  //終了する割り込みがあるとき
 18254:       XEiJ.mpuISR ^= t;
 18255:       //デバイスに割り込み処理の終了を通知する
 18256:       if (t == XEiJ.MPU_MFP_INTERRUPT_MASK) {  //MFPのみ
 18257:         MC68901.mfpDone ();
 18258:       } else if (t == XEiJ.MPU_DMA_INTERRUPT_MASK) {  //DMAのみ
 18259:         HD63450.dmaDone ();
 18260:       } else if (t == XEiJ.MPU_SCC_INTERRUPT_MASK) {  //SCCのみ
 18261:         Z8530.sccDone ();
 18262:       } else if (t == XEiJ.MPU_IOI_INTERRUPT_MASK) {  //IOIのみ
 18263:         IOInterrupt.ioiDone ();
 18264:       } else if (t == XEiJ.MPU_EB2_INTERRUPT_MASK) {  //EB2のみ
 18265:         XEiJ.eb2Done ();
 18266:       } else {  //SYSのみまたは複数
 18267:         if (XEiJ.TEST_BIT_1_SHIFT ? t << 24 + XEiJ.MPU_MFP_INTERRUPT_LEVEL < 0 : (t & XEiJ.MPU_MFP_INTERRUPT_MASK) != 0) {
 18268:           MC68901.mfpDone ();
 18269:         }
 18270:         if (t << 24 + XEiJ.MPU_DMA_INTERRUPT_LEVEL < 0) {  //(t & XEiJ.MPU_DMA_INTERRUPT_MASK) != 0
 18271:           HD63450.dmaDone ();
 18272:         }
 18273:         if (XEiJ.TEST_BIT_2_SHIFT ? t << 24 + XEiJ.MPU_SCC_INTERRUPT_LEVEL < 0 : (t & XEiJ.MPU_SCC_INTERRUPT_MASK) != 0) {
 18274:           Z8530.sccDone ();
 18275:         }
 18276:         if (t << 24 + XEiJ.MPU_IOI_INTERRUPT_LEVEL < 0) {  //(t & XEiJ.MPU_IOI_INTERRUPT_MASK) != 0
 18277:           IOInterrupt.ioiDone ();
 18278:         }
 18279:         if (t << 24 + XEiJ.MPU_EB2_INTERRUPT_LEVEL < 0) {  //(t & XEiJ.MPU_EB2_INTERRUPT_MASK) != 0
 18280:           XEiJ.eb2Done ();
 18281:         }
 18282:         if (XEiJ.TEST_BIT_0_SHIFT ? t << 24 + XEiJ.MPU_SYS_INTERRUPT_LEVEL < 0 : (t & XEiJ.MPU_SYS_INTERRUPT_MASK) != 0) {
 18283:           XEiJ.sysDone ();
 18284:         }
 18285:       }
 18286:     }
 18287:     XEiJ.mpuIMR |= ~XEiJ.mpuISR & XEiJ.MPU_SYS_INTERRUPT_MASK;  //割り込みマスクレベルが7のときレベル7割り込みの処理中でなければレベル7割り込みを許可する
 18288:     XEiJ.regCCR = XEiJ.REG_CCR_MASK & newSr;
 18289:   }  //irpSetSR
 18290: 
 18291:   //irpInterrupt (offset, level)
 18292:   //  割り込み処理を開始する
 18293:   public static void irpInterrupt (int offset, int level) throws M68kException {
 18294:     if (XEiJ.regOC == 0b0100_111_001_110_010) {  //最後に実行した命令はSTOP命令
 18295:       XEiJ.regPC = XEiJ.regPC0 + 4;  //次の命令に進む
 18296:     }
 18297:     XEiJ.mpuClockTime += XEiJ.mpuModifiedUnit * 19;
 18298:     int save_sr = XEiJ.regSRT1 | XEiJ.regSRS | XEiJ.regSRM | XEiJ.regSRI | XEiJ.regCCR;
 18299:     XEiJ.regSRI = level << 8;  //割り込みマスクを要求されたレベルに変更する
 18300:     XEiJ.mpuIMR = 0x7f >> level;
 18301:     XEiJ.mpuISR |= 0x80 >> level;
 18302:     XEiJ.regSRT1 = XEiJ.mpuTraceFlag = 0;  //srのTビットを消す
 18303:     int sp;
 18304:     if (XEiJ.regSRS != 0) {  //スーパーバイザモード
 18305:       sp = XEiJ.regRn[15];
 18306:     } else {  //ユーザモード
 18307:       XEiJ.regSRS = XEiJ.REG_SR_S;  //スーパーバイザモードへ移行する
 18308:       XEiJ.mpuUSP = XEiJ.regRn[15];  //USPを保存
 18309:       sp = XEiJ.mpuISP;  //SSPを復元
 18310:       if (DataBreakPoint.DBP_ON) {
 18311:         DataBreakPoint.dbpMemoryMap = DataBreakPoint.dbpSuperMap;  //スーパーバイザメモリマップに切り替える
 18312:       } else {
 18313:         XEiJ.busMemoryMap = XEiJ.busSuperMap;  //スーパーバイザメモリマップに切り替える
 18314:       }
 18315:       if (InstructionBreakPoint.IBP_ON) {
 18316:         InstructionBreakPoint.ibpOp1MemoryMap = InstructionBreakPoint.ibpOp1SuperMap;
 18317:       }
 18318:     }
 18319:     //以下はスーパーバイザモード
 18320:     XEiJ.regRn[15] = sp -= 8;
 18321:     mmuWriteWordData (sp + 6, offset, 1);  //7-6:フォーマットとベクタオフセット
 18322:     mmuWriteLongData (sp + 2, XEiJ.regPC, 1);  //5-2:プログラムカウンタ
 18323:     mmuWriteWordData (sp, save_sr, 1);  //1-0:ステータスレジスタ
 18324:     //if (XEiJ.regSRM != 0) {  //マスタモードのとき
 18325:     XEiJ.regSRM = 0;  //割り込みモードへ移行する
 18326:     //}
 18327:     if (BranchLog.BLG_ON) {
 18328:       XEiJ.regPC0 = XEiJ.regPC;  //rteによる割り込み終了と同時に次の割り込みを受け付けたとき間でpc0を更新しないと2番目の分岐レコードの終了アドレスが1番目と同じになっておかしな分岐レコードができてしまう
 18329:     }
 18330:     irpSetPC (mmuReadLongFour (XEiJ.mpuVBR + offset, 1));  //例外ベクタを取り出してジャンプする
 18331:   }  //irpInterrupt
 18332: 
 18333:   //irpExceptionFormat0 (offset, save_pc)
 18334:   //  例外処理を開始する
 18335:   //  スタックへのプッシュ、ベクタの取り出し、ジャンプのいずれかでバスエラーまたはアドレスエラーが発生する場合がある
 18336:   public static void irpExceptionFormat0 (int offset, int save_pc) throws M68kException {
 18337:     XEiJ.mpuCycleCount += 19;
 18338:     int save_sr = XEiJ.regSRT1 | XEiJ.regSRS | XEiJ.regSRM | XEiJ.regSRI | XEiJ.regCCR;
 18339:     XEiJ.regSRT1 = XEiJ.mpuTraceFlag = 0;  //srのTビットを消す
 18340:     int sp;
 18341:     if (XEiJ.regSRS != 0) {  //スーパーバイザモード
 18342:       sp = XEiJ.regRn[15];
 18343:     } else {  //ユーザモード
 18344:       XEiJ.regSRS = XEiJ.REG_SR_S;  //スーパーバイザモードへ移行する
 18345:       XEiJ.mpuUSP = XEiJ.regRn[15];  //USPを保存
 18346:       sp = XEiJ.mpuISP;  //SSPを復元
 18347:       if (DataBreakPoint.DBP_ON) {
 18348:         DataBreakPoint.dbpMemoryMap = DataBreakPoint.dbpSuperMap;  //スーパーバイザメモリマップに切り替える
 18349:       } else {
 18350:         XEiJ.busMemoryMap = XEiJ.busSuperMap;  //スーパーバイザメモリマップに切り替える
 18351:       }
 18352:       if (InstructionBreakPoint.IBP_ON) {
 18353:         InstructionBreakPoint.ibpOp1MemoryMap = InstructionBreakPoint.ibpOp1SuperMap;
 18354:       }
 18355:     }
 18356:     //以下はスーパーバイザモード
 18357:     XEiJ.regRn[15] = sp -= 8;
 18358:     mmuWriteWordData (sp + 6, offset, 1);  //7-6:フォーマットとベクタオフセット
 18359:     mmuWriteLongData (sp + 2, save_pc, 1);  //5-2:プログラムカウンタ
 18360:     mmuWriteWordData (sp, save_sr, 1);  //1-0:ステータスレジスタ
 18361:     irpSetPC (mmuReadLongFour (XEiJ.mpuVBR + offset, 1));  //例外ベクタを取り出してジャンプする
 18362:   }  //irpExceptionFormat0
 18363: 
 18364:   //irpExceptionFormat2 (offset, save_pc, address)
 18365:   //  例外処理を開始する
 18366:   //  スタックへのプッシュ、ベクタの取り出し、ジャンプのいずれかでバスエラーまたはアドレスエラーが発生する場合がある
 18367:   public static void irpExceptionFormat2 (int offset, int save_pc, int address) throws M68kException {
 18368:     XEiJ.mpuCycleCount += 19;
 18369:     int save_sr = XEiJ.regSRT1 | XEiJ.regSRS | XEiJ.regSRM | XEiJ.regSRI | XEiJ.regCCR;
 18370:     XEiJ.regSRT1 = XEiJ.mpuTraceFlag = 0;  //srのTビットを消す
 18371:     int sp;
 18372:     if (XEiJ.regSRS != 0) {  //スーパーバイザモード
 18373:       sp = XEiJ.regRn[15];
 18374:     } else {  //ユーザモード
 18375:       XEiJ.regSRS = XEiJ.REG_SR_S;  //スーパーバイザモードへ移行する
 18376:       XEiJ.mpuUSP = XEiJ.regRn[15];  //USPを保存
 18377:       sp = XEiJ.mpuISP;  //SSPを復元
 18378:       if (DataBreakPoint.DBP_ON) {
 18379:         DataBreakPoint.dbpMemoryMap = DataBreakPoint.dbpSuperMap;  //スーパーバイザメモリマップに切り替える
 18380:       } else {
 18381:         XEiJ.busMemoryMap = XEiJ.busSuperMap;  //スーパーバイザメモリマップに切り替える
 18382:       }
 18383:       if (InstructionBreakPoint.IBP_ON) {
 18384:         InstructionBreakPoint.ibpOp1MemoryMap = InstructionBreakPoint.ibpOp1SuperMap;
 18385:       }
 18386:     }
 18387:     //以下はスーパーバイザモード
 18388:     XEiJ.regRn[15] = sp -= 12;
 18389:     mmuWriteLongData (sp + 8, address, 1);  //11-8:アドレス
 18390:     mmuWriteWordData (sp + 6, 0x2000 | offset, 1);  //7-6:フォーマットとベクタオフセット
 18391:     mmuWriteLongData (sp + 2, save_pc, 1);  //5-2:プログラムカウンタ
 18392:     mmuWriteWordData (sp, save_sr, 1);  //1-0:ステータスレジスタ
 18393:     irpSetPC (mmuReadLongFour (XEiJ.mpuVBR + offset, 1));  //例外ベクタを取り出してジャンプする
 18394:   }  //irpExceptionFormat2
 18395: 
 18396:   //irpExceptionFormat3 (offset, save_pc, address)
 18397:   //  例外処理を開始する
 18398:   //  スタックへのプッシュ、ベクタの取り出し、ジャンプのいずれかでバスエラーまたはアドレスエラーが発生する場合がある
 18399:   public static void irpExceptionFormat3 (int offset, int save_pc, int address) throws M68kException {
 18400:     XEiJ.mpuCycleCount += 19;
 18401:     int save_sr = XEiJ.regSRT1 | XEiJ.regSRS | XEiJ.regSRM | XEiJ.regSRI | XEiJ.regCCR;
 18402:     XEiJ.regSRT1 = XEiJ.mpuTraceFlag = 0;  //srのTビットを消す
 18403:     int sp;
 18404:     if (XEiJ.regSRS != 0) {  //スーパーバイザモード
 18405:       sp = XEiJ.regRn[15];
 18406:     } else {  //ユーザモード
 18407:       XEiJ.regSRS = XEiJ.REG_SR_S;  //スーパーバイザモードへ移行する
 18408:       XEiJ.mpuUSP = XEiJ.regRn[15];  //USPを保存
 18409:       sp = XEiJ.mpuISP;  //SSPを復元
 18410:       if (DataBreakPoint.DBP_ON) {
 18411:         DataBreakPoint.dbpMemoryMap = DataBreakPoint.dbpSuperMap;  //スーパーバイザメモリマップに切り替える
 18412:       } else {
 18413:         XEiJ.busMemoryMap = XEiJ.busSuperMap;  //スーパーバイザメモリマップに切り替える
 18414:       }
 18415:       if (InstructionBreakPoint.IBP_ON) {
 18416:         InstructionBreakPoint.ibpOp1MemoryMap = InstructionBreakPoint.ibpOp1SuperMap;
 18417:       }
 18418:     }
 18419:     //以下はスーパーバイザモード
 18420:     XEiJ.regRn[15] = sp -= 12;
 18421:     mmuWriteLongData (sp + 8, address, 1);  //11-8:実効アドレス
 18422:     mmuWriteWordData (sp + 6, 0x3000 | offset, 1);  //7-6:フォーマットとベクタオフセット
 18423:     mmuWriteLongData (sp + 2, save_pc, 1);  //5-2:プログラムカウンタ
 18424:     mmuWriteWordData (sp, save_sr, 1);  //1-0:ステータスレジスタ
 18425:     irpSetPC (mmuReadLongFour (XEiJ.mpuVBR + offset, 1));  //例外ベクタを取り出してジャンプする
 18426:   }  //irpExceptionFormat3
 18427: 
 18428: 
 18429: 
 18430:   //a = efaAnyByte (ea)  //|  M+-WXZPI|
 18431:   //  任意のモードのバイトオペランドの実効アドレスを求める
 18432:   //  (A7)+と-(A7)はA7を奇偶に関わらず2変化させ、跨いだワードの上位バイト(アドレスの小さい方)を参照する
 18433:   //  #<data>はオペコードに続くワードの下位バイトを参照する。上位バイトは不定なので参照してはならない
 18434:   @SuppressWarnings ("fallthrough") public static int efaAnyByte (int ea) throws M68kException {
 18435:     int t, w, x;
 18436:     switch (ea) {
 18437:     case 0b010_000:  //(A0)
 18438:       if (XEiJ.EFA_SEPARATE_AR) {
 18439:         return XEiJ.regRn[ 8];
 18440:       }
 18441:       //fallthrough
 18442:     case 0b010_001:  //(A1)
 18443:       if (XEiJ.EFA_SEPARATE_AR) {
 18444:         return XEiJ.regRn[ 9];
 18445:       }
 18446:       //fallthrough
 18447:     case 0b010_010:  //(A2)
 18448:       if (XEiJ.EFA_SEPARATE_AR) {
 18449:         return XEiJ.regRn[10];
 18450:       }
 18451:       //fallthrough
 18452:     case 0b010_011:  //(A3)
 18453:       if (XEiJ.EFA_SEPARATE_AR) {
 18454:         return XEiJ.regRn[11];
 18455:       }
 18456:       //fallthrough
 18457:     case 0b010_100:  //(A4)
 18458:       if (XEiJ.EFA_SEPARATE_AR) {
 18459:         return XEiJ.regRn[12];
 18460:       }
 18461:       //fallthrough
 18462:     case 0b010_101:  //(A5)
 18463:       if (XEiJ.EFA_SEPARATE_AR) {
 18464:         return XEiJ.regRn[13];
 18465:       }
 18466:       //fallthrough
 18467:     case 0b010_110:  //(A6)
 18468:       if (XEiJ.EFA_SEPARATE_AR) {
 18469:         return XEiJ.regRn[14];
 18470:       }
 18471:       //fallthrough
 18472:     case 0b010_111:  //(A7)
 18473:       if (XEiJ.EFA_SEPARATE_AR) {
 18474:         return XEiJ.regRn[15];
 18475:       } else {
 18476:         return XEiJ.regRn[ea - (0b010_000 - 8)];
 18477:       }
 18478:     case 0b011_000:  //(A0)+
 18479:       if (XEiJ.EFA_SEPARATE_AR) {
 18480:         M68kException.m6eIncremented += 1L << (0 << 3);
 18481:         return XEiJ.regRn[ 8]++;
 18482:       }
 18483:       //fallthrough
 18484:     case 0b011_001:  //(A1)+
 18485:       if (XEiJ.EFA_SEPARATE_AR) {
 18486:         M68kException.m6eIncremented += 1L << (1 << 3);
 18487:         return XEiJ.regRn[ 9]++;
 18488:       }
 18489:       //fallthrough
 18490:     case 0b011_010:  //(A2)+
 18491:       if (XEiJ.EFA_SEPARATE_AR) {
 18492:         M68kException.m6eIncremented += 1L << (2 << 3);
 18493:         return XEiJ.regRn[10]++;
 18494:       }
 18495:       //fallthrough
 18496:     case 0b011_011:  //(A3)+
 18497:       if (XEiJ.EFA_SEPARATE_AR) {
 18498:         M68kException.m6eIncremented += 1L << (3 << 3);
 18499:         return XEiJ.regRn[11]++;
 18500:       }
 18501:       //fallthrough
 18502:     case 0b011_100:  //(A4)+
 18503:       if (XEiJ.EFA_SEPARATE_AR) {
 18504:         M68kException.m6eIncremented += 1L << (4 << 3);
 18505:         return XEiJ.regRn[12]++;
 18506:       }
 18507:       //fallthrough
 18508:     case 0b011_101:  //(A5)+
 18509:       if (XEiJ.EFA_SEPARATE_AR) {
 18510:         M68kException.m6eIncremented += 1L << (5 << 3);
 18511:         return XEiJ.regRn[13]++;
 18512:       }
 18513:       //fallthrough
 18514:     case 0b011_110:  //(A6)+
 18515:       if (XEiJ.EFA_SEPARATE_AR) {
 18516:         M68kException.m6eIncremented += 1L << (6 << 3);
 18517:         return XEiJ.regRn[14]++;
 18518:       } else {
 18519:         M68kException.m6eIncremented += 1L << ((ea & 7) << 3);
 18520:         return XEiJ.regRn[ea - (0b011_000 - 8)]++;
 18521:       }
 18522:     case 0b011_111:  //(A7)+
 18523:       M68kException.m6eIncremented += 2L << (7 << 3);
 18524:       return (XEiJ.regRn[15] += 2) - 2;
 18525:     case 0b100_000:  //-(A0)
 18526:       if (XEiJ.EFA_SEPARATE_AR) {
 18527:         M68kException.m6eIncremented -= 1L << (0 << 3);
 18528:         return --XEiJ.regRn[ 8];
 18529:       }
 18530:       //fallthrough
 18531:     case 0b100_001:  //-(A1)
 18532:       if (XEiJ.EFA_SEPARATE_AR) {
 18533:         M68kException.m6eIncremented -= 1L << (1 << 3);
 18534:         return --XEiJ.regRn[ 9];
 18535:       }
 18536:       //fallthrough
 18537:     case 0b100_010:  //-(A2)
 18538:       if (XEiJ.EFA_SEPARATE_AR) {
 18539:         M68kException.m6eIncremented -= 1L << (2 << 3);
 18540:         return --XEiJ.regRn[10];
 18541:       }
 18542:       //fallthrough
 18543:     case 0b100_011:  //-(A3)
 18544:       if (XEiJ.EFA_SEPARATE_AR) {
 18545:         M68kException.m6eIncremented -= 1L << (3 << 3);
 18546:         return --XEiJ.regRn[11];
 18547:       }
 18548:       //fallthrough
 18549:     case 0b100_100:  //-(A4)
 18550:       if (XEiJ.EFA_SEPARATE_AR) {
 18551:         M68kException.m6eIncremented -= 1L << (4 << 3);
 18552:         return --XEiJ.regRn[12];
 18553:       }
 18554:       //fallthrough
 18555:     case 0b100_101:  //-(A5)
 18556:       if (XEiJ.EFA_SEPARATE_AR) {
 18557:         M68kException.m6eIncremented -= 1L << (5 << 3);
 18558:         return --XEiJ.regRn[13];
 18559:       }
 18560:       //fallthrough
 18561:     case 0b100_110:  //-(A6)
 18562:       if (XEiJ.EFA_SEPARATE_AR) {
 18563:         M68kException.m6eIncremented -= 1L << (6 << 3);
 18564:         return --XEiJ.regRn[14];
 18565:       } else {
 18566:         M68kException.m6eIncremented -= 1L << ((ea & 7) << 3);
 18567:         return --XEiJ.regRn[ea - (0b100_000 - 8)];
 18568:       }
 18569:     case 0b100_111:  //-(A7)
 18570:       M68kException.m6eIncremented -= 2L << (7 << 3);
 18571:       return XEiJ.regRn[15] -= 2;
 18572:     case 0b101_000:  //(d16,A0)
 18573:     case 0b101_001:  //(d16,A1)
 18574:     case 0b101_010:  //(d16,A2)
 18575:     case 0b101_011:  //(d16,A3)
 18576:     case 0b101_100:  //(d16,A4)
 18577:     case 0b101_101:  //(d16,A5)
 18578:     case 0b101_110:  //(d16,A6)
 18579:     case 0b101_111:  //(d16,A7)
 18580:       if (XEiJ.MPU_COMPOUND_POSTINCREMENT) {
 18581:         return (XEiJ.regRn[ea - (0b101_000 - 8)]  //ベースレジスタ
 18582:                 + mmuReadWordSignExword ((XEiJ.regPC += 2) - 2, XEiJ.regSRS));  //pcws。ワードディスプレースメント
 18583:       } else {
 18584:         t = XEiJ.regPC;
 18585:         XEiJ.regPC = t + 2;
 18586:         return (XEiJ.regRn[ea - (0b101_000 - 8)]  //ベースレジスタ
 18587:                 + mmuReadWordSignExword (t, XEiJ.regSRS));  //pcws。ワードディスプレースメント
 18588:       }
 18589:     case 0b110_000:  //(d8,A0,Rn.wl)
 18590:     case 0b110_001:  //(d8,A1,Rn.wl)
 18591:     case 0b110_010:  //(d8,A2,Rn.wl)
 18592:     case 0b110_011:  //(d8,A3,Rn.wl)
 18593:     case 0b110_100:  //(d8,A4,Rn.wl)
 18594:     case 0b110_101:  //(d8,A5,Rn.wl)
 18595:     case 0b110_110:  //(d8,A6,Rn.wl)
 18596:     case 0b110_111:  //(d8,A7,Rn.wl)
 18597:       if (XEiJ.MPU_COMPOUND_POSTINCREMENT) {
 18598:         w = mmuReadWordZeroExword ((XEiJ.regPC += 2) - 2, XEiJ.regSRS);  //pcwz。拡張ワード
 18599:       } else {
 18600:         w = XEiJ.regPC;
 18601:         XEiJ.regPC = w + 2;
 18602:         w = mmuReadWordZeroExword (w, XEiJ.regSRS);  //pcwz。拡張ワード
 18603:       }
 18604:       if (w << 31 - 8 < 0) {  //フルフォーマット
 18605:         XEiJ.mpuCycleCount += w << -2 == 0 ? 1 : 3;  //メモリ間接なし:メモリ間接あり
 18606:       }
 18607:       t = (((~w & 0x0180) == 0 ? 0 :  //ベースレジスタサプレス
 18608:             XEiJ.regRn[ea - (0b110_000 - 8)])  //ベースレジスタ
 18609:            + (w << 31 - 8 >= 0 ? (byte) w :  //バイトディスプレースメント
 18610:               w << 31 - 5 >= 0 ? 0 :  //ヌルベースディスプレースメント
 18611:               w << 31 - 4 >= 0 ? mmuReadWordSignExword ((XEiJ.regPC += 2) - 2, XEiJ.regSRS) :  //pcws。ワードベースディスプレースメント
 18612:               mmuReadLongExword ((XEiJ.regPC += 4) - 4, XEiJ.regSRS)));  //pcls。ロングベースディスプレースメント
 18613:       x = ((~w & 0x0140) == 0 ? 0 :  //インデックスサプレス
 18614:            (w << 31 - 11 >= 0 ? (short) XEiJ.regRn[w >> 12] :  //ワードインデックス
 18615:             XEiJ.regRn[w >> 12])  //ロングインデックス
 18616:            << (w >> 9 & 3));  //スケールファクタ。ワードインデックスのときは符号拡張してから掛ける
 18617:       return ((w & 0x0103) <= 0x0100 ? t + x :  //メモリ間接なし
 18618:               ((XEiJ.TEST_BIT_2_SHIFT ? w << 31 - 2 >= 0 : (w & 4) == 0) ? mmuReadLongData (t + x, XEiJ.regSRS) :  //プリインデックス
 18619:                mmuReadLongData (t, XEiJ.regSRS) + x)  //ポストインデックス
 18620:               + ((XEiJ.TEST_BIT_1_SHIFT ? w << 31 - 1 >= 0 : (w & 2) == 0) ? 0 :  //ヌルアウタディスプレースメント
 18621:                  (XEiJ.TEST_BIT_0_SHIFT ? w << 31 - 0 >= 0 : (w & 1) == 0) ? mmuReadWordSignExword ((XEiJ.regPC += 2) - 2, XEiJ.regSRS) :  //pcws。ワードアウタディスプレースメント
 18622:                  mmuReadLongExword ((XEiJ.regPC += 4) - 4, XEiJ.regSRS)));  //pcls。ロングアウタディスプレースメント
 18623:     case 0b111_000:  //(xxx).W
 18624:       return mmuReadWordSignExword ((XEiJ.regPC += 2) - 2, XEiJ.regSRS);  //pcws
 18625:     case 0b111_001:  //(xxx).L
 18626:       return mmuReadLongExword ((XEiJ.regPC += 4) - 4, XEiJ.regSRS);  //pcls
 18627:     case 0b111_010:  //(d16,PC)
 18628:       t = XEiJ.regPC;
 18629:       XEiJ.regPC = t + 2;
 18630:       return (t  //ベースレジスタ
 18631:               + mmuReadWordSignExword (t, XEiJ.regSRS));  //pcws。ワードディスプレースメント
 18632:     case 0b111_011:  //(d8,PC,Rn.wl)
 18633:       t = XEiJ.regPC;
 18634:       XEiJ.regPC = t + 2;
 18635:       w = mmuReadWordZeroExword (t, XEiJ.regSRS);  //pcwz。拡張ワード
 18636:       if (w << 31 - 8 < 0) {  //フルフォーマット
 18637:         XEiJ.mpuCycleCount += w << -2 == 0 ? 1 : 3;  //メモリ間接なし:メモリ間接あり
 18638:       }
 18639:       t = (((~w & 0x0180) == 0 ? 0 :  //ベースレジスタサプレス
 18640:             t)  //ベースレジスタ
 18641:            + (w << 31 - 8 >= 0 ? (byte) w :  //バイトディスプレースメント
 18642:               w << 31 - 5 >= 0 ? 0 :  //ヌルベースディスプレースメント
 18643:               w << 31 - 4 >= 0 ? mmuReadWordSignExword ((XEiJ.regPC += 2) - 2, XEiJ.regSRS) :  //pcws。ワードベースディスプレースメント
 18644:               mmuReadLongExword ((XEiJ.regPC += 4) - 4, XEiJ.regSRS)));  //pcls。ロングベースディスプレースメント
 18645:       x = ((~w & 0x0140) == 0 ? 0 :  //インデックスサプレス
 18646:            (w << 31 - 11 >= 0 ? (short) XEiJ.regRn[w >> 12] :  //ワードインデックス
 18647:             XEiJ.regRn[w >> 12])  //ロングインデックス
 18648:            << (w >> 9 & 3));  //スケールファクタ。ワードインデックスのときは符号拡張してから掛ける
 18649:       return ((w & 0x0103) <= 0x0100 ? t + x :  //メモリ間接なし
 18650:               ((XEiJ.TEST_BIT_2_SHIFT ? w << 31 - 2 >= 0 : (w & 4) == 0) ? mmuReadLongData (t + x, XEiJ.regSRS) :  //プリインデックス
 18651:                mmuReadLongData (t, XEiJ.regSRS) + x)  //ポストインデックス
 18652:               + ((XEiJ.TEST_BIT_1_SHIFT ? w << 31 - 1 >= 0 : (w & 2) == 0) ? 0 :  //ヌルアウタディスプレースメント
 18653:                  (XEiJ.TEST_BIT_0_SHIFT ? w << 31 - 0 >= 0 : (w & 1) == 0) ? mmuReadWordSignExword ((XEiJ.regPC += 2) - 2, XEiJ.regSRS) :  //pcws。ワードアウタディスプレースメント
 18654:                  mmuReadLongExword ((XEiJ.regPC += 4) - 4, XEiJ.regSRS)));  //pcls。ロングアウタディスプレースメント
 18655:     case 0b111_100:  //#<data>
 18656:       if (XEiJ.MPU_COMPOUND_POSTINCREMENT) {
 18657:         return (XEiJ.regPC += 2) - 1;  //下位バイト
 18658:       } else {
 18659:         t = XEiJ.regPC;
 18660:         XEiJ.regPC = t + 2;
 18661:         return t + 1;  //下位バイト
 18662:       }
 18663:     }  //switch
 18664:     M68kException.m6eNumber = M68kException.M6E_ILLEGAL_INSTRUCTION;
 18665:     throw M68kException.m6eSignal;
 18666:   }  //efaAnyByte
 18667: 
 18668:   //a = efaMemByte (ea)  //|  M+-WXZP |
 18669:   //  メモリモードのバイトオペランドの実効アドレスを求める
 18670:   //  efaAnyByteとの違いは#<data>がないこと
 18671:   @SuppressWarnings ("fallthrough") public static int efaMemByte (int ea) throws M68kException {
 18672:     int t, w, x;
 18673:     switch (ea) {
 18674:     case 0b010_000:  //(A0)
 18675:       if (XEiJ.EFA_SEPARATE_AR) {
 18676:         return XEiJ.regRn[ 8];
 18677:       }
 18678:       //fallthrough
 18679:     case 0b010_001:  //(A1)
 18680:       if (XEiJ.EFA_SEPARATE_AR) {
 18681:         return XEiJ.regRn[ 9];
 18682:       }
 18683:       //fallthrough
 18684:     case 0b010_010:  //(A2)
 18685:       if (XEiJ.EFA_SEPARATE_AR) {
 18686:         return XEiJ.regRn[10];
 18687:       }
 18688:       //fallthrough
 18689:     case 0b010_011:  //(A3)
 18690:       if (XEiJ.EFA_SEPARATE_AR) {
 18691:         return XEiJ.regRn[11];
 18692:       }
 18693:       //fallthrough
 18694:     case 0b010_100:  //(A4)
 18695:       if (XEiJ.EFA_SEPARATE_AR) {
 18696:         return XEiJ.regRn[12];
 18697:       }
 18698:       //fallthrough
 18699:     case 0b010_101:  //(A5)
 18700:       if (XEiJ.EFA_SEPARATE_AR) {
 18701:         return XEiJ.regRn[13];
 18702:       }
 18703:       //fallthrough
 18704:     case 0b010_110:  //(A6)
 18705:       if (XEiJ.EFA_SEPARATE_AR) {
 18706:         return XEiJ.regRn[14];
 18707:       }
 18708:       //fallthrough
 18709:     case 0b010_111:  //(A7)
 18710:       if (XEiJ.EFA_SEPARATE_AR) {
 18711:         return XEiJ.regRn[15];
 18712:       } else {
 18713:         return XEiJ.regRn[ea - (0b010_000 - 8)];
 18714:       }
 18715:     case 0b011_000:  //(A0)+
 18716:       if (XEiJ.EFA_SEPARATE_AR) {
 18717:         M68kException.m6eIncremented += 1L << (0 << 3);
 18718:         return XEiJ.regRn[ 8]++;
 18719:       }
 18720:       //fallthrough
 18721:     case 0b011_001:  //(A1)+
 18722:       if (XEiJ.EFA_SEPARATE_AR) {
 18723:         M68kException.m6eIncremented += 1L << (1 << 3);
 18724:         return XEiJ.regRn[ 9]++;
 18725:       }
 18726:       //fallthrough
 18727:     case 0b011_010:  //(A2)+
 18728:       if (XEiJ.EFA_SEPARATE_AR) {
 18729:         M68kException.m6eIncremented += 1L << (2 << 3);
 18730:         return XEiJ.regRn[10]++;
 18731:       }
 18732:       //fallthrough
 18733:     case 0b011_011:  //(A3)+
 18734:       if (XEiJ.EFA_SEPARATE_AR) {
 18735:         M68kException.m6eIncremented += 1L << (3 << 3);
 18736:         return XEiJ.regRn[11]++;
 18737:       }
 18738:       //fallthrough
 18739:     case 0b011_100:  //(A4)+
 18740:       if (XEiJ.EFA_SEPARATE_AR) {
 18741:         M68kException.m6eIncremented += 1L << (4 << 3);
 18742:         return XEiJ.regRn[12]++;
 18743:       }
 18744:       //fallthrough
 18745:     case 0b011_101:  //(A5)+
 18746:       if (XEiJ.EFA_SEPARATE_AR) {
 18747:         M68kException.m6eIncremented += 1L << (5 << 3);
 18748:         return XEiJ.regRn[13]++;
 18749:       }
 18750:       //fallthrough
 18751:     case 0b011_110:  //(A6)+
 18752:       if (XEiJ.EFA_SEPARATE_AR) {
 18753:         M68kException.m6eIncremented += 1L << (6 << 3);
 18754:         return XEiJ.regRn[14]++;
 18755:       } else {
 18756:         M68kException.m6eIncremented += 1L << ((ea & 7) << 3);
 18757:         return XEiJ.regRn[ea - (0b011_000 - 8)]++;
 18758:       }
 18759:     case 0b011_111:  //(A7)+
 18760:       M68kException.m6eIncremented += 2L << (7 << 3);
 18761:       return (XEiJ.regRn[15] += 2) - 2;
 18762:     case 0b100_000:  //-(A0)
 18763:       if (XEiJ.EFA_SEPARATE_AR) {
 18764:         M68kException.m6eIncremented -= 1L << (0 << 3);
 18765:         return --XEiJ.regRn[ 8];
 18766:       }
 18767:       //fallthrough
 18768:     case 0b100_001:  //-(A1)
 18769:       if (XEiJ.EFA_SEPARATE_AR) {
 18770:         M68kException.m6eIncremented -= 1L << (1 << 3);
 18771:         return --XEiJ.regRn[ 9];
 18772:       }
 18773:       //fallthrough
 18774:     case 0b100_010:  //-(A2)
 18775:       if (XEiJ.EFA_SEPARATE_AR) {
 18776:         M68kException.m6eIncremented -= 1L << (2 << 3);
 18777:         return --XEiJ.regRn[10];
 18778:       }
 18779:       //fallthrough
 18780:     case 0b100_011:  //-(A3)
 18781:       if (XEiJ.EFA_SEPARATE_AR) {
 18782:         M68kException.m6eIncremented -= 1L << (3 << 3);
 18783:         return --XEiJ.regRn[11];
 18784:       }
 18785:       //fallthrough
 18786:     case 0b100_100:  //-(A4)
 18787:       if (XEiJ.EFA_SEPARATE_AR) {
 18788:         M68kException.m6eIncremented -= 1L << (4 << 3);
 18789:         return --XEiJ.regRn[12];
 18790:       }
 18791:       //fallthrough
 18792:     case 0b100_101:  //-(A5)
 18793:       if (XEiJ.EFA_SEPARATE_AR) {
 18794:         M68kException.m6eIncremented -= 1L << (5 << 3);
 18795:         return --XEiJ.regRn[13];
 18796:       }
 18797:       //fallthrough
 18798:     case 0b100_110:  //-(A6)
 18799:       if (XEiJ.EFA_SEPARATE_AR) {
 18800:         M68kException.m6eIncremented -= 1L << (6 << 3);
 18801:         return --XEiJ.regRn[14];
 18802:       } else {
 18803:         M68kException.m6eIncremented -= 1L << ((ea & 7) << 3);
 18804:         return --XEiJ.regRn[ea - (0b100_000 - 8)];
 18805:       }
 18806:     case 0b100_111:  //-(A7)
 18807:       M68kException.m6eIncremented -= 2L << (7 << 3);
 18808:       return XEiJ.regRn[15] -= 2;
 18809:     case 0b101_000:  //(d16,A0)
 18810:     case 0b101_001:  //(d16,A1)
 18811:     case 0b101_010:  //(d16,A2)
 18812:     case 0b101_011:  //(d16,A3)
 18813:     case 0b101_100:  //(d16,A4)
 18814:     case 0b101_101:  //(d16,A5)
 18815:     case 0b101_110:  //(d16,A6)
 18816:     case 0b101_111:  //(d16,A7)
 18817:       if (XEiJ.MPU_COMPOUND_POSTINCREMENT) {
 18818:         return (XEiJ.regRn[ea - (0b101_000 - 8)]  //ベースレジスタ
 18819:                 + mmuReadWordSignExword ((XEiJ.regPC += 2) - 2, XEiJ.regSRS));  //pcws。ワードディスプレースメント
 18820:       } else {
 18821:         t = XEiJ.regPC;
 18822:         XEiJ.regPC = t + 2;
 18823:         return (XEiJ.regRn[ea - (0b101_000 - 8)]  //ベースレジスタ
 18824:                 + mmuReadWordSignExword (t, XEiJ.regSRS));  //pcws。ワードディスプレースメント
 18825:       }
 18826:     case 0b110_000:  //(d8,A0,Rn.wl)
 18827:     case 0b110_001:  //(d8,A1,Rn.wl)
 18828:     case 0b110_010:  //(d8,A2,Rn.wl)
 18829:     case 0b110_011:  //(d8,A3,Rn.wl)
 18830:     case 0b110_100:  //(d8,A4,Rn.wl)
 18831:     case 0b110_101:  //(d8,A5,Rn.wl)
 18832:     case 0b110_110:  //(d8,A6,Rn.wl)
 18833:     case 0b110_111:  //(d8,A7,Rn.wl)
 18834:       if (XEiJ.MPU_COMPOUND_POSTINCREMENT) {
 18835:         w = mmuReadWordZeroExword ((XEiJ.regPC += 2) - 2, XEiJ.regSRS);  //pcwz。拡張ワード
 18836:       } else {
 18837:         w = XEiJ.regPC;
 18838:         XEiJ.regPC = w + 2;
 18839:         w = mmuReadWordZeroExword (w, XEiJ.regSRS);  //pcwz。拡張ワード
 18840:       }
 18841:       if (w << 31 - 8 < 0) {  //フルフォーマット
 18842:         XEiJ.mpuCycleCount += w << -2 == 0 ? 1 : 3;  //メモリ間接なし:メモリ間接あり
 18843:       }
 18844:       t = (((~w & 0x0180) == 0 ? 0 :  //ベースレジスタサプレス
 18845:             XEiJ.regRn[ea - (0b110_000 - 8)])  //ベースレジスタ
 18846:            + (w << 31 - 8 >= 0 ? (byte) w :  //バイトディスプレースメント
 18847:               w << 31 - 5 >= 0 ? 0 :  //ヌルベースディスプレースメント
 18848:               w << 31 - 4 >= 0 ? mmuReadWordSignExword ((XEiJ.regPC += 2) - 2, XEiJ.regSRS) :  //pcws。ワードベースディスプレースメント
 18849:               mmuReadLongExword ((XEiJ.regPC += 4) - 4, XEiJ.regSRS)));  //pcls。ロングベースディスプレースメント
 18850:       x = ((~w & 0x0140) == 0 ? 0 :  //インデックスサプレス
 18851:            (w << 31 - 11 >= 0 ? (short) XEiJ.regRn[w >> 12] :  //ワードインデックス
 18852:             XEiJ.regRn[w >> 12])  //ロングインデックス
 18853:            << (w >> 9 & 3));  //スケールファクタ。ワードインデックスのときは符号拡張してから掛ける
 18854:       return ((w & 0x0103) <= 0x0100 ? t + x :  //メモリ間接なし
 18855:               ((XEiJ.TEST_BIT_2_SHIFT ? w << 31 - 2 >= 0 : (w & 4) == 0) ? mmuReadLongData (t + x, XEiJ.regSRS) :  //プリインデックス
 18856:                mmuReadLongData (t, XEiJ.regSRS) + x)  //ポストインデックス
 18857:               + ((XEiJ.TEST_BIT_1_SHIFT ? w << 31 - 1 >= 0 : (w & 2) == 0) ? 0 :  //ヌルアウタディスプレースメント
 18858:                  (XEiJ.TEST_BIT_0_SHIFT ? w << 31 - 0 >= 0 : (w & 1) == 0) ? mmuReadWordSignExword ((XEiJ.regPC += 2) - 2, XEiJ.regSRS) :  //pcws。ワードアウタディスプレースメント
 18859:                  mmuReadLongExword ((XEiJ.regPC += 4) - 4, XEiJ.regSRS)));  //pcls。ロングアウタディスプレースメント
 18860:     case 0b111_000:  //(xxx).W
 18861:       return mmuReadWordSignExword ((XEiJ.regPC += 2) - 2, XEiJ.regSRS);  //pcws
 18862:     case 0b111_001:  //(xxx).L
 18863:       return mmuReadLongExword ((XEiJ.regPC += 4) - 4, XEiJ.regSRS);  //pcls
 18864:     case 0b111_010:  //(d16,PC)
 18865:       t = XEiJ.regPC;
 18866:       XEiJ.regPC = t + 2;
 18867:       return (t  //ベースレジスタ
 18868:               + mmuReadWordSignExword (t, XEiJ.regSRS));  //pcws。ワードディスプレースメント
 18869:     case 0b111_011:  //(d8,PC,Rn.wl)
 18870:       t = XEiJ.regPC;
 18871:       XEiJ.regPC = t + 2;
 18872:       w = mmuReadWordZeroExword (t, XEiJ.regSRS);  //pcwz。拡張ワード
 18873:       if (w << 31 - 8 < 0) {  //フルフォーマット
 18874:         XEiJ.mpuCycleCount += w << -2 == 0 ? 1 : 3;  //メモリ間接なし:メモリ間接あり
 18875:       }
 18876:       t = (((~w & 0x0180) == 0 ? 0 :  //ベースレジスタサプレス
 18877:             t)  //ベースレジスタ
 18878:            + (w << 31 - 8 >= 0 ? (byte) w :  //バイトディスプレースメント
 18879:               w << 31 - 5 >= 0 ? 0 :  //ヌルベースディスプレースメント
 18880:               w << 31 - 4 >= 0 ? mmuReadWordSignExword ((XEiJ.regPC += 2) - 2, XEiJ.regSRS) :  //pcws。ワードベースディスプレースメント
 18881:               mmuReadLongExword ((XEiJ.regPC += 4) - 4, XEiJ.regSRS)));  //pcls。ロングベースディスプレースメント
 18882:       x = ((~w & 0x0140) == 0 ? 0 :  //インデックスサプレス
 18883:            (w << 31 - 11 >= 0 ? (short) XEiJ.regRn[w >> 12] :  //ワードインデックス
 18884:             XEiJ.regRn[w >> 12])  //ロングインデックス
 18885:            << (w >> 9 & 3));  //スケールファクタ。ワードインデックスのときは符号拡張してから掛ける
 18886:       return ((w & 0x0103) <= 0x0100 ? t + x :  //メモリ間接なし
 18887:               ((XEiJ.TEST_BIT_2_SHIFT ? w << 31 - 2 >= 0 : (w & 4) == 0) ? mmuReadLongData (t + x, XEiJ.regSRS) :  //プリインデックス
 18888:                mmuReadLongData (t, XEiJ.regSRS) + x)  //ポストインデックス
 18889:               + ((XEiJ.TEST_BIT_1_SHIFT ? w << 31 - 1 >= 0 : (w & 2) == 0) ? 0 :  //ヌルアウタディスプレースメント
 18890:                  (XEiJ.TEST_BIT_0_SHIFT ? w << 31 - 0 >= 0 : (w & 1) == 0) ? mmuReadWordSignExword ((XEiJ.regPC += 2) - 2, XEiJ.regSRS) :  //pcws。ワードアウタディスプレースメント
 18891:                  mmuReadLongExword ((XEiJ.regPC += 4) - 4, XEiJ.regSRS)));  //pcls。ロングアウタディスプレースメント
 18892:     }  //switch
 18893:     M68kException.m6eNumber = M68kException.M6E_ILLEGAL_INSTRUCTION;
 18894:     throw M68kException.m6eSignal;
 18895:   }  //efaMemByte
 18896: 
 18897:   //a = efaMltByte (ea)  //|  M+-WXZ  |
 18898:   //  メモリ可変モードのバイトオペランドの実効アドレスを求める
 18899:   //  efaMemByteとの違いは(d16,PC)と(d8,PC,Rn.wl)がないこと
 18900:   @SuppressWarnings ("fallthrough") public static int efaMltByte (int ea) throws M68kException {
 18901:     int t, w, x;
 18902:     switch (ea) {
 18903:     case 0b010_000:  //(A0)
 18904:       if (XEiJ.EFA_SEPARATE_AR) {
 18905:         return XEiJ.regRn[ 8];
 18906:       }
 18907:       //fallthrough
 18908:     case 0b010_001:  //(A1)
 18909:       if (XEiJ.EFA_SEPARATE_AR) {
 18910:         return XEiJ.regRn[ 9];
 18911:       }
 18912:       //fallthrough
 18913:     case 0b010_010:  //(A2)
 18914:       if (XEiJ.EFA_SEPARATE_AR) {
 18915:         return XEiJ.regRn[10];
 18916:       }
 18917:       //fallthrough
 18918:     case 0b010_011:  //(A3)
 18919:       if (XEiJ.EFA_SEPARATE_AR) {
 18920:         return XEiJ.regRn[11];
 18921:       }
 18922:       //fallthrough
 18923:     case 0b010_100:  //(A4)
 18924:       if (XEiJ.EFA_SEPARATE_AR) {
 18925:         return XEiJ.regRn[12];
 18926:       }
 18927:       //fallthrough
 18928:     case 0b010_101:  //(A5)
 18929:       if (XEiJ.EFA_SEPARATE_AR) {
 18930:         return XEiJ.regRn[13];
 18931:       }
 18932:       //fallthrough
 18933:     case 0b010_110:  //(A6)
 18934:       if (XEiJ.EFA_SEPARATE_AR) {
 18935:         return XEiJ.regRn[14];
 18936:       }
 18937:       //fallthrough
 18938:     case 0b010_111:  //(A7)
 18939:       if (XEiJ.EFA_SEPARATE_AR) {
 18940:         return XEiJ.regRn[15];
 18941:       } else {
 18942:         return XEiJ.regRn[ea - (0b010_000 - 8)];
 18943:       }
 18944:     case 0b011_000:  //(A0)+
 18945:       if (XEiJ.EFA_SEPARATE_AR) {
 18946:         M68kException.m6eIncremented += 1L << (0 << 3);
 18947:         return XEiJ.regRn[ 8]++;
 18948:       }
 18949:       //fallthrough
 18950:     case 0b011_001:  //(A1)+
 18951:       if (XEiJ.EFA_SEPARATE_AR) {
 18952:         M68kException.m6eIncremented += 1L << (1 << 3);
 18953:         return XEiJ.regRn[ 9]++;
 18954:       }
 18955:       //fallthrough
 18956:     case 0b011_010:  //(A2)+
 18957:       if (XEiJ.EFA_SEPARATE_AR) {
 18958:         M68kException.m6eIncremented += 1L << (2 << 3);
 18959:         return XEiJ.regRn[10]++;
 18960:       }
 18961:       //fallthrough
 18962:     case 0b011_011:  //(A3)+
 18963:       if (XEiJ.EFA_SEPARATE_AR) {
 18964:         M68kException.m6eIncremented += 1L << (3 << 3);
 18965:         return XEiJ.regRn[11]++;
 18966:       }
 18967:       //fallthrough
 18968:     case 0b011_100:  //(A4)+
 18969:       if (XEiJ.EFA_SEPARATE_AR) {
 18970:         M68kException.m6eIncremented += 1L << (4 << 3);
 18971:         return XEiJ.regRn[12]++;
 18972:       }
 18973:       //fallthrough
 18974:     case 0b011_101:  //(A5)+
 18975:       if (XEiJ.EFA_SEPARATE_AR) {
 18976:         M68kException.m6eIncremented += 1L << (5 << 3);
 18977:         return XEiJ.regRn[13]++;
 18978:       }
 18979:       //fallthrough
 18980:     case 0b011_110:  //(A6)+
 18981:       if (XEiJ.EFA_SEPARATE_AR) {
 18982:         M68kException.m6eIncremented += 1L << (6 << 3);
 18983:         return XEiJ.regRn[14]++;
 18984:       } else {
 18985:         M68kException.m6eIncremented += 1L << ((ea & 7) << 3);
 18986:         return XEiJ.regRn[ea - (0b011_000 - 8)]++;
 18987:       }
 18988:     case 0b011_111:  //(A7)+
 18989:       M68kException.m6eIncremented += 2L << (7 << 3);
 18990:       return (XEiJ.regRn[15] += 2) - 2;
 18991:     case 0b100_000:  //-(A0)
 18992:       if (XEiJ.EFA_SEPARATE_AR) {
 18993:         M68kException.m6eIncremented -= 1L << (0 << 3);
 18994:         return --XEiJ.regRn[ 8];
 18995:       }
 18996:       //fallthrough
 18997:     case 0b100_001:  //-(A1)
 18998:       if (XEiJ.EFA_SEPARATE_AR) {
 18999:         M68kException.m6eIncremented -= 1L << (1 << 3);
 19000:         return --XEiJ.regRn[ 9];
 19001:       }
 19002:       //fallthrough
 19003:     case 0b100_010:  //-(A2)
 19004:       if (XEiJ.EFA_SEPARATE_AR) {
 19005:         M68kException.m6eIncremented -= 1L << (2 << 3);
 19006:         return --XEiJ.regRn[10];
 19007:       }
 19008:       //fallthrough
 19009:     case 0b100_011:  //-(A3)
 19010:       if (XEiJ.EFA_SEPARATE_AR) {
 19011:         M68kException.m6eIncremented -= 1L << (3 << 3);
 19012:         return --XEiJ.regRn[11];
 19013:       }
 19014:       //fallthrough
 19015:     case 0b100_100:  //-(A4)
 19016:       if (XEiJ.EFA_SEPARATE_AR) {
 19017:         M68kException.m6eIncremented -= 1L << (4 << 3);
 19018:         return --XEiJ.regRn[12];
 19019:       }
 19020:       //fallthrough
 19021:     case 0b100_101:  //-(A5)
 19022:       if (XEiJ.EFA_SEPARATE_AR) {
 19023:         M68kException.m6eIncremented -= 1L << (5 << 3);
 19024:         return --XEiJ.regRn[13];
 19025:       }
 19026:       //fallthrough
 19027:     case 0b100_110:  //-(A6)
 19028:       if (XEiJ.EFA_SEPARATE_AR) {
 19029:         M68kException.m6eIncremented -= 1L << (6 << 3);
 19030:         return --XEiJ.regRn[14];
 19031:       } else {
 19032:         M68kException.m6eIncremented -= 1L << ((ea & 7) << 3);
 19033:         return --XEiJ.regRn[ea - (0b100_000 - 8)];
 19034:       }
 19035:     case 0b100_111:  //-(A7)
 19036:       M68kException.m6eIncremented -= 2L << (7 << 3);
 19037:       return XEiJ.regRn[15] -= 2;
 19038:     case 0b101_000:  //(d16,A0)
 19039:     case 0b101_001:  //(d16,A1)
 19040:     case 0b101_010:  //(d16,A2)
 19041:     case 0b101_011:  //(d16,A3)
 19042:     case 0b101_100:  //(d16,A4)
 19043:     case 0b101_101:  //(d16,A5)
 19044:     case 0b101_110:  //(d16,A6)
 19045:     case 0b101_111:  //(d16,A7)
 19046:       if (XEiJ.MPU_COMPOUND_POSTINCREMENT) {
 19047:         return (XEiJ.regRn[ea - (0b101_000 - 8)]  //ベースレジスタ
 19048:                 + mmuReadWordSignExword ((XEiJ.regPC += 2) - 2, XEiJ.regSRS));  //pcws。ワードディスプレースメント
 19049:       } else {
 19050:         t = XEiJ.regPC;
 19051:         XEiJ.regPC = t + 2;
 19052:         return (XEiJ.regRn[ea - (0b101_000 - 8)]  //ベースレジスタ
 19053:                 + mmuReadWordSignExword (t, XEiJ.regSRS));  //pcws。ワードディスプレースメント
 19054:       }
 19055:     case 0b110_000:  //(d8,A0,Rn.wl)
 19056:     case 0b110_001:  //(d8,A1,Rn.wl)
 19057:     case 0b110_010:  //(d8,A2,Rn.wl)
 19058:     case 0b110_011:  //(d8,A3,Rn.wl)
 19059:     case 0b110_100:  //(d8,A4,Rn.wl)
 19060:     case 0b110_101:  //(d8,A5,Rn.wl)
 19061:     case 0b110_110:  //(d8,A6,Rn.wl)
 19062:     case 0b110_111:  //(d8,A7,Rn.wl)
 19063:       if (XEiJ.MPU_COMPOUND_POSTINCREMENT) {
 19064:         w = mmuReadWordZeroExword ((XEiJ.regPC += 2) - 2, XEiJ.regSRS);  //pcwz。拡張ワード
 19065:       } else {
 19066:         w = XEiJ.regPC;
 19067:         XEiJ.regPC = w + 2;
 19068:         w = mmuReadWordZeroExword (w, XEiJ.regSRS);  //pcwz。拡張ワード
 19069:       }
 19070:       if (w << 31 - 8 < 0) {  //フルフォーマット
 19071:         XEiJ.mpuCycleCount += w << -2 == 0 ? 1 : 3;  //メモリ間接なし:メモリ間接あり
 19072:       }
 19073:       t = (((~w & 0x0180) == 0 ? 0 :  //ベースレジスタサプレス
 19074:             XEiJ.regRn[ea - (0b110_000 - 8)])  //ベースレジスタ
 19075:            + (w << 31 - 8 >= 0 ? (byte) w :  //バイトディスプレースメント
 19076:               w << 31 - 5 >= 0 ? 0 :  //ヌルベースディスプレースメント
 19077:               w << 31 - 4 >= 0 ? mmuReadWordSignExword ((XEiJ.regPC += 2) - 2, XEiJ.regSRS) :  //pcws。ワードベースディスプレースメント
 19078:               mmuReadLongExword ((XEiJ.regPC += 4) - 4, XEiJ.regSRS)));  //pcls。ロングベースディスプレースメント
 19079:       x = ((~w & 0x0140) == 0 ? 0 :  //インデックスサプレス
 19080:            (w << 31 - 11 >= 0 ? (short) XEiJ.regRn[w >> 12] :  //ワードインデックス
 19081:             XEiJ.regRn[w >> 12])  //ロングインデックス
 19082:            << (w >> 9 & 3));  //スケールファクタ。ワードインデックスのときは符号拡張してから掛ける
 19083:       return ((w & 0x0103) <= 0x0100 ? t + x :  //メモリ間接なし
 19084:               ((XEiJ.TEST_BIT_2_SHIFT ? w << 31 - 2 >= 0 : (w & 4) == 0) ? mmuReadLongData (t + x, XEiJ.regSRS) :  //プリインデックス
 19085:                mmuReadLongData (t, XEiJ.regSRS) + x)  //ポストインデックス
 19086:               + ((XEiJ.TEST_BIT_1_SHIFT ? w << 31 - 1 >= 0 : (w & 2) == 0) ? 0 :  //ヌルアウタディスプレースメント
 19087:                  (XEiJ.TEST_BIT_0_SHIFT ? w << 31 - 0 >= 0 : (w & 1) == 0) ? mmuReadWordSignExword ((XEiJ.regPC += 2) - 2, XEiJ.regSRS) :  //pcws。ワードアウタディスプレースメント
 19088:                  mmuReadLongExword ((XEiJ.regPC += 4) - 4, XEiJ.regSRS)));  //pcls。ロングアウタディスプレースメント
 19089:     case 0b111_000:  //(xxx).W
 19090:       return mmuReadWordSignExword ((XEiJ.regPC += 2) - 2, XEiJ.regSRS);  //pcws
 19091:     case 0b111_001:  //(xxx).L
 19092:       return mmuReadLongExword ((XEiJ.regPC += 4) - 4, XEiJ.regSRS);  //pcls
 19093:     }  //switch
 19094:     M68kException.m6eNumber = M68kException.M6E_ILLEGAL_INSTRUCTION;
 19095:     throw M68kException.m6eSignal;
 19096:   }  //efaMltByte
 19097: 
 19098:   //a = efaCntByte (ea)  //|  M  WXZP |
 19099:   //  制御モードのロングオペランドの実効アドレスを求める
 19100:   //  efaMemByteとの違いは(Ar)+と-(Ar)がないこと
 19101:   @SuppressWarnings ("fallthrough") public static int efaCntByte (int ea) throws M68kException {
 19102:     int t, w, x;
 19103:     switch (ea) {
 19104:     case 0b010_000:  //(A0)
 19105:       if (XEiJ.EFA_SEPARATE_AR) {
 19106:         return XEiJ.regRn[ 8];
 19107:       }
 19108:       //fallthrough
 19109:     case 0b010_001:  //(A1)
 19110:       if (XEiJ.EFA_SEPARATE_AR) {
 19111:         return XEiJ.regRn[ 9];
 19112:       }
 19113:       //fallthrough
 19114:     case 0b010_010:  //(A2)
 19115:       if (XEiJ.EFA_SEPARATE_AR) {
 19116:         return XEiJ.regRn[10];
 19117:       }
 19118:       //fallthrough
 19119:     case 0b010_011:  //(A3)
 19120:       if (XEiJ.EFA_SEPARATE_AR) {
 19121:         return XEiJ.regRn[11];
 19122:       }
 19123:       //fallthrough
 19124:     case 0b010_100:  //(A4)
 19125:       if (XEiJ.EFA_SEPARATE_AR) {
 19126:         return XEiJ.regRn[12];
 19127:       }
 19128:       //fallthrough
 19129:     case 0b010_101:  //(A5)
 19130:       if (XEiJ.EFA_SEPARATE_AR) {
 19131:         return XEiJ.regRn[13];
 19132:       }
 19133:       //fallthrough
 19134:     case 0b010_110:  //(A6)
 19135:       if (XEiJ.EFA_SEPARATE_AR) {
 19136:         return XEiJ.regRn[14];
 19137:       }
 19138:       //fallthrough
 19139:     case 0b010_111:  //(A7)
 19140:       if (XEiJ.EFA_SEPARATE_AR) {
 19141:         return XEiJ.regRn[15];
 19142:       } else {
 19143:         return XEiJ.regRn[ea - (0b010_000 - 8)];
 19144:       }
 19145:     case 0b101_000:  //(d16,A0)
 19146:     case 0b101_001:  //(d16,A1)
 19147:     case 0b101_010:  //(d16,A2)
 19148:     case 0b101_011:  //(d16,A3)
 19149:     case 0b101_100:  //(d16,A4)
 19150:     case 0b101_101:  //(d16,A5)
 19151:     case 0b101_110:  //(d16,A6)
 19152:     case 0b101_111:  //(d16,A7)
 19153:       if (XEiJ.MPU_COMPOUND_POSTINCREMENT) {
 19154:         return (XEiJ.regRn[ea - (0b101_000 - 8)]  //ベースレジスタ
 19155:                 + mmuReadWordSignExword ((XEiJ.regPC += 2) - 2, XEiJ.regSRS));  //pcws。ワードディスプレースメント
 19156:       } else {
 19157:         t = XEiJ.regPC;
 19158:         XEiJ.regPC = t + 2;
 19159:         return (XEiJ.regRn[ea - (0b101_000 - 8)]  //ベースレジスタ
 19160:                 + mmuReadWordSignExword (t, XEiJ.regSRS));  //pcws。ワードディスプレースメント
 19161:       }
 19162:     case 0b110_000:  //(d8,A0,Rn.wl)
 19163:     case 0b110_001:  //(d8,A1,Rn.wl)
 19164:     case 0b110_010:  //(d8,A2,Rn.wl)
 19165:     case 0b110_011:  //(d8,A3,Rn.wl)
 19166:     case 0b110_100:  //(d8,A4,Rn.wl)
 19167:     case 0b110_101:  //(d8,A5,Rn.wl)
 19168:     case 0b110_110:  //(d8,A6,Rn.wl)
 19169:     case 0b110_111:  //(d8,A7,Rn.wl)
 19170:       if (XEiJ.MPU_COMPOUND_POSTINCREMENT) {
 19171:         w = mmuReadWordZeroExword ((XEiJ.regPC += 2) - 2, XEiJ.regSRS);  //pcwz。拡張ワード
 19172:       } else {
 19173:         w = XEiJ.regPC;
 19174:         XEiJ.regPC = w + 2;
 19175:         w = mmuReadWordZeroExword (w, XEiJ.regSRS);  //pcwz。拡張ワード
 19176:       }
 19177:       if (w << 31 - 8 < 0) {  //フルフォーマット
 19178:         XEiJ.mpuCycleCount += w << -2 == 0 ? 1 : 3;  //メモリ間接なし:メモリ間接あり
 19179:       }
 19180:       t = (((~w & 0x0180) == 0 ? 0 :  //ベースレジスタサプレス
 19181:             XEiJ.regRn[ea - (0b110_000 - 8)])  //ベースレジスタ
 19182:            + (w << 31 - 8 >= 0 ? (byte) w :  //バイトディスプレースメント
 19183:               w << 31 - 5 >= 0 ? 0 :  //ヌルベースディスプレースメント
 19184:               w << 31 - 4 >= 0 ? mmuReadWordSignExword ((XEiJ.regPC += 2) - 2, XEiJ.regSRS) :  //pcws。ワードベースディスプレースメント
 19185:               mmuReadLongExword ((XEiJ.regPC += 4) - 4, XEiJ.regSRS)));  //pcls。ロングベースディスプレースメント
 19186:       x = ((~w & 0x0140) == 0 ? 0 :  //インデックスサプレス
 19187:            (w << 31 - 11 >= 0 ? (short) XEiJ.regRn[w >> 12] :  //ワードインデックス
 19188:             XEiJ.regRn[w >> 12])  //ロングインデックス
 19189:            << (w >> 9 & 3));  //スケールファクタ。ワードインデックスのときは符号拡張してから掛ける
 19190:       return ((w & 0x0103) <= 0x0100 ? t + x :  //メモリ間接なし
 19191:               ((XEiJ.TEST_BIT_2_SHIFT ? w << 31 - 2 >= 0 : (w & 4) == 0) ? mmuReadLongData (t + x, XEiJ.regSRS) :  //プリインデックス
 19192:                mmuReadLongData (t, XEiJ.regSRS) + x)  //ポストインデックス
 19193:               + ((XEiJ.TEST_BIT_1_SHIFT ? w << 31 - 1 >= 0 : (w & 2) == 0) ? 0 :  //ヌルアウタディスプレースメント
 19194:                  (XEiJ.TEST_BIT_0_SHIFT ? w << 31 - 0 >= 0 : (w & 1) == 0) ? mmuReadWordSignExword ((XEiJ.regPC += 2) - 2, XEiJ.regSRS) :  //pcws。ワードアウタディスプレースメント
 19195:                  mmuReadLongExword ((XEiJ.regPC += 4) - 4, XEiJ.regSRS)));  //pcls。ロングアウタディスプレースメント
 19196:     case 0b111_000:  //(xxx).W
 19197:       return mmuReadWordSignExword ((XEiJ.regPC += 2) - 2, XEiJ.regSRS);  //pcws
 19198:     case 0b111_001:  //(xxx).L
 19199:       return mmuReadLongExword ((XEiJ.regPC += 4) - 4, XEiJ.regSRS);  //pcls
 19200:     case 0b111_010:  //(d16,PC)
 19201:       t = XEiJ.regPC;
 19202:       XEiJ.regPC = t + 2;
 19203:       return (t  //ベースレジスタ
 19204:               + mmuReadWordSignExword (t, XEiJ.regSRS));  //pcws。ワードディスプレースメント
 19205:     case 0b111_011:  //(d8,PC,Rn.wl)
 19206:       t = XEiJ.regPC;
 19207:       XEiJ.regPC = t + 2;
 19208:       w = mmuReadWordZeroExword (t, XEiJ.regSRS);  //pcwz。拡張ワード
 19209:       if (w << 31 - 8 < 0) {  //フルフォーマット
 19210:         XEiJ.mpuCycleCount += w << -2 == 0 ? 1 : 3;  //メモリ間接なし:メモリ間接あり
 19211:       }
 19212:       t = (((~w & 0x0180) == 0 ? 0 :  //ベースレジスタサプレス
 19213:             t)  //ベースレジスタ
 19214:            + (w << 31 - 8 >= 0 ? (byte) w :  //バイトディスプレースメント
 19215:               w << 31 - 5 >= 0 ? 0 :  //ヌルベースディスプレースメント
 19216:               w << 31 - 4 >= 0 ? mmuReadWordSignExword ((XEiJ.regPC += 2) - 2, XEiJ.regSRS) :  //pcws。ワードベースディスプレースメント
 19217:               mmuReadLongExword ((XEiJ.regPC += 4) - 4, XEiJ.regSRS)));  //pcls。ロングベースディスプレースメント
 19218:       x = ((~w & 0x0140) == 0 ? 0 :  //インデックスサプレス
 19219:            (w << 31 - 11 >= 0 ? (short) XEiJ.regRn[w >> 12] :  //ワードインデックス
 19220:             XEiJ.regRn[w >> 12])  //ロングインデックス
 19221:            << (w >> 9 & 3));  //スケールファクタ。ワードインデックスのときは符号拡張してから掛ける
 19222:       return ((w & 0x0103) <= 0x0100 ? t + x :  //メモリ間接なし
 19223:               ((XEiJ.TEST_BIT_2_SHIFT ? w << 31 - 2 >= 0 : (w & 4) == 0) ? mmuReadLongData (t + x, XEiJ.regSRS) :  //プリインデックス
 19224:                mmuReadLongData (t, XEiJ.regSRS) + x)  //ポストインデックス
 19225:               + ((XEiJ.TEST_BIT_1_SHIFT ? w << 31 - 1 >= 0 : (w & 2) == 0) ? 0 :  //ヌルアウタディスプレースメント
 19226:                  (XEiJ.TEST_BIT_0_SHIFT ? w << 31 - 0 >= 0 : (w & 1) == 0) ? mmuReadWordSignExword ((XEiJ.regPC += 2) - 2, XEiJ.regSRS) :  //pcws。ワードアウタディスプレースメント
 19227:                  mmuReadLongExword ((XEiJ.regPC += 4) - 4, XEiJ.regSRS)));  //pcls。ロングアウタディスプレースメント
 19228:     }  //switch
 19229:     M68kException.m6eNumber = M68kException.M6E_ILLEGAL_INSTRUCTION;
 19230:     throw M68kException.m6eSignal;
 19231:   }  //efaCntByte
 19232: 
 19233:   //a = efaAnyWord (ea)  //|  M+-WXZPI|
 19234:   //  任意のモードのワードオペランドの実効アドレスを求める
 19235:   //  efaAnyByteとの違いは(Ar)+と-(Ar)がArを2変化させることと、(A7)+と-(A7)と#<data>の特別な動作がないこと
 19236:   @SuppressWarnings ("fallthrough") public static int efaAnyWord (int ea) throws M68kException {
 19237:     int t, w, x;
 19238:     switch (ea) {
 19239:     case 0b010_000:  //(A0)
 19240:       if (XEiJ.EFA_SEPARATE_AR) {
 19241:         return XEiJ.regRn[ 8];
 19242:       }
 19243:       //fallthrough
 19244:     case 0b010_001:  //(A1)
 19245:       if (XEiJ.EFA_SEPARATE_AR) {
 19246:         return XEiJ.regRn[ 9];
 19247:       }
 19248:       //fallthrough
 19249:     case 0b010_010:  //(A2)
 19250:       if (XEiJ.EFA_SEPARATE_AR) {
 19251:         return XEiJ.regRn[10];
 19252:       }
 19253:       //fallthrough
 19254:     case 0b010_011:  //(A3)
 19255:       if (XEiJ.EFA_SEPARATE_AR) {
 19256:         return XEiJ.regRn[11];
 19257:       }
 19258:       //fallthrough
 19259:     case 0b010_100:  //(A4)
 19260:       if (XEiJ.EFA_SEPARATE_AR) {
 19261:         return XEiJ.regRn[12];
 19262:       }
 19263:       //fallthrough
 19264:     case 0b010_101:  //(A5)
 19265:       if (XEiJ.EFA_SEPARATE_AR) {
 19266:         return XEiJ.regRn[13];
 19267:       }
 19268:       //fallthrough
 19269:     case 0b010_110:  //(A6)
 19270:       if (XEiJ.EFA_SEPARATE_AR) {
 19271:         return XEiJ.regRn[14];
 19272:       }
 19273:       //fallthrough
 19274:     case 0b010_111:  //(A7)
 19275:       if (XEiJ.EFA_SEPARATE_AR) {
 19276:         return XEiJ.regRn[15];
 19277:       } else {
 19278:         return XEiJ.regRn[ea - (0b010_000 - 8)];
 19279:       }
 19280:     case 0b011_000:  //(A0)+
 19281:       if (XEiJ.EFA_SEPARATE_AR) {
 19282:         M68kException.m6eIncremented += 2L << (0 << 3);
 19283:         return (XEiJ.regRn[ 8] += 2) - 2;
 19284:       }
 19285:       //fallthrough
 19286:     case 0b011_001:  //(A1)+
 19287:       if (XEiJ.EFA_SEPARATE_AR) {
 19288:         M68kException.m6eIncremented += 2L << (1 << 3);
 19289:         return (XEiJ.regRn[ 9] += 2) - 2;
 19290:       }
 19291:       //fallthrough
 19292:     case 0b011_010:  //(A2)+
 19293:       if (XEiJ.EFA_SEPARATE_AR) {
 19294:         M68kException.m6eIncremented += 2L << (2 << 3);
 19295:         return (XEiJ.regRn[10] += 2) - 2;
 19296:       }
 19297:       //fallthrough
 19298:     case 0b011_011:  //(A3)+
 19299:       if (XEiJ.EFA_SEPARATE_AR) {
 19300:         M68kException.m6eIncremented += 2L << (3 << 3);
 19301:         return (XEiJ.regRn[11] += 2) - 2;
 19302:       }
 19303:       //fallthrough
 19304:     case 0b011_100:  //(A4)+
 19305:       if (XEiJ.EFA_SEPARATE_AR) {
 19306:         M68kException.m6eIncremented += 2L << (4 << 3);
 19307:         return (XEiJ.regRn[12] += 2) - 2;
 19308:       }
 19309:       //fallthrough
 19310:     case 0b011_101:  //(A5)+
 19311:       if (XEiJ.EFA_SEPARATE_AR) {
 19312:         M68kException.m6eIncremented += 2L << (5 << 3);
 19313:         return (XEiJ.regRn[13] += 2) - 2;
 19314:       }
 19315:       //fallthrough
 19316:     case 0b011_110:  //(A6)+
 19317:       if (XEiJ.EFA_SEPARATE_AR) {
 19318:         M68kException.m6eIncremented += 2L << (6 << 3);
 19319:         return (XEiJ.regRn[14] += 2) - 2;
 19320:       }
 19321:       //fallthrough
 19322:     case 0b011_111:  //(A7)+
 19323:       if (XEiJ.EFA_SEPARATE_AR) {
 19324:         M68kException.m6eIncremented += 2L << (7 << 3);
 19325:         return (XEiJ.regRn[15] += 2) - 2;
 19326:       } else {
 19327:         M68kException.m6eIncremented += 2L << ((ea & 7) << 3);
 19328:         return (XEiJ.regRn[ea - (0b011_000 - 8)] += 2) - 2;
 19329:       }
 19330:     case 0b100_000:  //-(A0)
 19331:       if (XEiJ.EFA_SEPARATE_AR) {
 19332:         M68kException.m6eIncremented -= 2L << (0 << 3);
 19333:         return XEiJ.regRn[ 8] -= 2;
 19334:       }
 19335:       //fallthrough
 19336:     case 0b100_001:  //-(A1)
 19337:       if (XEiJ.EFA_SEPARATE_AR) {
 19338:         M68kException.m6eIncremented -= 2L << (1 << 3);
 19339:         return XEiJ.regRn[ 9] -= 2;
 19340:       }
 19341:       //fallthrough
 19342:     case 0b100_010:  //-(A2)
 19343:       if (XEiJ.EFA_SEPARATE_AR) {
 19344:         M68kException.m6eIncremented -= 2L << (2 << 3);
 19345:         return XEiJ.regRn[10] -= 2;
 19346:       }
 19347:       //fallthrough
 19348:     case 0b100_011:  //-(A3)
 19349:       if (XEiJ.EFA_SEPARATE_AR) {
 19350:         M68kException.m6eIncremented -= 2L << (3 << 3);
 19351:         return XEiJ.regRn[11] -= 2;
 19352:       }
 19353:       //fallthrough
 19354:     case 0b100_100:  //-(A4)
 19355:       if (XEiJ.EFA_SEPARATE_AR) {
 19356:         M68kException.m6eIncremented -= 2L << (4 << 3);
 19357:         return XEiJ.regRn[12] -= 2;
 19358:       }
 19359:       //fallthrough
 19360:     case 0b100_101:  //-(A5)
 19361:       if (XEiJ.EFA_SEPARATE_AR) {
 19362:         M68kException.m6eIncremented -= 2L << (5 << 3);
 19363:         return XEiJ.regRn[13] -= 2;
 19364:       }
 19365:       //fallthrough
 19366:     case 0b100_110:  //-(A6)
 19367:       if (XEiJ.EFA_SEPARATE_AR) {
 19368:         M68kException.m6eIncremented -= 2L << (6 << 3);
 19369:         return XEiJ.regRn[14] -= 2;
 19370:       }
 19371:       //fallthrough
 19372:     case 0b100_111:  //-(A7)
 19373:       if (XEiJ.EFA_SEPARATE_AR) {
 19374:         M68kException.m6eIncremented -= 2L << (7 << 3);
 19375:         return XEiJ.regRn[15] -= 2;
 19376:       } else {
 19377:         M68kException.m6eIncremented -= 2L << ((ea & 7) << 3);
 19378:         return XEiJ.regRn[ea - (0b100_000 - 8)] -= 2;
 19379:       }
 19380:     case 0b101_000:  //(d16,A0)
 19381:     case 0b101_001:  //(d16,A1)
 19382:     case 0b101_010:  //(d16,A2)
 19383:     case 0b101_011:  //(d16,A3)
 19384:     case 0b101_100:  //(d16,A4)
 19385:     case 0b101_101:  //(d16,A5)
 19386:     case 0b101_110:  //(d16,A6)
 19387:     case 0b101_111:  //(d16,A7)
 19388:       if (XEiJ.MPU_COMPOUND_POSTINCREMENT) {
 19389:         return (XEiJ.regRn[ea - (0b101_000 - 8)]  //ベースレジスタ
 19390:                 + mmuReadWordSignExword ((XEiJ.regPC += 2) - 2, XEiJ.regSRS));  //pcws。ワードディスプレースメント
 19391:       } else {
 19392:         t = XEiJ.regPC;
 19393:         XEiJ.regPC = t + 2;
 19394:         return (XEiJ.regRn[ea - (0b101_000 - 8)]  //ベースレジスタ
 19395:                 + mmuReadWordSignExword (t, XEiJ.regSRS));  //pcws。ワードディスプレースメント
 19396:       }
 19397:     case 0b110_000:  //(d8,A0,Rn.wl)
 19398:     case 0b110_001:  //(d8,A1,Rn.wl)
 19399:     case 0b110_010:  //(d8,A2,Rn.wl)
 19400:     case 0b110_011:  //(d8,A3,Rn.wl)
 19401:     case 0b110_100:  //(d8,A4,Rn.wl)
 19402:     case 0b110_101:  //(d8,A5,Rn.wl)
 19403:     case 0b110_110:  //(d8,A6,Rn.wl)
 19404:     case 0b110_111:  //(d8,A7,Rn.wl)
 19405:       if (XEiJ.MPU_COMPOUND_POSTINCREMENT) {
 19406:         w = mmuReadWordZeroExword ((XEiJ.regPC += 2) - 2, XEiJ.regSRS);  //pcwz。拡張ワード
 19407:       } else {
 19408:         w = XEiJ.regPC;
 19409:         XEiJ.regPC = w + 2;
 19410:         w = mmuReadWordZeroExword (w, XEiJ.regSRS);  //pcwz。拡張ワード
 19411:       }
 19412:       if (w << 31 - 8 < 0) {  //フルフォーマット
 19413:         XEiJ.mpuCycleCount += w << -2 == 0 ? 1 : 3;  //メモリ間接なし:メモリ間接あり
 19414:       }
 19415:       t = (((~w & 0x0180) == 0 ? 0 :  //ベースレジスタサプレス
 19416:             XEiJ.regRn[ea - (0b110_000 - 8)])  //ベースレジスタ
 19417:            + (w << 31 - 8 >= 0 ? (byte) w :  //バイトディスプレースメント
 19418:               w << 31 - 5 >= 0 ? 0 :  //ヌルベースディスプレースメント
 19419:               w << 31 - 4 >= 0 ? mmuReadWordSignExword ((XEiJ.regPC += 2) - 2, XEiJ.regSRS) :  //pcws。ワードベースディスプレースメント
 19420:               mmuReadLongExword ((XEiJ.regPC += 4) - 4, XEiJ.regSRS)));  //pcls。ロングベースディスプレースメント
 19421:       x = ((~w & 0x0140) == 0 ? 0 :  //インデックスサプレス
 19422:            (w << 31 - 11 >= 0 ? (short) XEiJ.regRn[w >> 12] :  //ワードインデックス
 19423:             XEiJ.regRn[w >> 12])  //ロングインデックス
 19424:            << (w >> 9 & 3));  //スケールファクタ。ワードインデックスのときは符号拡張してから掛ける
 19425:       return ((w & 0x0103) <= 0x0100 ? t + x :  //メモリ間接なし
 19426:               ((XEiJ.TEST_BIT_2_SHIFT ? w << 31 - 2 >= 0 : (w & 4) == 0) ? mmuReadLongData (t + x, XEiJ.regSRS) :  //プリインデックス
 19427:                mmuReadLongData (t, XEiJ.regSRS) + x)  //ポストインデックス
 19428:               + ((XEiJ.TEST_BIT_1_SHIFT ? w << 31 - 1 >= 0 : (w & 2) == 0) ? 0 :  //ヌルアウタディスプレースメント
 19429:                  (XEiJ.TEST_BIT_0_SHIFT ? w << 31 - 0 >= 0 : (w & 1) == 0) ? mmuReadWordSignExword ((XEiJ.regPC += 2) - 2, XEiJ.regSRS) :  //pcws。ワードアウタディスプレースメント
 19430:                  mmuReadLongExword ((XEiJ.regPC += 4) - 4, XEiJ.regSRS)));  //pcls。ロングアウタディスプレースメント
 19431:     case 0b111_000:  //(xxx).W
 19432:       return mmuReadWordSignExword ((XEiJ.regPC += 2) - 2, XEiJ.regSRS);  //pcws
 19433:     case 0b111_001:  //(xxx).L
 19434:       return mmuReadLongExword ((XEiJ.regPC += 4) - 4, XEiJ.regSRS);  //pcls
 19435:     case 0b111_010:  //(d16,PC)
 19436:       t = XEiJ.regPC;
 19437:       XEiJ.regPC = t + 2;
 19438:       return (t  //ベースレジスタ
 19439:               + mmuReadWordSignExword (t, XEiJ.regSRS));  //pcws。ワードディスプレースメント
 19440:     case 0b111_011:  //(d8,PC,Rn.wl)
 19441:       t = XEiJ.regPC;
 19442:       XEiJ.regPC = t + 2;
 19443:       w = mmuReadWordZeroExword (t, XEiJ.regSRS);  //pcwz。拡張ワード
 19444:       if (w << 31 - 8 < 0) {  //フルフォーマット
 19445:         XEiJ.mpuCycleCount += w << -2 == 0 ? 1 : 3;  //メモリ間接なし:メモリ間接あり
 19446:       }
 19447:       t = (((~w & 0x0180) == 0 ? 0 :  //ベースレジスタサプレス
 19448:             t)  //ベースレジスタ
 19449:            + (w << 31 - 8 >= 0 ? (byte) w :  //バイトディスプレースメント
 19450:               w << 31 - 5 >= 0 ? 0 :  //ヌルベースディスプレースメント
 19451:               w << 31 - 4 >= 0 ? mmuReadWordSignExword ((XEiJ.regPC += 2) - 2, XEiJ.regSRS) :  //pcws。ワードベースディスプレースメント
 19452:               mmuReadLongExword ((XEiJ.regPC += 4) - 4, XEiJ.regSRS)));  //pcls。ロングベースディスプレースメント
 19453:       x = ((~w & 0x0140) == 0 ? 0 :  //インデックスサプレス
 19454:            (w << 31 - 11 >= 0 ? (short) XEiJ.regRn[w >> 12] :  //ワードインデックス
 19455:             XEiJ.regRn[w >> 12])  //ロングインデックス
 19456:            << (w >> 9 & 3));  //スケールファクタ。ワードインデックスのときは符号拡張してから掛ける
 19457:       return ((w & 0x0103) <= 0x0100 ? t + x :  //メモリ間接なし
 19458:               ((XEiJ.TEST_BIT_2_SHIFT ? w << 31 - 2 >= 0 : (w & 4) == 0) ? mmuReadLongData (t + x, XEiJ.regSRS) :  //プリインデックス
 19459:                mmuReadLongData (t, XEiJ.regSRS) + x)  //ポストインデックス
 19460:               + ((XEiJ.TEST_BIT_1_SHIFT ? w << 31 - 1 >= 0 : (w & 2) == 0) ? 0 :  //ヌルアウタディスプレースメント
 19461:                  (XEiJ.TEST_BIT_0_SHIFT ? w << 31 - 0 >= 0 : (w & 1) == 0) ? mmuReadWordSignExword ((XEiJ.regPC += 2) - 2, XEiJ.regSRS) :  //pcws。ワードアウタディスプレースメント
 19462:                  mmuReadLongExword ((XEiJ.regPC += 4) - 4, XEiJ.regSRS)));  //pcls。ロングアウタディスプレースメント
 19463:     case 0b111_100:  //#<data>
 19464:       if (XEiJ.MPU_COMPOUND_POSTINCREMENT) {
 19465:         return (XEiJ.regPC += 2) - 2;
 19466:       } else {
 19467:         t = XEiJ.regPC;
 19468:         XEiJ.regPC = t + 2;
 19469:         return t;
 19470:       }
 19471:     }  //switch
 19472:     M68kException.m6eNumber = M68kException.M6E_ILLEGAL_INSTRUCTION;
 19473:     throw M68kException.m6eSignal;
 19474:   }  //efaAnyWord
 19475: 
 19476:   //a = efaMemWord (ea)  //|  M+-WXZP |
 19477:   //  メモリモードのワードオペランドの実効アドレスを求める
 19478:   //  efaAnyWordとの違いは#<data>がないこと
 19479:   @SuppressWarnings ("fallthrough") public static int efaMemWord (int ea) throws M68kException {
 19480:     int t, w, x;
 19481:     switch (ea) {
 19482:     case 0b010_000:  //(A0)
 19483:       if (XEiJ.EFA_SEPARATE_AR) {
 19484:         return XEiJ.regRn[ 8];
 19485:       }
 19486:       //fallthrough
 19487:     case 0b010_001:  //(A1)
 19488:       if (XEiJ.EFA_SEPARATE_AR) {
 19489:         return XEiJ.regRn[ 9];
 19490:       }
 19491:       //fallthrough
 19492:     case 0b010_010:  //(A2)
 19493:       if (XEiJ.EFA_SEPARATE_AR) {
 19494:         return XEiJ.regRn[10];
 19495:       }
 19496:       //fallthrough
 19497:     case 0b010_011:  //(A3)
 19498:       if (XEiJ.EFA_SEPARATE_AR) {
 19499:         return XEiJ.regRn[11];
 19500:       }
 19501:       //fallthrough
 19502:     case 0b010_100:  //(A4)
 19503:       if (XEiJ.EFA_SEPARATE_AR) {
 19504:         return XEiJ.regRn[12];
 19505:       }
 19506:       //fallthrough
 19507:     case 0b010_101:  //(A5)
 19508:       if (XEiJ.EFA_SEPARATE_AR) {
 19509:         return XEiJ.regRn[13];
 19510:       }
 19511:       //fallthrough
 19512:     case 0b010_110:  //(A6)
 19513:       if (XEiJ.EFA_SEPARATE_AR) {
 19514:         return XEiJ.regRn[14];
 19515:       }
 19516:       //fallthrough
 19517:     case 0b010_111:  //(A7)
 19518:       if (XEiJ.EFA_SEPARATE_AR) {
 19519:         return XEiJ.regRn[15];
 19520:       } else {
 19521:         return XEiJ.regRn[ea - (0b010_000 - 8)];
 19522:       }
 19523:     case 0b011_000:  //(A0)+
 19524:       if (XEiJ.EFA_SEPARATE_AR) {
 19525:         M68kException.m6eIncremented += 2L << (0 << 3);
 19526:         return (XEiJ.regRn[ 8] += 2) - 2;
 19527:       }
 19528:       //fallthrough
 19529:     case 0b011_001:  //(A1)+
 19530:       if (XEiJ.EFA_SEPARATE_AR) {
 19531:         M68kException.m6eIncremented += 2L << (1 << 3);
 19532:         return (XEiJ.regRn[ 9] += 2) - 2;
 19533:       }
 19534:       //fallthrough
 19535:     case 0b011_010:  //(A2)+
 19536:       if (XEiJ.EFA_SEPARATE_AR) {
 19537:         M68kException.m6eIncremented += 2L << (2 << 3);
 19538:         return (XEiJ.regRn[10] += 2) - 2;
 19539:       }
 19540:       //fallthrough
 19541:     case 0b011_011:  //(A3)+
 19542:       if (XEiJ.EFA_SEPARATE_AR) {
 19543:         M68kException.m6eIncremented += 2L << (3 << 3);
 19544:         return (XEiJ.regRn[11] += 2) - 2;
 19545:       }
 19546:       //fallthrough
 19547:     case 0b011_100:  //(A4)+
 19548:       if (XEiJ.EFA_SEPARATE_AR) {
 19549:         M68kException.m6eIncremented += 2L << (4 << 3);
 19550:         return (XEiJ.regRn[12] += 2) - 2;
 19551:       }
 19552:       //fallthrough
 19553:     case 0b011_101:  //(A5)+
 19554:       if (XEiJ.EFA_SEPARATE_AR) {
 19555:         M68kException.m6eIncremented += 2L << (5 << 3);
 19556:         return (XEiJ.regRn[13] += 2) - 2;
 19557:       }
 19558:       //fallthrough
 19559:     case 0b011_110:  //(A6)+
 19560:       if (XEiJ.EFA_SEPARATE_AR) {
 19561:         M68kException.m6eIncremented += 2L << (6 << 3);
 19562:         return (XEiJ.regRn[14] += 2) - 2;
 19563:       }
 19564:       //fallthrough
 19565:     case 0b011_111:  //(A7)+
 19566:       if (XEiJ.EFA_SEPARATE_AR) {
 19567:         M68kException.m6eIncremented += 2L << (7 << 3);
 19568:         return (XEiJ.regRn[15] += 2) - 2;
 19569:       } else {
 19570:         M68kException.m6eIncremented += 2L << ((ea & 7) << 3);
 19571:         return (XEiJ.regRn[ea - (0b011_000 - 8)] += 2) - 2;
 19572:       }
 19573:     case 0b100_000:  //-(A0)
 19574:       if (XEiJ.EFA_SEPARATE_AR) {
 19575:         M68kException.m6eIncremented -= 2L << (0 << 3);
 19576:         return XEiJ.regRn[ 8] -= 2;
 19577:       }
 19578:       //fallthrough
 19579:     case 0b100_001:  //-(A1)
 19580:       if (XEiJ.EFA_SEPARATE_AR) {
 19581:         M68kException.m6eIncremented -= 2L << (1 << 3);
 19582:         return XEiJ.regRn[ 9] -= 2;
 19583:       }
 19584:       //fallthrough
 19585:     case 0b100_010:  //-(A2)
 19586:       if (XEiJ.EFA_SEPARATE_AR) {
 19587:         M68kException.m6eIncremented -= 2L << (2 << 3);
 19588:         return XEiJ.regRn[10] -= 2;
 19589:       }
 19590:       //fallthrough
 19591:     case 0b100_011:  //-(A3)
 19592:       if (XEiJ.EFA_SEPARATE_AR) {
 19593:         M68kException.m6eIncremented -= 2L << (3 << 3);
 19594:         return XEiJ.regRn[11] -= 2;
 19595:       }
 19596:       //fallthrough
 19597:     case 0b100_100:  //-(A4)
 19598:       if (XEiJ.EFA_SEPARATE_AR) {
 19599:         M68kException.m6eIncremented -= 2L << (4 << 3);
 19600:         return XEiJ.regRn[12] -= 2;
 19601:       }
 19602:       //fallthrough
 19603:     case 0b100_101:  //-(A5)
 19604:       if (XEiJ.EFA_SEPARATE_AR) {
 19605:         M68kException.m6eIncremented -= 2L << (5 << 3);
 19606:         return XEiJ.regRn[13] -= 2;
 19607:       }
 19608:       //fallthrough
 19609:     case 0b100_110:  //-(A6)
 19610:       if (XEiJ.EFA_SEPARATE_AR) {
 19611:         M68kException.m6eIncremented -= 2L << (6 << 3);
 19612:         return XEiJ.regRn[14] -= 2;
 19613:       }
 19614:       //fallthrough
 19615:     case 0b100_111:  //-(A7)
 19616:       if (XEiJ.EFA_SEPARATE_AR) {
 19617:         M68kException.m6eIncremented -= 2L << (7 << 3);
 19618:         return XEiJ.regRn[15] -= 2;
 19619:       } else {
 19620:         M68kException.m6eIncremented -= 2L << ((ea & 7) << 3);
 19621:         return XEiJ.regRn[ea - (0b100_000 - 8)] -= 2;
 19622:       }
 19623:     case 0b101_000:  //(d16,A0)
 19624:     case 0b101_001:  //(d16,A1)
 19625:     case 0b101_010:  //(d16,A2)
 19626:     case 0b101_011:  //(d16,A3)
 19627:     case 0b101_100:  //(d16,A4)
 19628:     case 0b101_101:  //(d16,A5)
 19629:     case 0b101_110:  //(d16,A6)
 19630:     case 0b101_111:  //(d16,A7)
 19631:       if (XEiJ.MPU_COMPOUND_POSTINCREMENT) {
 19632:         return (XEiJ.regRn[ea - (0b101_000 - 8)]  //ベースレジスタ
 19633:                 + mmuReadWordSignExword ((XEiJ.regPC += 2) - 2, XEiJ.regSRS));  //pcws。ワードディスプレースメント
 19634:       } else {
 19635:         t = XEiJ.regPC;
 19636:         XEiJ.regPC = t + 2;
 19637:         return (XEiJ.regRn[ea - (0b101_000 - 8)]  //ベースレジスタ
 19638:                 + mmuReadWordSignExword (t, XEiJ.regSRS));  //pcws。ワードディスプレースメント
 19639:       }
 19640:     case 0b110_000:  //(d8,A0,Rn.wl)
 19641:     case 0b110_001:  //(d8,A1,Rn.wl)
 19642:     case 0b110_010:  //(d8,A2,Rn.wl)
 19643:     case 0b110_011:  //(d8,A3,Rn.wl)
 19644:     case 0b110_100:  //(d8,A4,Rn.wl)
 19645:     case 0b110_101:  //(d8,A5,Rn.wl)
 19646:     case 0b110_110:  //(d8,A6,Rn.wl)
 19647:     case 0b110_111:  //(d8,A7,Rn.wl)
 19648:       if (XEiJ.MPU_COMPOUND_POSTINCREMENT) {
 19649:         w = mmuReadWordZeroExword ((XEiJ.regPC += 2) - 2, XEiJ.regSRS);  //pcwz。拡張ワード
 19650:       } else {
 19651:         w = XEiJ.regPC;
 19652:         XEiJ.regPC = w + 2;
 19653:         w = mmuReadWordZeroExword (w, XEiJ.regSRS);  //pcwz。拡張ワード
 19654:       }
 19655:       if (w << 31 - 8 < 0) {  //フルフォーマット
 19656:         XEiJ.mpuCycleCount += w << -2 == 0 ? 1 : 3;  //メモリ間接なし:メモリ間接あり
 19657:       }
 19658:       t = (((~w & 0x0180) == 0 ? 0 :  //ベースレジスタサプレス
 19659:             XEiJ.regRn[ea - (0b110_000 - 8)])  //ベースレジスタ
 19660:            + (w << 31 - 8 >= 0 ? (byte) w :  //バイトディスプレースメント
 19661:               w << 31 - 5 >= 0 ? 0 :  //ヌルベースディスプレースメント
 19662:               w << 31 - 4 >= 0 ? mmuReadWordSignExword ((XEiJ.regPC += 2) - 2, XEiJ.regSRS) :  //pcws。ワードベースディスプレースメント
 19663:               mmuReadLongExword ((XEiJ.regPC += 4) - 4, XEiJ.regSRS)));  //pcls。ロングベースディスプレースメント
 19664:       x = ((~w & 0x0140) == 0 ? 0 :  //インデックスサプレス
 19665:            (w << 31 - 11 >= 0 ? (short) XEiJ.regRn[w >> 12] :  //ワードインデックス
 19666:             XEiJ.regRn[w >> 12])  //ロングインデックス
 19667:            << (w >> 9 & 3));  //スケールファクタ。ワードインデックスのときは符号拡張してから掛ける
 19668:       return ((w & 0x0103) <= 0x0100 ? t + x :  //メモリ間接なし
 19669:               ((XEiJ.TEST_BIT_2_SHIFT ? w << 31 - 2 >= 0 : (w & 4) == 0) ? mmuReadLongData (t + x, XEiJ.regSRS) :  //プリインデックス
 19670:                mmuReadLongData (t, XEiJ.regSRS) + x)  //ポストインデックス
 19671:               + ((XEiJ.TEST_BIT_1_SHIFT ? w << 31 - 1 >= 0 : (w & 2) == 0) ? 0 :  //ヌルアウタディスプレースメント
 19672:                  (XEiJ.TEST_BIT_0_SHIFT ? w << 31 - 0 >= 0 : (w & 1) == 0) ? mmuReadWordSignExword ((XEiJ.regPC += 2) - 2, XEiJ.regSRS) :  //pcws。ワードアウタディスプレースメント
 19673:                  mmuReadLongExword ((XEiJ.regPC += 4) - 4, XEiJ.regSRS)));  //pcls。ロングアウタディスプレースメント
 19674:     case 0b111_000:  //(xxx).W
 19675:       return mmuReadWordSignExword ((XEiJ.regPC += 2) - 2, XEiJ.regSRS);  //pcws
 19676:     case 0b111_001:  //(xxx).L
 19677:       return mmuReadLongExword ((XEiJ.regPC += 4) - 4, XEiJ.regSRS);  //pcls
 19678:     case 0b111_010:  //(d16,PC)
 19679:       t = XEiJ.regPC;
 19680:       XEiJ.regPC = t + 2;
 19681:       return (t  //ベースレジスタ
 19682:               + mmuReadWordSignExword (t, XEiJ.regSRS));  //pcws。ワードディスプレースメント
 19683:     case 0b111_011:  //(d8,PC,Rn.wl)
 19684:       t = XEiJ.regPC;
 19685:       XEiJ.regPC = t + 2;
 19686:       w = mmuReadWordZeroExword (t, XEiJ.regSRS);  //pcwz。拡張ワード
 19687:       if (w << 31 - 8 < 0) {  //フルフォーマット
 19688:         XEiJ.mpuCycleCount += w << -2 == 0 ? 1 : 3;  //メモリ間接なし:メモリ間接あり
 19689:       }
 19690:       t = (((~w & 0x0180) == 0 ? 0 :  //ベースレジスタサプレス
 19691:             t)  //ベースレジスタ
 19692:            + (w << 31 - 8 >= 0 ? (byte) w :  //バイトディスプレースメント
 19693:               w << 31 - 5 >= 0 ? 0 :  //ヌルベースディスプレースメント
 19694:               w << 31 - 4 >= 0 ? mmuReadWordSignExword ((XEiJ.regPC += 2) - 2, XEiJ.regSRS) :  //pcws。ワードベースディスプレースメント
 19695:               mmuReadLongExword ((XEiJ.regPC += 4) - 4, XEiJ.regSRS)));  //pcls。ロングベースディスプレースメント
 19696:       x = ((~w & 0x0140) == 0 ? 0 :  //インデックスサプレス
 19697:            (w << 31 - 11 >= 0 ? (short) XEiJ.regRn[w >> 12] :  //ワードインデックス
 19698:             XEiJ.regRn[w >> 12])  //ロングインデックス
 19699:            << (w >> 9 & 3));  //スケールファクタ。ワードインデックスのときは符号拡張してから掛ける
 19700:       return ((w & 0x0103) <= 0x0100 ? t + x :  //メモリ間接なし
 19701:               ((XEiJ.TEST_BIT_2_SHIFT ? w << 31 - 2 >= 0 : (w & 4) == 0) ? mmuReadLongData (t + x, XEiJ.regSRS) :  //プリインデックス
 19702:                mmuReadLongData (t, XEiJ.regSRS) + x)  //ポストインデックス
 19703:               + ((XEiJ.TEST_BIT_1_SHIFT ? w << 31 - 1 >= 0 : (w & 2) == 0) ? 0 :  //ヌルアウタディスプレースメント
 19704:                  (XEiJ.TEST_BIT_0_SHIFT ? w << 31 - 0 >= 0 : (w & 1) == 0) ? mmuReadWordSignExword ((XEiJ.regPC += 2) - 2, XEiJ.regSRS) :  //pcws。ワードアウタディスプレースメント
 19705:                  mmuReadLongExword ((XEiJ.regPC += 4) - 4, XEiJ.regSRS)));  //pcls。ロングアウタディスプレースメント
 19706:     }  //switch
 19707:     M68kException.m6eNumber = M68kException.M6E_ILLEGAL_INSTRUCTION;
 19708:     throw M68kException.m6eSignal;
 19709:   }  //efaMemWord
 19710: 
 19711:   //a = efaMltWord (ea)  //|  M+-WXZ  |
 19712:   //  メモリ可変モードのワードオペランドの実効アドレスを求める
 19713:   //  efaMemWordとの違いは(d16,PC)と(d8,PC,Rn.wl)がないこと
 19714:   @SuppressWarnings ("fallthrough") public static int efaMltWord (int ea) throws M68kException {
 19715:     int t, w, x;
 19716:     switch (ea) {
 19717:     case 0b010_000:  //(A0)
 19718:       if (XEiJ.EFA_SEPARATE_AR) {
 19719:         return XEiJ.regRn[ 8];
 19720:       }
 19721:       //fallthrough
 19722:     case 0b010_001:  //(A1)
 19723:       if (XEiJ.EFA_SEPARATE_AR) {
 19724:         return XEiJ.regRn[ 9];
 19725:       }
 19726:       //fallthrough
 19727:     case 0b010_010:  //(A2)
 19728:       if (XEiJ.EFA_SEPARATE_AR) {
 19729:         return XEiJ.regRn[10];
 19730:       }
 19731:       //fallthrough
 19732:     case 0b010_011:  //(A3)
 19733:       if (XEiJ.EFA_SEPARATE_AR) {
 19734:         return XEiJ.regRn[11];
 19735:       }
 19736:       //fallthrough
 19737:     case 0b010_100:  //(A4)
 19738:       if (XEiJ.EFA_SEPARATE_AR) {
 19739:         return XEiJ.regRn[12];
 19740:       }
 19741:       //fallthrough
 19742:     case 0b010_101:  //(A5)
 19743:       if (XEiJ.EFA_SEPARATE_AR) {
 19744:         return XEiJ.regRn[13];
 19745:       }
 19746:       //fallthrough
 19747:     case 0b010_110:  //(A6)
 19748:       if (XEiJ.EFA_SEPARATE_AR) {
 19749:         return XEiJ.regRn[14];
 19750:       }
 19751:       //fallthrough
 19752:     case 0b010_111:  //(A7)
 19753:       if (XEiJ.EFA_SEPARATE_AR) {
 19754:         return XEiJ.regRn[15];
 19755:       } else {
 19756:         return XEiJ.regRn[ea - (0b010_000 - 8)];
 19757:       }
 19758:     case 0b011_000:  //(A0)+
 19759:       if (XEiJ.EFA_SEPARATE_AR) {
 19760:         M68kException.m6eIncremented += 2L << (0 << 3);
 19761:         return (XEiJ.regRn[ 8] += 2) - 2;
 19762:       }
 19763:       //fallthrough
 19764:     case 0b011_001:  //(A1)+
 19765:       if (XEiJ.EFA_SEPARATE_AR) {
 19766:         M68kException.m6eIncremented += 2L << (1 << 3);
 19767:         return (XEiJ.regRn[ 9] += 2) - 2;
 19768:       }
 19769:       //fallthrough
 19770:     case 0b011_010:  //(A2)+
 19771:       if (XEiJ.EFA_SEPARATE_AR) {
 19772:         M68kException.m6eIncremented += 2L << (2 << 3);
 19773:         return (XEiJ.regRn[10] += 2) - 2;
 19774:       }
 19775:       //fallthrough
 19776:     case 0b011_011:  //(A3)+
 19777:       if (XEiJ.EFA_SEPARATE_AR) {
 19778:         M68kException.m6eIncremented += 2L << (3 << 3);
 19779:         return (XEiJ.regRn[11] += 2) - 2;
 19780:       }
 19781:       //fallthrough
 19782:     case 0b011_100:  //(A4)+
 19783:       if (XEiJ.EFA_SEPARATE_AR) {
 19784:         M68kException.m6eIncremented += 2L << (4 << 3);
 19785:         return (XEiJ.regRn[12] += 2) - 2;
 19786:       }
 19787:       //fallthrough
 19788:     case 0b011_101:  //(A5)+
 19789:       if (XEiJ.EFA_SEPARATE_AR) {
 19790:         M68kException.m6eIncremented += 2L << (5 << 3);
 19791:         return (XEiJ.regRn[13] += 2) - 2;
 19792:       }
 19793:       //fallthrough
 19794:     case 0b011_110:  //(A6)+
 19795:       if (XEiJ.EFA_SEPARATE_AR) {
 19796:         M68kException.m6eIncremented += 2L << (6 << 3);
 19797:         return (XEiJ.regRn[14] += 2) - 2;
 19798:       }
 19799:       //fallthrough
 19800:     case 0b011_111:  //(A7)+
 19801:       if (XEiJ.EFA_SEPARATE_AR) {
 19802:         M68kException.m6eIncremented += 2L << (7 << 3);
 19803:         return (XEiJ.regRn[15] += 2) - 2;
 19804:       } else {
 19805:         M68kException.m6eIncremented += 2L << ((ea & 7) << 3);
 19806:         return (XEiJ.regRn[ea - (0b011_000 - 8)] += 2) - 2;
 19807:       }
 19808:     case 0b100_000:  //-(A0)
 19809:       if (XEiJ.EFA_SEPARATE_AR) {
 19810:         M68kException.m6eIncremented -= 2L << (0 << 3);
 19811:         return XEiJ.regRn[ 8] -= 2;
 19812:       }
 19813:       //fallthrough
 19814:     case 0b100_001:  //-(A1)
 19815:       if (XEiJ.EFA_SEPARATE_AR) {
 19816:         M68kException.m6eIncremented -= 2L << (1 << 3);
 19817:         return XEiJ.regRn[ 9] -= 2;
 19818:       }
 19819:       //fallthrough
 19820:     case 0b100_010:  //-(A2)
 19821:       if (XEiJ.EFA_SEPARATE_AR) {
 19822:         M68kException.m6eIncremented -= 2L << (2 << 3);
 19823:         return XEiJ.regRn[10] -= 2;
 19824:       }
 19825:       //fallthrough
 19826:     case 0b100_011:  //-(A3)
 19827:       if (XEiJ.EFA_SEPARATE_AR) {
 19828:         M68kException.m6eIncremented -= 2L << (3 << 3);
 19829:         return XEiJ.regRn[11] -= 2;
 19830:       }
 19831:       //fallthrough
 19832:     case 0b100_100:  //-(A4)
 19833:       if (XEiJ.EFA_SEPARATE_AR) {
 19834:         M68kException.m6eIncremented -= 2L << (4 << 3);
 19835:         return XEiJ.regRn[12] -= 2;
 19836:       }
 19837:       //fallthrough
 19838:     case 0b100_101:  //-(A5)
 19839:       if (XEiJ.EFA_SEPARATE_AR) {
 19840:         M68kException.m6eIncremented -= 2L << (5 << 3);
 19841:         return XEiJ.regRn[13] -= 2;
 19842:       }
 19843:       //fallthrough
 19844:     case 0b100_110:  //-(A6)
 19845:       if (XEiJ.EFA_SEPARATE_AR) {
 19846:         M68kException.m6eIncremented -= 2L << (6 << 3);
 19847:         return XEiJ.regRn[14] -= 2;
 19848:       }
 19849:       //fallthrough
 19850:     case 0b100_111:  //-(A7)
 19851:       if (XEiJ.EFA_SEPARATE_AR) {
 19852:         M68kException.m6eIncremented -= 2L << (7 << 3);
 19853:         return XEiJ.regRn[15] -= 2;
 19854:       } else {
 19855:         M68kException.m6eIncremented -= 2L << ((ea & 7) << 3);
 19856:         return XEiJ.regRn[ea - (0b100_000 - 8)] -= 2;
 19857:       }
 19858:     case 0b101_000:  //(d16,A0)
 19859:     case 0b101_001:  //(d16,A1)
 19860:     case 0b101_010:  //(d16,A2)
 19861:     case 0b101_011:  //(d16,A3)
 19862:     case 0b101_100:  //(d16,A4)
 19863:     case 0b101_101:  //(d16,A5)
 19864:     case 0b101_110:  //(d16,A6)
 19865:     case 0b101_111:  //(d16,A7)
 19866:       if (XEiJ.MPU_COMPOUND_POSTINCREMENT) {
 19867:         return (XEiJ.regRn[ea - (0b101_000 - 8)]  //ベースレジスタ
 19868:                 + mmuReadWordSignExword ((XEiJ.regPC += 2) - 2, XEiJ.regSRS));  //pcws。ワードディスプレースメント
 19869:       } else {
 19870:         t = XEiJ.regPC;
 19871:         XEiJ.regPC = t + 2;
 19872:         return (XEiJ.regRn[ea - (0b101_000 - 8)]  //ベースレジスタ
 19873:                 + mmuReadWordSignExword (t, XEiJ.regSRS));  //pcws。ワードディスプレースメント
 19874:       }
 19875:     case 0b110_000:  //(d8,A0,Rn.wl)
 19876:     case 0b110_001:  //(d8,A1,Rn.wl)
 19877:     case 0b110_010:  //(d8,A2,Rn.wl)
 19878:     case 0b110_011:  //(d8,A3,Rn.wl)
 19879:     case 0b110_100:  //(d8,A4,Rn.wl)
 19880:     case 0b110_101:  //(d8,A5,Rn.wl)
 19881:     case 0b110_110:  //(d8,A6,Rn.wl)
 19882:     case 0b110_111:  //(d8,A7,Rn.wl)
 19883:       if (XEiJ.MPU_COMPOUND_POSTINCREMENT) {
 19884:         w = mmuReadWordZeroExword ((XEiJ.regPC += 2) - 2, XEiJ.regSRS);  //pcwz。拡張ワード
 19885:       } else {
 19886:         w = XEiJ.regPC;
 19887:         XEiJ.regPC = w + 2;
 19888:         w = mmuReadWordZeroExword (w, XEiJ.regSRS);  //pcwz。拡張ワード
 19889:       }
 19890:       if (w << 31 - 8 < 0) {  //フルフォーマット
 19891:         XEiJ.mpuCycleCount += w << -2 == 0 ? 1 : 3;  //メモリ間接なし:メモリ間接あり
 19892:       }
 19893:       t = (((~w & 0x0180) == 0 ? 0 :  //ベースレジスタサプレス
 19894:             XEiJ.regRn[ea - (0b110_000 - 8)])  //ベースレジスタ
 19895:            + (w << 31 - 8 >= 0 ? (byte) w :  //バイトディスプレースメント
 19896:               w << 31 - 5 >= 0 ? 0 :  //ヌルベースディスプレースメント
 19897:               w << 31 - 4 >= 0 ? mmuReadWordSignExword ((XEiJ.regPC += 2) - 2, XEiJ.regSRS) :  //pcws。ワードベースディスプレースメント
 19898:               mmuReadLongExword ((XEiJ.regPC += 4) - 4, XEiJ.regSRS)));  //pcls。ロングベースディスプレースメント
 19899:       x = ((~w & 0x0140) == 0 ? 0 :  //インデックスサプレス
 19900:            (w << 31 - 11 >= 0 ? (short) XEiJ.regRn[w >> 12] :  //ワードインデックス
 19901:             XEiJ.regRn[w >> 12])  //ロングインデックス
 19902:            << (w >> 9 & 3));  //スケールファクタ。ワードインデックスのときは符号拡張してから掛ける
 19903:       return ((w & 0x0103) <= 0x0100 ? t + x :  //メモリ間接なし
 19904:               ((XEiJ.TEST_BIT_2_SHIFT ? w << 31 - 2 >= 0 : (w & 4) == 0) ? mmuReadLongData (t + x, XEiJ.regSRS) :  //プリインデックス
 19905:                mmuReadLongData (t, XEiJ.regSRS) + x)  //ポストインデックス
 19906:               + ((XEiJ.TEST_BIT_1_SHIFT ? w << 31 - 1 >= 0 : (w & 2) == 0) ? 0 :  //ヌルアウタディスプレースメント
 19907:                  (XEiJ.TEST_BIT_0_SHIFT ? w << 31 - 0 >= 0 : (w & 1) == 0) ? mmuReadWordSignExword ((XEiJ.regPC += 2) - 2, XEiJ.regSRS) :  //pcws。ワードアウタディスプレースメント
 19908:                  mmuReadLongExword ((XEiJ.regPC += 4) - 4, XEiJ.regSRS)));  //pcls。ロングアウタディスプレースメント
 19909:     case 0b111_000:  //(xxx).W
 19910:       return mmuReadWordSignExword ((XEiJ.regPC += 2) - 2, XEiJ.regSRS);  //pcws
 19911:     case 0b111_001:  //(xxx).L
 19912:       return mmuReadLongExword ((XEiJ.regPC += 4) - 4, XEiJ.regSRS);  //pcls
 19913:     }  //switch
 19914:     M68kException.m6eNumber = M68kException.M6E_ILLEGAL_INSTRUCTION;
 19915:     throw M68kException.m6eSignal;
 19916:   }  //efaMltWord
 19917: 
 19918:   //a = efaCntWord (ea)  //|  M  WXZP |
 19919:   //  制御モードのワードオペランドの実効アドレスを求める
 19920:   //  efaMemWordとの違いは(Ar)+と-(Ar)がないこと
 19921:   @SuppressWarnings ("fallthrough") public static int efaCntWord (int ea) throws M68kException {
 19922:     int t, w, x;
 19923:     switch (ea) {
 19924:     case 0b010_000:  //(A0)
 19925:       if (XEiJ.EFA_SEPARATE_AR) {
 19926:         return XEiJ.regRn[ 8];
 19927:       }
 19928:       //fallthrough
 19929:     case 0b010_001:  //(A1)
 19930:       if (XEiJ.EFA_SEPARATE_AR) {
 19931:         return XEiJ.regRn[ 9];
 19932:       }
 19933:       //fallthrough
 19934:     case 0b010_010:  //(A2)
 19935:       if (XEiJ.EFA_SEPARATE_AR) {
 19936:         return XEiJ.regRn[10];
 19937:       }
 19938:       //fallthrough
 19939:     case 0b010_011:  //(A3)
 19940:       if (XEiJ.EFA_SEPARATE_AR) {
 19941:         return XEiJ.regRn[11];
 19942:       }
 19943:       //fallthrough
 19944:     case 0b010_100:  //(A4)
 19945:       if (XEiJ.EFA_SEPARATE_AR) {
 19946:         return XEiJ.regRn[12];
 19947:       }
 19948:       //fallthrough
 19949:     case 0b010_101:  //(A5)
 19950:       if (XEiJ.EFA_SEPARATE_AR) {
 19951:         return XEiJ.regRn[13];
 19952:       }
 19953:       //fallthrough
 19954:     case 0b010_110:  //(A6)
 19955:       if (XEiJ.EFA_SEPARATE_AR) {
 19956:         return XEiJ.regRn[14];
 19957:       }
 19958:       //fallthrough
 19959:     case 0b010_111:  //(A7)
 19960:       if (XEiJ.EFA_SEPARATE_AR) {
 19961:         return XEiJ.regRn[15];
 19962:       } else {
 19963:         return XEiJ.regRn[ea - (0b010_000 - 8)];
 19964:       }
 19965:     case 0b101_000:  //(d16,A0)
 19966:     case 0b101_001:  //(d16,A1)
 19967:     case 0b101_010:  //(d16,A2)
 19968:     case 0b101_011:  //(d16,A3)
 19969:     case 0b101_100:  //(d16,A4)
 19970:     case 0b101_101:  //(d16,A5)
 19971:     case 0b101_110:  //(d16,A6)
 19972:     case 0b101_111:  //(d16,A7)
 19973:       if (XEiJ.MPU_COMPOUND_POSTINCREMENT) {
 19974:         return (XEiJ.regRn[ea - (0b101_000 - 8)]  //ベースレジスタ
 19975:                 + mmuReadWordSignExword ((XEiJ.regPC += 2) - 2, XEiJ.regSRS));  //pcws。ワードディスプレースメント
 19976:       } else {
 19977:         t = XEiJ.regPC;
 19978:         XEiJ.regPC = t + 2;
 19979:         return (XEiJ.regRn[ea - (0b101_000 - 8)]  //ベースレジスタ
 19980:                 + mmuReadWordSignExword (t, XEiJ.regSRS));  //pcws。ワードディスプレースメント
 19981:       }
 19982:     case 0b110_000:  //(d8,A0,Rn.wl)
 19983:     case 0b110_001:  //(d8,A1,Rn.wl)
 19984:     case 0b110_010:  //(d8,A2,Rn.wl)
 19985:     case 0b110_011:  //(d8,A3,Rn.wl)
 19986:     case 0b110_100:  //(d8,A4,Rn.wl)
 19987:     case 0b110_101:  //(d8,A5,Rn.wl)
 19988:     case 0b110_110:  //(d8,A6,Rn.wl)
 19989:     case 0b110_111:  //(d8,A7,Rn.wl)
 19990:       if (XEiJ.MPU_COMPOUND_POSTINCREMENT) {
 19991:         w = mmuReadWordZeroExword ((XEiJ.regPC += 2) - 2, XEiJ.regSRS);  //pcwz。拡張ワード
 19992:       } else {
 19993:         w = XEiJ.regPC;
 19994:         XEiJ.regPC = w + 2;
 19995:         w = mmuReadWordZeroExword (w, XEiJ.regSRS);  //pcwz。拡張ワード
 19996:       }
 19997:       if (w << 31 - 8 < 0) {  //フルフォーマット
 19998:         XEiJ.mpuCycleCount += w << -2 == 0 ? 1 : 3;  //メモリ間接なし:メモリ間接あり
 19999:       }
 20000:       t = (((~w & 0x0180) == 0 ? 0 :  //ベースレジスタサプレス
 20001:             XEiJ.regRn[ea - (0b110_000 - 8)])  //ベースレジスタ
 20002:            + (w << 31 - 8 >= 0 ? (byte) w :  //バイトディスプレースメント
 20003:               w << 31 - 5 >= 0 ? 0 :  //ヌルベースディスプレースメント
 20004:               w << 31 - 4 >= 0 ? mmuReadWordSignExword ((XEiJ.regPC += 2) - 2, XEiJ.regSRS) :  //pcws。ワードベースディスプレースメント
 20005:               mmuReadLongExword ((XEiJ.regPC += 4) - 4, XEiJ.regSRS)));  //pcls。ロングベースディスプレースメント
 20006:       x = ((~w & 0x0140) == 0 ? 0 :  //インデックスサプレス
 20007:            (w << 31 - 11 >= 0 ? (short) XEiJ.regRn[w >> 12] :  //ワードインデックス
 20008:             XEiJ.regRn[w >> 12])  //ロングインデックス
 20009:            << (w >> 9 & 3));  //スケールファクタ。ワードインデックスのときは符号拡張してから掛ける
 20010:       return ((w & 0x0103) <= 0x0100 ? t + x :  //メモリ間接なし
 20011:               ((XEiJ.TEST_BIT_2_SHIFT ? w << 31 - 2 >= 0 : (w & 4) == 0) ? mmuReadLongData (t + x, XEiJ.regSRS) :  //プリインデックス
 20012:                mmuReadLongData (t, XEiJ.regSRS) + x)  //ポストインデックス
 20013:               + ((XEiJ.TEST_BIT_1_SHIFT ? w << 31 - 1 >= 0 : (w & 2) == 0) ? 0 :  //ヌルアウタディスプレースメント
 20014:                  (XEiJ.TEST_BIT_0_SHIFT ? w << 31 - 0 >= 0 : (w & 1) == 0) ? mmuReadWordSignExword ((XEiJ.regPC += 2) - 2, XEiJ.regSRS) :  //pcws。ワードアウタディスプレースメント
 20015:                  mmuReadLongExword ((XEiJ.regPC += 4) - 4, XEiJ.regSRS)));  //pcls。ロングアウタディスプレースメント
 20016:     case 0b111_000:  //(xxx).W
 20017:       return mmuReadWordSignExword ((XEiJ.regPC += 2) - 2, XEiJ.regSRS);  //pcws
 20018:     case 0b111_001:  //(xxx).L
 20019:       return mmuReadLongExword ((XEiJ.regPC += 4) - 4, XEiJ.regSRS);  //pcls
 20020:     case 0b111_010:  //(d16,PC)
 20021:       t = XEiJ.regPC;
 20022:       XEiJ.regPC = t + 2;
 20023:       return (t  //ベースレジスタ
 20024:               + mmuReadWordSignExword (t, XEiJ.regSRS));  //pcws。ワードディスプレースメント
 20025:     case 0b111_011:  //(d8,PC,Rn.wl)
 20026:       t = XEiJ.regPC;
 20027:       XEiJ.regPC = t + 2;
 20028:       w = mmuReadWordZeroExword (t, XEiJ.regSRS);  //pcwz。拡張ワード
 20029:       if (w << 31 - 8 < 0) {  //フルフォーマット
 20030:         XEiJ.mpuCycleCount += w << -2 == 0 ? 1 : 3;  //メモリ間接なし:メモリ間接あり
 20031:       }
 20032:       t = (((~w & 0x0180) == 0 ? 0 :  //ベースレジスタサプレス
 20033:             t)  //ベースレジスタ
 20034:            + (w << 31 - 8 >= 0 ? (byte) w :  //バイトディスプレースメント
 20035:               w << 31 - 5 >= 0 ? 0 :  //ヌルベースディスプレースメント
 20036:               w << 31 - 4 >= 0 ? mmuReadWordSignExword ((XEiJ.regPC += 2) - 2, XEiJ.regSRS) :  //pcws。ワードベースディスプレースメント
 20037:               mmuReadLongExword ((XEiJ.regPC += 4) - 4, XEiJ.regSRS)));  //pcls。ロングベースディスプレースメント
 20038:       x = ((~w & 0x0140) == 0 ? 0 :  //インデックスサプレス
 20039:            (w << 31 - 11 >= 0 ? (short) XEiJ.regRn[w >> 12] :  //ワードインデックス
 20040:             XEiJ.regRn[w >> 12])  //ロングインデックス
 20041:            << (w >> 9 & 3));  //スケールファクタ。ワードインデックスのときは符号拡張してから掛ける
 20042:       return ((w & 0x0103) <= 0x0100 ? t + x :  //メモリ間接なし
 20043:               ((XEiJ.TEST_BIT_2_SHIFT ? w << 31 - 2 >= 0 : (w & 4) == 0) ? mmuReadLongData (t + x, XEiJ.regSRS) :  //プリインデックス
 20044:                mmuReadLongData (t, XEiJ.regSRS) + x)  //ポストインデックス
 20045:               + ((XEiJ.TEST_BIT_1_SHIFT ? w << 31 - 1 >= 0 : (w & 2) == 0) ? 0 :  //ヌルアウタディスプレースメント
 20046:                  (XEiJ.TEST_BIT_0_SHIFT ? w << 31 - 0 >= 0 : (w & 1) == 0) ? mmuReadWordSignExword ((XEiJ.regPC += 2) - 2, XEiJ.regSRS) :  //pcws。ワードアウタディスプレースメント
 20047:                  mmuReadLongExword ((XEiJ.regPC += 4) - 4, XEiJ.regSRS)));  //pcls。ロングアウタディスプレースメント
 20048:     }  //switch
 20049:     M68kException.m6eNumber = M68kException.M6E_ILLEGAL_INSTRUCTION;
 20050:     throw M68kException.m6eSignal;
 20051:   }  //efaCntWord
 20052: 
 20053:   //a = efaCltWord (ea)  //|  M  WXZ  |
 20054:   //  制御可変モードのワードオペランドの実効アドレスを求める
 20055:   //  efaCntWordとの違いは(d16,PC)と(d8,PC,Rn.wl)がないこと
 20056:   @SuppressWarnings ("fallthrough") public static int efaCltWord (int ea) throws M68kException {
 20057:     int t, w, x;
 20058:     switch (ea) {
 20059:     case 0b010_000:  //(A0)
 20060:       if (XEiJ.EFA_SEPARATE_AR) {
 20061:         return XEiJ.regRn[ 8];
 20062:       }
 20063:       //fallthrough
 20064:     case 0b010_001:  //(A1)
 20065:       if (XEiJ.EFA_SEPARATE_AR) {
 20066:         return XEiJ.regRn[ 9];
 20067:       }
 20068:       //fallthrough
 20069:     case 0b010_010:  //(A2)
 20070:       if (XEiJ.EFA_SEPARATE_AR) {
 20071:         return XEiJ.regRn[10];
 20072:       }
 20073:       //fallthrough
 20074:     case 0b010_011:  //(A3)
 20075:       if (XEiJ.EFA_SEPARATE_AR) {
 20076:         return XEiJ.regRn[11];
 20077:       }
 20078:       //fallthrough
 20079:     case 0b010_100:  //(A4)
 20080:       if (XEiJ.EFA_SEPARATE_AR) {
 20081:         return XEiJ.regRn[12];
 20082:       }
 20083:       //fallthrough
 20084:     case 0b010_101:  //(A5)
 20085:       if (XEiJ.EFA_SEPARATE_AR) {
 20086:         return XEiJ.regRn[13];
 20087:       }
 20088:       //fallthrough
 20089:     case 0b010_110:  //(A6)
 20090:       if (XEiJ.EFA_SEPARATE_AR) {
 20091:         return XEiJ.regRn[14];
 20092:       }
 20093:       //fallthrough
 20094:     case 0b010_111:  //(A7)
 20095:       if (XEiJ.EFA_SEPARATE_AR) {
 20096:         return XEiJ.regRn[15];
 20097:       } else {
 20098:         return XEiJ.regRn[ea - (0b010_000 - 8)];
 20099:       }
 20100:     case 0b101_000:  //(d16,A0)
 20101:     case 0b101_001:  //(d16,A1)
 20102:     case 0b101_010:  //(d16,A2)
 20103:     case 0b101_011:  //(d16,A3)
 20104:     case 0b101_100:  //(d16,A4)
 20105:     case 0b101_101:  //(d16,A5)
 20106:     case 0b101_110:  //(d16,A6)
 20107:     case 0b101_111:  //(d16,A7)
 20108:       if (XEiJ.MPU_COMPOUND_POSTINCREMENT) {
 20109:         return (XEiJ.regRn[ea - (0b101_000 - 8)]  //ベースレジスタ
 20110:                 + mmuReadWordSignExword ((XEiJ.regPC += 2) - 2, XEiJ.regSRS));  //pcws。ワードディスプレースメント
 20111:       } else {
 20112:         t = XEiJ.regPC;
 20113:         XEiJ.regPC = t + 2;
 20114:         return (XEiJ.regRn[ea - (0b101_000 - 8)]  //ベースレジスタ
 20115:                 + mmuReadWordSignExword (t, XEiJ.regSRS));  //pcws。ワードディスプレースメント
 20116:       }
 20117:     case 0b110_000:  //(d8,A0,Rn.wl)
 20118:     case 0b110_001:  //(d8,A1,Rn.wl)
 20119:     case 0b110_010:  //(d8,A2,Rn.wl)
 20120:     case 0b110_011:  //(d8,A3,Rn.wl)
 20121:     case 0b110_100:  //(d8,A4,Rn.wl)
 20122:     case 0b110_101:  //(d8,A5,Rn.wl)
 20123:     case 0b110_110:  //(d8,A6,Rn.wl)
 20124:     case 0b110_111:  //(d8,A7,Rn.wl)
 20125:       if (XEiJ.MPU_COMPOUND_POSTINCREMENT) {
 20126:         w = mmuReadWordZeroExword ((XEiJ.regPC += 2) - 2, XEiJ.regSRS);  //pcwz。拡張ワード
 20127:       } else {
 20128:         w = XEiJ.regPC;
 20129:         XEiJ.regPC = w + 2;
 20130:         w = mmuReadWordZeroExword (w, XEiJ.regSRS);  //pcwz。拡張ワード
 20131:       }
 20132:       if (w << 31 - 8 < 0) {  //フルフォーマット
 20133:         XEiJ.mpuCycleCount += w << -2 == 0 ? 1 : 3;  //メモリ間接なし:メモリ間接あり
 20134:       }
 20135:       t = (((~w & 0x0180) == 0 ? 0 :  //ベースレジスタサプレス
 20136:             XEiJ.regRn[ea - (0b110_000 - 8)])  //ベースレジスタ
 20137:            + (w << 31 - 8 >= 0 ? (byte) w :  //バイトディスプレースメント
 20138:               w << 31 - 5 >= 0 ? 0 :  //ヌルベースディスプレースメント
 20139:               w << 31 - 4 >= 0 ? mmuReadWordSignExword ((XEiJ.regPC += 2) - 2, XEiJ.regSRS) :  //pcws。ワードベースディスプレースメント
 20140:               mmuReadLongExword ((XEiJ.regPC += 4) - 4, XEiJ.regSRS)));  //pcls。ロングベースディスプレースメント
 20141:       x = ((~w & 0x0140) == 0 ? 0 :  //インデックスサプレス
 20142:            (w << 31 - 11 >= 0 ? (short) XEiJ.regRn[w >> 12] :  //ワードインデックス
 20143:             XEiJ.regRn[w >> 12])  //ロングインデックス
 20144:            << (w >> 9 & 3));  //スケールファクタ。ワードインデックスのときは符号拡張してから掛ける
 20145:       return ((w & 0x0103) <= 0x0100 ? t + x :  //メモリ間接なし
 20146:               ((XEiJ.TEST_BIT_2_SHIFT ? w << 31 - 2 >= 0 : (w & 4) == 0) ? mmuReadLongData (t + x, XEiJ.regSRS) :  //プリインデックス
 20147:                mmuReadLongData (t, XEiJ.regSRS) + x)  //ポストインデックス
 20148:               + ((XEiJ.TEST_BIT_1_SHIFT ? w << 31 - 1 >= 0 : (w & 2) == 0) ? 0 :  //ヌルアウタディスプレースメント
 20149:                  (XEiJ.TEST_BIT_0_SHIFT ? w << 31 - 0 >= 0 : (w & 1) == 0) ? mmuReadWordSignExword ((XEiJ.regPC += 2) - 2, XEiJ.regSRS) :  //pcws。ワードアウタディスプレースメント
 20150:                  mmuReadLongExword ((XEiJ.regPC += 4) - 4, XEiJ.regSRS)));  //pcls。ロングアウタディスプレースメント
 20151:     case 0b111_000:  //(xxx).W
 20152:       return mmuReadWordSignExword ((XEiJ.regPC += 2) - 2, XEiJ.regSRS);  //pcws
 20153:     case 0b111_001:  //(xxx).L
 20154:       return mmuReadLongExword ((XEiJ.regPC += 4) - 4, XEiJ.regSRS);  //pcls
 20155:     }  //switch
 20156:     M68kException.m6eNumber = M68kException.M6E_ILLEGAL_INSTRUCTION;
 20157:     throw M68kException.m6eSignal;
 20158:   }  //efaCltWord
 20159: 
 20160:   //a = efaAnyLong (ea)  //|  M+-WXZPI|
 20161:   //  任意のモードのロングオペランドの実効アドレスを求める
 20162:   //  efaAnyWordとの違いは(Ar)+と-(Ar)がArを4変化させることと、#<data>がPCを4変化させることと、
 20163:   //  オペランドのアクセスが1ワード増える分の4サイクルが追加されていること
 20164:   @SuppressWarnings ("fallthrough") public static int efaAnyLong (int ea) throws M68kException {
 20165:     int t, w, x;
 20166:     switch (ea) {
 20167:     case 0b010_000:  //(A0)
 20168:       if (XEiJ.EFA_SEPARATE_AR) {
 20169:         return XEiJ.regRn[ 8];
 20170:       }
 20171:       //fallthrough
 20172:     case 0b010_001:  //(A1)
 20173:       if (XEiJ.EFA_SEPARATE_AR) {
 20174:         return XEiJ.regRn[ 9];
 20175:       }
 20176:       //fallthrough
 20177:     case 0b010_010:  //(A2)
 20178:       if (XEiJ.EFA_SEPARATE_AR) {
 20179:         return XEiJ.regRn[10];
 20180:       }
 20181:       //fallthrough
 20182:     case 0b010_011:  //(A3)
 20183:       if (XEiJ.EFA_SEPARATE_AR) {
 20184:         return XEiJ.regRn[11];
 20185:       }
 20186:       //fallthrough
 20187:     case 0b010_100:  //(A4)
 20188:       if (XEiJ.EFA_SEPARATE_AR) {
 20189:         return XEiJ.regRn[12];
 20190:       }
 20191:       //fallthrough
 20192:     case 0b010_101:  //(A5)
 20193:       if (XEiJ.EFA_SEPARATE_AR) {
 20194:         return XEiJ.regRn[13];
 20195:       }
 20196:       //fallthrough
 20197:     case 0b010_110:  //(A6)
 20198:       if (XEiJ.EFA_SEPARATE_AR) {
 20199:         return XEiJ.regRn[14];
 20200:       }
 20201:       //fallthrough
 20202:     case 0b010_111:  //(A7)
 20203:       if (XEiJ.EFA_SEPARATE_AR) {
 20204:         return XEiJ.regRn[15];
 20205:       } else {
 20206:         return XEiJ.regRn[ea - (0b010_000 - 8)];
 20207:       }
 20208:     case 0b011_000:  //(A0)+
 20209:       if (XEiJ.EFA_SEPARATE_AR) {
 20210:         M68kException.m6eIncremented += 4L << (0 << 3);
 20211:         return (XEiJ.regRn[ 8] += 4) - 4;
 20212:       }
 20213:       //fallthrough
 20214:     case 0b011_001:  //(A1)+
 20215:       if (XEiJ.EFA_SEPARATE_AR) {
 20216:         M68kException.m6eIncremented += 4L << (1 << 3);
 20217:         return (XEiJ.regRn[ 9] += 4) - 4;
 20218:       }
 20219:       //fallthrough
 20220:     case 0b011_010:  //(A2)+
 20221:       if (XEiJ.EFA_SEPARATE_AR) {
 20222:         M68kException.m6eIncremented += 4L << (2 << 3);
 20223:         return (XEiJ.regRn[10] += 4) - 4;
 20224:       }
 20225:       //fallthrough
 20226:     case 0b011_011:  //(A3)+
 20227:       if (XEiJ.EFA_SEPARATE_AR) {
 20228:         M68kException.m6eIncremented += 4L << (3 << 3);
 20229:         return (XEiJ.regRn[11] += 4) - 4;
 20230:       }
 20231:       //fallthrough
 20232:     case 0b011_100:  //(A4)+
 20233:       if (XEiJ.EFA_SEPARATE_AR) {
 20234:         M68kException.m6eIncremented += 4L << (4 << 3);
 20235:         return (XEiJ.regRn[12] += 4) - 4;
 20236:       }
 20237:       //fallthrough
 20238:     case 0b011_101:  //(A5)+
 20239:       if (XEiJ.EFA_SEPARATE_AR) {
 20240:         M68kException.m6eIncremented += 4L << (5 << 3);
 20241:         return (XEiJ.regRn[13] += 4) - 4;
 20242:       }
 20243:       //fallthrough
 20244:     case 0b011_110:  //(A6)+
 20245:       if (XEiJ.EFA_SEPARATE_AR) {
 20246:         M68kException.m6eIncremented += 4L << (6 << 3);
 20247:         return (XEiJ.regRn[14] += 4) - 4;
 20248:       }
 20249:       //fallthrough
 20250:     case 0b011_111:  //(A7)+
 20251:       if (XEiJ.EFA_SEPARATE_AR) {
 20252:         M68kException.m6eIncremented += 4L << (7 << 3);
 20253:         return (XEiJ.regRn[15] += 4) - 4;
 20254:       } else {
 20255:         M68kException.m6eIncremented += 4L << ((ea & 7) << 3);
 20256:         return (XEiJ.regRn[ea - (0b011_000 - 8)] += 4) - 4;
 20257:       }
 20258:     case 0b100_000:  //-(A0)
 20259:       if (XEiJ.EFA_SEPARATE_AR) {
 20260:         M68kException.m6eIncremented -= 4L << (0 << 3);
 20261:         return XEiJ.regRn[ 8] -= 4;
 20262:       }
 20263:       //fallthrough
 20264:     case 0b100_001:  //-(A1)
 20265:       if (XEiJ.EFA_SEPARATE_AR) {
 20266:         M68kException.m6eIncremented -= 4L << (1 << 3);
 20267:         return XEiJ.regRn[ 9] -= 4;
 20268:       }
 20269:       //fallthrough
 20270:     case 0b100_010:  //-(A2)
 20271:       if (XEiJ.EFA_SEPARATE_AR) {
 20272:         M68kException.m6eIncremented -= 4L << (2 << 3);
 20273:         return XEiJ.regRn[10] -= 4;
 20274:       }
 20275:       //fallthrough
 20276:     case 0b100_011:  //-(A3)
 20277:       if (XEiJ.EFA_SEPARATE_AR) {
 20278:         M68kException.m6eIncremented -= 4L << (3 << 3);
 20279:         return XEiJ.regRn[11] -= 4;
 20280:       }
 20281:       //fallthrough
 20282:     case 0b100_100:  //-(A4)
 20283:       if (XEiJ.EFA_SEPARATE_AR) {
 20284:         M68kException.m6eIncremented -= 4L << (4 << 3);
 20285:         return XEiJ.regRn[12] -= 4;
 20286:       }
 20287:       //fallthrough
 20288:     case 0b100_101:  //-(A5)
 20289:       if (XEiJ.EFA_SEPARATE_AR) {
 20290:         M68kException.m6eIncremented -= 4L << (5 << 3);
 20291:         return XEiJ.regRn[13] -= 4;
 20292:       }
 20293:       //fallthrough
 20294:     case 0b100_110:  //-(A6)
 20295:       if (XEiJ.EFA_SEPARATE_AR) {
 20296:         M68kException.m6eIncremented -= 4L << (6 << 3);
 20297:         return XEiJ.regRn[14] -= 4;
 20298:       }
 20299:       //fallthrough
 20300:     case 0b100_111:  //-(A7)
 20301:       if (XEiJ.EFA_SEPARATE_AR) {
 20302:         M68kException.m6eIncremented -= 4L << (7 << 3);
 20303:         return XEiJ.regRn[15] -= 4;
 20304:       } else {
 20305:         M68kException.m6eIncremented -= 4L << ((ea & 7) << 3);
 20306:         return XEiJ.regRn[ea - (0b100_000 - 8)] -= 4;
 20307:       }
 20308:     case 0b101_000:  //(d16,A0)
 20309:     case 0b101_001:  //(d16,A1)
 20310:     case 0b101_010:  //(d16,A2)
 20311:     case 0b101_011:  //(d16,A3)
 20312:     case 0b101_100:  //(d16,A4)
 20313:     case 0b101_101:  //(d16,A5)
 20314:     case 0b101_110:  //(d16,A6)
 20315:     case 0b101_111:  //(d16,A7)
 20316:       if (XEiJ.MPU_COMPOUND_POSTINCREMENT) {
 20317:         return (XEiJ.regRn[ea - (0b101_000 - 8)]  //ベースレジスタ
 20318:                 + mmuReadWordSignExword ((XEiJ.regPC += 2) - 2, XEiJ.regSRS));  //pcws。ワードディスプレースメント
 20319:       } else {
 20320:         t = XEiJ.regPC;
 20321:         XEiJ.regPC = t + 2;
 20322:         return (XEiJ.regRn[ea - (0b101_000 - 8)]  //ベースレジスタ
 20323:                 + mmuReadWordSignExword (t, XEiJ.regSRS));  //pcws。ワードディスプレースメント
 20324:       }
 20325:     case 0b110_000:  //(d8,A0,Rn.wl)
 20326:     case 0b110_001:  //(d8,A1,Rn.wl)
 20327:     case 0b110_010:  //(d8,A2,Rn.wl)
 20328:     case 0b110_011:  //(d8,A3,Rn.wl)
 20329:     case 0b110_100:  //(d8,A4,Rn.wl)
 20330:     case 0b110_101:  //(d8,A5,Rn.wl)
 20331:     case 0b110_110:  //(d8,A6,Rn.wl)
 20332:     case 0b110_111:  //(d8,A7,Rn.wl)
 20333:       if (XEiJ.MPU_COMPOUND_POSTINCREMENT) {
 20334:         w = mmuReadWordZeroExword ((XEiJ.regPC += 2) - 2, XEiJ.regSRS);  //pcwz。拡張ワード
 20335:       } else {
 20336:         w = XEiJ.regPC;
 20337:         XEiJ.regPC = w + 2;
 20338:         w = mmuReadWordZeroExword (w, XEiJ.regSRS);  //pcwz。拡張ワード
 20339:       }
 20340:       if (w << 31 - 8 < 0) {  //フルフォーマット
 20341:         XEiJ.mpuCycleCount += w << -2 == 0 ? 1 : 3;  //メモリ間接なし:メモリ間接あり
 20342:       }
 20343:       t = (((~w & 0x0180) == 0 ? 0 :  //ベースレジスタサプレス
 20344:             XEiJ.regRn[ea - (0b110_000 - 8)])  //ベースレジスタ
 20345:            + (w << 31 - 8 >= 0 ? (byte) w :  //バイトディスプレースメント
 20346:               w << 31 - 5 >= 0 ? 0 :  //ヌルベースディスプレースメント
 20347:               w << 31 - 4 >= 0 ? mmuReadWordSignExword ((XEiJ.regPC += 2) - 2, XEiJ.regSRS) :  //pcws。ワードベースディスプレースメント
 20348:               mmuReadLongExword ((XEiJ.regPC += 4) - 4, XEiJ.regSRS)));  //pcls。ロングベースディスプレースメント
 20349:       x = ((~w & 0x0140) == 0 ? 0 :  //インデックスサプレス
 20350:            (w << 31 - 11 >= 0 ? (short) XEiJ.regRn[w >> 12] :  //ワードインデックス
 20351:             XEiJ.regRn[w >> 12])  //ロングインデックス
 20352:            << (w >> 9 & 3));  //スケールファクタ。ワードインデックスのときは符号拡張してから掛ける
 20353:       return ((w & 0x0103) <= 0x0100 ? t + x :  //メモリ間接なし
 20354:               ((XEiJ.TEST_BIT_2_SHIFT ? w << 31 - 2 >= 0 : (w & 4) == 0) ? mmuReadLongData (t + x, XEiJ.regSRS) :  //プリインデックス
 20355:                mmuReadLongData (t, XEiJ.regSRS) + x)  //ポストインデックス
 20356:               + ((XEiJ.TEST_BIT_1_SHIFT ? w << 31 - 1 >= 0 : (w & 2) == 0) ? 0 :  //ヌルアウタディスプレースメント
 20357:                  (XEiJ.TEST_BIT_0_SHIFT ? w << 31 - 0 >= 0 : (w & 1) == 0) ? mmuReadWordSignExword ((XEiJ.regPC += 2) - 2, XEiJ.regSRS) :  //pcws。ワードアウタディスプレースメント
 20358:                  mmuReadLongExword ((XEiJ.regPC += 4) - 4, XEiJ.regSRS)));  //pcls。ロングアウタディスプレースメント
 20359:     case 0b111_000:  //(xxx).W
 20360:       return mmuReadWordSignExword ((XEiJ.regPC += 2) - 2, XEiJ.regSRS);  //pcws
 20361:     case 0b111_001:  //(xxx).L
 20362:       return mmuReadLongExword ((XEiJ.regPC += 4) - 4, XEiJ.regSRS);  //pcls
 20363:     case 0b111_010:  //(d16,PC)
 20364:       t = XEiJ.regPC;
 20365:       XEiJ.regPC = t + 2;
 20366:       return (t  //ベースレジスタ
 20367:               + mmuReadWordSignExword (t, XEiJ.regSRS));  //pcws。ワードディスプレースメント
 20368:     case 0b111_011:  //(d8,PC,Rn.wl)
 20369:       t = XEiJ.regPC;
 20370:       XEiJ.regPC = t + 2;
 20371:       w = mmuReadWordZeroExword (t, XEiJ.regSRS);  //pcwz。拡張ワード
 20372:       if (w << 31 - 8 < 0) {  //フルフォーマット
 20373:         XEiJ.mpuCycleCount += w << -2 == 0 ? 1 : 3;  //メモリ間接なし:メモリ間接あり
 20374:       }
 20375:       t = (((~w & 0x0180) == 0 ? 0 :  //ベースレジスタサプレス
 20376:             t)  //ベースレジスタ
 20377:            + (w << 31 - 8 >= 0 ? (byte) w :  //バイトディスプレースメント
 20378:               w << 31 - 5 >= 0 ? 0 :  //ヌルベースディスプレースメント
 20379:               w << 31 - 4 >= 0 ? mmuReadWordSignExword ((XEiJ.regPC += 2) - 2, XEiJ.regSRS) :  //pcws。ワードベースディスプレースメント
 20380:               mmuReadLongExword ((XEiJ.regPC += 4) - 4, XEiJ.regSRS)));  //pcls。ロングベースディスプレースメント
 20381:       x = ((~w & 0x0140) == 0 ? 0 :  //インデックスサプレス
 20382:            (w << 31 - 11 >= 0 ? (short) XEiJ.regRn[w >> 12] :  //ワードインデックス
 20383:             XEiJ.regRn[w >> 12])  //ロングインデックス
 20384:            << (w >> 9 & 3));  //スケールファクタ。ワードインデックスのときは符号拡張してから掛ける
 20385:       return ((w & 0x0103) <= 0x0100 ? t + x :  //メモリ間接なし
 20386:               ((XEiJ.TEST_BIT_2_SHIFT ? w << 31 - 2 >= 0 : (w & 4) == 0) ? mmuReadLongData (t + x, XEiJ.regSRS) :  //プリインデックス
 20387:                mmuReadLongData (t, XEiJ.regSRS) + x)  //ポストインデックス
 20388:               + ((XEiJ.TEST_BIT_1_SHIFT ? w << 31 - 1 >= 0 : (w & 2) == 0) ? 0 :  //ヌルアウタディスプレースメント
 20389:                  (XEiJ.TEST_BIT_0_SHIFT ? w << 31 - 0 >= 0 : (w & 1) == 0) ? mmuReadWordSignExword ((XEiJ.regPC += 2) - 2, XEiJ.regSRS) :  //pcws。ワードアウタディスプレースメント
 20390:                  mmuReadLongExword ((XEiJ.regPC += 4) - 4, XEiJ.regSRS)));  //pcls。ロングアウタディスプレースメント
 20391:     case 0b111_100:  //#<data>
 20392:       if (XEiJ.MPU_COMPOUND_POSTINCREMENT) {
 20393:         return (XEiJ.regPC += 4) - 4;
 20394:       } else {
 20395:         t = XEiJ.regPC;
 20396:         XEiJ.regPC = t + 4;
 20397:         return t;
 20398:       }
 20399:     }  //switch
 20400:     M68kException.m6eNumber = M68kException.M6E_ILLEGAL_INSTRUCTION;
 20401:     throw M68kException.m6eSignal;
 20402:   }  //efaAnyLong
 20403: 
 20404:   //a = efaMemLong (ea)  //|  M+-WXZP |
 20405:   //  メモリモードのロングオペランドの実効アドレスを求める
 20406:   //  efaAnyLongとの違いは#<data>がないこと
 20407:   @SuppressWarnings ("fallthrough") public static int efaMemLong (int ea) throws M68kException {
 20408:     int t, w, x;
 20409:     switch (ea) {
 20410:     case 0b010_000:  //(A0)
 20411:       if (XEiJ.EFA_SEPARATE_AR) {
 20412:         return XEiJ.regRn[ 8];
 20413:       }
 20414:       //fallthrough
 20415:     case 0b010_001:  //(A1)
 20416:       if (XEiJ.EFA_SEPARATE_AR) {
 20417:         return XEiJ.regRn[ 9];
 20418:       }
 20419:       //fallthrough
 20420:     case 0b010_010:  //(A2)
 20421:       if (XEiJ.EFA_SEPARATE_AR) {
 20422:         return XEiJ.regRn[10];
 20423:       }
 20424:       //fallthrough
 20425:     case 0b010_011:  //(A3)
 20426:       if (XEiJ.EFA_SEPARATE_AR) {
 20427:         return XEiJ.regRn[11];
 20428:       }
 20429:       //fallthrough
 20430:     case 0b010_100:  //(A4)
 20431:       if (XEiJ.EFA_SEPARATE_AR) {
 20432:         return XEiJ.regRn[12];
 20433:       }
 20434:       //fallthrough
 20435:     case 0b010_101:  //(A5)
 20436:       if (XEiJ.EFA_SEPARATE_AR) {
 20437:         return XEiJ.regRn[13];
 20438:       }
 20439:       //fallthrough
 20440:     case 0b010_110:  //(A6)
 20441:       if (XEiJ.EFA_SEPARATE_AR) {
 20442:         return XEiJ.regRn[14];
 20443:       }
 20444:       //fallthrough
 20445:     case 0b010_111:  //(A7)
 20446:       if (XEiJ.EFA_SEPARATE_AR) {
 20447:         return XEiJ.regRn[15];
 20448:       } else {
 20449:         return XEiJ.regRn[ea - (0b010_000 - 8)];
 20450:       }
 20451:     case 0b011_000:  //(A0)+
 20452:       if (XEiJ.EFA_SEPARATE_AR) {
 20453:         M68kException.m6eIncremented += 4L << (0 << 3);
 20454:         return (XEiJ.regRn[ 8] += 4) - 4;
 20455:       }
 20456:       //fallthrough
 20457:     case 0b011_001:  //(A1)+
 20458:       if (XEiJ.EFA_SEPARATE_AR) {
 20459:         M68kException.m6eIncremented += 4L << (1 << 3);
 20460:         return (XEiJ.regRn[ 9] += 4) - 4;
 20461:       }
 20462:       //fallthrough
 20463:     case 0b011_010:  //(A2)+
 20464:       if (XEiJ.EFA_SEPARATE_AR) {
 20465:         M68kException.m6eIncremented += 4L << (2 << 3);
 20466:         return (XEiJ.regRn[10] += 4) - 4;
 20467:       }
 20468:       //fallthrough
 20469:     case 0b011_011:  //(A3)+
 20470:       if (XEiJ.EFA_SEPARATE_AR) {
 20471:         M68kException.m6eIncremented += 4L << (3 << 3);
 20472:         return (XEiJ.regRn[11] += 4) - 4;
 20473:       }
 20474:       //fallthrough
 20475:     case 0b011_100:  //(A4)+
 20476:       if (XEiJ.EFA_SEPARATE_AR) {
 20477:         M68kException.m6eIncremented += 4L << (4 << 3);
 20478:         return (XEiJ.regRn[12] += 4) - 4;
 20479:       }
 20480:       //fallthrough
 20481:     case 0b011_101:  //(A5)+
 20482:       if (XEiJ.EFA_SEPARATE_AR) {
 20483:         M68kException.m6eIncremented += 4L << (5 << 3);
 20484:         return (XEiJ.regRn[13] += 4) - 4;
 20485:       }
 20486:       //fallthrough
 20487:     case 0b011_110:  //(A6)+
 20488:       if (XEiJ.EFA_SEPARATE_AR) {
 20489:         M68kException.m6eIncremented += 4L << (6 << 3);
 20490:         return (XEiJ.regRn[14] += 4) - 4;
 20491:       }
 20492:       //fallthrough
 20493:     case 0b011_111:  //(A7)+
 20494:       if (XEiJ.EFA_SEPARATE_AR) {
 20495:         M68kException.m6eIncremented += 4L << (7 << 3);
 20496:         return (XEiJ.regRn[15] += 4) - 4;
 20497:       } else {
 20498:         M68kException.m6eIncremented += 4L << ((ea & 7) << 3);
 20499:         return (XEiJ.regRn[ea - (0b011_000 - 8)] += 4) - 4;
 20500:       }
 20501:     case 0b100_000:  //-(A0)
 20502:       if (XEiJ.EFA_SEPARATE_AR) {
 20503:         M68kException.m6eIncremented -= 4L << (0 << 3);
 20504:         return XEiJ.regRn[ 8] -= 4;
 20505:       }
 20506:       //fallthrough
 20507:     case 0b100_001:  //-(A1)
 20508:       if (XEiJ.EFA_SEPARATE_AR) {
 20509:         M68kException.m6eIncremented -= 4L << (1 << 3);
 20510:         return XEiJ.regRn[ 9] -= 4;
 20511:       }
 20512:       //fallthrough
 20513:     case 0b100_010:  //-(A2)
 20514:       if (XEiJ.EFA_SEPARATE_AR) {
 20515:         M68kException.m6eIncremented -= 4L << (2 << 3);
 20516:         return XEiJ.regRn[10] -= 4;
 20517:       }
 20518:       //fallthrough
 20519:     case 0b100_011:  //-(A3)
 20520:       if (XEiJ.EFA_SEPARATE_AR) {
 20521:         M68kException.m6eIncremented -= 4L << (3 << 3);
 20522:         return XEiJ.regRn[11] -= 4;
 20523:       }
 20524:       //fallthrough
 20525:     case 0b100_100:  //-(A4)
 20526:       if (XEiJ.EFA_SEPARATE_AR) {
 20527:         M68kException.m6eIncremented -= 4L << (4 << 3);
 20528:         return XEiJ.regRn[12] -= 4;
 20529:       }
 20530:       //fallthrough
 20531:     case 0b100_101:  //-(A5)
 20532:       if (XEiJ.EFA_SEPARATE_AR) {
 20533:         M68kException.m6eIncremented -= 4L << (5 << 3);
 20534:         return XEiJ.regRn[13] -= 4;
 20535:       }
 20536:       //fallthrough
 20537:     case 0b100_110:  //-(A6)
 20538:       if (XEiJ.EFA_SEPARATE_AR) {
 20539:         M68kException.m6eIncremented -= 4L << (6 << 3);
 20540:         return XEiJ.regRn[14] -= 4;
 20541:       }
 20542:       //fallthrough
 20543:     case 0b100_111:  //-(A7)
 20544:       if (XEiJ.EFA_SEPARATE_AR) {
 20545:         M68kException.m6eIncremented -= 4L << (7 << 3);
 20546:         return XEiJ.regRn[15] -= 4;
 20547:       } else {
 20548:         M68kException.m6eIncremented -= 4L << ((ea & 7) << 3);
 20549:         return XEiJ.regRn[ea - (0b100_000 - 8)] -= 4;
 20550:       }
 20551:     case 0b101_000:  //(d16,A0)
 20552:     case 0b101_001:  //(d16,A1)
 20553:     case 0b101_010:  //(d16,A2)
 20554:     case 0b101_011:  //(d16,A3)
 20555:     case 0b101_100:  //(d16,A4)
 20556:     case 0b101_101:  //(d16,A5)
 20557:     case 0b101_110:  //(d16,A6)
 20558:     case 0b101_111:  //(d16,A7)
 20559:       if (XEiJ.MPU_COMPOUND_POSTINCREMENT) {
 20560:         return (XEiJ.regRn[ea - (0b101_000 - 8)]  //ベースレジスタ
 20561:                 + mmuReadWordSignExword ((XEiJ.regPC += 2) - 2, XEiJ.regSRS));  //pcws。ワードディスプレースメント
 20562:       } else {
 20563:         t = XEiJ.regPC;
 20564:         XEiJ.regPC = t + 2;
 20565:         return (XEiJ.regRn[ea - (0b101_000 - 8)]  //ベースレジスタ
 20566:                 + mmuReadWordSignExword (t, XEiJ.regSRS));  //pcws。ワードディスプレースメント
 20567:       }
 20568:     case 0b110_000:  //(d8,A0,Rn.wl)
 20569:     case 0b110_001:  //(d8,A1,Rn.wl)
 20570:     case 0b110_010:  //(d8,A2,Rn.wl)
 20571:     case 0b110_011:  //(d8,A3,Rn.wl)
 20572:     case 0b110_100:  //(d8,A4,Rn.wl)
 20573:     case 0b110_101:  //(d8,A5,Rn.wl)
 20574:     case 0b110_110:  //(d8,A6,Rn.wl)
 20575:     case 0b110_111:  //(d8,A7,Rn.wl)
 20576:       if (XEiJ.MPU_COMPOUND_POSTINCREMENT) {
 20577:         w = mmuReadWordZeroExword ((XEiJ.regPC += 2) - 2, XEiJ.regSRS);  //pcwz。拡張ワード
 20578:       } else {
 20579:         w = XEiJ.regPC;
 20580:         XEiJ.regPC = w + 2;
 20581:         w = mmuReadWordZeroExword (w, XEiJ.regSRS);  //pcwz。拡張ワード
 20582:       }
 20583:       if (w << 31 - 8 < 0) {  //フルフォーマット
 20584:         XEiJ.mpuCycleCount += w << -2 == 0 ? 1 : 3;  //メモリ間接なし:メモリ間接あり
 20585:       }
 20586:       t = (((~w & 0x0180) == 0 ? 0 :  //ベースレジスタサプレス
 20587:             XEiJ.regRn[ea - (0b110_000 - 8)])  //ベースレジスタ
 20588:            + (w << 31 - 8 >= 0 ? (byte) w :  //バイトディスプレースメント
 20589:               w << 31 - 5 >= 0 ? 0 :  //ヌルベースディスプレースメント
 20590:               w << 31 - 4 >= 0 ? mmuReadWordSignExword ((XEiJ.regPC += 2) - 2, XEiJ.regSRS) :  //pcws。ワードベースディスプレースメント
 20591:               mmuReadLongExword ((XEiJ.regPC += 4) - 4, XEiJ.regSRS)));  //pcls。ロングベースディスプレースメント
 20592:       x = ((~w & 0x0140) == 0 ? 0 :  //インデックスサプレス
 20593:            (w << 31 - 11 >= 0 ? (short) XEiJ.regRn[w >> 12] :  //ワードインデックス
 20594:             XEiJ.regRn[w >> 12])  //ロングインデックス
 20595:            << (w >> 9 & 3));  //スケールファクタ。ワードインデックスのときは符号拡張してから掛ける
 20596:       return ((w & 0x0103) <= 0x0100 ? t + x :  //メモリ間接なし
 20597:               ((XEiJ.TEST_BIT_2_SHIFT ? w << 31 - 2 >= 0 : (w & 4) == 0) ? mmuReadLongData (t + x, XEiJ.regSRS) :  //プリインデックス
 20598:                mmuReadLongData (t, XEiJ.regSRS) + x)  //ポストインデックス
 20599:               + ((XEiJ.TEST_BIT_1_SHIFT ? w << 31 - 1 >= 0 : (w & 2) == 0) ? 0 :  //ヌルアウタディスプレースメント
 20600:                  (XEiJ.TEST_BIT_0_SHIFT ? w << 31 - 0 >= 0 : (w & 1) == 0) ? mmuReadWordSignExword ((XEiJ.regPC += 2) - 2, XEiJ.regSRS) :  //pcws。ワードアウタディスプレースメント
 20601:                  mmuReadLongExword ((XEiJ.regPC += 4) - 4, XEiJ.regSRS)));  //pcls。ロングアウタディスプレースメント
 20602:     case 0b111_000:  //(xxx).W
 20603:       return mmuReadWordSignExword ((XEiJ.regPC += 2) - 2, XEiJ.regSRS);  //pcws
 20604:     case 0b111_001:  //(xxx).L
 20605:       return mmuReadLongExword ((XEiJ.regPC += 4) - 4, XEiJ.regSRS);  //pcls
 20606:     case 0b111_010:  //(d16,PC)
 20607:       t = XEiJ.regPC;
 20608:       XEiJ.regPC = t + 2;
 20609:       return (t  //ベースレジスタ
 20610:               + mmuReadWordSignExword (t, XEiJ.regSRS));  //pcws。ワードディスプレースメント
 20611:     case 0b111_011:  //(d8,PC,Rn.wl)
 20612:       t = XEiJ.regPC;
 20613:       XEiJ.regPC = t + 2;
 20614:       w = mmuReadWordZeroExword (t, XEiJ.regSRS);  //pcwz。拡張ワード
 20615:       if (w << 31 - 8 < 0) {  //フルフォーマット
 20616:         XEiJ.mpuCycleCount += w << -2 == 0 ? 1 : 3;  //メモリ間接なし:メモリ間接あり
 20617:       }
 20618:       t = (((~w & 0x0180) == 0 ? 0 :  //ベースレジスタサプレス
 20619:             t)  //ベースレジスタ
 20620:            + (w << 31 - 8 >= 0 ? (byte) w :  //バイトディスプレースメント
 20621:               w << 31 - 5 >= 0 ? 0 :  //ヌルベースディスプレースメント
 20622:               w << 31 - 4 >= 0 ? mmuReadWordSignExword ((XEiJ.regPC += 2) - 2, XEiJ.regSRS) :  //pcws。ワードベースディスプレースメント
 20623:               mmuReadLongExword ((XEiJ.regPC += 4) - 4, XEiJ.regSRS)));  //pcls。ロングベースディスプレースメント
 20624:       x = ((~w & 0x0140) == 0 ? 0 :  //インデックスサプレス
 20625:            (w << 31 - 11 >= 0 ? (short) XEiJ.regRn[w >> 12] :  //ワードインデックス
 20626:             XEiJ.regRn[w >> 12])  //ロングインデックス
 20627:            << (w >> 9 & 3));  //スケールファクタ。ワードインデックスのときは符号拡張してから掛ける
 20628:       return ((w & 0x0103) <= 0x0100 ? t + x :  //メモリ間接なし
 20629:               ((XEiJ.TEST_BIT_2_SHIFT ? w << 31 - 2 >= 0 : (w & 4) == 0) ? mmuReadLongData (t + x, XEiJ.regSRS) :  //プリインデックス
 20630:                mmuReadLongData (t, XEiJ.regSRS) + x)  //ポストインデックス
 20631:               + ((XEiJ.TEST_BIT_1_SHIFT ? w << 31 - 1 >= 0 : (w & 2) == 0) ? 0 :  //ヌルアウタディスプレースメント
 20632:                  (XEiJ.TEST_BIT_0_SHIFT ? w << 31 - 0 >= 0 : (w & 1) == 0) ? mmuReadWordSignExword ((XEiJ.regPC += 2) - 2, XEiJ.regSRS) :  //pcws。ワードアウタディスプレースメント
 20633:                  mmuReadLongExword ((XEiJ.regPC += 4) - 4, XEiJ.regSRS)));  //pcls。ロングアウタディスプレースメント
 20634:     }  //switch
 20635:     M68kException.m6eNumber = M68kException.M6E_ILLEGAL_INSTRUCTION;
 20636:     throw M68kException.m6eSignal;
 20637:   }  //efaMemLong
 20638: 
 20639:   //a = efaMltLong (ea)  //|  M+-WXZ  |
 20640:   //  メモリ可変モードのロングオペランドの実効アドレスを求める
 20641:   //  efaMemLongとの違いは(d16,PC)と(d8,PC,Rn.wl)がないこと
 20642:   @SuppressWarnings ("fallthrough") public static int efaMltLong (int ea) throws M68kException {
 20643:     int t, w, x;
 20644:     switch (ea) {
 20645:     case 0b010_000:  //(A0)
 20646:       if (XEiJ.EFA_SEPARATE_AR) {
 20647:         return XEiJ.regRn[ 8];
 20648:       }
 20649:       //fallthrough
 20650:     case 0b010_001:  //(A1)
 20651:       if (XEiJ.EFA_SEPARATE_AR) {
 20652:         return XEiJ.regRn[ 9];
 20653:       }
 20654:       //fallthrough
 20655:     case 0b010_010:  //(A2)
 20656:       if (XEiJ.EFA_SEPARATE_AR) {
 20657:         return XEiJ.regRn[10];
 20658:       }
 20659:       //fallthrough
 20660:     case 0b010_011:  //(A3)
 20661:       if (XEiJ.EFA_SEPARATE_AR) {
 20662:         return XEiJ.regRn[11];
 20663:       }
 20664:       //fallthrough
 20665:     case 0b010_100:  //(A4)
 20666:       if (XEiJ.EFA_SEPARATE_AR) {
 20667:         return XEiJ.regRn[12];
 20668:       }
 20669:       //fallthrough
 20670:     case 0b010_101:  //(A5)
 20671:       if (XEiJ.EFA_SEPARATE_AR) {
 20672:         return XEiJ.regRn[13];
 20673:       }
 20674:       //fallthrough
 20675:     case 0b010_110:  //(A6)
 20676:       if (XEiJ.EFA_SEPARATE_AR) {
 20677:         return XEiJ.regRn[14];
 20678:       }
 20679:       //fallthrough
 20680:     case 0b010_111:  //(A7)
 20681:       if (XEiJ.EFA_SEPARATE_AR) {
 20682:         return XEiJ.regRn[15];
 20683:       } else {
 20684:         return XEiJ.regRn[ea - (0b010_000 - 8)];
 20685:       }
 20686:     case 0b011_000:  //(A0)+
 20687:       if (XEiJ.EFA_SEPARATE_AR) {
 20688:         M68kException.m6eIncremented += 4L << (0 << 3);
 20689:         return (XEiJ.regRn[ 8] += 4) - 4;
 20690:       }
 20691:       //fallthrough
 20692:     case 0b011_001:  //(A1)+
 20693:       if (XEiJ.EFA_SEPARATE_AR) {
 20694:         M68kException.m6eIncremented += 4L << (1 << 3);
 20695:         return (XEiJ.regRn[ 9] += 4) - 4;
 20696:       }
 20697:       //fallthrough
 20698:     case 0b011_010:  //(A2)+
 20699:       if (XEiJ.EFA_SEPARATE_AR) {
 20700:         M68kException.m6eIncremented += 4L << (2 << 3);
 20701:         return (XEiJ.regRn[10] += 4) - 4;
 20702:       }
 20703:       //fallthrough
 20704:     case 0b011_011:  //(A3)+
 20705:       if (XEiJ.EFA_SEPARATE_AR) {
 20706:         M68kException.m6eIncremented += 4L << (3 << 3);
 20707:         return (XEiJ.regRn[11] += 4) - 4;
 20708:       }
 20709:       //fallthrough
 20710:     case 0b011_100:  //(A4)+
 20711:       if (XEiJ.EFA_SEPARATE_AR) {
 20712:         M68kException.m6eIncremented += 4L << (4 << 3);
 20713:         return (XEiJ.regRn[12] += 4) - 4;
 20714:       }
 20715:       //fallthrough
 20716:     case 0b011_101:  //(A5)+
 20717:       if (XEiJ.EFA_SEPARATE_AR) {
 20718:         M68kException.m6eIncremented += 4L << (5 << 3);
 20719:         return (XEiJ.regRn[13] += 4) - 4;
 20720:       }
 20721:       //fallthrough
 20722:     case 0b011_110:  //(A6)+
 20723:       if (XEiJ.EFA_SEPARATE_AR) {
 20724:         M68kException.m6eIncremented += 4L << (6 << 3);
 20725:         return (XEiJ.regRn[14] += 4) - 4;
 20726:       }
 20727:       //fallthrough
 20728:     case 0b011_111:  //(A7)+
 20729:       if (XEiJ.EFA_SEPARATE_AR) {
 20730:         M68kException.m6eIncremented += 4L << (7 << 3);
 20731:         return (XEiJ.regRn[15] += 4) - 4;
 20732:       } else {
 20733:         M68kException.m6eIncremented += 4L << ((ea & 7) << 3);
 20734:         return (XEiJ.regRn[ea - (0b011_000 - 8)] += 4) - 4;
 20735:       }
 20736:     case 0b100_000:  //-(A0)
 20737:       if (XEiJ.EFA_SEPARATE_AR) {
 20738:         M68kException.m6eIncremented -= 4L << (0 << 3);
 20739:         return XEiJ.regRn[ 8] -= 4;
 20740:       }
 20741:       //fallthrough
 20742:     case 0b100_001:  //-(A1)
 20743:       if (XEiJ.EFA_SEPARATE_AR) {
 20744:         M68kException.m6eIncremented -= 4L << (1 << 3);
 20745:         return XEiJ.regRn[ 9] -= 4;
 20746:       }
 20747:       //fallthrough
 20748:     case 0b100_010:  //-(A2)
 20749:       if (XEiJ.EFA_SEPARATE_AR) {
 20750:         M68kException.m6eIncremented -= 4L << (2 << 3);
 20751:         return XEiJ.regRn[10] -= 4;
 20752:       }
 20753:       //fallthrough
 20754:     case 0b100_011:  //-(A3)
 20755:       if (XEiJ.EFA_SEPARATE_AR) {
 20756:         M68kException.m6eIncremented -= 4L << (3 << 3);
 20757:         return XEiJ.regRn[11] -= 4;
 20758:       }
 20759:       //fallthrough
 20760:     case 0b100_100:  //-(A4)
 20761:       if (XEiJ.EFA_SEPARATE_AR) {
 20762:         M68kException.m6eIncremented -= 4L << (4 << 3);
 20763:         return XEiJ.regRn[12] -= 4;
 20764:       }
 20765:       //fallthrough
 20766:     case 0b100_101:  //-(A5)
 20767:       if (XEiJ.EFA_SEPARATE_AR) {
 20768:         M68kException.m6eIncremented -= 4L << (5 << 3);
 20769:         return XEiJ.regRn[13] -= 4;
 20770:       }
 20771:       //fallthrough
 20772:     case 0b100_110:  //-(A6)
 20773:       if (XEiJ.EFA_SEPARATE_AR) {
 20774:         M68kException.m6eIncremented -= 4L << (6 << 3);
 20775:         return XEiJ.regRn[14] -= 4;
 20776:       }
 20777:       //fallthrough
 20778:     case 0b100_111:  //-(A7)
 20779:       if (XEiJ.EFA_SEPARATE_AR) {
 20780:         M68kException.m6eIncremented -= 4L << (7 << 3);
 20781:         return XEiJ.regRn[15] -= 4;
 20782:       } else {
 20783:         M68kException.m6eIncremented -= 4L << ((ea & 7) << 3);
 20784:         return XEiJ.regRn[ea - (0b100_000 - 8)] -= 4;
 20785:       }
 20786:     case 0b101_000:  //(d16,A0)
 20787:     case 0b101_001:  //(d16,A1)
 20788:     case 0b101_010:  //(d16,A2)
 20789:     case 0b101_011:  //(d16,A3)
 20790:     case 0b101_100:  //(d16,A4)
 20791:     case 0b101_101:  //(d16,A5)
 20792:     case 0b101_110:  //(d16,A6)
 20793:     case 0b101_111:  //(d16,A7)
 20794:       if (XEiJ.MPU_COMPOUND_POSTINCREMENT) {
 20795:         return (XEiJ.regRn[ea - (0b101_000 - 8)]  //ベースレジスタ
 20796:                 + mmuReadWordSignExword ((XEiJ.regPC += 2) - 2, XEiJ.regSRS));  //pcws。ワードディスプレースメント
 20797:       } else {
 20798:         t = XEiJ.regPC;
 20799:         XEiJ.regPC = t + 2;
 20800:         return (XEiJ.regRn[ea - (0b101_000 - 8)]  //ベースレジスタ
 20801:                 + mmuReadWordSignExword (t, XEiJ.regSRS));  //pcws。ワードディスプレースメント
 20802:       }
 20803:     case 0b110_000:  //(d8,A0,Rn.wl)
 20804:     case 0b110_001:  //(d8,A1,Rn.wl)
 20805:     case 0b110_010:  //(d8,A2,Rn.wl)
 20806:     case 0b110_011:  //(d8,A3,Rn.wl)
 20807:     case 0b110_100:  //(d8,A4,Rn.wl)
 20808:     case 0b110_101:  //(d8,A5,Rn.wl)
 20809:     case 0b110_110:  //(d8,A6,Rn.wl)
 20810:     case 0b110_111:  //(d8,A7,Rn.wl)
 20811:       if (XEiJ.MPU_COMPOUND_POSTINCREMENT) {
 20812:         w = mmuReadWordZeroExword ((XEiJ.regPC += 2) - 2, XEiJ.regSRS);  //pcwz。拡張ワード
 20813:       } else {
 20814:         w = XEiJ.regPC;
 20815:         XEiJ.regPC = w + 2;
 20816:         w = mmuReadWordZeroExword (w, XEiJ.regSRS);  //pcwz。拡張ワード
 20817:       }
 20818:       if (w << 31 - 8 < 0) {  //フルフォーマット
 20819:         XEiJ.mpuCycleCount += w << -2 == 0 ? 1 : 3;  //メモリ間接なし:メモリ間接あり
 20820:       }
 20821:       t = (((~w & 0x0180) == 0 ? 0 :  //ベースレジスタサプレス
 20822:             XEiJ.regRn[ea - (0b110_000 - 8)])  //ベースレジスタ
 20823:            + (w << 31 - 8 >= 0 ? (byte) w :  //バイトディスプレースメント
 20824:               w << 31 - 5 >= 0 ? 0 :  //ヌルベースディスプレースメント
 20825:               w << 31 - 4 >= 0 ? mmuReadWordSignExword ((XEiJ.regPC += 2) - 2, XEiJ.regSRS) :  //pcws。ワードベースディスプレースメント
 20826:               mmuReadLongExword ((XEiJ.regPC += 4) - 4, XEiJ.regSRS)));  //pcls。ロングベースディスプレースメント
 20827:       x = ((~w & 0x0140) == 0 ? 0 :  //インデックスサプレス
 20828:            (w << 31 - 11 >= 0 ? (short) XEiJ.regRn[w >> 12] :  //ワードインデックス
 20829:             XEiJ.regRn[w >> 12])  //ロングインデックス
 20830:            << (w >> 9 & 3));  //スケールファクタ。ワードインデックスのときは符号拡張してから掛ける
 20831:       return ((w & 0x0103) <= 0x0100 ? t + x :  //メモリ間接なし
 20832:               ((XEiJ.TEST_BIT_2_SHIFT ? w << 31 - 2 >= 0 : (w & 4) == 0) ? mmuReadLongData (t + x, XEiJ.regSRS) :  //プリインデックス
 20833:                mmuReadLongData (t, XEiJ.regSRS) + x)  //ポストインデックス
 20834:               + ((XEiJ.TEST_BIT_1_SHIFT ? w << 31 - 1 >= 0 : (w & 2) == 0) ? 0 :  //ヌルアウタディスプレースメント
 20835:                  (XEiJ.TEST_BIT_0_SHIFT ? w << 31 - 0 >= 0 : (w & 1) == 0) ? mmuReadWordSignExword ((XEiJ.regPC += 2) - 2, XEiJ.regSRS) :  //pcws。ワードアウタディスプレースメント
 20836:                  mmuReadLongExword ((XEiJ.regPC += 4) - 4, XEiJ.regSRS)));  //pcls。ロングアウタディスプレースメント
 20837:     case 0b111_000:  //(xxx).W
 20838:       return mmuReadWordSignExword ((XEiJ.regPC += 2) - 2, XEiJ.regSRS);  //pcws
 20839:     case 0b111_001:  //(xxx).L
 20840:       return mmuReadLongExword ((XEiJ.regPC += 4) - 4, XEiJ.regSRS);  //pcls
 20841:     }  //switch
 20842:     M68kException.m6eNumber = M68kException.M6E_ILLEGAL_INSTRUCTION;
 20843:     throw M68kException.m6eSignal;
 20844:   }  //efaMltLong
 20845: 
 20846:   //a = efaCntLong (ea)  //|  M  WXZP |
 20847:   //  制御モードのロングオペランドの実効アドレスを求める
 20848:   //  efaMemLongとの違いは(Ar)+と-(Ar)がないこと
 20849:   @SuppressWarnings ("fallthrough") public static int efaCntLong (int ea) throws M68kException {
 20850:     int t, w, x;
 20851:     switch (ea) {
 20852:     case 0b010_000:  //(A0)
 20853:       if (XEiJ.EFA_SEPARATE_AR) {
 20854:         return XEiJ.regRn[ 8];
 20855:       }
 20856:       //fallthrough
 20857:     case 0b010_001:  //(A1)
 20858:       if (XEiJ.EFA_SEPARATE_AR) {
 20859:         return XEiJ.regRn[ 9];
 20860:       }
 20861:       //fallthrough
 20862:     case 0b010_010:  //(A2)
 20863:       if (XEiJ.EFA_SEPARATE_AR) {
 20864:         return XEiJ.regRn[10];
 20865:       }
 20866:       //fallthrough
 20867:     case 0b010_011:  //(A3)
 20868:       if (XEiJ.EFA_SEPARATE_AR) {
 20869:         return XEiJ.regRn[11];
 20870:       }
 20871:       //fallthrough
 20872:     case 0b010_100:  //(A4)
 20873:       if (XEiJ.EFA_SEPARATE_AR) {
 20874:         return XEiJ.regRn[12];
 20875:       }
 20876:       //fallthrough
 20877:     case 0b010_101:  //(A5)
 20878:       if (XEiJ.EFA_SEPARATE_AR) {
 20879:         return XEiJ.regRn[13];
 20880:       }
 20881:       //fallthrough
 20882:     case 0b010_110:  //(A6)
 20883:       if (XEiJ.EFA_SEPARATE_AR) {
 20884:         return XEiJ.regRn[14];
 20885:       }
 20886:       //fallthrough
 20887:     case 0b010_111:  //(A7)
 20888:       if (XEiJ.EFA_SEPARATE_AR) {
 20889:         return XEiJ.regRn[15];
 20890:       } else {
 20891:         return XEiJ.regRn[ea - (0b010_000 - 8)];
 20892:       }
 20893:     case 0b101_000:  //(d16,A0)
 20894:     case 0b101_001:  //(d16,A1)
 20895:     case 0b101_010:  //(d16,A2)
 20896:     case 0b101_011:  //(d16,A3)
 20897:     case 0b101_100:  //(d16,A4)
 20898:     case 0b101_101:  //(d16,A5)
 20899:     case 0b101_110:  //(d16,A6)
 20900:     case 0b101_111:  //(d16,A7)
 20901:       if (XEiJ.MPU_COMPOUND_POSTINCREMENT) {
 20902:         return (XEiJ.regRn[ea - (0b101_000 - 8)]  //ベースレジスタ
 20903:                 + mmuReadWordSignExword ((XEiJ.regPC += 2) - 2, XEiJ.regSRS));  //pcws。ワードディスプレースメント
 20904:       } else {
 20905:         t = XEiJ.regPC;
 20906:         XEiJ.regPC = t + 2;
 20907:         return (XEiJ.regRn[ea - (0b101_000 - 8)]  //ベースレジスタ
 20908:                 + mmuReadWordSignExword (t, XEiJ.regSRS));  //pcws。ワードディスプレースメント
 20909:       }
 20910:     case 0b110_000:  //(d8,A0,Rn.wl)
 20911:     case 0b110_001:  //(d8,A1,Rn.wl)
 20912:     case 0b110_010:  //(d8,A2,Rn.wl)
 20913:     case 0b110_011:  //(d8,A3,Rn.wl)
 20914:     case 0b110_100:  //(d8,A4,Rn.wl)
 20915:     case 0b110_101:  //(d8,A5,Rn.wl)
 20916:     case 0b110_110:  //(d8,A6,Rn.wl)
 20917:     case 0b110_111:  //(d8,A7,Rn.wl)
 20918:       if (XEiJ.MPU_COMPOUND_POSTINCREMENT) {
 20919:         w = mmuReadWordZeroExword ((XEiJ.regPC += 2) - 2, XEiJ.regSRS);  //pcwz。拡張ワード
 20920:       } else {
 20921:         w = XEiJ.regPC;
 20922:         XEiJ.regPC = w + 2;
 20923:         w = mmuReadWordZeroExword (w, XEiJ.regSRS);  //pcwz。拡張ワード
 20924:       }
 20925:       if (w << 31 - 8 < 0) {  //フルフォーマット
 20926:         XEiJ.mpuCycleCount += w << -2 == 0 ? 1 : 3;  //メモリ間接なし:メモリ間接あり
 20927:       }
 20928:       t = (((~w & 0x0180) == 0 ? 0 :  //ベースレジスタサプレス
 20929:             XEiJ.regRn[ea - (0b110_000 - 8)])  //ベースレジスタ
 20930:            + (w << 31 - 8 >= 0 ? (byte) w :  //バイトディスプレースメント
 20931:               w << 31 - 5 >= 0 ? 0 :  //ヌルベースディスプレースメント
 20932:               w << 31 - 4 >= 0 ? mmuReadWordSignExword ((XEiJ.regPC += 2) - 2, XEiJ.regSRS) :  //pcws。ワードベースディスプレースメント
 20933:               mmuReadLongExword ((XEiJ.regPC += 4) - 4, XEiJ.regSRS)));  //pcls。ロングベースディスプレースメント
 20934:       x = ((~w & 0x0140) == 0 ? 0 :  //インデックスサプレス
 20935:            (w << 31 - 11 >= 0 ? (short) XEiJ.regRn[w >> 12] :  //ワードインデックス
 20936:             XEiJ.regRn[w >> 12])  //ロングインデックス
 20937:            << (w >> 9 & 3));  //スケールファクタ。ワードインデックスのときは符号拡張してから掛ける
 20938:       return ((w & 0x0103) <= 0x0100 ? t + x :  //メモリ間接なし
 20939:               ((XEiJ.TEST_BIT_2_SHIFT ? w << 31 - 2 >= 0 : (w & 4) == 0) ? mmuReadLongData (t + x, XEiJ.regSRS) :  //プリインデックス
 20940:                mmuReadLongData (t, XEiJ.regSRS) + x)  //ポストインデックス
 20941:               + ((XEiJ.TEST_BIT_1_SHIFT ? w << 31 - 1 >= 0 : (w & 2) == 0) ? 0 :  //ヌルアウタディスプレースメント
 20942:                  (XEiJ.TEST_BIT_0_SHIFT ? w << 31 - 0 >= 0 : (w & 1) == 0) ? mmuReadWordSignExword ((XEiJ.regPC += 2) - 2, XEiJ.regSRS) :  //pcws。ワードアウタディスプレースメント
 20943:                  mmuReadLongExword ((XEiJ.regPC += 4) - 4, XEiJ.regSRS)));  //pcls。ロングアウタディスプレースメント
 20944:     case 0b111_000:  //(xxx).W
 20945:       return mmuReadWordSignExword ((XEiJ.regPC += 2) - 2, XEiJ.regSRS);  //pcws
 20946:     case 0b111_001:  //(xxx).L
 20947:       return mmuReadLongExword ((XEiJ.regPC += 4) - 4, XEiJ.regSRS);  //pcls
 20948:     case 0b111_010:  //(d16,PC)
 20949:       t = XEiJ.regPC;
 20950:       XEiJ.regPC = t + 2;
 20951:       return (t  //ベースレジスタ
 20952:               + mmuReadWordSignExword (t, XEiJ.regSRS));  //pcws。ワードディスプレースメント
 20953:     case 0b111_011:  //(d8,PC,Rn.wl)
 20954:       t = XEiJ.regPC;
 20955:       XEiJ.regPC = t + 2;
 20956:       w = mmuReadWordZeroExword (t, XEiJ.regSRS);  //pcwz。拡張ワード
 20957:       if (w << 31 - 8 < 0) {  //フルフォーマット
 20958:         XEiJ.mpuCycleCount += w << -2 == 0 ? 1 : 3;  //メモリ間接なし:メモリ間接あり
 20959:       }
 20960:       t = (((~w & 0x0180) == 0 ? 0 :  //ベースレジスタサプレス
 20961:             t)  //ベースレジスタ
 20962:            + (w << 31 - 8 >= 0 ? (byte) w :  //バイトディスプレースメント
 20963:               w << 31 - 5 >= 0 ? 0 :  //ヌルベースディスプレースメント
 20964:               w << 31 - 4 >= 0 ? mmuReadWordSignExword ((XEiJ.regPC += 2) - 2, XEiJ.regSRS) :  //pcws。ワードベースディスプレースメント
 20965:               mmuReadLongExword ((XEiJ.regPC += 4) - 4, XEiJ.regSRS)));  //pcls。ロングベースディスプレースメント
 20966:       x = ((~w & 0x0140) == 0 ? 0 :  //インデックスサプレス
 20967:            (w << 31 - 11 >= 0 ? (short) XEiJ.regRn[w >> 12] :  //ワードインデックス
 20968:             XEiJ.regRn[w >> 12])  //ロングインデックス
 20969:            << (w >> 9 & 3));  //スケールファクタ。ワードインデックスのときは符号拡張してから掛ける
 20970:       return ((w & 0x0103) <= 0x0100 ? t + x :  //メモリ間接なし
 20971:               ((XEiJ.TEST_BIT_2_SHIFT ? w << 31 - 2 >= 0 : (w & 4) == 0) ? mmuReadLongData (t + x, XEiJ.regSRS) :  //プリインデックス
 20972:                mmuReadLongData (t, XEiJ.regSRS) + x)  //ポストインデックス
 20973:               + ((XEiJ.TEST_BIT_1_SHIFT ? w << 31 - 1 >= 0 : (w & 2) == 0) ? 0 :  //ヌルアウタディスプレースメント
 20974:                  (XEiJ.TEST_BIT_0_SHIFT ? w << 31 - 0 >= 0 : (w & 1) == 0) ? mmuReadWordSignExword ((XEiJ.regPC += 2) - 2, XEiJ.regSRS) :  //pcws。ワードアウタディスプレースメント
 20975:                  mmuReadLongExword ((XEiJ.regPC += 4) - 4, XEiJ.regSRS)));  //pcls。ロングアウタディスプレースメント
 20976:     }  //switch
 20977:     M68kException.m6eNumber = M68kException.M6E_ILLEGAL_INSTRUCTION;
 20978:     throw M68kException.m6eSignal;
 20979:   }  //efaCntLong
 20980: 
 20981:   //a = efaCltLong (ea)  //|  M  WXZ  |
 20982:   //  制御可変モードのワードオペランドの実効アドレスを求める
 20983:   //  efaCntLongとの違いは(d16,PC)と(d8,PC,Rn.wl)がないこと
 20984:   @SuppressWarnings ("fallthrough") public static int efaCltLong (int ea) throws M68kException {
 20985:     int t, w, x;
 20986:     switch (ea) {
 20987:     case 0b010_000:  //(A0)
 20988:       if (XEiJ.EFA_SEPARATE_AR) {
 20989:         return XEiJ.regRn[ 8];
 20990:       }
 20991:       //fallthrough
 20992:     case 0b010_001:  //(A1)
 20993:       if (XEiJ.EFA_SEPARATE_AR) {
 20994:         return XEiJ.regRn[ 9];
 20995:       }
 20996:       //fallthrough
 20997:     case 0b010_010:  //(A2)
 20998:       if (XEiJ.EFA_SEPARATE_AR) {
 20999:         return XEiJ.regRn[10];
 21000:       }
 21001:       //fallthrough
 21002:     case 0b010_011:  //(A3)
 21003:       if (XEiJ.EFA_SEPARATE_AR) {
 21004:         return XEiJ.regRn[11];
 21005:       }
 21006:       //fallthrough
 21007:     case 0b010_100:  //(A4)
 21008:       if (XEiJ.EFA_SEPARATE_AR) {
 21009:         return XEiJ.regRn[12];
 21010:       }
 21011:       //fallthrough
 21012:     case 0b010_101:  //(A5)
 21013:       if (XEiJ.EFA_SEPARATE_AR) {
 21014:         return XEiJ.regRn[13];
 21015:       }
 21016:       //fallthrough
 21017:     case 0b010_110:  //(A6)
 21018:       if (XEiJ.EFA_SEPARATE_AR) {
 21019:         return XEiJ.regRn[14];
 21020:       }
 21021:       //fallthrough
 21022:     case 0b010_111:  //(A7)
 21023:       if (XEiJ.EFA_SEPARATE_AR) {
 21024:         return XEiJ.regRn[15];
 21025:       } else {
 21026:         return XEiJ.regRn[ea - (0b010_000 - 8)];
 21027:       }
 21028:     case 0b101_000:  //(d16,A0)
 21029:     case 0b101_001:  //(d16,A1)
 21030:     case 0b101_010:  //(d16,A2)
 21031:     case 0b101_011:  //(d16,A3)
 21032:     case 0b101_100:  //(d16,A4)
 21033:     case 0b101_101:  //(d16,A5)
 21034:     case 0b101_110:  //(d16,A6)
 21035:     case 0b101_111:  //(d16,A7)
 21036:       if (XEiJ.MPU_COMPOUND_POSTINCREMENT) {
 21037:         return (XEiJ.regRn[ea - (0b101_000 - 8)]  //ベースレジスタ
 21038:                 + mmuReadWordSignExword ((XEiJ.regPC += 2) - 2, XEiJ.regSRS));  //pcws。ワードディスプレースメント
 21039:       } else {
 21040:         t = XEiJ.regPC;
 21041:         XEiJ.regPC = t + 2;
 21042:         return (XEiJ.regRn[ea - (0b101_000 - 8)]  //ベースレジスタ
 21043:                 + mmuReadWordSignExword (t, XEiJ.regSRS));  //pcws。ワードディスプレースメント
 21044:       }
 21045:     case 0b110_000:  //(d8,A0,Rn.wl)
 21046:     case 0b110_001:  //(d8,A1,Rn.wl)
 21047:     case 0b110_010:  //(d8,A2,Rn.wl)
 21048:     case 0b110_011:  //(d8,A3,Rn.wl)
 21049:     case 0b110_100:  //(d8,A4,Rn.wl)
 21050:     case 0b110_101:  //(d8,A5,Rn.wl)
 21051:     case 0b110_110:  //(d8,A6,Rn.wl)
 21052:     case 0b110_111:  //(d8,A7,Rn.wl)
 21053:       if (XEiJ.MPU_COMPOUND_POSTINCREMENT) {
 21054:         w = mmuReadWordZeroExword ((XEiJ.regPC += 2) - 2, XEiJ.regSRS);  //pcwz。拡張ワード
 21055:       } else {
 21056:         w = XEiJ.regPC;
 21057:         XEiJ.regPC = w + 2;
 21058:         w = mmuReadWordZeroExword (w, XEiJ.regSRS);  //pcwz。拡張ワード
 21059:       }
 21060:       if (w << 31 - 8 < 0) {  //フルフォーマット
 21061:         XEiJ.mpuCycleCount += w << -2 == 0 ? 1 : 3;  //メモリ間接なし:メモリ間接あり
 21062:       }
 21063:       t = (((~w & 0x0180) == 0 ? 0 :  //ベースレジスタサプレス
 21064:             XEiJ.regRn[ea - (0b110_000 - 8)])  //ベースレジスタ
 21065:            + (w << 31 - 8 >= 0 ? (byte) w :  //バイトディスプレースメント
 21066:               w << 31 - 5 >= 0 ? 0 :  //ヌルベースディスプレースメント
 21067:               w << 31 - 4 >= 0 ? mmuReadWordSignExword ((XEiJ.regPC += 2) - 2, XEiJ.regSRS) :  //pcws。ワードベースディスプレースメント
 21068:               mmuReadLongExword ((XEiJ.regPC += 4) - 4, XEiJ.regSRS)));  //pcls。ロングベースディスプレースメント
 21069:       x = ((~w & 0x0140) == 0 ? 0 :  //インデックスサプレス
 21070:            (w << 31 - 11 >= 0 ? (short) XEiJ.regRn[w >> 12] :  //ワードインデックス
 21071:             XEiJ.regRn[w >> 12])  //ロングインデックス
 21072:            << (w >> 9 & 3));  //スケールファクタ。ワードインデックスのときは符号拡張してから掛ける
 21073:       return ((w & 0x0103) <= 0x0100 ? t + x :  //メモリ間接なし
 21074:               ((XEiJ.TEST_BIT_2_SHIFT ? w << 31 - 2 >= 0 : (w & 4) == 0) ? mmuReadLongData (t + x, XEiJ.regSRS) :  //プリインデックス
 21075:                mmuReadLongData (t, XEiJ.regSRS) + x)  //ポストインデックス
 21076:               + ((XEiJ.TEST_BIT_1_SHIFT ? w << 31 - 1 >= 0 : (w & 2) == 0) ? 0 :  //ヌルアウタディスプレースメント
 21077:                  (XEiJ.TEST_BIT_0_SHIFT ? w << 31 - 0 >= 0 : (w & 1) == 0) ? mmuReadWordSignExword ((XEiJ.regPC += 2) - 2, XEiJ.regSRS) :  //pcws。ワードアウタディスプレースメント
 21078:                  mmuReadLongExword ((XEiJ.regPC += 4) - 4, XEiJ.regSRS)));  //pcls。ロングアウタディスプレースメント
 21079:     case 0b111_000:  //(xxx).W
 21080:       return mmuReadWordSignExword ((XEiJ.regPC += 2) - 2, XEiJ.regSRS);  //pcws
 21081:     case 0b111_001:  //(xxx).L
 21082:       return mmuReadLongExword ((XEiJ.regPC += 4) - 4, XEiJ.regSRS);  //pcls
 21083:     }  //switch
 21084:     M68kException.m6eNumber = M68kException.M6E_ILLEGAL_INSTRUCTION;
 21085:     throw M68kException.m6eSignal;
 21086:   }  //efaCltLong
 21087: 
 21088:   //a = efaAnyQuad (ea)  //|  M+-WXZPI|
 21089:   //  任意のモードのクワッドオペランドの実効アドレスを求める
 21090:   //  efaAnyLongとの違いは(Ar)+と-(Ar)がArを8変化させることと、#<data>がPCを8変化させることと、
 21091:   //  オペランドのアクセスが2ワード増える分の8サイクルが追加されていること
 21092:   @SuppressWarnings ("fallthrough") public static int efaAnyQuad (int ea) throws M68kException {
 21093:     int t, w, x;
 21094:     switch (ea) {
 21095:     case 0b010_000:  //(A0)
 21096:       if (XEiJ.EFA_SEPARATE_AR) {
 21097:         return XEiJ.regRn[ 8];
 21098:       }
 21099:       //fallthrough
 21100:     case 0b010_001:  //(A1)
 21101:       if (XEiJ.EFA_SEPARATE_AR) {
 21102:         return XEiJ.regRn[ 9];
 21103:       }
 21104:       //fallthrough
 21105:     case 0b010_010:  //(A2)
 21106:       if (XEiJ.EFA_SEPARATE_AR) {
 21107:         return XEiJ.regRn[10];
 21108:       }
 21109:       //fallthrough
 21110:     case 0b010_011:  //(A3)
 21111:       if (XEiJ.EFA_SEPARATE_AR) {
 21112:         return XEiJ.regRn[11];
 21113:       }
 21114:       //fallthrough
 21115:     case 0b010_100:  //(A4)
 21116:       if (XEiJ.EFA_SEPARATE_AR) {
 21117:         return XEiJ.regRn[12];
 21118:       }
 21119:       //fallthrough
 21120:     case 0b010_101:  //(A5)
 21121:       if (XEiJ.EFA_SEPARATE_AR) {
 21122:         return XEiJ.regRn[13];
 21123:       }
 21124:       //fallthrough
 21125:     case 0b010_110:  //(A6)
 21126:       if (XEiJ.EFA_SEPARATE_AR) {
 21127:         return XEiJ.regRn[14];
 21128:       }
 21129:       //fallthrough
 21130:     case 0b010_111:  //(A7)
 21131:       if (XEiJ.EFA_SEPARATE_AR) {
 21132:         return XEiJ.regRn[15];
 21133:       } else {
 21134:         return XEiJ.regRn[ea - (0b010_000 - 8)];
 21135:       }
 21136:     case 0b011_000:  //(A0)+
 21137:       if (XEiJ.EFA_SEPARATE_AR) {
 21138:         M68kException.m6eIncremented += 8L << (0 << 3);
 21139:         return (XEiJ.regRn[ 8] += 8) - 8;
 21140:       }
 21141:       //fallthrough
 21142:     case 0b011_001:  //(A1)+
 21143:       if (XEiJ.EFA_SEPARATE_AR) {
 21144:         M68kException.m6eIncremented += 8L << (1 << 3);
 21145:         return (XEiJ.regRn[ 9] += 8) - 8;
 21146:       }
 21147:       //fallthrough
 21148:     case 0b011_010:  //(A2)+
 21149:       if (XEiJ.EFA_SEPARATE_AR) {
 21150:         M68kException.m6eIncremented += 8L << (2 << 3);
 21151:         return (XEiJ.regRn[10] += 8) - 8;
 21152:       }
 21153:       //fallthrough
 21154:     case 0b011_011:  //(A3)+
 21155:       if (XEiJ.EFA_SEPARATE_AR) {
 21156:         M68kException.m6eIncremented += 8L << (3 << 3);
 21157:         return (XEiJ.regRn[11] += 8) - 8;
 21158:       }
 21159:       //fallthrough
 21160:     case 0b011_100:  //(A4)+
 21161:       if (XEiJ.EFA_SEPARATE_AR) {
 21162:         M68kException.m6eIncremented += 8L << (4 << 3);
 21163:         return (XEiJ.regRn[12] += 8) - 8;
 21164:       }
 21165:       //fallthrough
 21166:     case 0b011_101:  //(A5)+
 21167:       if (XEiJ.EFA_SEPARATE_AR) {
 21168:         M68kException.m6eIncremented += 8L << (5 << 3);
 21169:         return (XEiJ.regRn[13] += 8) - 8;
 21170:       }
 21171:       //fallthrough
 21172:     case 0b011_110:  //(A6)+
 21173:       if (XEiJ.EFA_SEPARATE_AR) {
 21174:         M68kException.m6eIncremented += 8L << (6 << 3);
 21175:         return (XEiJ.regRn[14] += 8) - 8;
 21176:       }
 21177:       //fallthrough
 21178:     case 0b011_111:  //(A7)+
 21179:       if (XEiJ.EFA_SEPARATE_AR) {
 21180:         M68kException.m6eIncremented += 8L << (7 << 3);
 21181:         return (XEiJ.regRn[15] += 8) - 8;
 21182:       } else {
 21183:         M68kException.m6eIncremented += 8L << ((ea & 7) << 3);
 21184:         return (XEiJ.regRn[ea - (0b011_000 - 8)] += 8) - 8;
 21185:       }
 21186:     case 0b100_000:  //-(A0)
 21187:       if (XEiJ.EFA_SEPARATE_AR) {
 21188:         M68kException.m6eIncremented -= 8L << (0 << 3);
 21189:         return XEiJ.regRn[ 8] -= 8;
 21190:       }
 21191:       //fallthrough
 21192:     case 0b100_001:  //-(A1)
 21193:       if (XEiJ.EFA_SEPARATE_AR) {
 21194:         M68kException.m6eIncremented -= 8L << (1 << 3);
 21195:         return XEiJ.regRn[ 9] -= 8;
 21196:       }
 21197:       //fallthrough
 21198:     case 0b100_010:  //-(A2)
 21199:       if (XEiJ.EFA_SEPARATE_AR) {
 21200:         M68kException.m6eIncremented -= 8L << (2 << 3);
 21201:         return XEiJ.regRn[10] -= 8;
 21202:       }
 21203:       //fallthrough
 21204:     case 0b100_011:  //-(A3)
 21205:       if (XEiJ.EFA_SEPARATE_AR) {
 21206:         M68kException.m6eIncremented -= 8L << (3 << 3);
 21207:         return XEiJ.regRn[11] -= 8;
 21208:       }
 21209:       //fallthrough
 21210:     case 0b100_100:  //-(A4)
 21211:       if (XEiJ.EFA_SEPARATE_AR) {
 21212:         M68kException.m6eIncremented -= 8L << (4 << 3);
 21213:         return XEiJ.regRn[12] -= 8;
 21214:       }
 21215:       //fallthrough
 21216:     case 0b100_101:  //-(A5)
 21217:       if (XEiJ.EFA_SEPARATE_AR) {
 21218:         M68kException.m6eIncremented -= 8L << (5 << 3);
 21219:         return XEiJ.regRn[13] -= 8;
 21220:       }
 21221:       //fallthrough
 21222:     case 0b100_110:  //-(A6)
 21223:       if (XEiJ.EFA_SEPARATE_AR) {
 21224:         M68kException.m6eIncremented -= 8L << (6 << 3);
 21225:         return XEiJ.regRn[14] -= 8;
 21226:       }
 21227:       //fallthrough
 21228:     case 0b100_111:  //-(A7)
 21229:       if (XEiJ.EFA_SEPARATE_AR) {
 21230:         M68kException.m6eIncremented -= 8L << (7 << 3);
 21231:         return XEiJ.regRn[15] -= 8;
 21232:       } else {
 21233:         M68kException.m6eIncremented -= 8L << ((ea & 7) << 3);
 21234:         return XEiJ.regRn[ea - (0b100_000 - 8)] -= 8;
 21235:       }
 21236:     case 0b101_000:  //(d16,A0)
 21237:     case 0b101_001:  //(d16,A1)
 21238:     case 0b101_010:  //(d16,A2)
 21239:     case 0b101_011:  //(d16,A3)
 21240:     case 0b101_100:  //(d16,A4)
 21241:     case 0b101_101:  //(d16,A5)
 21242:     case 0b101_110:  //(d16,A6)
 21243:     case 0b101_111:  //(d16,A7)
 21244:       if (XEiJ.MPU_COMPOUND_POSTINCREMENT) {
 21245:         return (XEiJ.regRn[ea - (0b101_000 - 8)]  //ベースレジスタ
 21246:                 + mmuReadWordSignExword ((XEiJ.regPC += 2) - 2, XEiJ.regSRS));  //pcws。ワードディスプレースメント
 21247:       } else {
 21248:         t = XEiJ.regPC;
 21249:         XEiJ.regPC = t + 2;
 21250:         return (XEiJ.regRn[ea - (0b101_000 - 8)]  //ベースレジスタ
 21251:                 + mmuReadWordSignExword (t, XEiJ.regSRS));  //pcws。ワードディスプレースメント
 21252:       }
 21253:     case 0b110_000:  //(d8,A0,Rn.wl)
 21254:     case 0b110_001:  //(d8,A1,Rn.wl)
 21255:     case 0b110_010:  //(d8,A2,Rn.wl)
 21256:     case 0b110_011:  //(d8,A3,Rn.wl)
 21257:     case 0b110_100:  //(d8,A4,Rn.wl)
 21258:     case 0b110_101:  //(d8,A5,Rn.wl)
 21259:     case 0b110_110:  //(d8,A6,Rn.wl)
 21260:     case 0b110_111:  //(d8,A7,Rn.wl)
 21261:       if (XEiJ.MPU_COMPOUND_POSTINCREMENT) {
 21262:         w = mmuReadWordZeroExword ((XEiJ.regPC += 2) - 2, XEiJ.regSRS);  //pcwz。拡張ワード
 21263:       } else {
 21264:         w = XEiJ.regPC;
 21265:         XEiJ.regPC = w + 2;
 21266:         w = mmuReadWordZeroExword (w, XEiJ.regSRS);  //pcwz。拡張ワード
 21267:       }
 21268:       if (w << 31 - 8 < 0) {  //フルフォーマット
 21269:         XEiJ.mpuCycleCount += w << -2 == 0 ? 1 : 3;  //メモリ間接なし:メモリ間接あり
 21270:       }
 21271:       t = (((~w & 0x0180) == 0 ? 0 :  //ベースレジスタサプレス
 21272:             XEiJ.regRn[ea - (0b110_000 - 8)])  //ベースレジスタ
 21273:            + (w << 31 - 8 >= 0 ? (byte) w :  //バイトディスプレースメント
 21274:               w << 31 - 5 >= 0 ? 0 :  //ヌルベースディスプレースメント
 21275:               w << 31 - 4 >= 0 ? mmuReadWordSignExword ((XEiJ.regPC += 2) - 2, XEiJ.regSRS) :  //pcws。ワードベースディスプレースメント
 21276:               mmuReadLongExword ((XEiJ.regPC += 4) - 4, XEiJ.regSRS)));  //pcls。ロングベースディスプレースメント
 21277:       x = ((~w & 0x0140) == 0 ? 0 :  //インデックスサプレス
 21278:            (w << 31 - 11 >= 0 ? (short) XEiJ.regRn[w >> 12] :  //ワードインデックス
 21279:             XEiJ.regRn[w >> 12])  //ロングインデックス
 21280:            << (w >> 9 & 3));  //スケールファクタ。ワードインデックスのときは符号拡張してから掛ける
 21281:       return ((w & 0x0103) <= 0x0100 ? t + x :  //メモリ間接なし
 21282:               ((XEiJ.TEST_BIT_2_SHIFT ? w << 31 - 2 >= 0 : (w & 4) == 0) ? mmuReadLongData (t + x, XEiJ.regSRS) :  //プリインデックス
 21283:                mmuReadLongData (t, XEiJ.regSRS) + x)  //ポストインデックス
 21284:               + ((XEiJ.TEST_BIT_1_SHIFT ? w << 31 - 1 >= 0 : (w & 2) == 0) ? 0 :  //ヌルアウタディスプレースメント
 21285:                  (XEiJ.TEST_BIT_0_SHIFT ? w << 31 - 0 >= 0 : (w & 1) == 0) ? mmuReadWordSignExword ((XEiJ.regPC += 2) - 2, XEiJ.regSRS) :  //pcws。ワードアウタディスプレースメント
 21286:                  mmuReadLongExword ((XEiJ.regPC += 4) - 4, XEiJ.regSRS)));  //pcls。ロングアウタディスプレースメント
 21287:     case 0b111_000:  //(xxx).W
 21288:       return mmuReadWordSignExword ((XEiJ.regPC += 2) - 2, XEiJ.regSRS);  //pcws
 21289:     case 0b111_001:  //(xxx).L
 21290:       return mmuReadLongExword ((XEiJ.regPC += 4) - 4, XEiJ.regSRS);  //pcls
 21291:     case 0b111_010:  //(d16,PC)
 21292:       t = XEiJ.regPC;
 21293:       XEiJ.regPC = t + 2;
 21294:       return (t  //ベースレジスタ
 21295:               + mmuReadWordSignExword (t, XEiJ.regSRS));  //pcws。ワードディスプレースメント
 21296:     case 0b111_011:  //(d8,PC,Rn.wl)
 21297:       t = XEiJ.regPC;
 21298:       XEiJ.regPC = t + 2;
 21299:       w = mmuReadWordZeroExword (t, XEiJ.regSRS);  //pcwz。拡張ワード
 21300:       if (w << 31 - 8 < 0) {  //フルフォーマット
 21301:         XEiJ.mpuCycleCount += w << -2 == 0 ? 1 : 3;  //メモリ間接なし:メモリ間接あり
 21302:       }
 21303:       t = (((~w & 0x0180) == 0 ? 0 :  //ベースレジスタサプレス
 21304:             t)  //ベースレジスタ
 21305:            + (w << 31 - 8 >= 0 ? (byte) w :  //バイトディスプレースメント
 21306:               w << 31 - 5 >= 0 ? 0 :  //ヌルベースディスプレースメント
 21307:               w << 31 - 4 >= 0 ? mmuReadWordSignExword ((XEiJ.regPC += 2) - 2, XEiJ.regSRS) :  //pcws。ワードベースディスプレースメント
 21308:               mmuReadLongExword ((XEiJ.regPC += 4) - 4, XEiJ.regSRS)));  //pcls。ロングベースディスプレースメント
 21309:       x = ((~w & 0x0140) == 0 ? 0 :  //インデックスサプレス
 21310:            (w << 31 - 11 >= 0 ? (short) XEiJ.regRn[w >> 12] :  //ワードインデックス
 21311:             XEiJ.regRn[w >> 12])  //ロングインデックス
 21312:            << (w >> 9 & 3));  //スケールファクタ。ワードインデックスのときは符号拡張してから掛ける
 21313:       return ((w & 0x0103) <= 0x0100 ? t + x :  //メモリ間接なし
 21314:               ((XEiJ.TEST_BIT_2_SHIFT ? w << 31 - 2 >= 0 : (w & 4) == 0) ? mmuReadLongData (t + x, XEiJ.regSRS) :  //プリインデックス
 21315:                mmuReadLongData (t, XEiJ.regSRS) + x)  //ポストインデックス
 21316:               + ((XEiJ.TEST_BIT_1_SHIFT ? w << 31 - 1 >= 0 : (w & 2) == 0) ? 0 :  //ヌルアウタディスプレースメント
 21317:                  (XEiJ.TEST_BIT_0_SHIFT ? w << 31 - 0 >= 0 : (w & 1) == 0) ? mmuReadWordSignExword ((XEiJ.regPC += 2) - 2, XEiJ.regSRS) :  //pcws。ワードアウタディスプレースメント
 21318:                  mmuReadLongExword ((XEiJ.regPC += 4) - 4, XEiJ.regSRS)));  //pcls。ロングアウタディスプレースメント
 21319:     case 0b111_100:  //#<data>
 21320:       if (XEiJ.MPU_COMPOUND_POSTINCREMENT) {
 21321:         return (XEiJ.regPC += 8) - 8;
 21322:       } else {
 21323:         t = XEiJ.regPC;
 21324:         XEiJ.regPC = t + 8;
 21325:         return t;
 21326:       }
 21327:     }  //switch
 21328:     M68kException.m6eNumber = M68kException.M6E_ILLEGAL_INSTRUCTION;
 21329:     throw M68kException.m6eSignal;
 21330:   }  //efaAnyQuad
 21331: 
 21332:   //a = efaMltQuad (ea)  //|  M+-WXZ  |
 21333:   //  メモリ可変モードのクワッドオペランドの実効アドレスを求める
 21334:   //  efaMltLongとの違いは(Ar)+と-(Ar)がArを8変化させることと、#<data>がPCを8変化させることと、
 21335:   //  オペランドのアクセスが2ワード増える分の8サイクルが追加されていること
 21336:   @SuppressWarnings ("fallthrough") public static int efaMltQuad (int ea) throws M68kException {
 21337:     int t, w, x;
 21338:     switch (ea) {
 21339:     case 0b010_000:  //(A0)
 21340:       if (XEiJ.EFA_SEPARATE_AR) {
 21341:         return XEiJ.regRn[ 8];
 21342:       }
 21343:       //fallthrough
 21344:     case 0b010_001:  //(A1)
 21345:       if (XEiJ.EFA_SEPARATE_AR) {
 21346:         return XEiJ.regRn[ 9];
 21347:       }
 21348:       //fallthrough
 21349:     case 0b010_010:  //(A2)
 21350:       if (XEiJ.EFA_SEPARATE_AR) {
 21351:         return XEiJ.regRn[10];
 21352:       }
 21353:       //fallthrough
 21354:     case 0b010_011:  //(A3)
 21355:       if (XEiJ.EFA_SEPARATE_AR) {
 21356:         return XEiJ.regRn[11];
 21357:       }
 21358:       //fallthrough
 21359:     case 0b010_100:  //(A4)
 21360:       if (XEiJ.EFA_SEPARATE_AR) {
 21361:         return XEiJ.regRn[12];
 21362:       }
 21363:       //fallthrough
 21364:     case 0b010_101:  //(A5)
 21365:       if (XEiJ.EFA_SEPARATE_AR) {
 21366:         return XEiJ.regRn[13];
 21367:       }
 21368:       //fallthrough
 21369:     case 0b010_110:  //(A6)
 21370:       if (XEiJ.EFA_SEPARATE_AR) {
 21371:         return XEiJ.regRn[14];
 21372:       }
 21373:       //fallthrough
 21374:     case 0b010_111:  //(A7)
 21375:       if (XEiJ.EFA_SEPARATE_AR) {
 21376:         return XEiJ.regRn[15];
 21377:       } else {
 21378:         return XEiJ.regRn[ea - (0b010_000 - 8)];
 21379:       }
 21380:     case 0b011_000:  //(A0)+
 21381:       if (XEiJ.EFA_SEPARATE_AR) {
 21382:         M68kException.m6eIncremented += 8L << (0 << 3);
 21383:         return (XEiJ.regRn[ 8] += 8) - 8;
 21384:       }
 21385:       //fallthrough
 21386:     case 0b011_001:  //(A1)+
 21387:       if (XEiJ.EFA_SEPARATE_AR) {
 21388:         M68kException.m6eIncremented += 8L << (1 << 3);
 21389:         return (XEiJ.regRn[ 9] += 8) - 8;
 21390:       }
 21391:       //fallthrough
 21392:     case 0b011_010:  //(A2)+
 21393:       if (XEiJ.EFA_SEPARATE_AR) {
 21394:         M68kException.m6eIncremented += 8L << (2 << 3);
 21395:         return (XEiJ.regRn[10] += 8) - 8;
 21396:       }
 21397:       //fallthrough
 21398:     case 0b011_011:  //(A3)+
 21399:       if (XEiJ.EFA_SEPARATE_AR) {
 21400:         M68kException.m6eIncremented += 8L << (3 << 3);
 21401:         return (XEiJ.regRn[11] += 8) - 8;
 21402:       }
 21403:       //fallthrough
 21404:     case 0b011_100:  //(A4)+
 21405:       if (XEiJ.EFA_SEPARATE_AR) {
 21406:         M68kException.m6eIncremented += 8L << (4 << 3);
 21407:         return (XEiJ.regRn[12] += 8) - 8;
 21408:       }
 21409:       //fallthrough
 21410:     case 0b011_101:  //(A5)+
 21411:       if (XEiJ.EFA_SEPARATE_AR) {
 21412:         M68kException.m6eIncremented += 8L << (5 << 3);
 21413:         return (XEiJ.regRn[13] += 8) - 8;
 21414:       }
 21415:       //fallthrough
 21416:     case 0b011_110:  //(A6)+
 21417:       if (XEiJ.EFA_SEPARATE_AR) {
 21418:         M68kException.m6eIncremented += 8L << (6 << 3);
 21419:         return (XEiJ.regRn[14] += 8) - 8;
 21420:       }
 21421:       //fallthrough
 21422:     case 0b011_111:  //(A7)+
 21423:       if (XEiJ.EFA_SEPARATE_AR) {
 21424:         M68kException.m6eIncremented += 8L << (7 << 3);
 21425:         return (XEiJ.regRn[15] += 8) - 8;
 21426:       } else {
 21427:         M68kException.m6eIncremented += 8L << ((ea & 7) << 3);
 21428:         return (XEiJ.regRn[ea - (0b011_000 - 8)] += 8) - 8;
 21429:       }
 21430:     case 0b100_000:  //-(A0)
 21431:       if (XEiJ.EFA_SEPARATE_AR) {
 21432:         M68kException.m6eIncremented -= 8L << (0 << 3);
 21433:         return XEiJ.regRn[ 8] -= 8;
 21434:       }
 21435:       //fallthrough
 21436:     case 0b100_001:  //-(A1)
 21437:       if (XEiJ.EFA_SEPARATE_AR) {
 21438:         M68kException.m6eIncremented -= 8L << (1 << 3);
 21439:         return XEiJ.regRn[ 9] -= 8;
 21440:       }
 21441:       //fallthrough
 21442:     case 0b100_010:  //-(A2)
 21443:       if (XEiJ.EFA_SEPARATE_AR) {
 21444:         M68kException.m6eIncremented -= 8L << (2 << 3);
 21445:         return XEiJ.regRn[10] -= 8;
 21446:       }
 21447:       //fallthrough
 21448:     case 0b100_011:  //-(A3)
 21449:       if (XEiJ.EFA_SEPARATE_AR) {
 21450:         M68kException.m6eIncremented -= 8L << (3 << 3);
 21451:         return XEiJ.regRn[11] -= 8;
 21452:       }
 21453:       //fallthrough
 21454:     case 0b100_100:  //-(A4)
 21455:       if (XEiJ.EFA_SEPARATE_AR) {
 21456:         M68kException.m6eIncremented -= 8L << (4 << 3);
 21457:         return XEiJ.regRn[12] -= 8;
 21458:       }
 21459:       //fallthrough
 21460:     case 0b100_101:  //-(A5)
 21461:       if (XEiJ.EFA_SEPARATE_AR) {
 21462:         M68kException.m6eIncremented -= 8L << (5 << 3);
 21463:         return XEiJ.regRn[13] -= 8;
 21464:       }
 21465:       //fallthrough
 21466:     case 0b100_110:  //-(A6)
 21467:       if (XEiJ.EFA_SEPARATE_AR) {
 21468:         M68kException.m6eIncremented -= 8L << (6 << 3);
 21469:         return XEiJ.regRn[14] -= 8;
 21470:       }
 21471:       //fallthrough
 21472:     case 0b100_111:  //-(A7)
 21473:       if (XEiJ.EFA_SEPARATE_AR) {
 21474:         M68kException.m6eIncremented -= 8L << (7 << 3);
 21475:         return XEiJ.regRn[15] -= 8;
 21476:       } else {
 21477:         M68kException.m6eIncremented -= 8L << ((ea & 7) << 3);
 21478:         return XEiJ.regRn[ea - (0b100_000 - 8)] -= 8;
 21479:       }
 21480:     case 0b101_000:  //(d16,A0)
 21481:     case 0b101_001:  //(d16,A1)
 21482:     case 0b101_010:  //(d16,A2)
 21483:     case 0b101_011:  //(d16,A3)
 21484:     case 0b101_100:  //(d16,A4)
 21485:     case 0b101_101:  //(d16,A5)
 21486:     case 0b101_110:  //(d16,A6)
 21487:     case 0b101_111:  //(d16,A7)
 21488:       if (XEiJ.MPU_COMPOUND_POSTINCREMENT) {
 21489:         return (XEiJ.regRn[ea - (0b101_000 - 8)]  //ベースレジスタ
 21490:                 + mmuReadWordSignExword ((XEiJ.regPC += 2) - 2, XEiJ.regSRS));  //pcws。ワードディスプレースメント
 21491:       } else {
 21492:         t = XEiJ.regPC;
 21493:         XEiJ.regPC = t + 2;
 21494:         return (XEiJ.regRn[ea - (0b101_000 - 8)]  //ベースレジスタ
 21495:                 + mmuReadWordSignExword (t, XEiJ.regSRS));  //pcws。ワードディスプレースメント
 21496:       }
 21497:     case 0b110_000:  //(d8,A0,Rn.wl)
 21498:     case 0b110_001:  //(d8,A1,Rn.wl)
 21499:     case 0b110_010:  //(d8,A2,Rn.wl)
 21500:     case 0b110_011:  //(d8,A3,Rn.wl)
 21501:     case 0b110_100:  //(d8,A4,Rn.wl)
 21502:     case 0b110_101:  //(d8,A5,Rn.wl)
 21503:     case 0b110_110:  //(d8,A6,Rn.wl)
 21504:     case 0b110_111:  //(d8,A7,Rn.wl)
 21505:       if (XEiJ.MPU_COMPOUND_POSTINCREMENT) {
 21506:         w = mmuReadWordZeroExword ((XEiJ.regPC += 2) - 2, XEiJ.regSRS);  //pcwz。拡張ワード
 21507:       } else {
 21508:         w = XEiJ.regPC;
 21509:         XEiJ.regPC = w + 2;
 21510:         w = mmuReadWordZeroExword (w, XEiJ.regSRS);  //pcwz。拡張ワード
 21511:       }
 21512:       if (w << 31 - 8 < 0) {  //フルフォーマット
 21513:         XEiJ.mpuCycleCount += w << -2 == 0 ? 1 : 3;  //メモリ間接なし:メモリ間接あり
 21514:       }
 21515:       t = (((~w & 0x0180) == 0 ? 0 :  //ベースレジスタサプレス
 21516:             XEiJ.regRn[ea - (0b110_000 - 8)])  //ベースレジスタ
 21517:            + (w << 31 - 8 >= 0 ? (byte) w :  //バイトディスプレースメント
 21518:               w << 31 - 5 >= 0 ? 0 :  //ヌルベースディスプレースメント
 21519:               w << 31 - 4 >= 0 ? mmuReadWordSignExword ((XEiJ.regPC += 2) - 2, XEiJ.regSRS) :  //pcws。ワードベースディスプレースメント
 21520:               mmuReadLongExword ((XEiJ.regPC += 4) - 4, XEiJ.regSRS)));  //pcls。ロングベースディスプレースメント
 21521:       x = ((~w & 0x0140) == 0 ? 0 :  //インデックスサプレス
 21522:            (w << 31 - 11 >= 0 ? (short) XEiJ.regRn[w >> 12] :  //ワードインデックス
 21523:             XEiJ.regRn[w >> 12])  //ロングインデックス
 21524:            << (w >> 9 & 3));  //スケールファクタ。ワードインデックスのときは符号拡張してから掛ける
 21525:       return ((w & 0x0103) <= 0x0100 ? t + x :  //メモリ間接なし
 21526:               ((XEiJ.TEST_BIT_2_SHIFT ? w << 31 - 2 >= 0 : (w & 4) == 0) ? mmuReadLongData (t + x, XEiJ.regSRS) :  //プリインデックス
 21527:                mmuReadLongData (t, XEiJ.regSRS) + x)  //ポストインデックス
 21528:               + ((XEiJ.TEST_BIT_1_SHIFT ? w << 31 - 1 >= 0 : (w & 2) == 0) ? 0 :  //ヌルアウタディスプレースメント
 21529:                  (XEiJ.TEST_BIT_0_SHIFT ? w << 31 - 0 >= 0 : (w & 1) == 0) ? mmuReadWordSignExword ((XEiJ.regPC += 2) - 2, XEiJ.regSRS) :  //pcws。ワードアウタディスプレースメント
 21530:                  mmuReadLongExword ((XEiJ.regPC += 4) - 4, XEiJ.regSRS)));  //pcls。ロングアウタディスプレースメント
 21531:     case 0b111_000:  //(xxx).W
 21532:       return mmuReadWordSignExword ((XEiJ.regPC += 2) - 2, XEiJ.regSRS);  //pcws
 21533:     case 0b111_001:  //(xxx).L
 21534:       return mmuReadLongExword ((XEiJ.regPC += 4) - 4, XEiJ.regSRS);  //pcls
 21535:     }  //switch
 21536:     M68kException.m6eNumber = M68kException.M6E_ILLEGAL_INSTRUCTION;
 21537:     throw M68kException.m6eSignal;
 21538:   }  //efaMltQuad
 21539: 
 21540:   //a = efaAnyExtd (ea)  //|  M+-WXZPI|
 21541:   //  任意のモードのエクステンデッドオペランドの実効アドレスを求める
 21542:   //  efaAnyQuadとの違いは(Ar)+と-(Ar)がArを12変化させることと、#<data>がPCを12変化させることと、
 21543:   //  オペランドのアクセスが2ワード増える分の8サイクルが追加されていること
 21544:   @SuppressWarnings ("fallthrough") public static int efaAnyExtd (int ea) throws M68kException {
 21545:     int t, w, x;
 21546:     switch (ea) {
 21547:     case 0b010_000:  //(A0)
 21548:       if (XEiJ.EFA_SEPARATE_AR) {
 21549:         return XEiJ.regRn[ 8];
 21550:       }
 21551:       //fallthrough
 21552:     case 0b010_001:  //(A1)
 21553:       if (XEiJ.EFA_SEPARATE_AR) {
 21554:         return XEiJ.regRn[ 9];
 21555:       }
 21556:       //fallthrough
 21557:     case 0b010_010:  //(A2)
 21558:       if (XEiJ.EFA_SEPARATE_AR) {
 21559:         return XEiJ.regRn[10];
 21560:       }
 21561:       //fallthrough
 21562:     case 0b010_011:  //(A3)
 21563:       if (XEiJ.EFA_SEPARATE_AR) {
 21564:         return XEiJ.regRn[11];
 21565:       }
 21566:       //fallthrough
 21567:     case 0b010_100:  //(A4)
 21568:       if (XEiJ.EFA_SEPARATE_AR) {
 21569:         return XEiJ.regRn[12];
 21570:       }
 21571:       //fallthrough
 21572:     case 0b010_101:  //(A5)
 21573:       if (XEiJ.EFA_SEPARATE_AR) {
 21574:         return XEiJ.regRn[13];
 21575:       }
 21576:       //fallthrough
 21577:     case 0b010_110:  //(A6)
 21578:       if (XEiJ.EFA_SEPARATE_AR) {
 21579:         return XEiJ.regRn[14];
 21580:       }
 21581:       //fallthrough
 21582:     case 0b010_111:  //(A7)
 21583:       if (XEiJ.EFA_SEPARATE_AR) {
 21584:         return XEiJ.regRn[15];
 21585:       } else {
 21586:         return XEiJ.regRn[ea - (0b010_000 - 8)];
 21587:       }
 21588:     case 0b011_000:  //(A0)+
 21589:       if (XEiJ.EFA_SEPARATE_AR) {
 21590:         M68kException.m6eIncremented += 12L << (0 << 3);
 21591:         return (XEiJ.regRn[ 8] += 12) - 12;
 21592:       }
 21593:       //fallthrough
 21594:     case 0b011_001:  //(A1)+
 21595:       if (XEiJ.EFA_SEPARATE_AR) {
 21596:         M68kException.m6eIncremented += 12L << (1 << 3);
 21597:         return (XEiJ.regRn[ 9] += 12) - 12;
 21598:       }
 21599:       //fallthrough
 21600:     case 0b011_010:  //(A2)+
 21601:       if (XEiJ.EFA_SEPARATE_AR) {
 21602:         M68kException.m6eIncremented += 12L << (2 << 3);
 21603:         return (XEiJ.regRn[10] += 12) - 12;
 21604:       }
 21605:       //fallthrough
 21606:     case 0b011_011:  //(A3)+
 21607:       if (XEiJ.EFA_SEPARATE_AR) {
 21608:         M68kException.m6eIncremented += 12L << (3 << 3);
 21609:         return (XEiJ.regRn[11] += 12) - 12;
 21610:       }
 21611:       //fallthrough
 21612:     case 0b011_100:  //(A4)+
 21613:       if (XEiJ.EFA_SEPARATE_AR) {
 21614:         M68kException.m6eIncremented += 12L << (4 << 3);
 21615:         return (XEiJ.regRn[12] += 12) - 12;
 21616:       }
 21617:       //fallthrough
 21618:     case 0b011_101:  //(A5)+
 21619:       if (XEiJ.EFA_SEPARATE_AR) {
 21620:         M68kException.m6eIncremented += 12L << (5 << 3);
 21621:         return (XEiJ.regRn[13] += 12) - 12;
 21622:       }
 21623:       //fallthrough
 21624:     case 0b011_110:  //(A6)+
 21625:       if (XEiJ.EFA_SEPARATE_AR) {
 21626:         M68kException.m6eIncremented += 12L << (6 << 3);
 21627:         return (XEiJ.regRn[14] += 12) - 12;
 21628:       }
 21629:       //fallthrough
 21630:     case 0b011_111:  //(A7)+
 21631:       if (XEiJ.EFA_SEPARATE_AR) {
 21632:         M68kException.m6eIncremented += 12L << (7 << 3);
 21633:         return (XEiJ.regRn[15] += 12) - 12;
 21634:       } else {
 21635:         M68kException.m6eIncremented += 12L << ((ea & 7) << 3);
 21636:         return (XEiJ.regRn[ea - (0b011_000 - 8)] += 12) - 12;
 21637:       }
 21638:     case 0b100_000:  //-(A0)
 21639:       if (XEiJ.EFA_SEPARATE_AR) {
 21640:         M68kException.m6eIncremented -= 12L << (0 << 3);
 21641:         return XEiJ.regRn[ 8] -= 12;
 21642:       }
 21643:       //fallthrough
 21644:     case 0b100_001:  //-(A1)
 21645:       if (XEiJ.EFA_SEPARATE_AR) {
 21646:         M68kException.m6eIncremented -= 12L << (1 << 3);
 21647:         return XEiJ.regRn[ 9] -= 12;
 21648:       }
 21649:       //fallthrough
 21650:     case 0b100_010:  //-(A2)
 21651:       if (XEiJ.EFA_SEPARATE_AR) {
 21652:         M68kException.m6eIncremented -= 12L << (2 << 3);
 21653:         return XEiJ.regRn[10] -= 12;
 21654:       }
 21655:       //fallthrough
 21656:     case 0b100_011:  //-(A3)
 21657:       if (XEiJ.EFA_SEPARATE_AR) {
 21658:         M68kException.m6eIncremented -= 12L << (3 << 3);
 21659:         return XEiJ.regRn[11] -= 12;
 21660:       }
 21661:       //fallthrough
 21662:     case 0b100_100:  //-(A4)
 21663:       if (XEiJ.EFA_SEPARATE_AR) {
 21664:         M68kException.m6eIncremented -= 12L << (4 << 3);
 21665:         return XEiJ.regRn[12] -= 12;
 21666:       }
 21667:       //fallthrough
 21668:     case 0b100_101:  //-(A5)
 21669:       if (XEiJ.EFA_SEPARATE_AR) {
 21670:         M68kException.m6eIncremented -= 12L << (5 << 3);
 21671:         return XEiJ.regRn[13] -= 12;
 21672:       }
 21673:       //fallthrough
 21674:     case 0b100_110:  //-(A6)
 21675:       if (XEiJ.EFA_SEPARATE_AR) {
 21676:         M68kException.m6eIncremented -= 12L << (6 << 3);
 21677:         return XEiJ.regRn[14] -= 12;
 21678:       }
 21679:       //fallthrough
 21680:     case 0b100_111:  //-(A7)
 21681:       if (XEiJ.EFA_SEPARATE_AR) {
 21682:         M68kException.m6eIncremented -= 12L << (7 << 3);
 21683:         return XEiJ.regRn[15] -= 12;
 21684:       } else {
 21685:         M68kException.m6eIncremented -= 12L << ((ea & 7) << 3);
 21686:         return XEiJ.regRn[ea - (0b100_000 - 8)] -= 12;
 21687:       }
 21688:     case 0b101_000:  //(d16,A0)
 21689:     case 0b101_001:  //(d16,A1)
 21690:     case 0b101_010:  //(d16,A2)
 21691:     case 0b101_011:  //(d16,A3)
 21692:     case 0b101_100:  //(d16,A4)
 21693:     case 0b101_101:  //(d16,A5)
 21694:     case 0b101_110:  //(d16,A6)
 21695:     case 0b101_111:  //(d16,A7)
 21696:       if (XEiJ.MPU_COMPOUND_POSTINCREMENT) {
 21697:         return (XEiJ.regRn[ea - (0b101_000 - 8)]  //ベースレジスタ
 21698:                 + mmuReadWordSignExword ((XEiJ.regPC += 2) - 2, XEiJ.regSRS));  //pcws。ワードディスプレースメント
 21699:       } else {
 21700:         t = XEiJ.regPC;
 21701:         XEiJ.regPC = t + 2;
 21702:         return (XEiJ.regRn[ea - (0b101_000 - 8)]  //ベースレジスタ
 21703:                 + mmuReadWordSignExword (t, XEiJ.regSRS));  //pcws。ワードディスプレースメント
 21704:       }
 21705:     case 0b110_000:  //(d8,A0,Rn.wl)
 21706:     case 0b110_001:  //(d8,A1,Rn.wl)
 21707:     case 0b110_010:  //(d8,A2,Rn.wl)
 21708:     case 0b110_011:  //(d8,A3,Rn.wl)
 21709:     case 0b110_100:  //(d8,A4,Rn.wl)
 21710:     case 0b110_101:  //(d8,A5,Rn.wl)
 21711:     case 0b110_110:  //(d8,A6,Rn.wl)
 21712:     case 0b110_111:  //(d8,A7,Rn.wl)
 21713:       if (XEiJ.MPU_COMPOUND_POSTINCREMENT) {
 21714:         w = mmuReadWordZeroExword ((XEiJ.regPC += 2) - 2, XEiJ.regSRS);  //pcwz。拡張ワード
 21715:       } else {
 21716:         w = XEiJ.regPC;
 21717:         XEiJ.regPC = w + 2;
 21718:         w = mmuReadWordZeroExword (w, XEiJ.regSRS);  //pcwz。拡張ワード
 21719:       }
 21720:       if (w << 31 - 8 < 0) {  //フルフォーマット
 21721:         XEiJ.mpuCycleCount += w << -2 == 0 ? 1 : 3;  //メモリ間接なし:メモリ間接あり
 21722:       }
 21723:       t = (((~w & 0x0180) == 0 ? 0 :  //ベースレジスタサプレス
 21724:             XEiJ.regRn[ea - (0b110_000 - 8)])  //ベースレジスタ
 21725:            + (w << 31 - 8 >= 0 ? (byte) w :  //バイトディスプレースメント
 21726:               w << 31 - 5 >= 0 ? 0 :  //ヌルベースディスプレースメント
 21727:               w << 31 - 4 >= 0 ? mmuReadWordSignExword ((XEiJ.regPC += 2) - 2, XEiJ.regSRS) :  //pcws。ワードベースディスプレースメント
 21728:               mmuReadLongExword ((XEiJ.regPC += 4) - 4, XEiJ.regSRS)));  //pcls。ロングベースディスプレースメント
 21729:       x = ((~w & 0x0140) == 0 ? 0 :  //インデックスサプレス
 21730:            (w << 31 - 11 >= 0 ? (short) XEiJ.regRn[w >> 12] :  //ワードインデックス
 21731:             XEiJ.regRn[w >> 12])  //ロングインデックス
 21732:            << (w >> 9 & 3));  //スケールファクタ。ワードインデックスのときは符号拡張してから掛ける
 21733:       return ((w & 0x0103) <= 0x0100 ? t + x :  //メモリ間接なし
 21734:               ((XEiJ.TEST_BIT_2_SHIFT ? w << 31 - 2 >= 0 : (w & 4) == 0) ? mmuReadLongData (t + x, XEiJ.regSRS) :  //プリインデックス
 21735:                mmuReadLongData (t, XEiJ.regSRS) + x)  //ポストインデックス
 21736:               + ((XEiJ.TEST_BIT_1_SHIFT ? w << 31 - 1 >= 0 : (w & 2) == 0) ? 0 :  //ヌルアウタディスプレースメント
 21737:                  (XEiJ.TEST_BIT_0_SHIFT ? w << 31 - 0 >= 0 : (w & 1) == 0) ? mmuReadWordSignExword ((XEiJ.regPC += 2) - 2, XEiJ.regSRS) :  //pcws。ワードアウタディスプレースメント
 21738:                  mmuReadLongExword ((XEiJ.regPC += 4) - 4, XEiJ.regSRS)));  //pcls。ロングアウタディスプレースメント
 21739:     case 0b111_000:  //(xxx).W
 21740:       return mmuReadWordSignExword ((XEiJ.regPC += 2) - 2, XEiJ.regSRS);  //pcws
 21741:     case 0b111_001:  //(xxx).L
 21742:       return mmuReadLongExword ((XEiJ.regPC += 4) - 4, XEiJ.regSRS);  //pcls
 21743:     case 0b111_010:  //(d16,PC)
 21744:       t = XEiJ.regPC;
 21745:       XEiJ.regPC = t + 2;
 21746:       return (t  //ベースレジスタ
 21747:               + mmuReadWordSignExword (t, XEiJ.regSRS));  //pcws。ワードディスプレースメント
 21748:     case 0b111_011:  //(d8,PC,Rn.wl)
 21749:       t = XEiJ.regPC;
 21750:       XEiJ.regPC = t + 2;
 21751:       w = mmuReadWordZeroExword (t, XEiJ.regSRS);  //pcwz。拡張ワード
 21752:       if (w << 31 - 8 < 0) {  //フルフォーマット
 21753:         XEiJ.mpuCycleCount += w << -2 == 0 ? 1 : 3;  //メモリ間接なし:メモリ間接あり
 21754:       }
 21755:       t = (((~w & 0x0180) == 0 ? 0 :  //ベースレジスタサプレス
 21756:             t)  //ベースレジスタ
 21757:            + (w << 31 - 8 >= 0 ? (byte) w :  //バイトディスプレースメント
 21758:               w << 31 - 5 >= 0 ? 0 :  //ヌルベースディスプレースメント
 21759:               w << 31 - 4 >= 0 ? mmuReadWordSignExword ((XEiJ.regPC += 2) - 2, XEiJ.regSRS) :  //pcws。ワードベースディスプレースメント
 21760:               mmuReadLongExword ((XEiJ.regPC += 4) - 4, XEiJ.regSRS)));  //pcls。ロングベースディスプレースメント
 21761:       x = ((~w & 0x0140) == 0 ? 0 :  //インデックスサプレス
 21762:            (w << 31 - 11 >= 0 ? (short) XEiJ.regRn[w >> 12] :  //ワードインデックス
 21763:             XEiJ.regRn[w >> 12])  //ロングインデックス
 21764:            << (w >> 9 & 3));  //スケールファクタ。ワードインデックスのときは符号拡張してから掛ける
 21765:       return ((w & 0x0103) <= 0x0100 ? t + x :  //メモリ間接なし
 21766:               ((XEiJ.TEST_BIT_2_SHIFT ? w << 31 - 2 >= 0 : (w & 4) == 0) ? mmuReadLongData (t + x, XEiJ.regSRS) :  //プリインデックス
 21767:                mmuReadLongData (t, XEiJ.regSRS) + x)  //ポストインデックス
 21768:               + ((XEiJ.TEST_BIT_1_SHIFT ? w << 31 - 1 >= 0 : (w & 2) == 0) ? 0 :  //ヌルアウタディスプレースメント
 21769:                  (XEiJ.TEST_BIT_0_SHIFT ? w << 31 - 0 >= 0 : (w & 1) == 0) ? mmuReadWordSignExword ((XEiJ.regPC += 2) - 2, XEiJ.regSRS) :  //pcws。ワードアウタディスプレースメント
 21770:                  mmuReadLongExword ((XEiJ.regPC += 4) - 4, XEiJ.regSRS)));  //pcls。ロングアウタディスプレースメント
 21771:     case 0b111_100:  //#<data>
 21772:       if (XEiJ.MPU_COMPOUND_POSTINCREMENT) {
 21773:         return (XEiJ.regPC += 12) - 12;
 21774:       } else {
 21775:         t = XEiJ.regPC;
 21776:         XEiJ.regPC = t + 12;
 21777:         return t;
 21778:       }
 21779:     }  //switch
 21780:     M68kException.m6eNumber = M68kException.M6E_ILLEGAL_INSTRUCTION;
 21781:     throw M68kException.m6eSignal;
 21782:   }  //efaAnyExtd
 21783: 
 21784:   //a = efaMltExtd (ea)  //|  M+-WXZ  |
 21785:   //  メモリ可変モードのエクステンデッドオペランドの実効アドレスを求める
 21786:   //  efaMltQuadとの違いは(Ar)+と-(Ar)がArを12変化させることと、#<data>がPCを12変化させることと、
 21787:   //  オペランドのアクセスが2ワード増える分の8サイクルが追加されていること
 21788:   @SuppressWarnings ("fallthrough") public static int efaMltExtd (int ea) throws M68kException {
 21789:     int t, w, x;
 21790:     switch (ea) {
 21791:     case 0b010_000:  //(A0)
 21792:       if (XEiJ.EFA_SEPARATE_AR) {
 21793:         return XEiJ.regRn[ 8];
 21794:       }
 21795:       //fallthrough
 21796:     case 0b010_001:  //(A1)
 21797:       if (XEiJ.EFA_SEPARATE_AR) {
 21798:         return XEiJ.regRn[ 9];
 21799:       }
 21800:       //fallthrough
 21801:     case 0b010_010:  //(A2)
 21802:       if (XEiJ.EFA_SEPARATE_AR) {
 21803:         return XEiJ.regRn[10];
 21804:       }
 21805:       //fallthrough
 21806:     case 0b010_011:  //(A3)
 21807:       if (XEiJ.EFA_SEPARATE_AR) {
 21808:         return XEiJ.regRn[11];
 21809:       }
 21810:       //fallthrough
 21811:     case 0b010_100:  //(A4)
 21812:       if (XEiJ.EFA_SEPARATE_AR) {
 21813:         return XEiJ.regRn[12];
 21814:       }
 21815:       //fallthrough
 21816:     case 0b010_101:  //(A5)
 21817:       if (XEiJ.EFA_SEPARATE_AR) {
 21818:         return XEiJ.regRn[13];
 21819:       }
 21820:       //fallthrough
 21821:     case 0b010_110:  //(A6)
 21822:       if (XEiJ.EFA_SEPARATE_AR) {
 21823:         return XEiJ.regRn[14];
 21824:       }
 21825:       //fallthrough
 21826:     case 0b010_111:  //(A7)
 21827:       if (XEiJ.EFA_SEPARATE_AR) {
 21828:         return XEiJ.regRn[15];
 21829:       } else {
 21830:         return XEiJ.regRn[ea - (0b010_000 - 8)];
 21831:       }
 21832:     case 0b011_000:  //(A0)+
 21833:       if (XEiJ.EFA_SEPARATE_AR) {
 21834:         M68kException.m6eIncremented += 12L << (0 << 3);
 21835:         return (XEiJ.regRn[ 8] += 12) - 12;
 21836:       }
 21837:       //fallthrough
 21838:     case 0b011_001:  //(A1)+
 21839:       if (XEiJ.EFA_SEPARATE_AR) {
 21840:         M68kException.m6eIncremented += 12L << (1 << 3);
 21841:         return (XEiJ.regRn[ 9] += 12) - 12;
 21842:       }
 21843:       //fallthrough
 21844:     case 0b011_010:  //(A2)+
 21845:       if (XEiJ.EFA_SEPARATE_AR) {
 21846:         M68kException.m6eIncremented += 12L << (2 << 3);
 21847:         return (XEiJ.regRn[10] += 12) - 12;
 21848:       }
 21849:       //fallthrough
 21850:     case 0b011_011:  //(A3)+
 21851:       if (XEiJ.EFA_SEPARATE_AR) {
 21852:         M68kException.m6eIncremented += 12L << (3 << 3);
 21853:         return (XEiJ.regRn[11] += 12) - 12;
 21854:       }
 21855:       //fallthrough
 21856:     case 0b011_100:  //(A4)+
 21857:       if (XEiJ.EFA_SEPARATE_AR) {
 21858:         M68kException.m6eIncremented += 12L << (4 << 3);
 21859:         return (XEiJ.regRn[12] += 12) - 12;
 21860:       }
 21861:       //fallthrough
 21862:     case 0b011_101:  //(A5)+
 21863:       if (XEiJ.EFA_SEPARATE_AR) {
 21864:         M68kException.m6eIncremented += 12L << (5 << 3);
 21865:         return (XEiJ.regRn[13] += 12) - 12;
 21866:       }
 21867:       //fallthrough
 21868:     case 0b011_110:  //(A6)+
 21869:       if (XEiJ.EFA_SEPARATE_AR) {
 21870:         M68kException.m6eIncremented += 12L << (6 << 3);
 21871:         return (XEiJ.regRn[14] += 12) - 12;
 21872:       }
 21873:       //fallthrough
 21874:     case 0b011_111:  //(A7)+
 21875:       if (XEiJ.EFA_SEPARATE_AR) {
 21876:         M68kException.m6eIncremented += 12L << (7 << 3);
 21877:         return (XEiJ.regRn[15] += 12) - 12;
 21878:       } else {
 21879:         M68kException.m6eIncremented += 12L << ((ea & 7) << 3);
 21880:         return (XEiJ.regRn[ea - (0b011_000 - 8)] += 12) - 12;
 21881:       }
 21882:     case 0b100_000:  //-(A0)
 21883:       if (XEiJ.EFA_SEPARATE_AR) {
 21884:         M68kException.m6eIncremented -= 12L << (0 << 3);
 21885:         return XEiJ.regRn[ 8] -= 12;
 21886:       }
 21887:       //fallthrough
 21888:     case 0b100_001:  //-(A1)
 21889:       if (XEiJ.EFA_SEPARATE_AR) {
 21890:         M68kException.m6eIncremented -= 12L << (1 << 3);
 21891:         return XEiJ.regRn[ 9] -= 12;
 21892:       }
 21893:       //fallthrough
 21894:     case 0b100_010:  //-(A2)
 21895:       if (XEiJ.EFA_SEPARATE_AR) {
 21896:         M68kException.m6eIncremented -= 12L << (2 << 3);
 21897:         return XEiJ.regRn[10] -= 12;
 21898:       }
 21899:       //fallthrough
 21900:     case 0b100_011:  //-(A3)
 21901:       if (XEiJ.EFA_SEPARATE_AR) {
 21902:         M68kException.m6eIncremented -= 12L << (3 << 3);
 21903:         return XEiJ.regRn[11] -= 12;
 21904:       }
 21905:       //fallthrough
 21906:     case 0b100_100:  //-(A4)
 21907:       if (XEiJ.EFA_SEPARATE_AR) {
 21908:         M68kException.m6eIncremented -= 12L << (4 << 3);
 21909:         return XEiJ.regRn[12] -= 12;
 21910:       }
 21911:       //fallthrough
 21912:     case 0b100_101:  //-(A5)
 21913:       if (XEiJ.EFA_SEPARATE_AR) {
 21914:         M68kException.m6eIncremented -= 12L << (5 << 3);
 21915:         return XEiJ.regRn[13] -= 12;
 21916:       }
 21917:       //fallthrough
 21918:     case 0b100_110:  //-(A6)
 21919:       if (XEiJ.EFA_SEPARATE_AR) {
 21920:         M68kException.m6eIncremented -= 12L << (6 << 3);
 21921:         return XEiJ.regRn[14] -= 12;
 21922:       }
 21923:       //fallthrough
 21924:     case 0b100_111:  //-(A7)
 21925:       if (XEiJ.EFA_SEPARATE_AR) {
 21926:         M68kException.m6eIncremented -= 12L << (7 << 3);
 21927:         return XEiJ.regRn[15] -= 12;
 21928:       } else {
 21929:         M68kException.m6eIncremented -= 12L << ((ea & 7) << 3);
 21930:         return XEiJ.regRn[ea - (0b100_000 - 8)] -= 12;
 21931:       }
 21932:     case 0b101_000:  //(d16,A0)
 21933:     case 0b101_001:  //(d16,A1)
 21934:     case 0b101_010:  //(d16,A2)
 21935:     case 0b101_011:  //(d16,A3)
 21936:     case 0b101_100:  //(d16,A4)
 21937:     case 0b101_101:  //(d16,A5)
 21938:     case 0b101_110:  //(d16,A6)
 21939:     case 0b101_111:  //(d16,A7)
 21940:       if (XEiJ.MPU_COMPOUND_POSTINCREMENT) {
 21941:         return (XEiJ.regRn[ea - (0b101_000 - 8)]  //ベースレジスタ
 21942:                 + mmuReadWordSignExword ((XEiJ.regPC += 2) - 2, XEiJ.regSRS));  //pcws。ワードディスプレースメント
 21943:       } else {
 21944:         t = XEiJ.regPC;
 21945:         XEiJ.regPC = t + 2;
 21946:         return (XEiJ.regRn[ea - (0b101_000 - 8)]  //ベースレジスタ
 21947:                 + mmuReadWordSignExword (t, XEiJ.regSRS));  //pcws。ワードディスプレースメント
 21948:       }
 21949:     case 0b110_000:  //(d8,A0,Rn.wl)
 21950:     case 0b110_001:  //(d8,A1,Rn.wl)
 21951:     case 0b110_010:  //(d8,A2,Rn.wl)
 21952:     case 0b110_011:  //(d8,A3,Rn.wl)
 21953:     case 0b110_100:  //(d8,A4,Rn.wl)
 21954:     case 0b110_101:  //(d8,A5,Rn.wl)
 21955:     case 0b110_110:  //(d8,A6,Rn.wl)
 21956:     case 0b110_111:  //(d8,A7,Rn.wl)
 21957:       if (XEiJ.MPU_COMPOUND_POSTINCREMENT) {
 21958:         w = mmuReadWordZeroExword ((XEiJ.regPC += 2) - 2, XEiJ.regSRS);  //pcwz。拡張ワード
 21959:       } else {
 21960:         w = XEiJ.regPC;
 21961:         XEiJ.regPC = w + 2;
 21962:         w = mmuReadWordZeroExword (w, XEiJ.regSRS);  //pcwz。拡張ワード
 21963:       }
 21964:       if (w << 31 - 8 < 0) {  //フルフォーマット
 21965:         XEiJ.mpuCycleCount += w << -2 == 0 ? 1 : 3;  //メモリ間接なし:メモリ間接あり
 21966:       }
 21967:       t = (((~w & 0x0180) == 0 ? 0 :  //ベースレジスタサプレス
 21968:             XEiJ.regRn[ea - (0b110_000 - 8)])  //ベースレジスタ
 21969:            + (w << 31 - 8 >= 0 ? (byte) w :  //バイトディスプレースメント
 21970:               w << 31 - 5 >= 0 ? 0 :  //ヌルベースディスプレースメント
 21971:               w << 31 - 4 >= 0 ? mmuReadWordSignExword ((XEiJ.regPC += 2) - 2, XEiJ.regSRS) :  //pcws。ワードベースディスプレースメント
 21972:               mmuReadLongExword ((XEiJ.regPC += 4) - 4, XEiJ.regSRS)));  //pcls。ロングベースディスプレースメント
 21973:       x = ((~w & 0x0140) == 0 ? 0 :  //インデックスサプレス
 21974:            (w << 31 - 11 >= 0 ? (short) XEiJ.regRn[w >> 12] :  //ワードインデックス
 21975:             XEiJ.regRn[w >> 12])  //ロングインデックス
 21976:            << (w >> 9 & 3));  //スケールファクタ。ワードインデックスのときは符号拡張してから掛ける
 21977:       return ((w & 0x0103) <= 0x0100 ? t + x :  //メモリ間接なし
 21978:               ((XEiJ.TEST_BIT_2_SHIFT ? w << 31 - 2 >= 0 : (w & 4) == 0) ? mmuReadLongData (t + x, XEiJ.regSRS) :  //プリインデックス
 21979:                mmuReadLongData (t, XEiJ.regSRS) + x)  //ポストインデックス
 21980:               + ((XEiJ.TEST_BIT_1_SHIFT ? w << 31 - 1 >= 0 : (w & 2) == 0) ? 0 :  //ヌルアウタディスプレースメント
 21981:                  (XEiJ.TEST_BIT_0_SHIFT ? w << 31 - 0 >= 0 : (w & 1) == 0) ? mmuReadWordSignExword ((XEiJ.regPC += 2) - 2, XEiJ.regSRS) :  //pcws。ワードアウタディスプレースメント
 21982:                  mmuReadLongExword ((XEiJ.regPC += 4) - 4, XEiJ.regSRS)));  //pcls。ロングアウタディスプレースメント
 21983:     case 0b111_000:  //(xxx).W
 21984:       return mmuReadWordSignExword ((XEiJ.regPC += 2) - 2, XEiJ.regSRS);  //pcws
 21985:     case 0b111_001:  //(xxx).L
 21986:       return mmuReadLongExword ((XEiJ.regPC += 4) - 4, XEiJ.regSRS);  //pcls
 21987:     }  //switch
 21988:     M68kException.m6eNumber = M68kException.M6E_ILLEGAL_INSTRUCTION;
 21989:     throw M68kException.m6eSignal;
 21990:   }  //efaMltExtd
 21991: 
 21992:   //a = efaLeaPea (ea)  //|  M  WXZP |
 21993:   //  LEA命令とPEA命令のオペランドの実効アドレスを求める
 21994:   //  efaCntWordとの違いはサイクル数のみ
 21995:   //  LEA命令のベースサイクル数4を含んでいるのでLEA命令ではベースサイクル数を加えなくてよい
 21996:   //  PEA命令のベースサイクル数は12-4=8
 21997:   @SuppressWarnings ("fallthrough") public static int efaLeaPea (int ea) throws M68kException {
 21998:     int t, w, x;
 21999:     switch (ea) {
 22000:     case 0b010_000:  //(A0)
 22001:       if (XEiJ.EFA_SEPARATE_AR) {
 22002:         return XEiJ.regRn[ 8];
 22003:       }
 22004:       //fallthrough
 22005:     case 0b010_001:  //(A1)
 22006:       if (XEiJ.EFA_SEPARATE_AR) {
 22007:         return XEiJ.regRn[ 9];
 22008:       }
 22009:       //fallthrough
 22010:     case 0b010_010:  //(A2)
 22011:       if (XEiJ.EFA_SEPARATE_AR) {
 22012:         return XEiJ.regRn[10];
 22013:       }
 22014:       //fallthrough
 22015:     case 0b010_011:  //(A3)
 22016:       if (XEiJ.EFA_SEPARATE_AR) {
 22017:         return XEiJ.regRn[11];
 22018:       }
 22019:       //fallthrough
 22020:     case 0b010_100:  //(A4)
 22021:       if (XEiJ.EFA_SEPARATE_AR) {
 22022:         return XEiJ.regRn[12];
 22023:       }
 22024:       //fallthrough
 22025:     case 0b010_101:  //(A5)
 22026:       if (XEiJ.EFA_SEPARATE_AR) {
 22027:         return XEiJ.regRn[13];
 22028:       }
 22029:       //fallthrough
 22030:     case 0b010_110:  //(A6)
 22031:       if (XEiJ.EFA_SEPARATE_AR) {
 22032:         return XEiJ.regRn[14];
 22033:       }
 22034:       //fallthrough
 22035:     case 0b010_111:  //(A7)
 22036:       if (XEiJ.EFA_SEPARATE_AR) {
 22037:         return XEiJ.regRn[15];
 22038:       } else {
 22039:         return XEiJ.regRn[ea - (0b010_000 - 8)];
 22040:       }
 22041:     case 0b101_000:  //(d16,A0)
 22042:     case 0b101_001:  //(d16,A1)
 22043:     case 0b101_010:  //(d16,A2)
 22044:     case 0b101_011:  //(d16,A3)
 22045:     case 0b101_100:  //(d16,A4)
 22046:     case 0b101_101:  //(d16,A5)
 22047:     case 0b101_110:  //(d16,A6)
 22048:     case 0b101_111:  //(d16,A7)
 22049:       if (XEiJ.MPU_COMPOUND_POSTINCREMENT) {
 22050:         return (XEiJ.regRn[ea - (0b101_000 - 8)]  //ベースレジスタ
 22051:                 + mmuReadWordSignExword ((XEiJ.regPC += 2) - 2, XEiJ.regSRS));  //pcws。ワードディスプレースメント
 22052:       } else {
 22053:         t = XEiJ.regPC;
 22054:         XEiJ.regPC = t + 2;
 22055:         return (XEiJ.regRn[ea - (0b101_000 - 8)]  //ベースレジスタ
 22056:                 + mmuReadWordSignExword (t, XEiJ.regSRS));  //pcws。ワードディスプレースメント
 22057:       }
 22058:     case 0b110_000:  //(d8,A0,Rn.wl)
 22059:     case 0b110_001:  //(d8,A1,Rn.wl)
 22060:     case 0b110_010:  //(d8,A2,Rn.wl)
 22061:     case 0b110_011:  //(d8,A3,Rn.wl)
 22062:     case 0b110_100:  //(d8,A4,Rn.wl)
 22063:     case 0b110_101:  //(d8,A5,Rn.wl)
 22064:     case 0b110_110:  //(d8,A6,Rn.wl)
 22065:     case 0b110_111:  //(d8,A7,Rn.wl)
 22066:       if (XEiJ.MPU_COMPOUND_POSTINCREMENT) {
 22067:         w = mmuReadWordZeroExword ((XEiJ.regPC += 2) - 2, XEiJ.regSRS);  //pcwz。拡張ワード
 22068:       } else {
 22069:         w = XEiJ.regPC;
 22070:         XEiJ.regPC = w + 2;
 22071:         w = mmuReadWordZeroExword (w, XEiJ.regSRS);  //pcwz。拡張ワード
 22072:       }
 22073:       if (w << 31 - 8 < 0) {  //フルフォーマット
 22074:         XEiJ.mpuCycleCount += w << -2 == 0 ? 1 : 3;  //メモリ間接なし:メモリ間接あり
 22075:       }
 22076:       t = (((~w & 0x0180) == 0 ? 0 :  //ベースレジスタサプレス
 22077:             XEiJ.regRn[ea - (0b110_000 - 8)])  //ベースレジスタ
 22078:            + (w << 31 - 8 >= 0 ? (byte) w :  //バイトディスプレースメント
 22079:               w << 31 - 5 >= 0 ? 0 :  //ヌルベースディスプレースメント
 22080:               w << 31 - 4 >= 0 ? mmuReadWordSignExword ((XEiJ.regPC += 2) - 2, XEiJ.regSRS) :  //pcws。ワードベースディスプレースメント
 22081:               mmuReadLongExword ((XEiJ.regPC += 4) - 4, XEiJ.regSRS)));  //pcls。ロングベースディスプレースメント
 22082:       x = ((~w & 0x0140) == 0 ? 0 :  //インデックスサプレス
 22083:            (w << 31 - 11 >= 0 ? (short) XEiJ.regRn[w >> 12] :  //ワードインデックス
 22084:             XEiJ.regRn[w >> 12])  //ロングインデックス
 22085:            << (w >> 9 & 3));  //スケールファクタ。ワードインデックスのときは符号拡張してから掛ける
 22086:       return ((w & 0x0103) <= 0x0100 ? t + x :  //メモリ間接なし
 22087:               ((XEiJ.TEST_BIT_2_SHIFT ? w << 31 - 2 >= 0 : (w & 4) == 0) ? mmuReadLongData (t + x, XEiJ.regSRS) :  //プリインデックス
 22088:                mmuReadLongData (t, XEiJ.regSRS) + x)  //ポストインデックス
 22089:               + ((XEiJ.TEST_BIT_1_SHIFT ? w << 31 - 1 >= 0 : (w & 2) == 0) ? 0 :  //ヌルアウタディスプレースメント
 22090:                  (XEiJ.TEST_BIT_0_SHIFT ? w << 31 - 0 >= 0 : (w & 1) == 0) ? mmuReadWordSignExword ((XEiJ.regPC += 2) - 2, XEiJ.regSRS) :  //pcws。ワードアウタディスプレースメント
 22091:                  mmuReadLongExword ((XEiJ.regPC += 4) - 4, XEiJ.regSRS)));  //pcls。ロングアウタディスプレースメント
 22092:     case 0b111_000:  //(xxx).W
 22093:       return mmuReadWordSignExword ((XEiJ.regPC += 2) - 2, XEiJ.regSRS);  //pcws
 22094:     case 0b111_001:  //(xxx).L
 22095:       return mmuReadLongExword ((XEiJ.regPC += 4) - 4, XEiJ.regSRS);  //pcls
 22096:     case 0b111_010:  //(d16,PC)
 22097:       t = XEiJ.regPC;
 22098:       XEiJ.regPC = t + 2;
 22099:       return (t  //ベースレジスタ
 22100:               + mmuReadWordSignExword (t, XEiJ.regSRS));  //pcws。ワードディスプレースメント
 22101:     case 0b111_011:  //(d8,PC,Rn.wl)
 22102:       t = XEiJ.regPC;
 22103:       XEiJ.regPC = t + 2;
 22104:       w = mmuReadWordZeroExword (t, XEiJ.regSRS);  //pcwz。拡張ワード
 22105:       if (w << 31 - 8 < 0) {  //フルフォーマット
 22106:         XEiJ.mpuCycleCount += w << -2 == 0 ? 1 : 3;  //メモリ間接なし:メモリ間接あり
 22107:       }
 22108:       t = (((~w & 0x0180) == 0 ? 0 :  //ベースレジスタサプレス
 22109:             t)  //ベースレジスタ
 22110:            + (w << 31 - 8 >= 0 ? (byte) w :  //バイトディスプレースメント
 22111:               w << 31 - 5 >= 0 ? 0 :  //ヌルベースディスプレースメント
 22112:               w << 31 - 4 >= 0 ? mmuReadWordSignExword ((XEiJ.regPC += 2) - 2, XEiJ.regSRS) :  //pcws。ワードベースディスプレースメント
 22113:               mmuReadLongExword ((XEiJ.regPC += 4) - 4, XEiJ.regSRS)));  //pcls。ロングベースディスプレースメント
 22114:       x = ((~w & 0x0140) == 0 ? 0 :  //インデックスサプレス
 22115:            (w << 31 - 11 >= 0 ? (short) XEiJ.regRn[w >> 12] :  //ワードインデックス
 22116:             XEiJ.regRn[w >> 12])  //ロングインデックス
 22117:            << (w >> 9 & 3));  //スケールファクタ。ワードインデックスのときは符号拡張してから掛ける
 22118:       return ((w & 0x0103) <= 0x0100 ? t + x :  //メモリ間接なし
 22119:               ((XEiJ.TEST_BIT_2_SHIFT ? w << 31 - 2 >= 0 : (w & 4) == 0) ? mmuReadLongData (t + x, XEiJ.regSRS) :  //プリインデックス
 22120:                mmuReadLongData (t, XEiJ.regSRS) + x)  //ポストインデックス
 22121:               + ((XEiJ.TEST_BIT_1_SHIFT ? w << 31 - 1 >= 0 : (w & 2) == 0) ? 0 :  //ヌルアウタディスプレースメント
 22122:                  (XEiJ.TEST_BIT_0_SHIFT ? w << 31 - 0 >= 0 : (w & 1) == 0) ? mmuReadWordSignExword ((XEiJ.regPC += 2) - 2, XEiJ.regSRS) :  //pcws。ワードアウタディスプレースメント
 22123:                  mmuReadLongExword ((XEiJ.regPC += 4) - 4, XEiJ.regSRS)));  //pcls。ロングアウタディスプレースメント
 22124:     }  //switch
 22125:     M68kException.m6eNumber = M68kException.M6E_ILLEGAL_INSTRUCTION;
 22126:     throw M68kException.m6eSignal;
 22127:   }  //efaLeaPea
 22128: 
 22129:   //a = efaJmpJsr (ea)  //|  M  WXZP |
 22130:   //  JMP命令とJSR命令のオペランドの実効アドレスを求める
 22131:   //  efaCntWordとの違いはサイクル数のみ
 22132:   //  JMP命令のベースサイクル数8を含んでいるのでJMP命令ではベースサイクル数を加えなくてよい
 22133:   //  JSR命令のベースサイクル数は16-8=8
 22134:   @SuppressWarnings ("fallthrough") public static int efaJmpJsr (int ea) throws M68kException {
 22135:     int t, w, x;
 22136:     switch (ea) {
 22137:     case 0b010_000:  //(A0)
 22138:       if (XEiJ.EFA_SEPARATE_AR) {
 22139:         return XEiJ.regRn[ 8];
 22140:       }
 22141:       //fallthrough
 22142:     case 0b010_001:  //(A1)
 22143:       if (XEiJ.EFA_SEPARATE_AR) {
 22144:         return XEiJ.regRn[ 9];
 22145:       }
 22146:       //fallthrough
 22147:     case 0b010_010:  //(A2)
 22148:       if (XEiJ.EFA_SEPARATE_AR) {
 22149:         return XEiJ.regRn[10];
 22150:       }
 22151:       //fallthrough
 22152:     case 0b010_011:  //(A3)
 22153:       if (XEiJ.EFA_SEPARATE_AR) {
 22154:         return XEiJ.regRn[11];
 22155:       }
 22156:       //fallthrough
 22157:     case 0b010_100:  //(A4)
 22158:       if (XEiJ.EFA_SEPARATE_AR) {
 22159:         return XEiJ.regRn[12];
 22160:       }
 22161:       //fallthrough
 22162:     case 0b010_101:  //(A5)
 22163:       if (XEiJ.EFA_SEPARATE_AR) {
 22164:         return XEiJ.regRn[13];
 22165:       }
 22166:       //fallthrough
 22167:     case 0b010_110:  //(A6)
 22168:       if (XEiJ.EFA_SEPARATE_AR) {
 22169:         return XEiJ.regRn[14];
 22170:       }
 22171:       //fallthrough
 22172:     case 0b010_111:  //(A7)
 22173:       if (XEiJ.EFA_SEPARATE_AR) {
 22174:         return XEiJ.regRn[15];
 22175:       } else {
 22176:         return XEiJ.regRn[ea - (0b010_000 - 8)];
 22177:       }
 22178:     case 0b101_000:  //(d16,A0)
 22179:     case 0b101_001:  //(d16,A1)
 22180:     case 0b101_010:  //(d16,A2)
 22181:     case 0b101_011:  //(d16,A3)
 22182:     case 0b101_100:  //(d16,A4)
 22183:     case 0b101_101:  //(d16,A5)
 22184:     case 0b101_110:  //(d16,A6)
 22185:     case 0b101_111:  //(d16,A7)
 22186:       if (XEiJ.MPU_COMPOUND_POSTINCREMENT) {
 22187:         return (XEiJ.regRn[ea - (0b101_000 - 8)]  //ベースレジスタ
 22188:                 + mmuReadWordSignExword ((XEiJ.regPC += 2) - 2, XEiJ.regSRS));  //pcws。ワードディスプレースメント
 22189:       } else {
 22190:         t = XEiJ.regPC;
 22191:         XEiJ.regPC = t + 2;
 22192:         return (XEiJ.regRn[ea - (0b101_000 - 8)]  //ベースレジスタ
 22193:                 + mmuReadWordSignExword (t, XEiJ.regSRS));  //pcws。ワードディスプレースメント
 22194:       }
 22195:     case 0b110_000:  //(d8,A0,Rn.wl)
 22196:     case 0b110_001:  //(d8,A1,Rn.wl)
 22197:     case 0b110_010:  //(d8,A2,Rn.wl)
 22198:     case 0b110_011:  //(d8,A3,Rn.wl)
 22199:     case 0b110_100:  //(d8,A4,Rn.wl)
 22200:     case 0b110_101:  //(d8,A5,Rn.wl)
 22201:     case 0b110_110:  //(d8,A6,Rn.wl)
 22202:     case 0b110_111:  //(d8,A7,Rn.wl)
 22203:       if (XEiJ.MPU_COMPOUND_POSTINCREMENT) {
 22204:         w = mmuReadWordZeroExword ((XEiJ.regPC += 2) - 2, XEiJ.regSRS);  //pcwz。拡張ワード
 22205:       } else {
 22206:         w = XEiJ.regPC;
 22207:         XEiJ.regPC = w + 2;
 22208:         w = mmuReadWordZeroExword (w, XEiJ.regSRS);  //pcwz。拡張ワード
 22209:       }
 22210:       if (w << 31 - 8 < 0) {  //フルフォーマット
 22211:         XEiJ.mpuCycleCount += w << -2 == 0 ? 1 : 3;  //メモリ間接なし:メモリ間接あり
 22212:       }
 22213:       t = (((~w & 0x0180) == 0 ? 0 :  //ベースレジスタサプレス
 22214:             XEiJ.regRn[ea - (0b110_000 - 8)])  //ベースレジスタ
 22215:            + (w << 31 - 8 >= 0 ? (byte) w :  //バイトディスプレースメント
 22216:               w << 31 - 5 >= 0 ? 0 :  //ヌルベースディスプレースメント
 22217:               w << 31 - 4 >= 0 ? mmuReadWordSignExword ((XEiJ.regPC += 2) - 2, XEiJ.regSRS) :  //pcws。ワードベースディスプレースメント
 22218:               mmuReadLongExword ((XEiJ.regPC += 4) - 4, XEiJ.regSRS)));  //pcls。ロングベースディスプレースメント
 22219:       x = ((~w & 0x0140) == 0 ? 0 :  //インデックスサプレス
 22220:            (w << 31 - 11 >= 0 ? (short) XEiJ.regRn[w >> 12] :  //ワードインデックス
 22221:             XEiJ.regRn[w >> 12])  //ロングインデックス
 22222:            << (w >> 9 & 3));  //スケールファクタ。ワードインデックスのときは符号拡張してから掛ける
 22223:       return ((w & 0x0103) <= 0x0100 ? t + x :  //メモリ間接なし
 22224:               ((XEiJ.TEST_BIT_2_SHIFT ? w << 31 - 2 >= 0 : (w & 4) == 0) ? mmuReadLongData (t + x, XEiJ.regSRS) :  //プリインデックス
 22225:                mmuReadLongData (t, XEiJ.regSRS) + x)  //ポストインデックス
 22226:               + ((XEiJ.TEST_BIT_1_SHIFT ? w << 31 - 1 >= 0 : (w & 2) == 0) ? 0 :  //ヌルアウタディスプレースメント
 22227:                  (XEiJ.TEST_BIT_0_SHIFT ? w << 31 - 0 >= 0 : (w & 1) == 0) ? mmuReadWordSignExword ((XEiJ.regPC += 2) - 2, XEiJ.regSRS) :  //pcws。ワードアウタディスプレースメント
 22228:                  mmuReadLongExword ((XEiJ.regPC += 4) - 4, XEiJ.regSRS)));  //pcls。ロングアウタディスプレースメント
 22229:     case 0b111_000:  //(xxx).W
 22230:       return mmuReadWordSignExword ((XEiJ.regPC += 2) - 2, XEiJ.regSRS);  //pcws
 22231:     case 0b111_001:  //(xxx).L
 22232:       return mmuReadLongExword ((XEiJ.regPC += 4) - 4, XEiJ.regSRS);  //pcls
 22233:     case 0b111_010:  //(d16,PC)
 22234:       t = XEiJ.regPC;
 22235:       XEiJ.regPC = t + 2;
 22236:       return (t  //ベースレジスタ
 22237:               + mmuReadWordSignExword (t, XEiJ.regSRS));  //pcws。ワードディスプレースメント
 22238:     case 0b111_011:  //(d8,PC,Rn.wl)
 22239:       t = XEiJ.regPC;
 22240:       XEiJ.regPC = t + 2;
 22241:       w = mmuReadWordZeroExword (t, XEiJ.regSRS);  //pcwz。拡張ワード
 22242:       if (w << 31 - 8 < 0) {  //フルフォーマット
 22243:         XEiJ.mpuCycleCount += w << -2 == 0 ? 1 : 3;  //メモリ間接なし:メモリ間接あり
 22244:       }
 22245:       t = (((~w & 0x0180) == 0 ? 0 :  //ベースレジスタサプレス
 22246:             t)  //ベースレジスタ
 22247:            + (w << 31 - 8 >= 0 ? (byte) w :  //バイトディスプレースメント
 22248:               w << 31 - 5 >= 0 ? 0 :  //ヌルベースディスプレースメント
 22249:               w << 31 - 4 >= 0 ? mmuReadWordSignExword ((XEiJ.regPC += 2) - 2, XEiJ.regSRS) :  //pcws。ワードベースディスプレースメント
 22250:               mmuReadLongExword ((XEiJ.regPC += 4) - 4, XEiJ.regSRS)));  //pcls。ロングベースディスプレースメント
 22251:       x = ((~w & 0x0140) == 0 ? 0 :  //インデックスサプレス
 22252:            (w << 31 - 11 >= 0 ? (short) XEiJ.regRn[w >> 12] :  //ワードインデックス
 22253:             XEiJ.regRn[w >> 12])  //ロングインデックス
 22254:            << (w >> 9 & 3));  //スケールファクタ。ワードインデックスのときは符号拡張してから掛ける
 22255:       return ((w & 0x0103) <= 0x0100 ? t + x :  //メモリ間接なし
 22256:               ((XEiJ.TEST_BIT_2_SHIFT ? w << 31 - 2 >= 0 : (w & 4) == 0) ? mmuReadLongData (t + x, XEiJ.regSRS) :  //プリインデックス
 22257:                mmuReadLongData (t, XEiJ.regSRS) + x)  //ポストインデックス
 22258:               + ((XEiJ.TEST_BIT_1_SHIFT ? w << 31 - 1 >= 0 : (w & 2) == 0) ? 0 :  //ヌルアウタディスプレースメント
 22259:                  (XEiJ.TEST_BIT_0_SHIFT ? w << 31 - 0 >= 0 : (w & 1) == 0) ? mmuReadWordSignExword ((XEiJ.regPC += 2) - 2, XEiJ.regSRS) :  //pcws。ワードアウタディスプレースメント
 22260:                  mmuReadLongExword ((XEiJ.regPC += 4) - 4, XEiJ.regSRS)));  //pcls。ロングアウタディスプレースメント
 22261:     }  //switch
 22262:     M68kException.m6eNumber = M68kException.M6E_ILLEGAL_INSTRUCTION;
 22263:     throw M68kException.m6eSignal;
 22264:   }  //efaJmpJsr
 22265: 
 22266: 
 22267: 
 22268:   //fpkSTOL ()
 22269:   //  $FE10  __STOL
 22270:   //  10進数の文字列を32bit符号あり整数に変換する
 22271:   //  /^[ \t]*[-+]?[0-9]+/
 22272:   //  先頭の'\t'と' 'を読み飛ばす
 22273:   //  <a0.l:10進数の文字列の先頭
 22274:   //  >d0.l:32bit符号あり整数
 22275:   //  >a0.l:10進数の文字列の直後('\0'とは限らない)
 22276:   //  >ccr:0=エラーなし,CCR_N|CCR_C=文法エラー,CCR_V|CCR_C=オーバーフロー
 22277:   public static void fpkSTOL () throws M68kException {
 22278:     int a = XEiJ.regRn[8];  //a0
 22279:     int c = mmuReadByteZeroData (a, 1);
 22280:     while (c == ' ' || c == '\t') {
 22281:       c = mmuReadByteZeroData (++a, 1);
 22282:     }
 22283:     int n = '7';  //'7'=正,'8'=負
 22284:     if (c == '-') {  //負
 22285:       n = '8';
 22286:       c = mmuReadByteZeroData (++a, 1);
 22287:     } else if (c == '+') {  //正
 22288:       c = mmuReadByteZeroData (++a, 1);
 22289:     }
 22290:     if (!('0' <= c && c <= '9')) {  //数字が1つもない
 22291:       XEiJ.regRn[8] = a;  //a0
 22292:       XEiJ.regCCR = XEiJ.REG_CCR_N | XEiJ.REG_CCR_C;
 22293:       return;
 22294:     }
 22295:     int x = c - '0';  //値
 22296:     for (c = mmuReadByteZeroData (++a, 1); '0' <= c && c <= '9'; c = mmuReadByteZeroData (++a, 1)) {
 22297:       if (214748364 < x || x == 214748364 && n < c) {  //正のとき2147483647、負のとき2147483648より大きくなるときオーバーフロー
 22298:         XEiJ.regRn[8] = a;  //a0
 22299:         XEiJ.regCCR = XEiJ.REG_CCR_V | XEiJ.REG_CCR_C;
 22300:         return;
 22301:       }
 22302:       x = x * 10 + (c - '0');
 22303:     }
 22304:     if (n != '7') {  //負
 22305:       x = -x;
 22306:     }
 22307:     XEiJ.regRn[0] = x;  //d0
 22308:     XEiJ.regRn[8] = a;  //a0
 22309:     XEiJ.regCCR = 0;
 22310:   }  //fpkSTOL()
 22311: 
 22312:   //fpkLTOS ()
 22313:   //  $FE11  __LTOS
 22314:   //  32bit符号あり整数を10進数の文字列に変換する
 22315:   //  /^-?[1-9][0-9]*$/
 22316:   //  <d0.l:32bit符号あり整数
 22317:   //  <a0.l:文字列バッファの先頭
 22318:   //  >a0.l:10進数の文字列の直後('\0'の位置)
 22319:   public static void fpkLTOS () throws M68kException {
 22320:     int x = XEiJ.regRn[0];  //d0
 22321:     int a = XEiJ.regRn[8];  //a0
 22322:     if (x < 0) {  //負
 22323:       mmuWriteByteData (a++, '-', 1);
 22324:       x = -x;
 22325:     }
 22326:     long t = XEiJ.fmtBcd12 (0xffffffffL & x);  //符号は取り除いてあるがx=0x80000000の場合があるので(long)xは不可
 22327:     XEiJ.regRn[8] = a += Math.max (1, 67 - Long.numberOfLeadingZeros (t) >> 2);  //a0
 22328:     mmuWriteByteData (a, 0, 1);
 22329:     do {
 22330:       mmuWriteByteData (--a, '0' | (int) t & 15, 1);
 22331:     } while ((t >>>= 4) != 0L);
 22332:   }  //fpkLTOS()
 22333: 
 22334:   //fpkSTOH ()
 22335:   //  $FE12  __STOH
 22336:   //  16進数の文字列を32bit符号なし整数に変換する
 22337:   //  /^[0-9A-Fa-f]+/
 22338:   //  <a0.l:16進数の文字列の先頭
 22339:   //  >d0.l:32bit符号なし整数
 22340:   //  >a0.l:16進数の文字列の直後('\0'とは限らない)
 22341:   //  >ccr:0=エラーなし,CCR_N|CCR_C=文法エラー,CCR_V|CCR_C=オーバーフロー
 22342:   public static void fpkSTOH () throws M68kException {
 22343:     int a = XEiJ.regRn[8];  //a0
 22344:     int c = mmuReadByteZeroData (a, 1);
 22345:     if (!('0' <= c && c <= '9' || 'A' <= c && c <= 'F' || 'a' <= c && c <= 'f')) {  //数字が1つもない
 22346:       XEiJ.regRn[8] = a;  //a0
 22347:       XEiJ.regCCR = XEiJ.REG_CCR_N | XEiJ.REG_CCR_C;
 22348:       return;
 22349:     }
 22350:     int x = c <= '9' ? c - '0' : c <= 'F' ? c - ('A' - 10) : c - ('a' - 10);  //値
 22351:     for (c = mmuReadByteZeroData (++a, 1); '0' <= c && c <= '9' || 'A' <= c && c <= 'F' || 'a' <= c && c <= 'f'; c = mmuReadByteZeroData (++a, 1)) {
 22352:       if (0x0fffffff < x) {  //0xffffffffより大きくなるときオーバーフロー
 22353:         XEiJ.regRn[8] = a;  //a0
 22354:         XEiJ.regCCR = XEiJ.REG_CCR_V | XEiJ.REG_CCR_C;
 22355:         return;
 22356:       }
 22357:       x = x << 4 | (c <= '9' ? c - '0' : c <= 'F' ? c - ('A' - 10) : c - ('a' - 10));
 22358:     }
 22359:     XEiJ.regRn[0] = x;  //d0
 22360:     XEiJ.regRn[8] = a;  //a0
 22361:     XEiJ.regCCR = 0;
 22362:   }  //fpkSTOH()
 22363: 
 22364:   //fpkHTOS ()
 22365:   //  $FE13  __HTOS
 22366:   //  32bit符号なし整数を16進数の文字列に変換する
 22367:   //  /^[1-9A-F][0-9A-F]*$/
 22368:   //  <d0.l:32bit符号なし整数
 22369:   //  <a0.l:文字列バッファの先頭
 22370:   //  >a0.l:16進数の文字列の直後('\0'の位置)
 22371:   public static void fpkHTOS () throws M68kException {
 22372:     int x = XEiJ.regRn[0];  //d0
 22373:     int a = XEiJ.regRn[8] += Math.max (1, 35 - Integer.numberOfLeadingZeros (x) >> 2);  //a0
 22374:     mmuWriteByteData (a, 0, 1);
 22375:     do {
 22376:       int t = x & 15;
 22377:       //     t             00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f
 22378:       //   9-t             09 08 07 06 05 04 03 02 01 00 ff fe fd fc fb fa
 22379:       //   9-t>>4          00 00 00 00 00 00 00 00 00 00 ff ff ff ff ff ff
 22380:       //   9-t>>4&7        00 00 00 00 00 00 00 00 00 00 07 07 07 07 07 07
 22381:       //   9-t>>4&7|48     30 30 30 30 30 30 30 30 30 30 37 37 37 37 37 37
 22382:       //  (9-t>>4&7|48)+t  30 31 32 33 34 35 36 37 38 39 41 42 43 44 45 46
 22383:       //                    0  1  2  3  4  5  6  7  8  9  A  B  C  D  E  F
 22384:       mmuWriteByteData (--a, (9 - t >> 4 & 7 | 48) + t, 1);
 22385:     } while ((x >>>= 4) != 0);
 22386:   }  //fpkHTOS()
 22387: 
 22388:   //fpkSTOO ()
 22389:   //  $FE14  __STOO
 22390:   //  8進数の文字列を32bit符号なし整数に変換する
 22391:   //  /^[0-7]+/
 22392:   //  <a0.l:8進数の文字列の先頭
 22393:   //  >d0.l:32bit符号なし整数
 22394:   //  >a0.l:8進数の文字列の直後('\0'とは限らない)
 22395:   //  >ccr:0=エラーなし,CCR_N|CCR_C=文法エラー,CCR_V|CCR_C=オーバーフロー
 22396:   public static void fpkSTOO () throws M68kException {
 22397:     int a = XEiJ.regRn[8];  //a0
 22398:     int c = mmuReadByteZeroData (a, 1);
 22399:     if (!('0' <= c && c <= '7')) {  //数字が1つもない
 22400:       XEiJ.regRn[8] = a;  //a0
 22401:       XEiJ.regCCR = XEiJ.REG_CCR_N | XEiJ.REG_CCR_C;
 22402:       return;
 22403:     }
 22404:     int x = c - '0';  //値
 22405:     for (c = mmuReadByteZeroData (++a, 1); '0' <= c && c <= '7'; c = mmuReadByteZeroData (++a, 1)) {
 22406:       if (0x1fffffff < x) {  //0xffffffffより大きくなるときオーバーフロー
 22407:         XEiJ.regRn[8] = a;  //a0
 22408:         XEiJ.regCCR = XEiJ.REG_CCR_V | XEiJ.REG_CCR_C;
 22409:         return;
 22410:       }
 22411:       x = x << 3 | c & 7;
 22412:     }
 22413:     XEiJ.regRn[0] = x;  //d0
 22414:     XEiJ.regRn[8] = a;  //a0
 22415:     XEiJ.regCCR = 0;
 22416:   }  //fpkSTOO()
 22417: 
 22418:   //fpkOTOS ()
 22419:   //  $FE15  __OTOS
 22420:   //  32bit符号なし整数を8進数の文字列に変換する
 22421:   //  /^[1-7][0-7]*$/
 22422:   //  <d0.l:32bit符号なし整数
 22423:   //  <a0.l:文字列バッファの先頭
 22424:   //  >a0.l:8進数の文字列の直後('\0'の位置)
 22425:   public static void fpkOTOS () throws M68kException {
 22426:     int x = XEiJ.regRn[0];  //d0
 22427:     //perl optdiv.pl 34 3
 22428:     //  x/3==x*43>>>7 (0<=x<=127) [34*43==1462]
 22429:     int a = XEiJ.regRn[8] += Math.max (1, (34 - Integer.numberOfLeadingZeros (x)) * 43 >>> 7);  //a0
 22430:     mmuWriteByteData (a, 0, 1);
 22431:     do {
 22432:       mmuWriteByteData (--a, '0' | x & 7, 1);
 22433:     } while ((x >>>= 3) != 0);
 22434:   }  //fpkOTOS()
 22435: 
 22436:   //fpkSTOB ()
 22437:   //  $FE16  __STOB
 22438:   //  2進数の文字列を32bit符号なし整数に変換する
 22439:   //  /^[01]+/
 22440:   //  <a0.l:2進数の文字列の先頭
 22441:   //  >d0.l:32bit符号なし整数
 22442:   //  >a0.l:2進数の文字列の直後('\0'とは限らない)
 22443:   //  >ccr:0=エラーなし,CCR_N|CCR_C=文法エラー,CCR_V|CCR_C=オーバーフロー
 22444:   public static void fpkSTOB () throws M68kException {
 22445:     int a = XEiJ.regRn[8];  //a0
 22446:     int c = mmuReadByteZeroData (a, 1);
 22447:     if (!('0' <= c && c <= '1')) {  //数字が1つもない
 22448:       XEiJ.regRn[8] = a;  //a0
 22449:       XEiJ.regCCR = XEiJ.REG_CCR_N | XEiJ.REG_CCR_C;
 22450:       return;
 22451:     }
 22452:     int x = c - '0';  //値
 22453:     for (c = mmuReadByteZeroData (++a, 1); '0' <= c && c <= '1'; c = mmuReadByteZeroData (++a, 1)) {
 22454:       if (x < 0) {  //オーバーフロー
 22455:         XEiJ.regRn[8] = a;  //a0
 22456:         XEiJ.regCCR = XEiJ.REG_CCR_V | XEiJ.REG_CCR_C;
 22457:         return;
 22458:       }
 22459:       x = x << 1 | c & 1;
 22460:     }
 22461:     XEiJ.regRn[0] = x;  //d0
 22462:     XEiJ.regRn[8] = a;  //a0
 22463:     XEiJ.regCCR = 0;
 22464:   }  //fpkSTOB()
 22465: 
 22466:   //fpkBTOS ()
 22467:   //  $FE17  __BTOS
 22468:   //  32bit符号なし整数を2進数の文字列に変換する
 22469:   //  /^1[01]*$/
 22470:   //  <d0.l:32bit符号なし整数
 22471:   //  <a0.l:文字列バッファの先頭
 22472:   //  >a0.l:2進数の文字列の直後('\0'の位置)
 22473:   public static void fpkBTOS () throws M68kException {
 22474:     int x = XEiJ.regRn[0];  //d0
 22475:     int a = XEiJ.regRn[8] += Math.max (1, 32 - Integer.numberOfLeadingZeros (x));  //a0
 22476:     mmuWriteByteData (a, 0, 1);
 22477:     do {
 22478:       mmuWriteByteData (--a, '0' | x & 1, 1);
 22479:     } while ((x >>>= 1) != 0);
 22480:   }  //fpkBTOS()
 22481: 
 22482:   //fpkIUSING ()
 22483:   //  $FE18  __IUSING
 22484:   //  32bit符号あり整数を文字数を指定して右詰めで10進数の文字列に変換する
 22485:   //  /^ *-?[1-9][0-9]*$/
 22486:   //  <d0.l:32bit符号あり整数
 22487:   //  <d1.b:文字数
 22488:   //  <a0.l:文字列バッファの先頭
 22489:   //  >a0.l:10進数の文字列の直後('\0'の位置)
 22490:   public static void fpkIUSING () throws M68kException {
 22491:     int x = XEiJ.regRn[0];  //d0
 22492:     int n = 0;  //符号の文字数
 22493:     if (x < 0) {  //負
 22494:       n = 1;
 22495:       x = -x;
 22496:     }
 22497:     long t = XEiJ.fmtBcd12 (0xffffffffL & x);  //符号は取り除いてあるがx=0x80000000の場合があるので(long)xは不可
 22498:     int l = n + Math.max (1, 67 - Long.numberOfLeadingZeros (t) >> 2);  //符号を含めた文字数
 22499:     int a = XEiJ.regRn[8];  //a0
 22500:     for (int i = (XEiJ.regRn[1] & 255) - l; i > 0; i--) {
 22501:       mmuWriteByteData (a++, ' ', 1);
 22502:     }
 22503:     XEiJ.regRn[8] = a += l;  //a0
 22504:     mmuWriteByteData (a, 0, 1);
 22505:     do {
 22506:       mmuWriteByteData (--a, '0' | (int) t & 15, 1);
 22507:     } while ((t >>>= 4) != 0L);
 22508:     if (n != 0) {
 22509:       mmuWriteByteData (--a, '-', 1);
 22510:     }
 22511:   }  //fpkIUSING()
 22512: 
 22513:   //fpkVAL ()
 22514:   //  $FE20  __VAL
 22515:   //  文字列を64bit浮動小数点数に変換する
 22516:   //  先頭の'\t'と' 'を読み飛ばす
 22517:   //  "&B"または"&b"で始まっているときは続きを2進数とみなして__STOBで32bit符号なし整数に変換してから__LTODで64bit浮動小数点数に変換する
 22518:   //  "&O"または"&o"で始まっているときは続きを8進数とみなして__STOOで32bit符号なし整数に変換してから__LTODで64bit浮動小数点数に変換する
 22519:   //  "&H"または"&h"で始まっているときは続きを16進数とみなして__STOHで32bit符号なし整数に変換してから__LTODで64bit浮動小数点数に変換する
 22520:   //  それ以外は__STODと同じ
 22521:   //  <a0.l:文字列の先頭
 22522:   //  >d0d1.d:64bit浮動小数点数
 22523:   //  >d2.l:(先頭が'&'でないとき)65535=64bit浮動小数点数をオーバーフローなしでintに変換できる,0=それ以外
 22524:   //  >d3.l:(先頭が'&'でないとき)d2.l==65535のとき64bit浮動小数点数をintに変換した値
 22525:   //  >a0.l:変換された文字列の直後('\0'とは限らない)
 22526:   //  >ccr:0=エラーなし,CCR_N|CCR_C=文法エラー,CCR_V|CCR_C=オーバーフロー
 22527:   public static void fpkVAL () throws M68kException {
 22528:     int a = XEiJ.regRn[8];  //a0
 22529:     //先頭の空白を読み飛ばす
 22530:     int c = mmuReadByteSignData (a++, 1);
 22531:     while (c == ' ' || c == '\t') {
 22532:       c = mmuReadByteSignData (a++, 1);
 22533:     }
 22534:     if (c == '&') {  //&B,&O,&H
 22535:       c = mmuReadByteSignData (a++, 1) & 0xdf;
 22536:       XEiJ.regRn[8] = a;  //&?の直後
 22537:       if (c == 'B') {
 22538:         fpkSTOB ();
 22539:         FEFunction.fpkLTOD ();
 22540:       } else if (c == 'O') {
 22541:         fpkSTOO ();
 22542:         FEFunction.fpkLTOD ();
 22543:       } else if (c == 'H') {
 22544:         fpkSTOH ();
 22545:         FEFunction.fpkLTOD ();
 22546:       } else {
 22547:         XEiJ.regCCR = XEiJ.REG_CCR_N | XEiJ.REG_CCR_C;  //文法エラー
 22548:       }
 22549:     } else {  //&B,&O,&H以外
 22550:       fpkSTOD ();
 22551:     }
 22552:   }  //fpkVAL()
 22553: 
 22554:   //fpkUSING ()
 22555:   //  $FE21  __USING
 22556:   //  64bit浮動小数点数をアトリビュートを指定して文字列に変換する
 22557:   //  メモ
 22558:   //    bit1の'\\'とbit4の'+'を両方指定したときは'\\'が右側。先頭に"+\\"を付ける
 22559:   //    bit1の'\\'とbit2の','とbit4の'+'は整数部の桁数が足りないとき数字を右にずらして押し込まれる
 22560:   //    bit3で指数形式を指示しなければ指数部が極端に大きくても極端に小さくても指数形式にならない
 22561:   //    bit3で指数形式を指定したときbit1の'\\'とbit2の','は無効
 22562:   //    bit4とbit5とbit6はbit4>bit5>bit6の順位で1つだけ有効
 22563:   //    有効数字は14桁で15桁目以降はすべて0
 22564:   //    FLOAT2.Xは整数部の0でない最初の数字から256文字目までで打ち切られてしまう
 22565:   //    整数部の桁数に余裕があれば左側の空白は出力されるので文字列の全体が常に256バイトに収まるわけではない
 22566:   //      using 1234.5 5 0 0    " 1235."
 22567:   //      using 1234.5 5 1 0    " 1234.5"
 22568:   //      using 1234.5 5 2 0    " 1234.50"
 22569:   //      using 1234.5 6 2 1    "**1234.50"
 22570:   //      using 1234.5 6 2 2    " \\1234.50"
 22571:   //      using 1234.5 6 2 3    "*\\1234.50"
 22572:   //      using 1234.5 6 2 4    " 1,234.50"
 22573:   //      using 1234.5 4 2 4    "1,234.50"
 22574:   //      using 1234.5 4 2 5    "1,234.50"
 22575:   //      using 1234.5 4 2 6    "\\1,234.50"
 22576:   //      using 1234.5 4 2 7    "\\1,234.50"
 22577:   //      using 1234.5 4 2 16   "+1234.50"
 22578:   //      using 1234.5 4 2 22   "+\\1,234.50"
 22579:   //      using 1234.5 4 2 32   "1234.50+"
 22580:   //      using 1234.5 4 2 48   "+1234.50"
 22581:   //      using 1234.5 4 2 64   "1234.50 "
 22582:   //      using 1234.5 4 2 80   "+1234.50"
 22583:   //      using 1234.5 4 2 96   "1234.50+"
 22584:   //      using 12345678901234567890 10 1 0      "12345678901235000000.0"
 22585:   //      using 12345678901234567890e+10 10 1 0  "123456789012350000000000000000.0"
 22586:   //      using 0.3333 0 0 0    "."
 22587:   //      using 0.6666 0 0 0    "1."
 22588:   //      using 0.6666 0 3 0    ".667"
 22589:   //      using 0.6666 3 0 0    "  1."
 22590:   //      using 0.3333 0 0 2    "\\."
 22591:   //      using 0.3333 0 0 16   "+."
 22592:   //      using 0.3333 0 0 18   "+\\."
 22593:   //      using 1e-10 3 3 0     "  0.000"
 22594:   //    指数形式の出力は不可解で本来の動作ではないように思えるが、
 22595:   //    X-BASICのprint using命令が使っているのでFLOAT2.Xに合わせておいた方がよさそう
 22596:   //      print using "###.##";1.23         "  1.23"         整数部の桁数は3
 22597:   //      print using "+##.##";1.23         " +1.23"         整数部の桁数は3←
 22598:   //      print using "###.##^^^^^";1.23    " 12.30E-001"    整数部の桁数は3
 22599:   //      print using "+##.##^^^^^";1.23    "+12.30E-001"    整数部の桁数は2←
 22600:   //    FLOAT2.Xでは#NANと#INFは4桁の整数のように出力される。末尾に小数点が付くが小数部には何も出力されない
 22601:   //      using -#INF 7 3 23     "*-\\#,INF."
 22602:   //    FLOAT2.Xで#NANと#INFを指数形式にするとさらに不可解。これはバグと言ってよいと思う
 22603:   //      using #INF 10 10 8      " #INFE-005"
 22604:   //    ここでは#NANと#INFは整数部と小数点と小数部と指数部の全体を使って右寄せにする
 22605:   //  <d0d1.d:64bit浮動小数点数
 22606:   //  <d2.l:整数部の桁数
 22607:   //  <d3.l:小数部の桁数
 22608:   //  <d4.l:アトリビュート
 22609:   //    bit0  左側を'*'で埋める
 22610:   //    bit1  先頭に'\\'を付ける
 22611:   //    bit2  整数部を3桁毎に','で区切る
 22612:   //    bit3  指数形式
 22613:   //    bit4  先頭に符号('+'または'-')を付ける
 22614:   //    bit5  末尾に符号('+'または'-')を付ける
 22615:   //    bit6  末尾に符号(' 'または'-')を付ける
 22616:   //  <a0.l:文字列バッファの先頭
 22617:   //  a0は変化しない
 22618:   public static void fpkUSING () throws M68kException {
 22619:     fpkUSINGSub ((long) XEiJ.regRn[0] << 32 | 0xffffffffL & XEiJ.regRn[1]);  //64bit浮動小数点数
 22620:   }  //fpkUSING()
 22621:   public static void fpkUSINGSub (long l) throws M68kException {
 22622:     int len1 = Math.max (0, XEiJ.regRn[2]);  //整数部の桁数
 22623:     int len2 = Math.max (0, XEiJ.regRn[3]);  //小数部の桁数
 22624:     int attr = XEiJ.regRn[4];  //アトリビュート
 22625:     int a = XEiJ.regRn[8];  //文字列バッファの先頭
 22626:     boolean exp = (attr & 8) != 0;  //true=指数形式
 22627:     int spc = (attr & 1) != 0 ? '*' : ' ';  //先頭の空白を充填する文字
 22628:     int yen = (attr & 2) != 0 ? '\\' : 0;  //先頭の'\\'
 22629:     int cmm = !exp && (attr & 4) != 0 ? ',' : 0;  //3桁毎に入れる','
 22630:     //符号
 22631:     int sgn1 = 0;  //先頭の符号
 22632:     int sgn2 = 0;  //末尾の符号
 22633:     if (l < 0L) {  //負
 22634:       if ((attr & 32 + 64) == 0) {  //末尾に符号を付けない
 22635:         sgn1 = '-';  //先頭の符号
 22636:       } else {  //末尾に符号を付ける
 22637:         sgn2 = '-';  //末尾の符号
 22638:       }
 22639:       l &= 0x7fffffffffffffffL;  //符号bitを消しておく
 22640:     } else {  //正
 22641:       if ((attr & 16) != 0) {  //先頭に符号('+'または'-')を付ける
 22642:         sgn1 = '+';
 22643:       } else if ((attr & 16 + 32) == 32) {  //末尾に符号('+'または'-')を付ける
 22644:         sgn2 = '+';
 22645:       } else if ((attr & 16 + 32 + 64) == 64) {  //末尾に符号(' 'または'-')を付ける
 22646:         sgn2 = ' ';
 22647:       }
 22648:     }
 22649:     double x = Double.longBitsToDouble (l);  //絶対値
 22650:     int e = (int) (l >>> 52) - 1023;  //指数部。ゲタ0。符号bitは消してあるのでマスクは不要
 22651:     l &= 0x000fffffffffffffL;  //仮数部の小数部。正規化数のとき整数部の1が付いていないことに注意
 22652:     //±0,±Inf,NaN
 22653:     if (e == -1023) {  //±0,非正規化数
 22654:       if (l == 0L) {  //±0
 22655:         for (int i = len1 - ((sgn1 != 0 ? 1 : 0) +  //先頭の符号
 22656:                              (yen != 0 ? 1 : 0) +  //'\\'
 22657:                              1  //数字
 22658:                              ); 0 < i; i--) {
 22659:           mmuWriteByteData (a++, spc, 1);  //空白
 22660:         }
 22661:         if (sgn1 != 0) {
 22662:           mmuWriteByteData (a++, sgn1, 1);  //先頭の符号
 22663:         }
 22664:         if (yen != 0) {
 22665:           mmuWriteByteData (a++, yen, 1);  //'\\'
 22666:         }
 22667:         if (0 < len1) {
 22668:           mmuWriteByteData (a++, '0', 1);  //整数部
 22669:         }
 22670:         mmuWriteByteData (a++, '.', 1);  //小数点
 22671:         for (; 0 < len2; len2--) {
 22672:           mmuWriteByteData (a++, '0', 1);  //小数部
 22673:         }
 22674:         mmuWriteByteData (a, '\0', 1);
 22675:         return;
 22676:       }
 22677:       e -= Long.numberOfLeadingZeros (l) - 12;  //非正規化数の指数部を補正する
 22678:     } else if (e == 1024) {  //±Inf,NaN
 22679:       for (int i = len1 + 1 + len2 + (exp ? 5 : 0) -  //整数部と小数点と小数部と指数部の全体を使って右寄せにする
 22680:            ((sgn1 != 0 ? 1 : 0) +  //先頭の符号
 22681:             (yen != 0 ? 1 : 0) +  //'\\'
 22682:             4  //文字
 22683:             ); 0 < i; i--) {
 22684:         mmuWriteByteData (a++, spc, 1);  //空白
 22685:       }
 22686:       if (sgn1 != 0) {
 22687:         mmuWriteByteData (a++, sgn1, 1);  //先頭の符号
 22688:       }
 22689:       if (yen != 0) {
 22690:         mmuWriteByteData (a++, yen, 1);  //'\\'
 22691:       }
 22692:       mmuWriteByteData (a++, '#', 1);
 22693:       if (l == 0L) {  //±Inf
 22694:         mmuWriteByteData (a++, 'I', 1);
 22695:         mmuWriteByteData (a++, 'N', 1);
 22696:         mmuWriteByteData (a++, 'F', 1);
 22697:       } else {  //NaN
 22698:         mmuWriteByteData (a++, 'N', 1);
 22699:         mmuWriteByteData (a++, 'A', 1);
 22700:         mmuWriteByteData (a++, 'N', 1);
 22701:       }
 22702:       mmuWriteByteData (a, '\0', 1);
 22703:       return;
 22704:     }
 22705:     //10進数で表現したときの指数部を求める
 22706:     //  10^e<=x<10^(e+1)となるeを求める
 22707:     e = (int) Math.floor ((double) e * 0.30102999566398119521373889472);  //log10(2)
 22708:     //10^-eを掛けて1<=x<10にする
 22709:     //  非正規化数の最小値から正規化数の最大値まで処理できなければならない
 22710:     //  10^-eを計算してからまとめて掛ける方法はxが非正規化数のとき10^-eがオーバーフローしてしまうので不可
 22711:     //    doubleは非正規化数の逆数を表現できない
 22712:     if (0 < e) {  //10<=x
 22713:       x *= FEFunction.FPK_TEN_M16QR[e & 15];
 22714:       if (16 <= e) {
 22715:         x *= FEFunction.FPK_TEN_M16QR[16 + (e >> 4 & 15)];
 22716:         if (256 <= e) {
 22717:           x *= FEFunction.FPK_TEN_M16QR[33];  //FEFunction.FPK_TEN_M16QR[32 + (e >> 8)]
 22718:         }
 22719:       }
 22720:     } else if (e < 0) {  //x<1
 22721:       x *= FEFunction.FPK_TEN_P16QR[-e & 15];
 22722:       if (e <= -16) {
 22723:         x *= FEFunction.FPK_TEN_P16QR[16 + (-e >> 4 & 15)];
 22724:         if (e <= -256) {
 22725:           x *= FEFunction.FPK_TEN_P16QR[33];  //FEFunction.FPK_TEN_P16QR[32 + (-e >> 8)]
 22726:         }
 22727:       }
 22728:     }
 22729:     //整数部2桁、小数部16桁の10進数に変換する
 22730:     //  1<=x<10なのでw[1]が先頭になるはずだが誤差で前後にずれる可能性がある
 22731:     int[] w = new int[18];
 22732:     {
 22733:       int d = (int) x;
 22734:       int t = XEiJ.FMT_BCD4[d];
 22735:       w[0] = t >> 4;
 22736:       w[1] = t      & 15;
 22737:       for (int i = 2; i < 18; i += 4) {
 22738:         //xを10000倍して整数部dを引くことで小数部を残すが、このとき情報落ちが発生して誤差が蓄積する
 22739:         //Double-Doubleの乗算の要領で10000倍を正確に行い、誤差の蓄積を回避する
 22740:         //x = (x - (double) d) * 10000.0;
 22741:         double xh = x * 0x8000001p0;
 22742:         xh += x - xh;  //xの上半分
 22743:         x = (xh - (double) d) * 10000.0 + (x - xh) * 10000.0;
 22744:         d = (int) x;
 22745:         t = XEiJ.FMT_BCD4[d];
 22746:         w[i    ] = t >> 12;
 22747:         w[i + 1] = t >>  8 & 15;
 22748:         w[i + 2] = t >>  4 & 15;
 22749:         w[i + 3] = t       & 15;
 22750:       }
 22751:     }
 22752:     //先頭の位置を確認する
 22753:     //  w[h]が先頭(0でない最初の数字)の位置
 22754:     int h = w[0] != 0 ? 0 : w[1] != 0 ? 1 : 2;
 22755:     //14+1桁目を四捨五入する
 22756:     int o = h + 14;  //w[o]は四捨五入する桁の位置。w[]の範囲内
 22757:     if (5 <= w[o]) {
 22758:       int i = o;
 22759:       while (10 <= ++w[--i]) {
 22760:         w[i] = 0;
 22761:       }
 22762:       if (i < h) {  //先頭から繰り上がった。このとき新しい先頭は1でそれ以外はすべて0
 22763:         h--;  //先頭を左にずらす
 22764:         o--;  //末尾を左にずらす
 22765:       }
 22766:     }
 22767:     //先頭の位置に応じて指数部を更新する
 22768:     //  w[h]が整数部、w[h+1..13]が小数部。10^eの小数点はw[h]の右側。整数部の桁数はe+1桁
 22769:     e -= h - 1;
 22770:     //整数部の桁数を調節する
 22771:     int ee = !exp ? e : Math.max (0, sgn1 != 0 || sgn2 != 0 ? len1 : len1 - 1) - 1;  //整数部の桁数-1。整数部の桁数はee+1桁。指数部はe-ee
 22772:     //小数点以下len2+1桁目が先頭から14+1桁目よりも左側にあるときその桁で改めて四捨五入する
 22773:     //  あらかじめ14+1桁目で四捨五入しておかないと、
 22774:     //  1.5の5を四捨五入しなければならないときに誤差で1.499…になったまま4を四捨五入しようとして失敗することがある
 22775:     int s = h + ee + 1 + len2;  //w[s]は小数点以下len2+1桁目の位置。w.length<=sの場合があることに注意
 22776:     if (s < o) {
 22777:       o = s;  //w[o]は四捨五入する桁の位置。o<0の場合があることに注意
 22778:       if (0 <= o && 5 <= w[o]) {
 22779:         int i = o;
 22780:         while (10 <= ++w[--i]) {
 22781:           w[i] = 0;
 22782:         }
 22783:         if (i < h) {  //先頭から繰り上がった。このとき新しい先頭は1でそれ以外はすべて0
 22784:           h--;  //先頭を左にずらす
 22785:           if (!exp) {  //指数形式でないとき
 22786:             ee++;  //左に1桁伸ばす。全体の桁数が1桁増える
 22787:           } else {  //指数形式のとき
 22788:             e++;  //指数部を1増やす
 22789:             o--;  //末尾を左にずらす。全体の桁数は変わらない
 22790:           }
 22791:         }
 22792:       }
 22793:     }
 22794:     //文字列に変換する
 22795:     if (0 <= ee) {  //1<=x
 22796:       for (int i = len1 - ((sgn1 != 0 ? 1 : 0) +  //先頭の符号
 22797:                            (yen != 0 ? 1 : 0) +  //'\\'
 22798:                            (cmm != 0 ? ee / 3 : 0) +  //','
 22799:                            ee + 1  //数字
 22800:                            ); 0 < i; i--) {
 22801:         mmuWriteByteData (a++, spc, 1);  //空白
 22802:       }
 22803:       if (sgn1 != 0) {
 22804:         mmuWriteByteData (a++, sgn1, 1);  //先頭の符号
 22805:       }
 22806:       if (yen != 0) {
 22807:         mmuWriteByteData (a++, yen, 1);  //'\\'
 22808:       }
 22809:       for (int i = ee; 0 <= i; i--) {
 22810:         mmuWriteByteData (a++, h < o ? '0' + w[h] : '0', 1);  //整数部
 22811:         h++;
 22812:         if (cmm != 0 && 0 < i && i % 3 == 0) {
 22813:           mmuWriteByteData (a++, cmm, 1);  //','
 22814:         }
 22815:       }
 22816:       mmuWriteByteData (a++, '.', 1);  //小数点
 22817:       for (; 0 < len2; len2--) {
 22818:         mmuWriteByteData (a++, h < o ? '0' + w[h] : '0', 1);  //小数部
 22819:         h++;
 22820:       }
 22821:     } else {  //x<1
 22822:       for (int i = len1 - ((sgn1 != 0 ? 1 : 0) +  //先頭の符号
 22823:                            (yen != 0 ? 1 : 0) +  //'\\'
 22824:                            1  //数字
 22825:                            ); 0 < i; i--) {
 22826:         mmuWriteByteData (a++, spc, 1);  //空白
 22827:       }
 22828:       if (sgn1 != 0) {
 22829:         mmuWriteByteData (a++, sgn1, 1);  //先頭の符号
 22830:       }
 22831:       if (yen != 0) {
 22832:         mmuWriteByteData (a++, yen, 1);  //'\\'
 22833:       }
 22834:       if (0 < len1) {
 22835:         mmuWriteByteData (a++, '0', 1);  //整数部
 22836:       }
 22837:       mmuWriteByteData (a++, '.', 1);  //小数点
 22838:       for (int i = -1 - ee; 0 < len2 && 0 < i; len2--, i--) {
 22839:         mmuWriteByteData (a++, '0', 1);  //小数部の先頭の0の並び
 22840:       }
 22841:       for (; 0 < len2; len2--) {
 22842:         mmuWriteByteData (a++, h < o ? '0' + w[h] : '0', 1);  //小数部
 22843:         h++;
 22844:       }
 22845:     }
 22846:     if (exp) {
 22847:       e -= ee;
 22848:       mmuWriteByteData (a++, 'E', 1);  //指数部の始まり
 22849:       if (0 <= e) {
 22850:         mmuWriteByteData (a++, '+', 1);  //指数部の正符号。省略しない
 22851:       } else {
 22852:         mmuWriteByteData (a++, '-', 1);  //指数部の負符号
 22853:         e = -e;
 22854:       }
 22855:       e = XEiJ.FMT_BCD4[e];
 22856:       mmuWriteByteData (a++, '0' + (e >> 8     ), 1);  //指数部の100の位。0でも省略しない
 22857:       mmuWriteByteData (a++, '0' + (e >> 4 & 15), 1);  //指数部の10の位
 22858:       mmuWriteByteData (a++, '0' + (e      & 15), 1);  //指数部の1の位
 22859:     }
 22860:     if (sgn2 != 0) {
 22861:       mmuWriteByteData (a++, sgn2, 1);  //末尾の符号
 22862:     }
 22863:     mmuWriteByteData (a, '\0', 1);
 22864:   }  //fpkUSINGSub6(long)
 22865: 
 22866:   //fpkSTOD ()
 22867:   //  $FE22  __STOD
 22868:   //  文字列を64bit浮動小数点数に変換する
 22869:   //  先頭の'\t'と' 'を読み飛ばす
 22870:   //  "#INF"は無限大、"#NAN"は非数とみなす
 22871:   //  バグ
 22872:   //    FLOAT2.X 2.02/2.03は誤差が大きい
 22873:   //      "1.7976931348623E+308"=0x7fefffffffffffb0が0x7fefffffffffffb3になる
 22874:   //      "1.5707963267949"=0x3ff921fb54442d28が0x3ff921fb54442d26になる
 22875:   //      "4.9406564584125E-324"(非正規化数の最小値よりもわずかに大きい)がエラーになる
 22876:   //    FLOAT2.X 2.02/2.03は"-0"が+0になる
 22877:   //    FLOAT4.X 1.02は"-0"が+0になる(実機で確認済み)
 22878:   //    FLOAT2.X 2.02/2.03は"-#INF"が+Infになる
 22879:   //      print val("-#INF")で再現できる
 22880:   //      '-'を符号として解釈しておきながら結果の無限大に符号を付けるのを忘れている
 22881:   //    FLOAT2.X 2.02/2.03は".#INF"が+Infになる
 22882:   //      print val(".#INF")で再現できる
 22883:   //    FLOAT4.X 1.02は"#NAN","#INF","-#INF"を読み取ったときa0が文字列の直後ではなく最後の文字を指している
 22884:   //  <a0.l:文字列の先頭
 22885:   //  >d0d1.d:64bit浮動小数点数
 22886:   //  >d2.l:65535=64bit浮動小数点数をオーバーフローなしでintに変換できる,0=それ以外
 22887:   //  >d3.l:d2.l==65535のとき64bit浮動小数点数をintに変換した値
 22888:   //  >a0.l:変換された文字列の直後('\0'とは限らない)
 22889:   //  >ccr:0=エラーなし,CCR_N|CCR_C=文法エラー,CCR_V|CCR_C=オーバーフロー
 22890:   public static void fpkSTOD () throws M68kException {
 22891:     long l = Double.doubleToLongBits (fpkSTODSub ());
 22892:     if (FEFunction.FPK_FPCP_NAN && l == 0x7ff8000000000000L) {
 22893:       l = 0x7fffffffffffffffL;
 22894:     }
 22895:     XEiJ.regRn[0] = (int) (l >> 32);  //d0
 22896:     XEiJ.regRn[1] = (int) l;  //d1
 22897:   }  //fpkSTOD()
 22898:   public static double fpkSTODSub () throws M68kException {
 22899:     int a = XEiJ.regRn[8];  //a0
 22900:     //先頭の空白を読み飛ばす
 22901:     int c = mmuReadByteSignData (a, 1);
 22902:     while (c == ' ' || c == '\t') {
 22903:       c = mmuReadByteSignData (++a, 1);
 22904:     }
 22905:     //符号を読み取る
 22906:     double s = 1.0;  //仮数部の符号
 22907:     if (c == '+') {
 22908:       c = mmuReadByteSignData (++a, 1);
 22909:     } else if (c == '-') {
 22910:       s = -s;
 22911:       c = mmuReadByteSignData (++a, 1);
 22912:     }
 22913:     //#NANと#INFを処理する
 22914:     if (c == '#') {
 22915:       c = mmuReadByteSignData (a + 1, 1);
 22916:       if (c == 'N' || c == 'I') {  //小文字は不可
 22917:         c = c << 8 | mmuReadByteZeroData (a + 2, 1);
 22918:         if (c == ('N' << 8 | 'A') || c == ('I' << 8 | 'N')) {
 22919:           c = c << 8 | mmuReadByteZeroData (a + 3, 1);
 22920:           if (c == ('N' << 16 | 'A' << 8 | 'N') || c == ('I' << 16 | 'N' << 8 | 'F')) {
 22921:             XEiJ.regRn[2] = 0;  //d2
 22922:             XEiJ.regRn[3] = 0;  //d3
 22923:             XEiJ.regRn[8] = a + 4;  //a0。"#NAN"または"#INF"のときだけ直後まで進める。それ以外は'#'の位置で止める
 22924:             XEiJ.regCCR = 0;  //エラーなし。"#INF"はオーバーフローとみなされない
 22925:             return c == ('N' << 16 | 'A' << 8 | 'N') ? Double.NaN : s * Double.POSITIVE_INFINITY;
 22926:           }
 22927:         }
 22928:       }
 22929:       XEiJ.regRn[8] = a;  //a0。'#'の位置で止める
 22930:       XEiJ.regCCR = XEiJ.REG_CCR_N | XEiJ.REG_CCR_C;  //文法エラー
 22931:       return 0.0;
 22932:     }  //if c=='#'
 22933:     //仮数部を読み取る
 22934:     //  数字を1000個並べてからe-1000などと書いてあるとき途中でオーバーフローすると困るので、
 22935:     //  多すぎる数字の並びは先頭の有効数字だけ読み取って残りは桁数だけ数えて読み飛ばす
 22936:     long u = 0L;  //仮数部
 22937:     int n = 0;  //0以外の最初の数字から数えて何桁目か
 22938:     int e = 1;  //-小数部の桁数。1=整数部
 22939:     if (c == '.') {  //仮数部の先頭が小数点
 22940:       e = 0;  //小数部開始
 22941:       c = mmuReadByteSignData (++a, 1);
 22942:     }
 22943:     if (c < '0' || '9' < c) {  //仮数部に数字がない
 22944:       XEiJ.regRn[8] = a;  //a0
 22945:       XEiJ.regCCR = XEiJ.REG_CCR_N | XEiJ.REG_CCR_C;  //文法エラー
 22946:       return 0.0;
 22947:     }
 22948:     double x = 0.0;
 22949:     do {
 22950:       if (0 < n || '0' < c) {  //0以外
 22951:         n++;  //0以外の最初の数字から数えて何桁目か
 22952:       }
 22953:       if (e <= 0 && n <= 18) {  //小数部で18桁目まで
 22954:         e--;  //-小数部の桁数
 22955:       }
 22956:       if (0 < n && n <= 18) {  //1桁目から18桁目まで
 22957:         u = u * 10L + (long) (c - '0');
 22958:       }
 22959:       c = mmuReadByteSignData (++a, 1);
 22960:       if (0 < e && c == '.') {  //整数部で小数点が出てきた
 22961:         e = 0;  //小数部開始
 22962:         c = mmuReadByteSignData (++a, 1);
 22963:       }
 22964:     } while ('0' <= c && c <= '9');
 22965:     if (0 < e) {  //小数点が出てこなかった
 22966:       e = 18 < n ? n - 18 : 0;  //整数部を読み飛ばした桁数が(-小数部の桁数)
 22967:     }
 22968:     //  1<=u<10^18  整数なので誤差はない
 22969:     //  0<e   小数点がなくて整数部が19桁以上あって末尾を読み飛ばした
 22970:     //  e==0  小数点がなくて整数部が18桁以内で末尾を読み飛ばさなかった
 22971:     //        小数点があって小数点で終わっていた
 22972:     //  e<0   小数点があって小数部が1桁以上あった
 22973:     //指数部を読み取る
 22974:     if (c == 'E' || c == 'e') {
 22975:       c = mmuReadByteSignData (++a, 1);
 22976:       int t = 1;  //指数部の符号
 22977:       if (c == '+') {
 22978:         c = mmuReadByteSignData (++a, 1);
 22979:       } else if (c == '-') {
 22980:         t = -t;
 22981:         c = mmuReadByteSignData (++a, 1);
 22982:       }
 22983:       if (c < '0' || '9' < c) {  //指数部に数字がない
 22984:         XEiJ.regRn[8] = a;  //a0
 22985:         XEiJ.regCCR = XEiJ.REG_CCR_N | XEiJ.REG_CCR_C;  //文法エラー
 22986:         return 0.0;
 22987:       }
 22988:       while (c == '0') {  //先頭の0を読み飛ばす
 22989:         c = mmuReadByteSignData (++a, 1);
 22990:       }
 22991:       int p = 0;
 22992:       for (int j = 0; '0' <= c && c <= '9' && j < 9; j++) {  //0以外の数字が出てきてから最大で9桁目まで読み取る。Human68kの環境では数字を1GBも並べることはできないのでオーバーフローの判定には9桁あれば十分
 22993:         p = p * 10 + (c - '0');
 22994:         c = mmuReadByteSignData (++a, 1);
 22995:       }
 22996:       e += t * p;
 22997:     }
 22998:     //符号と仮数部と指数部を合わせる
 22999:     //  x=s*x*10^e
 23000:     //  1<=u<10^18なのでeが範囲を大きく外れている場合を先に除外する
 23001:     if (e < -350) {
 23002:       XEiJ.regRn[2] = 65535;  //d2。-1ではない
 23003:       XEiJ.regRn[3] = 0;  //d3
 23004:       XEiJ.regRn[8] = a;  //a0
 23005:       XEiJ.regCCR = 0;  //エラーなし。アンダーフローはエラーとみなされない
 23006:       return s < 0.0 ? -0.0 : 0.0;
 23007:     }
 23008:     if (350 < e) {
 23009:       XEiJ.regRn[2] = 0;  //d2
 23010:       XEiJ.regRn[3] = 0;  //d3
 23011:       XEiJ.regRn[8] = a;  //a0
 23012:       XEiJ.regCCR = XEiJ.REG_CCR_V | XEiJ.REG_CCR_C;  //オーバーフロー
 23013:       return s * Double.POSITIVE_INFINITY;
 23014:     }
 23015:     if (true) {
 23016:       QFP xx = new QFP (s < 0.0 ? -u : u);  //符号と仮数部
 23017:       if (0 < e) {
 23018:         xx.mul (QFP.QFP_TEN_P16QR[e & 15]);
 23019:         if (16 <= e) {
 23020:           xx.mul (QFP.QFP_TEN_P16QR[16 + (e >> 4 & 15)]);
 23021:           if (256 <= e) {
 23022:             xx.mul (QFP.QFP_TEN_P16QR[33]);
 23023:           }
 23024:         }
 23025:       } else if (e < 0) {
 23026:         xx.mul (QFP.QFP_TEN_M16QR[-e & 15]);
 23027:         if (e <= -16) {
 23028:           xx.mul (QFP.QFP_TEN_M16QR[16 + (-e >> 4 & 15)]);
 23029:           if (e <= -256) {
 23030:             xx.mul (QFP.QFP_TEN_M16QR[33]);
 23031:           }
 23032:         }
 23033:       }
 23034:       x = xx.getd ();
 23035:     } else {
 23036:       x = s * (double) u;  //符号と仮数部
 23037:       if (0 < e) {
 23038:         x *= FEFunction.FPK_TEN_P16QR[e & 15];
 23039:         if (16 <= e) {
 23040:           x *= FEFunction.FPK_TEN_P16QR[16 + (e >> 4 & 15)];
 23041:           if (256 <= e) {
 23042:             x *= FEFunction.FPK_TEN_P16QR[33];  //FEFunction.FPK_TEN_P16QR[32 + (e >> 8)]
 23043:           }
 23044:         }
 23045:       } else if (e < 0) {
 23046:         x /= FEFunction.FPK_TEN_P16QR[-e & 15];
 23047:         if (e <= -16) {
 23048:           x /= FEFunction.FPK_TEN_P16QR[16 + (-e >> 4 & 15)];
 23049:           if (e <= -256) {
 23050:             x /= FEFunction.FPK_TEN_P16QR[33];  //FEFunction.FPK_TEN_P16QR[32 + (-e >> 8)]
 23051:           }
 23052:         }
 23053:       }
 23054:     }
 23055:     if (Double.isInfinite (x)) {
 23056:       XEiJ.regRn[8] = a;  //a0
 23057:       XEiJ.regCCR = XEiJ.REG_CCR_V | XEiJ.REG_CCR_C;  //オーバーフロー
 23058:       return x;
 23059:     }
 23060:     //  アンダーフローで0になっている場合がある
 23061:     if (x == (double) ((int) x)) {  //intで表現できる。+0.0==-0.0==0なので±0.0を含む
 23062:       XEiJ.regRn[2] = 65535;  //d2。-1ではない
 23063:       XEiJ.regRn[3] = (int) x;  //d3
 23064:     } else {  //intで表現できない
 23065:       XEiJ.regRn[2] = 0;  //d2
 23066:       XEiJ.regRn[3] = 0;  //d3
 23067:     }
 23068:     XEiJ.regRn[8] = a;  //a0
 23069:     XEiJ.regCCR = 0;  //エラーなし
 23070:     return x;
 23071:   }  //fpkSTODSub()
 23072: 
 23073:   //fpkDTOS ()
 23074:   //  $FE23  __DTOS
 23075:   //  64bit浮動小数点数を文字列に変換する
 23076:   //  無限大は"#INF"、非数は"#NAN"になる
 23077:   //  指数形式の境目
 23078:   //    x<10^-4または10^14<=xのとき指数形式にする
 23079:   //    FLOAT2.X/FLOAT4.Xの場合
 23080:   //      3f2fffffffffff47  2.4414062499999E-004
 23081:   //      3f2fffffffffff48  0.000244140625
 23082:   //      42d6bcc41e8fffdf  99999999999999
 23083:   //      42d6bcc41e8fffe0  1E+014
 23084:   //  <d0d1.d:64bit浮動小数点数
 23085:   //  <a0.l:文字列バッファの先頭
 23086:   //  >a0.l:末尾の'\0'の位置
 23087:   public static void fpkDTOS () throws M68kException {
 23088:     fpkDTOSSub ((long) XEiJ.regRn[0] << 32 | 0xffffffffL & XEiJ.regRn[1]);  //64bit浮動小数点数
 23089:   }  //fpkDTOS()
 23090:   public static void fpkDTOSSub (long l) throws M68kException {
 23091:     final int len3 = 14;
 23092:     int a = XEiJ.regRn[8];  //文字列バッファの先頭
 23093:     //符号と指数部の処理
 23094:     //  ±0,±Inf,NaNはここで除外する
 23095:     if (l < 0L) {
 23096:       mmuWriteByteData (a++, '-', 1);  //負符号
 23097:       l &= 0x7fffffffffffffffL;  //符号bitを消しておく
 23098:     }
 23099:     double x = Double.longBitsToDouble (l);  //絶対値
 23100:     int e = (int) (l >>> 52) - 1023;  //指数部。ゲタ0。符号bitは消してあるのでマスクは不要
 23101:     l &= 0x000fffffffffffffL;  //仮数部の小数部。正規化数のとき整数部の1が付いていないことに注意
 23102:     if (e == -1023) {  //±0,非正規化数
 23103:       if (l == 0L) {  //±0
 23104:         mmuWriteByteData (a++, '0', 1);  //0
 23105:         mmuWriteByteData (a, '\0', 1);
 23106:         XEiJ.regRn[8] = a;  //末尾の'\0'の位置
 23107:         return;
 23108:       }
 23109:       e -= Long.numberOfLeadingZeros (l) - 12;  //非正規化数の指数部を補正する
 23110:     } else if (e == 1024) {  //±Inf,NaN
 23111:       mmuWriteByteData (a++, '#', 1);
 23112:       if (l == 0L) {  //±Inf
 23113:         mmuWriteByteData (a++, 'I', 1);
 23114:         mmuWriteByteData (a++, 'N', 1);
 23115:         mmuWriteByteData (a++, 'F', 1);
 23116:       } else {  //NaN
 23117:         mmuWriteByteData (a++, 'N', 1);
 23118:         mmuWriteByteData (a++, 'A', 1);
 23119:         mmuWriteByteData (a++, 'N', 1);
 23120:       }
 23121:       mmuWriteByteData (a, '\0', 1);
 23122:       XEiJ.regRn[8] = a;  //末尾の'\0'の位置
 23123:       return;
 23124:     }
 23125:     //10進数で表現したときの指数部を求める
 23126:     //  10^e<=x<10^(e+1)となるeを求める
 23127:     e = (int) Math.floor ((double) e * 0.30102999566398119521373889472);  //log10(2)
 23128:     //10^-eを掛けて1<=x<10にする
 23129:     //  非正規化数の最小値から正規化数の最大値まで処理できなければならない
 23130:     //  10^-eを計算してからまとめて掛ける方法はxが非正規化数のとき10^-eがオーバーフローしてしまうので不可
 23131:     //    doubleは非正規化数の逆数を表現できない
 23132:     if (0 < e) {  //10<=x
 23133:       x *= FEFunction.FPK_TEN_M16QR[e & 15];
 23134:       if (16 <= e) {
 23135:         x *= FEFunction.FPK_TEN_M16QR[16 + (e >> 4 & 15)];
 23136:         if (256 <= e) {
 23137:           x *= FEFunction.FPK_TEN_M16QR[33];  //FEFunction.FPK_TEN_M16QR[32 + (e >> 8)]
 23138:         }
 23139:       }
 23140:     } else if (e < 0) {  //x<1
 23141:       x *= FEFunction.FPK_TEN_P16QR[-e & 15];
 23142:       if (e <= -16) {
 23143:         x *= FEFunction.FPK_TEN_P16QR[16 + (-e >> 4 & 15)];
 23144:         if (e <= -256) {
 23145:           x *= FEFunction.FPK_TEN_P16QR[33];  //FEFunction.FPK_TEN_P16QR[32 + (-e >> 8)]
 23146:         }
 23147:       }
 23148:     }
 23149:     //整数部2桁、小数部16桁の10進数に変換する
 23150:     //  1<=x<10なのでw[1]が先頭になるはずだが誤差で前後にずれる可能性がある
 23151:     int[] w = new int[18];
 23152:     {
 23153:       int d = (int) x;
 23154:       int t = XEiJ.FMT_BCD4[d];
 23155:       w[0] = t >> 4;
 23156:       w[1] = t      & 15;
 23157:       for (int i = 2; i < 18; i += 4) {
 23158:         //xを10000倍して整数部dを引くことで小数部を残すが、このとき情報落ちが発生して誤差が蓄積する
 23159:         //Double-Doubleの乗算の要領で10000倍を正確に行い、誤差の蓄積を回避する
 23160:         //x = (x - (double) d) * 10000.0;
 23161:         double xh = x * 0x8000001p0;
 23162:         xh += x - xh;  //xの上半分
 23163:         x = (xh - (double) d) * 10000.0 + (x - xh) * 10000.0;
 23164:         d = (int) x;
 23165:         t = XEiJ.FMT_BCD4[d];
 23166:         w[i    ] = t >> 12;
 23167:         w[i + 1] = t >>  8 & 15;
 23168:         w[i + 2] = t >>  4 & 15;
 23169:         w[i + 3] = t       & 15;
 23170:       }
 23171:     }
 23172:     //先頭の位置を確認する
 23173:     //  w[h]が先頭(0でない最初の数字)の位置
 23174:     int h = w[0] != 0 ? 0 : w[1] != 0 ? 1 : 2;
 23175:     //14+1桁目を四捨五入する
 23176:     int o = h + 14;  //w[o]は四捨五入する桁の位置。w[]の範囲内
 23177:     if (5 <= w[o]) {
 23178:       int i = o;
 23179:       while (10 <= ++w[--i]) {
 23180:         w[i] = 0;
 23181:       }
 23182:       if (i < h) {  //先頭から繰り上がった。このとき新しい先頭は1でそれ以外はすべて0
 23183:         h--;  //先頭を左にずらす
 23184:         o--;  //末尾を左にずらす
 23185:       }
 23186:     }
 23187:     //先頭の位置に応じて指数部を更新する
 23188:     //  w[h]が整数部、w[h+1..o-1]が小数部。10^eの小数点はw[h]の右側。整数部の桁数はe+1桁
 23189:     e -= h - 1;
 23190:     //末尾の位置を確認する
 23191:     //  w[o-1]が末尾(0でない最後の数字)の位置
 23192:     while (w[o - 1] == 0) {  //全体は0ではないので必ず止まる。小数点よりも左側で止まる場合があることに注意
 23193:       o--;
 23194:     }
 23195:     //指数形式にするかどうか選択して文字列に変換する
 23196:     if (0 <= e && e < len3) {  //1<=x<10^len3。指数形式にしない
 23197:       do {
 23198:         mmuWriteByteData (a++, '0' + w[h++], 1);  //整数部。末尾の位置に関係なく1の位まで書く
 23199:       } while (0 <= --e);
 23200:       if (h < o) {  //小数部がある
 23201:         mmuWriteByteData (a++, '.', 1);  //小数部があるときだけ小数点を書く
 23202:         do {
 23203:           mmuWriteByteData (a++, '0' + w[h++], 1);  //小数部
 23204:         } while (h < o);
 23205:       }
 23206:     } else if (-4 <= e && e < 0) {  //10^-4<=x<1。指数形式にしない
 23207:       mmuWriteByteData (a++, '0', 1);  //整数部の0
 23208:       mmuWriteByteData (a++, '.', 1);  //小数点
 23209:       while (++e < 0) {
 23210:         mmuWriteByteData (a++, '0', 1);  //小数部の先頭の0の並び
 23211:       }
 23212:       do {
 23213:         mmuWriteByteData (a++, '0' + w[h++], 1);  //小数部
 23214:       } while (h < o);
 23215:     } else {  //x<10^-4または10^len3<=x。指数形式にする
 23216:       mmuWriteByteData (a++, '0' + w[h++], 1);  //整数部
 23217:       if (h < o) {  //小数部がある
 23218:         mmuWriteByteData (a++, '.', 1);  //小数部があるときだけ小数点を書く
 23219:         do {
 23220:           mmuWriteByteData (a++, '0' + w[h++], 1);  //小数部
 23221:         } while (h < o);
 23222:       }
 23223:       mmuWriteByteData (a++, 'E', 1);  //指数部の始まり
 23224:       if (0 <= e) {
 23225:         mmuWriteByteData (a++, '+', 1);  //指数部の正符号。省略しない
 23226:       } else {
 23227:         mmuWriteByteData (a++, '-', 1);  //指数部の負符号
 23228:         e = -e;
 23229:       }
 23230:       e = XEiJ.FMT_BCD4[e];
 23231:       mmuWriteByteData (a++, '0' + (e >> 8     ), 1);  //指数部の100の位。0でも省略しない
 23232:       mmuWriteByteData (a++, '0' + (e >> 4 & 15), 1);  //指数部の10の位
 23233:       mmuWriteByteData (a++, '0' + (e      & 15), 1);  //指数部の1の位
 23234:     }
 23235:     mmuWriteByteData (a, '\0', 1);
 23236:     XEiJ.regRn[8] = a;  //末尾の'\0'の位置
 23237:   }  //fpkDTOSSub6()
 23238: 
 23239:   //fpkECVT ()
 23240:   //  $FE24  __ECVT
 23241:   //  64bit浮動小数点数を全体の桁数を指定して文字列に変換する
 23242:   //  文字列に書くのは仮数部の数字のみ
 23243:   //  符号と小数点と指数部は文字列に書かず、小数点の位置と符号をレジスタに入れて返す
 23244:   //  桁数は255桁まで指定できるが、有効桁数は14桁まで
 23245:   //    有効桁数の次の桁で絶対値を四捨五入する
 23246:   //    15桁以上を指定しても14桁に丸められ、15桁目以降はすべて'0'になる
 23247:   //  無限大は"#INF"、非数は"#NAN"に変換する
 23248:   //    "#INF"と"#NAN"のとき小数点の位置は4になる
 23249:   //    "#INF"と"#NAN"で3桁以下のときは途中で打ち切る
 23250:   //    メモ
 23251:   //      FLOATn.Xは"#INF"と"#NAN"で1桁~3桁のとき文字列が"$","$0","$00"になってしまう
 23252:   //      文字数が少なすぎて"#INF"や"#NAN"が入り切らないのは仕方がないが、
 23253:   //      無意味な"$00"という文字列になるのは数字ではない文字列を四捨五入しようとするバグが原因
 23254:   //      例えば3桁のときは4桁目の'F'または'N'が'5'以上なので繰り上げて上の位をインクリメントする
 23255:   //      'N'+1='O'または'A'+1='B'が'9'よりも大きいので'0'を上書きして繰り上げて上の位をインクリメントする
 23256:   //      'I'+1='J'または'N'+1='O'も'9'よりも大きいので'0'を上書きして繰り上げて上の位をインクリメントする
 23257:   //      '#'+1='$'は'9'以下なので"$00"になる
 23258:   //      X-BASICでint i2,i3:print ecvt(val("#INF"),3,i2,i3)とすると再現できる
 23259:   //    "#INF"と"#NAN"で5桁以上のときは5桁目以降はすべて'\0'になる
 23260:   //    メモ
 23261:   //      FLOATn.Xは"#NAN"と"#INF"で15桁以上のとき5桁目から14桁目までは'\0'だが15桁目以降に'0'が書き込まれる
 23262:   //      通常は5桁目の'\0'で文字列は終了していると見なされるので実害はないが気持ち悪い
 23263:   //  メモ
 23264:   //    FLOAT2.X 2.02/2.03は0のとき小数点の位置が0になる
 23265:   //    FLOAT4.X 1.02は0のとき小数点の位置が1になる
 23266:   //    ここでは1にしている
 23267:   //  <d0d1.d:64bit浮動小数点数
 23268:   //  <d2.l:全体の桁数
 23269:   //  <a0.l:文字列バッファの先頭。末尾に'\0'を書き込むので桁数+1バイト必要
 23270:   //  >d0.l:先頭から小数点の位置までのオフセット
 23271:   //  >d1.l:符号(0=+,1=-)
 23272:   //  a0.lは変化しない
 23273:   public static void fpkECVT () throws M68kException {
 23274:     fpkECVTSub ((long) XEiJ.regRn[0] << 32 | 0xffffffffL & XEiJ.regRn[1]);  //64bit浮動小数点数
 23275:   }  //fpkECVT()
 23276:   public static void fpkECVTSub (long l) throws M68kException {
 23277:     int len3 = Math.max (0, XEiJ.regRn[2]);  //全体の桁数
 23278:     int a = XEiJ.regRn[8];  //文字列バッファの先頭
 23279:     int b = a + len3;  //文字列バッファの末尾+1。'\0'を書き込む位置
 23280:     //符号と指数部の処理
 23281:     //  ±0,±Inf,NaNはここで除外する
 23282:     if (0L <= l) {
 23283:       XEiJ.regRn[1] = 0;  //正符号
 23284:     } else {
 23285:       XEiJ.regRn[1] = 1;  //負符号
 23286:       l &= 0x7fffffffffffffffL;  //符号bitを消しておく
 23287:     }
 23288:     double x = Double.longBitsToDouble (l);  //絶対値
 23289:     int e = (int) (l >>> 52) - 1023;  //指数部。ゲタ0。符号bitは消してあるのでマスクは不要
 23290:     l &= 0x000fffffffffffffL;  //仮数部の小数部。正規化数のとき整数部の1が付いていないことに注意
 23291:     if (e == -1023) {  //±0,非正規化数
 23292:       if (l == 0L) {  //±0
 23293:         //指定された全体の桁数だけ'0'を並べる
 23294:         while (a < b) {
 23295:           mmuWriteByteData (a++, '0', 1);
 23296:         }
 23297:         mmuWriteByteData (a, '\0', 1);
 23298:         XEiJ.regRn[0] = 1;  //小数点の位置
 23299:         return;
 23300:       }
 23301:       e -= Long.numberOfLeadingZeros (l) - 12;  //非正規化数の指数部を補正する
 23302:     } else if (e == 1024) {  //±Inf,NaN
 23303:       for (int s = l != 0L ? '#' | 'N' << 8 | 'A' << 16 | 'N' << 24 : '#' | 'I' << 8 | 'N' << 16 | 'F' << 24; a < b && s != 0; s >>>= 8) {
 23304:         mmuWriteByteData (a++, s, 1);
 23305:       }
 23306:       while (a < b) {
 23307:         mmuWriteByteData (a++, '\0', 1);  //残りは'\0'
 23308:       }
 23309:       mmuWriteByteData (a, '\0', 1);
 23310:       XEiJ.regRn[0] = 4;  //小数点の位置
 23311:       return;
 23312:     }
 23313:     //10進数で表現したときの指数部を求める
 23314:     //  10^e<=x<10^(e+1)となるeを求める
 23315:     e = (int) Math.floor ((double) e * 0.30102999566398119521373889472);  //log10(2)
 23316:     //10^-eを掛けて1<=x<10にする
 23317:     //  非正規化数の最小値から正規化数の最大値まで処理できなければならない
 23318:     //  10^-eを計算してからまとめて掛ける方法はxが非正規化数のとき10^-eがオーバーフローしてしまうので不可
 23319:     //    doubleは非正規化数の逆数を表現できない
 23320:     if (0 < e) {  //10<=x
 23321:       x *= FEFunction.FPK_TEN_M16QR[e & 15];
 23322:       if (16 <= e) {
 23323:         x *= FEFunction.FPK_TEN_M16QR[16 + (e >> 4 & 15)];
 23324:         if (256 <= e) {
 23325:           x *= FEFunction.FPK_TEN_M16QR[33];  //FEFunction.FPK_TEN_M16QR[32 + (e >> 8)]
 23326:         }
 23327:       }
 23328:     } else if (e < 0) {  //x<1
 23329:       x *= FEFunction.FPK_TEN_P16QR[-e & 15];
 23330:       if (e <= -16) {
 23331:         x *= FEFunction.FPK_TEN_P16QR[16 + (-e >> 4 & 15)];
 23332:         if (e <= -256) {
 23333:           x *= FEFunction.FPK_TEN_P16QR[33];  //FEFunction.FPK_TEN_P16QR[32 + (-e >> 8)]
 23334:         }
 23335:       }
 23336:     }
 23337:     //整数部2桁、小数部16桁の10進数に変換する
 23338:     //  1<=x<10なのでw[1]が先頭になるはずだが誤差で前後にずれる可能性がある
 23339:     int[] w = new int[18];
 23340:     {
 23341:       int d = (int) x;
 23342:       int t = XEiJ.FMT_BCD4[d];
 23343:       w[0] = t >> 4;
 23344:       w[1] = t      & 15;
 23345:       for (int i = 2; i < 18; i += 4) {
 23346:         //xを10000倍して整数部dを引くことで小数部を残すが、このとき情報落ちが発生して誤差が蓄積する
 23347:         //Double-Doubleの乗算の要領で10000倍を正確に行い、誤差の蓄積を回避する
 23348:         //x = (x - (double) d) * 10000.0;
 23349:         double xh = x * 0x8000001p0;
 23350:         xh += x - xh;  //xの上半分
 23351:         x = (xh - (double) d) * 10000.0 + (x - xh) * 10000.0;
 23352:         d = (int) x;
 23353:         t = XEiJ.FMT_BCD4[d];
 23354:         w[i    ] = t >> 12;
 23355:         w[i + 1] = t >>  8 & 15;
 23356:         w[i + 2] = t >>  4 & 15;
 23357:         w[i + 3] = t       & 15;
 23358:       }
 23359:     }
 23360:     //先頭の位置を確認する
 23361:     //  w[h]が先頭(0でない最初の数字)の位置
 23362:     int h = w[0] != 0 ? 0 : w[1] != 0 ? 1 : 2;
 23363:     //14+1桁目を四捨五入する
 23364:     int o = h + 14;  //w[o]は四捨五入する桁の位置。w[]の範囲内
 23365:     if (5 <= w[o]) {
 23366:       int i = o;
 23367:       while (10 <= ++w[--i]) {
 23368:         w[i] = 0;
 23369:       }
 23370:       if (i < h) {  //先頭から繰り上がった。このとき新しい先頭は1でそれ以外はすべて0
 23371:         h--;  //先頭を左にずらす
 23372:         o--;  //末尾を左にずらす
 23373:       }
 23374:     }
 23375:     //先頭の位置に応じて指数部を更新する
 23376:     //  w[h]が整数部、w[h+1..o-1]が小数部。10^eの小数点はw[h]の右側。整数部の桁数はe+1桁
 23377:     e -= h - 1;
 23378:     //先頭からlen3+1桁目が先頭から14+1桁目よりも左側にあるときその桁で改めて四捨五入する
 23379:     //  あらかじめ14+1桁目で四捨五入しておかないと、
 23380:     //  1.5の5を四捨五入しなければならないときに誤差で1.499…になったまま4を四捨五入しようとして失敗することがある
 23381:     int s = h + len3;  //w[s]は先頭からlen3+1桁目の位置。w.length<=sの場合があることに注意
 23382:     if (s < o) {
 23383:       o = s;  //w[o]は四捨五入する桁の位置。o<0の場合があることに注意
 23384:       if (0 <= o && 5 <= w[o]) {
 23385:         int i = o;
 23386:         while (10 <= ++w[--i]) {
 23387:           w[i] = 0;
 23388:         }
 23389:         if (i < h) {  //先頭から繰り上がった。このとき新しい先頭は1でそれ以外はすべて0
 23390:           h--;  //先頭を左にずらす
 23391:           o--;  //末尾を左にずらす
 23392:           e++;  //指数部を1増やす
 23393:         }
 23394:       }
 23395:     }
 23396:     //文字列に変換する
 23397:     while (a < b && h < o) {
 23398:       mmuWriteByteData (a++, '0' + w[h++], 1);  //有効数字
 23399:     }
 23400:     while (a < b) {
 23401:       mmuWriteByteData (a++, '0', 1);  //残りは'0'
 23402:     }
 23403:     mmuWriteByteData (a, '\0', 1);
 23404:     XEiJ.regRn[0] = e + 1;  //小数点の位置
 23405:   }  //fpkECVTSub6()
 23406: 
 23407:   //fpkFCVT ()
 23408:   //  $FE25  __FCVT
 23409:   //  64bit浮動小数点数を小数点以下の桁数を指定して文字列に変換する
 23410:   //  メモ
 23411:   //    小数点の位置がpのとき[p]の左側に小数点がある
 23412:   //    全体の桁数が制限されないので指数部が大きいとき整数部が収まるサイズのバッファが必要
 23413:   //    0または1以上のとき
 23414:   //      整数部と小数点以下の指定された桁数までを小数部の0を省略せずに出力する
 23415:   //      整数部と小数点以下の指定された桁数が合わせて14桁を超えるときは15桁目が四捨五入されて15桁目以降は0になる
 23416:   //      小数点の位置は整数部の桁数に等しい
 23417:   //      print fcvt(0#,4,i2,i3),i2,i3
 23418:   //      0000     0       0
 23419:   //      print fcvt(2e+12/3#,4,i2,i3),i2,i3
 23420:   //      6666666666666700         12      0
 23421:   //                 ↑
 23422:   //    1未満のとき
 23423:   //      小数点以下の桁数の範囲内を先頭の0を省略して出力する
 23424:   //      小数点以下の桁数の範囲内がすべて0のときは""になる
 23425:   //      小数点の位置は指数部+1に等しい
 23426:   //      print fcvt(0.01,3,i2,i3),i2,i3                0.010
 23427:   //      10      -1       0                              <~~
 23428:   //      print fcvt(0.001,3,i2,i3),i2,i3               0.001
 23429:   //      1       -2       0                              <<~
 23430:   //      print fcvt(0.0001,3,i2,i3),i2,i3              0.0001
 23431:   //              -3       0                              <<<
 23432:   //      print fcvt(0.00001,3,i2,i3),i2,i3             0.00001
 23433:   //              -4       0                              <<<<
 23434:   //    #INFと#NAN
 23435:   //      小数点以下の桁数の指定に関係なく4文字出力して小数点の位置4を返す
 23436:   //      print fcvt(val("#INF"),2,i2,i3),i2,i3
 23437:   //      #INF     4       0
 23438:   //      print fcvt(val("#INF"),6,i2,i3),i2,i3
 23439:   //      #INF     4       0
 23440:   //  バグ
 23441:   //    FLOAT4.X 1.02は結果が整数部が大きいとき255文字で打ち切られる
 23442:   //    FLOAT4.X 1.02はFCVT(±0)の整数部が0桁ではなく1桁になる
 23443:   //  <d0d1.d:64bit浮動小数点数
 23444:   //  <d2.l:小数点以下の桁数
 23445:   //  <a0.l:文字列バッファの先頭
 23446:   //  >d0.l:先頭から小数点の位置までのオフセット
 23447:   //  >d1.l:符号(0=+,1=-)
 23448:   public static void fpkFCVT () throws M68kException {
 23449:     fpkFCVTSub ((long) XEiJ.regRn[0] << 32 | 0xffffffffL & XEiJ.regRn[1]);  //64bit浮動小数点数
 23450:   }  //fpkFCVT()
 23451:   public static void fpkFCVTSub (long l) throws M68kException {
 23452:     int len2 = Math.max (0, XEiJ.regRn[2]);  //小数部の桁数
 23453:     int a = XEiJ.regRn[8];  //文字列バッファの先頭
 23454:     //符号と指数部の処理
 23455:     //  ±0,±Inf,NaNはここで除外する
 23456:     if (0L <= l) {
 23457:       XEiJ.regRn[1] = 0;  //正符号
 23458:     } else {
 23459:       XEiJ.regRn[1] = 1;  //負符号
 23460:       l &= 0x7fffffffffffffffL;  //符号bitを消しておく
 23461:     }
 23462:     double x = Double.longBitsToDouble (l);  //絶対値
 23463:     int e = (int) (l >>> 52) - 1023;  //指数部。ゲタ0。符号bitは消してあるのでマスクは不要
 23464:     l &= 0x000fffffffffffffL;  //仮数部の小数部。正規化数のとき整数部の1が付いていないことに注意
 23465:     if (e == -1023) {  //±0,非正規化数
 23466:       if (l == 0L) {  //±0
 23467:         //指定された小数点以下の桁数だけ'0'を並べる
 23468:         while (len2-- > 0) {
 23469:           mmuWriteByteData (a++, '0', 1);
 23470:         }
 23471:         mmuWriteByteData (a, '\0', 1);
 23472:         XEiJ.regRn[0] = 0;  //小数点の位置
 23473:         return;
 23474:       }
 23475:       e -= Long.numberOfLeadingZeros (l) - 12;  //非正規化数の指数部を補正する
 23476:     } else if (e == 1024) {  //±Inf,NaN
 23477:       mmuWriteByteData (a++, '#', 1);
 23478:       if (l == 0L) {  //±Inf
 23479:         mmuWriteByteData (a++, 'I', 1);
 23480:         mmuWriteByteData (a++, 'N', 1);
 23481:         mmuWriteByteData (a++, 'F', 1);
 23482:       } else {  //NaN
 23483:         mmuWriteByteData (a++, 'N', 1);
 23484:         mmuWriteByteData (a++, 'A', 1);
 23485:         mmuWriteByteData (a++, 'N', 1);
 23486:       }
 23487:       mmuWriteByteData (a, '\0', 1);
 23488:       XEiJ.regRn[0] = 4;  //小数点の位置
 23489:       return;
 23490:     }
 23491:     //10進数で表現したときの指数部を求める
 23492:     //  10^e<=x<10^(e+1)となるeを求める
 23493:     e = (int) Math.floor ((double) e * 0.30102999566398119521373889472);  //log10(2)
 23494:     //10^-eを掛けて1<=x<10にする
 23495:     //  非正規化数の最小値から正規化数の最大値まで処理できなければならない
 23496:     //  10^-eを計算してからまとめて掛ける方法はxが非正規化数のとき10^-eがオーバーフローしてしまうので不可
 23497:     //    doubleは非正規化数の逆数を表現できない
 23498:     if (0 < e) {  //10<=x
 23499:       x *= FEFunction.FPK_TEN_M16QR[e & 15];
 23500:       if (16 <= e) {
 23501:         x *= FEFunction.FPK_TEN_M16QR[16 + (e >> 4 & 15)];
 23502:         if (256 <= e) {
 23503:           x *= FEFunction.FPK_TEN_M16QR[33];  //FEFunction.FPK_TEN_M16QR[32 + (e >> 8)]
 23504:         }
 23505:       }
 23506:     } else if (e < 0) {  //x<1
 23507:       x *= FEFunction.FPK_TEN_P16QR[-e & 15];
 23508:       if (e <= -16) {
 23509:         x *= FEFunction.FPK_TEN_P16QR[16 + (-e >> 4 & 15)];
 23510:         if (e <= -256) {
 23511:           x *= FEFunction.FPK_TEN_P16QR[33];  //FEFunction.FPK_TEN_P16QR[32 + (-e >> 8)]
 23512:         }
 23513:       }
 23514:     }
 23515:     //整数部2桁、小数部16桁の10進数に変換する
 23516:     //  1<=x<10なのでw[1]が先頭になるはずだが誤差で前後にずれる可能性がある
 23517:     int[] w = new int[18];
 23518:     {
 23519:       int d = (int) x;
 23520:       int t = XEiJ.FMT_BCD4[d];
 23521:       w[0] = t >> 4;
 23522:       w[1] = t      & 15;
 23523:       for (int i = 2; i < 18; i += 4) {
 23524:         //xを10000倍して整数部dを引くことで小数部を残すが、このとき情報落ちが発生して誤差が蓄積する
 23525:         //Double-Doubleの乗算の要領で10000倍を正確に行い、誤差の蓄積を回避する
 23526:         //x = (x - (double) d) * 10000.0;
 23527:         double xh = x * 0x8000001p0;
 23528:         xh += x - xh;  //xの上半分
 23529:         x = (xh - (double) d) * 10000.0 + (x - xh) * 10000.0;
 23530:         d = (int) x;
 23531:         t = XEiJ.FMT_BCD4[d];
 23532:         w[i    ] = t >> 12;
 23533:         w[i + 1] = t >>  8 & 15;
 23534:         w[i + 2] = t >>  4 & 15;
 23535:         w[i + 3] = t       & 15;
 23536:       }
 23537:     }
 23538:     //先頭の位置を確認する
 23539:     //  w[h]が先頭(0でない最初の数字)の位置
 23540:     int h = w[0] != 0 ? 0 : w[1] != 0 ? 1 : 2;
 23541:     //14+1桁目を四捨五入する
 23542:     int o = h + 14;  //w[o]は四捨五入する桁の位置。w[]の範囲内
 23543:     if (5 <= w[o]) {
 23544:       int i = o;
 23545:       while (10 <= ++w[--i]) {
 23546:         w[i] = 0;
 23547:       }
 23548:       if (i < h) {  //先頭から繰り上がった。このとき新しい先頭は1でそれ以外はすべて0
 23549:         h--;  //先頭を左にずらす
 23550:         o--;  //末尾を左にずらす
 23551:       }
 23552:     }
 23553:     //先頭の位置に応じて指数部を更新する
 23554:     //  w[h]が整数部、w[h+1..o-1]が小数部。10^eの小数点はw[h]の右側。整数部の桁数はe+1桁
 23555:     e -= h - 1;
 23556:     //小数点以下len2+1桁目が先頭から14+1桁目よりも左側にあるときその桁で改めて四捨五入する
 23557:     //  あらかじめ14+1桁目で四捨五入しておかないと、
 23558:     //  1.5の5を四捨五入しなければならないときに誤差で1.499…になったまま4を四捨五入しようとして失敗することがある
 23559:     int s = h + e + 1 + len2;  //w[s]は小数点以下len2+1桁目の位置。w.length<=sの場合があることに注意
 23560:     if (s < o) {
 23561:       o = s;  //w[o]は四捨五入する桁の位置。o<0の場合があることに注意
 23562:       if (0 <= o && 5 <= w[o]) {
 23563:         int i = o;
 23564:         while (10 <= ++w[--i]) {
 23565:           w[i] = 0;
 23566:         }
 23567:         if (i < h) {  //先頭から繰り上がった。このとき新しい先頭は1でそれ以外はすべて0
 23568:           h--;  //先頭を左にずらす
 23569:           o--;  //末尾を左にずらす
 23570:           e++;  //指数部を1増やす
 23571:         }
 23572:       }
 23573:     }
 23574:     //文字列に変換する
 23575:     while (h < o) {
 23576:       mmuWriteByteData (a++, '0' + w[h++], 1);  //有効数字
 23577:     }
 23578:     while (h++ < s) {
 23579:       mmuWriteByteData (a++, '0', 1);  //残りは'0'
 23580:     }
 23581:     mmuWriteByteData (a, '\0', 1);
 23582:     XEiJ.regRn[0] = e + 1;  //小数点の位置
 23583:   }  //fpkFCVTSub6()
 23584: 
 23585:   //fpkGCVT ()
 23586:   //  $FE26  __GCVT
 23587:   //  64bit浮動小数点数を全体の桁数を指定して文字列に変換する
 23588:   //  指定された桁数で表現できないときは指数表現になる
 23589:   //  メモ
 23590:   //    print gcvt(1e-1,10)
 23591:   //    0.1
 23592:   //    print gcvt(1e-8,10)
 23593:   //    0.00000001
 23594:   //    print gcvt(1.5e-8,10)
 23595:   //    1.5E-008
 23596:   //    print gcvt(1e-9,10)
 23597:   //    1.E-009                 小数点はあるが小数部がない
 23598:   //    print gcvt(2e-1/3#,10)
 23599:   //    6.666666667E-002
 23600:   //    print gcvt(2e+0/3#,10)
 23601:   //    0.6666666667
 23602:   //    print gcvt(2e+1/3#,10)
 23603:   //    6.666666667
 23604:   //    print gcvt(2e+9/3#,10)
 23605:   //    666666666.7
 23606:   //    print gcvt(2e+10/3#,10)
 23607:   //    6666666667
 23608:   //    print gcvt(2e+11/3#,10)
 23609:   //    6.666666667E+010
 23610:   //    print gcvt(0#,4)
 23611:   //    0.
 23612:   //    print gcvt(val("#INF"),4)
 23613:   //    #INF
 23614:   //    print gcvt(val("#INF"),3)
 23615:   //    $.E+003
 23616:   //    print gcvt(val("#INF"),2)
 23617:   //    $.E+003
 23618:   //    print gcvt(val("#INF"),1)
 23619:   //    $.E+003
 23620:   //    FLOAT2.XのGCVTは小数部がなくても桁数の範囲内であれば小数点を書く
 23621:   //    桁数ちょうどのときは小数点も指数部も付かないので、整数でないことを明確にするために小数点を書いているとも言い難い
 23622:   //    ここでは#NANと#INF以外は小数部がなくても小数点を書くことにする
 23623:   //  バグ
 23624:   //    FLOAT2.X 2.02/2.03は#NANと#INFにも小数点を付ける
 23625:   //    FLOAT2.X 2.02/2.03は#NANと#INFのとき桁数が足りないと指数形式にしようとして文字列が壊れる
 23626:   //    FLOAT4.X 1.02は#NANと#INFにも小数点を付ける
 23627:   //    FLOAT4.X 1.02は桁数の少ない整数には小数点を付けて桁数ちょうどの整数には小数点も指数部も付けない
 23628:   //  <d0d1.d:64bit浮動小数点数
 23629:   //  <d2.b:全体の桁数
 23630:   //  <a0.l:文字列バッファの先頭
 23631:   //  >a0.l:末尾の'\0'の位置
 23632:   public static void fpkGCVT () throws M68kException {
 23633:     fpkGCVTSub ((long) XEiJ.regRn[0] << 32 | 0xffffffffL & XEiJ.regRn[1]);  //64bit浮動小数点数
 23634:   }  //fpkGCVT()
 23635:   public static void fpkGCVTSub (long l) throws M68kException {
 23636:     int len3 = Math.max (0, XEiJ.regRn[2]);  //全体の桁数
 23637:     int a = XEiJ.regRn[8];  //文字列バッファの先頭
 23638:     //符号と指数部の処理
 23639:     //  ±0,±Inf,NaNはここで除外する
 23640:     if (l < 0L) {
 23641:       mmuWriteByteData (a++, '-', 1);  //負符号
 23642:       l &= 0x7fffffffffffffffL;  //符号bitを消しておく
 23643:     }
 23644:     double x = Double.longBitsToDouble (l);  //絶対値
 23645:     int e = (int) (l >>> 52) - 1023;  //指数部。ゲタ0。符号bitは消してあるのでマスクは不要
 23646:     l &= 0x000fffffffffffffL;  //仮数部の小数部。正規化数のとき整数部の1が付いていないことに注意
 23647:     if (e == -1023) {  //±0,非正規化数
 23648:       if (l == 0L) {  //±0
 23649:         mmuWriteByteData (a++, '0', 1);  //0
 23650:         mmuWriteByteData (a++, '.', 1);  //小数点
 23651:         mmuWriteByteData (a, '\0', 1);
 23652:         XEiJ.regRn[8] = a;  //末尾の'\0'の位置
 23653:         return;
 23654:       }
 23655:       e -= Long.numberOfLeadingZeros (l) - 12;  //非正規化数の指数部を補正する
 23656:     } else if (e == 1024) {  //±Inf,NaN
 23657:       mmuWriteByteData (a++, '#', 1);
 23658:       if (l == 0L) {  //±Inf
 23659:         mmuWriteByteData (a++, 'I', 1);
 23660:         mmuWriteByteData (a++, 'N', 1);
 23661:         mmuWriteByteData (a++, 'F', 1);
 23662:       } else {  //NaN
 23663:         mmuWriteByteData (a++, 'N', 1);
 23664:         mmuWriteByteData (a++, 'A', 1);
 23665:         mmuWriteByteData (a++, 'N', 1);
 23666:       }
 23667:       mmuWriteByteData (a, '\0', 1);
 23668:       XEiJ.regRn[8] = a;  //末尾の'\0'の位置
 23669:       return;
 23670:     }
 23671:     //10進数で表現したときの指数部を求める
 23672:     //  10^e<=x<10^(e+1)となるeを求める
 23673:     e = (int) Math.floor ((double) e * 0.30102999566398119521373889472);  //log10(2)
 23674:     //10^-eを掛けて1<=x<10にする
 23675:     //  非正規化数の最小値から正規化数の最大値まで処理できなければならない
 23676:     //  10^-eを計算してからまとめて掛ける方法はxが非正規化数のとき10^-eがオーバーフローしてしまうので不可
 23677:     //    doubleは非正規化数の逆数を表現できない
 23678:     if (0 < e) {  //10<=x
 23679:       x *= FEFunction.FPK_TEN_M16QR[e & 15];
 23680:       if (16 <= e) {
 23681:         x *= FEFunction.FPK_TEN_M16QR[16 + (e >> 4 & 15)];
 23682:         if (256 <= e) {
 23683:           x *= FEFunction.FPK_TEN_M16QR[33];  //FEFunction.FPK_TEN_M16QR[32 + (e >> 8)]
 23684:         }
 23685:       }
 23686:     } else if (e < 0) {  //x<1
 23687:       x *= FEFunction.FPK_TEN_P16QR[-e & 15];
 23688:       if (e <= -16) {
 23689:         x *= FEFunction.FPK_TEN_P16QR[16 + (-e >> 4 & 15)];
 23690:         if (e <= -256) {
 23691:           x *= FEFunction.FPK_TEN_P16QR[33];  //FEFunction.FPK_TEN_P16QR[32 + (-e >> 8)]
 23692:         }
 23693:       }
 23694:     }
 23695:     //整数部2桁、小数部16桁の10進数に変換する
 23696:     //  1<=x<10なのでw[1]が先頭になるはずだが誤差で前後にずれる可能性がある
 23697:     int[] w = new int[18];
 23698:     {
 23699:       int d = (int) x;
 23700:       int t = XEiJ.FMT_BCD4[d];
 23701:       w[0] = t >> 4;
 23702:       w[1] = t      & 15;
 23703:       for (int i = 2; i < 18; i += 4) {
 23704:         //xを10000倍して整数部dを引くことで小数部を残すが、このとき情報落ちが発生して誤差が蓄積する
 23705:         //Double-Doubleの乗算の要領で10000倍を正確に行い、誤差の蓄積を回避する
 23706:         //x = (x - (double) d) * 10000.0;
 23707:         double xh = x * 0x8000001p0;
 23708:         xh += x - xh;  //xの上半分
 23709:         x = (xh - (double) d) * 10000.0 + (x - xh) * 10000.0;
 23710:         d = (int) x;
 23711:         t = XEiJ.FMT_BCD4[d];
 23712:         w[i    ] = t >> 12;
 23713:         w[i + 1] = t >>  8 & 15;
 23714:         w[i + 2] = t >>  4 & 15;
 23715:         w[i + 3] = t       & 15;
 23716:       }
 23717:     }
 23718:     //先頭の位置を確認する
 23719:     //  w[h]が先頭(0でない最初の数字)の位置
 23720:     int h = w[0] != 0 ? 0 : w[1] != 0 ? 1 : 2;
 23721:     //14+1桁目を四捨五入する
 23722:     int o = h + 14;  //w[o]は四捨五入する桁の位置。w[]の範囲内
 23723:     if (5 <= w[o]) {
 23724:       int i = o;
 23725:       while (10 <= ++w[--i]) {
 23726:         w[i] = 0;
 23727:       }
 23728:       if (i < h) {  //先頭から繰り上がった。このとき新しい先頭は1でそれ以外はすべて0
 23729:         h--;  //先頭を左にずらす
 23730:         o--;  //末尾を左にずらす
 23731:       }
 23732:     }
 23733:     //先頭の位置に応じて指数部を更新する
 23734:     //  w[h]が整数部、w[h+1..o-1]が小数部。10^eの小数点はw[h]の右側。整数部の桁数はe+1桁
 23735:     e -= h - 1;
 23736:     //先頭からlen3+1桁目が先頭から14+1桁目よりも左側にあるときその桁で改めて四捨五入する
 23737:     //  あらかじめ14+1桁目で四捨五入しておかないと、
 23738:     //  1.5の5を四捨五入しなければならないときに誤差で1.499…になったまま4を四捨五入しようとして失敗することがある
 23739:     int s = h + len3;  //w[s]は先頭からlen3+1桁目の位置。w.length<=sの場合があることに注意
 23740:     if (s < o) {
 23741:       o = s;  //w[o]は四捨五入する桁の位置。o<0の場合があることに注意
 23742:       if (0 <= o && 5 <= w[o]) {
 23743:         int i = o;
 23744:         while (10 <= ++w[--i]) {
 23745:           w[i] = 0;
 23746:         }
 23747:         if (i < h) {  //先頭から繰り上がった。このとき新しい先頭は1でそれ以外はすべて0
 23748:           h--;  //先頭を左にずらす
 23749:           o--;  //末尾を左にずらす
 23750:           e++;  //指数部を1増やす
 23751:         }
 23752:       }
 23753:     }
 23754:     //末尾の位置を確認する
 23755:     //  w[o-1]が末尾(0でない最後の数字)の位置
 23756:     while (w[o - 1] == 0) {  //全体は0ではないので必ず止まる。小数点よりも左側で止まる場合があることに注意
 23757:       o--;
 23758:     }
 23759:     //指数形式にするかどうか選択して文字列に変換する
 23760:     if (0 <= e && e < len3) {  //1<=x<10^len3。指数形式にしない
 23761:       do {
 23762:         mmuWriteByteData (a++, '0' + w[h++], 1);  //整数部。末尾の位置に関係なく1の位まで書く
 23763:       } while (0 <= --e);
 23764:       mmuWriteByteData (a++, '.', 1);  //小数部がなくても小数点を書く
 23765:       while (h < o) {
 23766:         mmuWriteByteData (a++, '0' + w[h++], 1);  //小数部
 23767:       }
 23768:     } else if (-4 <= e && e < 0) {  //10^-4<=x<1。指数形式にしない
 23769:       mmuWriteByteData (a++, '0', 1);  //整数部の0
 23770:       mmuWriteByteData (a++, '.', 1);  //小数点
 23771:       while (++e < 0) {
 23772:         mmuWriteByteData (a++, '0', 1);  //小数部の先頭の0の並び
 23773:       }
 23774:       while (h < o) {
 23775:         mmuWriteByteData (a++, '0' + w[h++], 1);  //小数部
 23776:       }
 23777:     } else {  //x<10^-4または10^len3<=x。指数形式にする
 23778:       mmuWriteByteData (a++, '0' + w[h++], 1);  //整数部
 23779:       mmuWriteByteData (a++, '.', 1);  //小数部がなくても小数点を書く
 23780:       while (h < o) {
 23781:         mmuWriteByteData (a++, '0' + w[h++], 1);  //小数部
 23782:       }
 23783:       mmuWriteByteData (a++, 'E', 1);  //指数部の始まり
 23784:       if (0 <= e) {
 23785:         mmuWriteByteData (a++, '+', 1);  //指数部の正符号。省略しない
 23786:       } else {
 23787:         mmuWriteByteData (a++, '-', 1);  //指数部の負符号
 23788:         e = -e;
 23789:       }
 23790:       e = XEiJ.FMT_BCD4[e];
 23791:       mmuWriteByteData (a++, '0' + (e >> 8     ), 1);  //指数部の100の位。0でも省略しない
 23792:       mmuWriteByteData (a++, '0' + (e >> 4 & 15), 1);  //指数部の10の位
 23793:       mmuWriteByteData (a++, '0' + (e      & 15), 1);  //指数部の1の位
 23794:     }
 23795:     mmuWriteByteData (a, '\0', 1);
 23796:     XEiJ.regRn[8] = a;  //末尾の'\0'の位置
 23797:   }  //fpkGCVTSub6()
 23798: 
 23799:   //fpkFVAL ()
 23800:   //  $FE50  __FVAL
 23801:   //  文字列を32bit浮動小数点数に変換する
 23802:   //  __VALとほぼ同じ
 23803:   //  <a0.l:文字列の先頭
 23804:   //  >d0.s:32bit浮動小数点数
 23805:   //  >d2.l:(先頭が'&'でないとき)65535=32bit浮動小数点数をオーバーフローなしでintに変換できる,0=それ以外
 23806:   //  >d3.l:(先頭が'&'でないとき)d2.l==65535のとき32bit浮動小数点数をintに変換した値
 23807:   //  >a0.l:変換された文字列の直後('\0'とは限らない)
 23808:   //  >ccr:0=エラーなし,CCR_N|CCR_C=文法エラー,CCR_V|CCR_C=オーバーフロー
 23809:   public static void fpkFVAL () throws M68kException {
 23810:     int a = XEiJ.regRn[8];  //a0
 23811:     //先頭の空白を読み飛ばす
 23812:     int c = mmuReadByteSignData (a++, 1);
 23813:     while (c == ' ' || c == '\t') {
 23814:       c = mmuReadByteSignData (a++, 1);
 23815:     }
 23816:     if (c == '&') {  //&B,&O,&H
 23817:       c = mmuReadByteSignData (a++, 1) & 0xdf;
 23818:       XEiJ.regRn[8] = a;  //&?の直後
 23819:       if (c == 'B') {
 23820:         fpkSTOB ();
 23821:         FEFunction.fpkLTOF ();
 23822:       } else if (c == 'O') {
 23823:         fpkSTOO ();
 23824:         FEFunction.fpkLTOF ();
 23825:       } else if (c == 'H') {
 23826:         fpkSTOH ();
 23827:         FEFunction.fpkLTOF ();
 23828:       } else {
 23829:         XEiJ.regCCR = XEiJ.REG_CCR_N | XEiJ.REG_CCR_C;  //文法エラー
 23830:       }
 23831:     } else {  //&B,&O,&H以外
 23832:       FEFunction.fpkSTOF ();
 23833:     }
 23834:   }  //fpkFVAL()
 23835: 
 23836:   //fpkCLMUL ()
 23837:   //  $FEE0  __CLMUL
 23838:   //  32bit符号あり整数乗算
 23839:   //  <(a7).l:32bit符号あり整数。被乗数x
 23840:   //  <4(a7).l:32bit符号あり整数。乗数y
 23841:   //  >(a7).l:32bit符号あり整数。積x*y。オーバーフローのときは不定
 23842:   //  >ccr:cs=オーバーフロー。C以外は不定
 23843:   public static void fpkCLMUL () throws M68kException {
 23844:     int a7 = XEiJ.regRn[15];
 23845:     long l = (long) mmuReadLongData (a7, 1) * (long) mmuReadLongData (a7 + 4, 1);
 23846:     int h = (int) l;
 23847:     mmuWriteLongData (a7, h, 1);  //オーバーフローのときは積の下位32bit
 23848:     XEiJ.regCCR = (long) h == l ? 0 : XEiJ.REG_CCR_C;
 23849:   }  //fpkCLMUL()
 23850: 
 23851:   //fpkCLDIV ()
 23852:   //  $FEE1  __CLDIV
 23853:   //  32bit符号あり整数除算
 23854:   //  <(a7).l:32bit符号あり整数。被除数x
 23855:   //  <4(a7).l:32bit符号あり整数。除数y
 23856:   //  >(a7).l:32bit符号あり整数。商x/y。ゼロ除算のときは不定
 23857:   //  >ccr:cs=ゼロ除算。C以外は不定
 23858:   public static void fpkCLDIV () throws M68kException {
 23859:     int a7 = XEiJ.regRn[15];
 23860:     int h = mmuReadLongData (a7 + 4, 1);
 23861:     if (h == 0) {
 23862:       //(a7).lは変化しない
 23863:       XEiJ.regCCR = XEiJ.REG_CCR_C;
 23864:     } else {
 23865:       mmuWriteLongData (a7, mmuReadLongData (a7, 1) / h, 1);
 23866:       XEiJ.regCCR = 0;
 23867:     }
 23868:   }  //fpkCLDIV()
 23869: 
 23870:   //fpkCLMOD ()
 23871:   //  $FEE2  __CLMOD
 23872:   //  32bit符号あり整数剰余算
 23873:   //  <(a7).l:32bit符号あり整数。被除数x
 23874:   //  <4(a7).l:32bit符号あり整数。除数y
 23875:   //  >(a7).l:32bit符号あり整数。余りx%y。ゼロ除算のときは不定
 23876:   //  >ccr:cs=ゼロ除算。C以外は不定
 23877:   public static void fpkCLMOD () throws M68kException {
 23878:     int a7 = XEiJ.regRn[15];
 23879:     int h = mmuReadLongData (a7 + 4, 1);
 23880:     if (h == 0) {
 23881:       //(a7).lは変化しない
 23882:       XEiJ.regCCR = XEiJ.REG_CCR_C;
 23883:     } else {
 23884:       mmuWriteLongData (a7, mmuReadLongData (a7, 1) % h, 1);
 23885:       XEiJ.regCCR = 0;
 23886:     }
 23887:   }  //fpkCLMOD()
 23888: 
 23889:   //fpkCUMUL ()
 23890:   //  $FEE3  __CUMUL
 23891:   //  32bit符号なし整数乗算
 23892:   //  <(a7).l:32bit符号なし整数。被乗数x
 23893:   //  <4(a7).l:32bit符号なし整数。乗数y
 23894:   //  >(a7).l:32bit符号なし整数。積x*y。オーバーフローのときは不定
 23895:   //  >ccr:cs=オーバーフロー。C以外は不定
 23896:   public static void fpkCUMUL () throws M68kException {
 23897:     int a7 = XEiJ.regRn[15];
 23898:     long l = (0xffffffffL & mmuReadLongData (a7, 1)) * (0xffffffffL & mmuReadLongData (a7 + 4, 1));
 23899:     int h = (int) l;
 23900:     mmuWriteLongData (a7, h, 1);
 23901:     XEiJ.regCCR = (0xffffffffL & h) == l ? 0 : XEiJ.REG_CCR_C;
 23902:   }  //fpkCUMUL()
 23903: 
 23904:   //fpkCUDIV ()
 23905:   //  $FEE4  __CUDIV
 23906:   //  32bit符号なし整数除算
 23907:   //  <(a7).l:32bit符号なし整数。被除数x
 23908:   //  <4(a7).l:32bit符号なし整数。除数y
 23909:   //  >(a7).l:32bit符号なし整数。商x/y。ゼロ除算のときは不定
 23910:   //  >ccr:cs=ゼロ除算。C以外は不定
 23911:   public static void fpkCUDIV () throws M68kException {
 23912:     int a7 = XEiJ.regRn[15];
 23913:     int h = mmuReadLongData (a7 + 4, 1);
 23914:     if (h == 0) {
 23915:       //(a7).lは変化しない
 23916:       XEiJ.regCCR = XEiJ.REG_CCR_C;
 23917:     } else {
 23918:       mmuWriteLongData (a7, (int) ((0xffffffffL & mmuReadLongData (a7, 1)) / (0xffffffffL & h)), 1);
 23919:       XEiJ.regCCR = 0;
 23920:     }
 23921:   }  //fpkCUDIV()
 23922: 
 23923:   //fpkCUMOD ()
 23924:   //  $FEE5  __CUMOD
 23925:   //  32bit符号なし整数剰余算
 23926:   //  <(a7).l:32bit符号なし整数。被除数x
 23927:   //  <4(a7).l:32bit符号なし整数。除数y
 23928:   //  >(a7).l:32bit符号なし整数。余りx%y。ゼロ除算のときは不定
 23929:   //  >ccr:cs=ゼロ除算。C以外は不定
 23930:   public static void fpkCUMOD () throws M68kException {
 23931:     int a7 = XEiJ.regRn[15];
 23932:     int h = mmuReadLongData (a7 + 4, 1);
 23933:     if (h == 0) {
 23934:       //(a7).lは変化しない
 23935:       XEiJ.regCCR = XEiJ.REG_CCR_C;
 23936:     } else {
 23937:       mmuWriteLongData (a7, (int) ((0xffffffffL & mmuReadLongData (a7, 1)) % (0xffffffffL & h)), 1);
 23938:       XEiJ.regCCR = 0;
 23939:     }
 23940:   }  //fpkCUMOD()
 23941: 
 23942:   //fpkCLTOD ()
 23943:   //  $FEE6  __CLTOD
 23944:   //  32bit符号あり整数を64bit浮動小数点数に変換する
 23945:   //  <(a7).l:32bit符号あり整数。x
 23946:   //  >(a7).d:64bit浮動小数点数。(double)x
 23947:   public static void fpkCLTOD () throws M68kException {
 23948:     //int→double→[long]→[int,int]
 23949:     int a7 = XEiJ.regRn[15];
 23950:     long l = Double.doubleToLongBits ((double) mmuReadLongData (a7, 1));
 23951:     mmuWriteLongData (a7, (int) (l >>> 32), 1);
 23952:     mmuWriteLongData (a7 + 4, (int) l, 1);
 23953:   }  //fpkCLTOD()
 23954: 
 23955:   //fpkCDTOL ()
 23956:   //  $FEE7  __CDTOL
 23957:   //  64bit浮動小数点数を32bit符号あり整数に変換する
 23958:   //  <(a7).d:64bit浮動小数点数。x
 23959:   //  >(a7).l:32bit符号あり整数。(int)x
 23960:   //  >ccr:cs=オーバーフロー。C以外は不定
 23961:   public static void fpkCDTOL () throws M68kException {
 23962:     //[int,int]→[long]→double→int
 23963:     int a7 = XEiJ.regRn[15];
 23964:     double d = Double.longBitsToDouble ((long) mmuReadLongData (a7, 1) << 32 | 0xffffffffL & mmuReadLongData (a7 + 4, 1));
 23965:     mmuWriteLongData (a7, (int) d, 1);  //オーバーフローのときは最小値または最大値
 23966:     XEiJ.regCCR = (double) Integer.MIN_VALUE - 1.0 < d && d < (double) Integer.MAX_VALUE + 1.0 ? 0 : XEiJ.REG_CCR_C;  //NaN,±Infはエラー
 23967:   }  //fpkCDTOL()
 23968: 
 23969:   //fpkCLTOF ()
 23970:   //  $FEE8  __CLTOF
 23971:   //  32bit符号あり整数を32bit浮動小数点数に変換する
 23972:   //  <(a7).l:32bit符号あり整数。x
 23973:   //  >(a7).s:32bit浮動小数点数。(float)x
 23974:   public static void fpkCLTOF () throws M68kException {
 23975:     //int→float→[int]
 23976:     int a7 = XEiJ.regRn[15];
 23977:     mmuWriteLongData (a7, Float.floatToIntBits ((float) mmuReadLongData (a7, 1)), 1);
 23978:   }  //fpkCLTOF()
 23979: 
 23980:   //fpkCFTOL ()
 23981:   //  $FEE9  __CFTOL
 23982:   //  32bit浮動小数点数を32bit符号あり整数に変換する
 23983:   //  <(a7).s:32bit浮動小数点数。x
 23984:   //  >(a7).l:32bit符号あり整数。(int)x
 23985:   //  >ccr:cs=オーバーフロー。C以外は不定
 23986:   public static void fpkCFTOL () throws M68kException {
 23987:     //[int]→float→int
 23988:     int a7 = XEiJ.regRn[15];
 23989:     float f = Float.intBitsToFloat (mmuReadLongData (a7, 1));
 23990:     mmuWriteLongData (a7, (int) f, 1);
 23991:     XEiJ.regCCR = (float) Integer.MIN_VALUE - 1.0F < f && f < (float) Integer.MAX_VALUE + 1.0F ? 0 : XEiJ.REG_CCR_C;  //NaN,±Infはエラー
 23992:   }  //fpkCFTOL()
 23993: 
 23994:   //fpkCFTOD ()
 23995:   //  $FEEA  __CFTOD
 23996:   //  32bit浮動小数点数を64bit浮動小数点数に変換する
 23997:   //  <(a7).s:32bit浮動小数点数。x
 23998:   //  >(a7).d:64bit浮動小数点数。(double)x
 23999:   public static void fpkCFTOD () throws M68kException {
 24000:     //[int]→float→double→[long]→[int,int]
 24001:     int a7 = XEiJ.regRn[15];
 24002:     long l = Double.doubleToLongBits ((double) Float.intBitsToFloat (mmuReadLongData (a7, 1)));
 24003:     if (FEFunction.FPK_FPCP_NAN && l == 0x7ff8000000000000L) {
 24004:       l = 0x7fffffffffffffffL;
 24005:     }
 24006:     mmuWriteLongData (a7, (int) (l >>> 32), 1);
 24007:     mmuWriteLongData (a7 + 4, (int) l, 1);
 24008:   }  //fpkCFTOD()
 24009: 
 24010:   //fpkCDTOF ()
 24011:   //  $FEEB  __CDTOF
 24012:   //  64bit浮動小数点数を32bit浮動小数点数に変換する
 24013:   //  <(a7).d:64bit浮動小数点数。x
 24014:   //  >(a7).s:32bit浮動小数点数。(float)x
 24015:   //  >ccr:cs=オーバーフロー。C以外は不定
 24016:   public static void fpkCDTOF () throws M68kException {
 24017:     //[int,int]→[long]→double→float→[int]
 24018:     int a7 = XEiJ.regRn[15];
 24019:     double d = Double.longBitsToDouble ((long) mmuReadLongData (a7, 1) << 32 | 0xffffffffL & mmuReadLongData (a7 + 4, 1));
 24020:     int h = Float.floatToIntBits ((float) d);
 24021:     if (FEFunction.FPK_FPCP_NAN && h == 0x7fc00000) {
 24022:       h = 0x7fffffff;
 24023:     }
 24024:     mmuWriteLongData (a7, h, 1);
 24025:     XEiJ.regCCR = (Double.isNaN (d) || Double.isInfinite (d) ||
 24026:            Math.abs (d) < (double) Float.MAX_VALUE + 0.5 * (double) Math.ulp (Float.MAX_VALUE) ? 0 : XEiJ.REG_CCR_C);  //アンダーフローはエラーなし
 24027:   }  //fpkCDTOF()
 24028: 
 24029:   //fpkCDCMP ()
 24030:   //  $FEEC  __CDCMP
 24031:   //  64bit浮動小数点数の比較
 24032:   //  x<=>y
 24033:   //  <(a7).d:64bit浮動小数点数。x
 24034:   //  <8(a7).d:64bit浮動小数点数。y
 24035:   //  >ccr:lt=x<y,eq=x==y,gt=x>y
 24036:   public static void fpkCDCMP () throws M68kException {
 24037:     //([int,int]→[long]→double)<=>([int,int]→[long]→double)
 24038:     int a7 = XEiJ.regRn[15];
 24039:     double xd = Double.longBitsToDouble ((long) mmuReadLongData (a7, 1) << 32 | 0xffffffffL & mmuReadLongData (a7 + 4, 1));
 24040:     double yd = Double.longBitsToDouble ((long) mmuReadLongData (a7 + 8, 1) << 32 | 0xffffffffL & mmuReadLongData (a7 + 12, 1));
 24041:     XEiJ.regCCR = xd < yd ? XEiJ.REG_CCR_N | XEiJ.REG_CCR_C : xd == yd ? XEiJ.REG_CCR_Z : 0;  //どちらかがNaNのときは0
 24042:   }  //fpkCDCMP()
 24043: 
 24044:   //fpkCDADD ()
 24045:   //  $FEED  __CDADD
 24046:   //  64bit浮動小数点数の加算
 24047:   //  <(a7).d:64bit浮動小数点数。被加算数x
 24048:   //  <8(a7).d:64bit浮動小数点数。加算数y
 24049:   //  >(a7).d:64bit浮動小数点数。和x+y
 24050:   //  >ccr:0=エラーなし,CCR_C=アンダーフロー,CCR_V|CCR_C=オーバーフロー
 24051:   public static void fpkCDADD () throws M68kException {
 24052:     //([int,int]→[long]→double)+([int,int]→[long]→double)→[long]→[int,int]
 24053:     int a7 = XEiJ.regRn[15];
 24054:     double xd = Double.longBitsToDouble ((long) mmuReadLongData (a7, 1) << 32 | 0xffffffffL & mmuReadLongData (a7 + 4, 1));
 24055:     double yd = Double.longBitsToDouble ((long) mmuReadLongData (a7 + 8, 1) << 32 | 0xffffffffL & mmuReadLongData (a7 + 12, 1));
 24056:     double zd = xd + yd;
 24057:     long l = Double.doubleToLongBits (zd);
 24058:     if (FEFunction.FPK_FPCP_NAN && l == 0x7ff8000000000000L) {
 24059:       l = 0x7fffffffffffffffL;
 24060:     }
 24061:     mmuWriteLongData (a7, (int) (l >>> 32), 1);
 24062:     mmuWriteLongData (a7 + 4, (int) l, 1);
 24063:     XEiJ.regCCR = (Double.isNaN (xd) || Double.isNaN (yd) ? 0 :  //引数がNaN
 24064:            Double.isNaN (zd) ? XEiJ.REG_CCR_C :  //引数がNaNでないのに結果がNaNのときはエラー。(+Inf)+(-Inf)=NaN
 24065:            Double.isInfinite (xd) || Double.isInfinite (yd) ? 0 :  //引数が±Inf
 24066:            Double.isInfinite (zd) ? XEiJ.REG_CCR_V | XEiJ.REG_CCR_C :  //引数が±Infでないのに結果が±Infのときはオーバーフロー
 24067:            0);
 24068:   }  //fpkCDADD()
 24069: 
 24070:   //fpkCDSUB ()
 24071:   //  $FEEE  __CDSUB
 24072:   //  64bit浮動小数点数の減算
 24073:   //  <(a7).d:64bit浮動小数点数。被減算数x
 24074:   //  <8(a7).d:64bit浮動小数点数。減算数y
 24075:   //  >(a7).d:64bit浮動小数点数。差x-y
 24076:   //  >ccr:cs=エラー,vs=オーバーフロー
 24077:   public static void fpkCDSUB () throws M68kException {
 24078:     //([int,int]→[long]→double)-([int,int]→[long]→double)→[long]→[int,int]
 24079:     int a7 = XEiJ.regRn[15];
 24080:     double xd = Double.longBitsToDouble ((long) mmuReadLongData (a7, 1) << 32 | 0xffffffffL & mmuReadLongData (a7 + 4, 1));
 24081:     double yd = Double.longBitsToDouble ((long) mmuReadLongData (a7 + 8, 1) << 32 | 0xffffffffL & mmuReadLongData (a7 + 12, 1));
 24082:     double zd = xd - yd;
 24083:     long l = Double.doubleToLongBits (zd);
 24084:     if (FEFunction.FPK_FPCP_NAN && l == 0x7ff8000000000000L) {
 24085:       l = 0x7fffffffffffffffL;
 24086:     }
 24087:     mmuWriteLongData (a7, (int) (l >>> 32), 1);
 24088:     mmuWriteLongData (a7 + 4, (int) l, 1);
 24089:     XEiJ.regCCR = (Double.isNaN (xd) || Double.isNaN (yd) ? 0 :  //引数がNaN
 24090:            Double.isNaN (zd) ? XEiJ.REG_CCR_C :  //引数がNaNでないのに結果がNaNのときはエラー。(+Inf)-(+Inf)=NaN
 24091:            Double.isInfinite (xd) || Double.isInfinite (yd) ? 0 :  //引数が±Inf
 24092:            Double.isInfinite (zd) ? XEiJ.REG_CCR_V | XEiJ.REG_CCR_C :  //引数が±Infでないのに結果が±Infのときはオーバーフロー
 24093:            0);
 24094:   }  //fpkCDSUB()
 24095: 
 24096:   //fpkCDMUL ()
 24097:   //  $FEEF  __CDMUL
 24098:   //  64bit浮動小数点数の乗算
 24099:   //  <(a7).d:64bit浮動小数点数。被乗数x
 24100:   //  <8(a7).d:64bit浮動小数点数。乗数y
 24101:   //  >(a7).d:64bit浮動小数点数。積x*y
 24102:   //  >ccr:cs=エラー,vs=オーバーフロー
 24103:   public static void fpkCDMUL () throws M68kException {
 24104:     //([int,int]→[long]→double)*([int,int]→[long]→double)→[long]→[int,int]
 24105:     int a7 = XEiJ.regRn[15];
 24106:     double xd = Double.longBitsToDouble ((long) mmuReadLongData (a7, 1) << 32 | 0xffffffffL & mmuReadLongData (a7 + 4, 1));
 24107:     double yd = Double.longBitsToDouble ((long) mmuReadLongData (a7 + 8, 1) << 32 | 0xffffffffL & mmuReadLongData (a7 + 12, 1));
 24108:     double zd = xd * yd;
 24109:     long l = Double.doubleToLongBits (zd);
 24110:     if (FEFunction.FPK_FPCP_NAN && l == 0x7ff8000000000000L) {
 24111:       l = 0x7fffffffffffffffL;
 24112:     }
 24113:     mmuWriteLongData (a7, (int) (l >>> 32), 1);
 24114:     mmuWriteLongData (a7 + 4, (int) l, 1);
 24115:     XEiJ.regCCR = (Double.isNaN (xd) || Double.isNaN (yd) ? 0 :  //引数がNaN
 24116:            Double.isNaN (zd) ? XEiJ.REG_CCR_C :  //引数がNaNでないのに結果がNaNのときはエラー。(±0)*(±Inf)=NaN
 24117:            Double.isInfinite (xd) || Double.isInfinite (yd) ? 0 :  //引数が±Inf
 24118:            Double.isInfinite (zd) ? XEiJ.REG_CCR_V | XEiJ.REG_CCR_C :  //引数が±Infでないのに結果が±Infのときはオーバーフロー
 24119:            0);
 24120:   }  //fpkCDMUL()
 24121: 
 24122:   //fpkCDDIV ()
 24123:   //  $FEF0  __CDDIV
 24124:   //  64bit浮動小数点数の除算
 24125:   //  <(a7).d:64bit浮動小数点数。被除数x
 24126:   //  <8(a7).d:64bit浮動小数点数。除数y
 24127:   //  >(a7).d:64bit浮動小数点数。商x/y。ゼロ除算のときは不定
 24128:   //  >ccr:cs=エラー,eq=ゼロ除算,vs=オーバーフロー
 24129:   public static void fpkCDDIV () throws M68kException {
 24130:     //([int,int]→[long]→double)/([int,int]→[long]→double)→[long]→[int,int]
 24131:     int a7 = XEiJ.regRn[15];
 24132:     double xd = Double.longBitsToDouble ((long) mmuReadLongData (a7, 1) << 32 | 0xffffffffL & mmuReadLongData (a7 + 4, 1));
 24133:     double yd = Double.longBitsToDouble ((long) mmuReadLongData (a7 + 8, 1) << 32 | 0xffffffffL & mmuReadLongData (a7 + 12, 1));
 24134:     double zd = xd / yd;
 24135:     long l = Double.doubleToLongBits (zd);
 24136:     if (FEFunction.FPK_FPCP_NAN && l == 0x7ff8000000000000L) {
 24137:       l = 0x7fffffffffffffffL;
 24138:     }
 24139:     mmuWriteLongData (a7, (int) (l >>> 32), 1);
 24140:     mmuWriteLongData (a7 + 4, (int) l, 1);
 24141:     XEiJ.regCCR = (Double.isNaN (xd) || Double.isNaN (yd) ? 0 :  //引数がNaN
 24142:            Double.isNaN (zd) ? XEiJ.REG_CCR_C :  //引数がNaNでないのに結果がNaNのときはエラー。(±0)/(±0)=NaN
 24143:            Double.isInfinite (xd) || Double.isInfinite (yd) ? 0 :  //引数が±Inf。(±Inf)/(±0)=(±Inf)
 24144:            yd == 0.0 ? XEiJ.REG_CCR_Z | XEiJ.REG_CCR_C :  //除数が±0のときはゼロ除算
 24145:            Double.isInfinite (zd) ? XEiJ.REG_CCR_V | XEiJ.REG_CCR_C :  //引数が±Infでないのに結果が±Infのときはオーバーフロー
 24146:            0);
 24147:   }  //fpkCDDIV()
 24148: 
 24149:   //fpkCDMOD ()
 24150:   //  $FEF1  __CDMOD
 24151:   //  64bit浮動小数点数の剰余算
 24152:   //  <(a7).d:64bit浮動小数点数。被除数x
 24153:   //  <8(a7).d:64bit浮動小数点数。除数y
 24154:   //  >(a7).d:64bit浮動小数点数。余りx%y。ゼロ除算のときは不定
 24155:   //  >ccr:cs=エラー,eq=ゼロ除算
 24156:   public static void fpkCDMOD () throws M68kException {
 24157:     //([int,int]→[long]→double)%([int,int]→[long]→double)→[long]→[int,int]
 24158:     int a7 = XEiJ.regRn[15];
 24159:     double xd = Double.longBitsToDouble ((long) mmuReadLongData (a7, 1) << 32 | 0xffffffffL & mmuReadLongData (a7 + 4, 1));
 24160:     double yd = Double.longBitsToDouble ((long) mmuReadLongData (a7 + 8, 1) << 32 | 0xffffffffL & mmuReadLongData (a7 + 12, 1));
 24161:     double zd = xd % yd;
 24162:     long l = Double.doubleToLongBits (zd);
 24163:     if (FEFunction.FPK_FPCP_NAN && l == 0x7ff8000000000000L) {
 24164:       l = 0x7fffffffffffffffL;
 24165:     }
 24166:     mmuWriteLongData (a7, (int) (l >>> 32), 1);
 24167:     mmuWriteLongData (a7 + 4, (int) l, 1);
 24168:     XEiJ.regCCR = (Double.isNaN (xd) || Double.isNaN (yd) ? 0 :  //引数がNaN
 24169:            yd == 0.0 ? XEiJ.REG_CCR_Z | XEiJ.REG_CCR_C :  //除数が0のときはゼロ除算。(±Inf)%(±0)=NaN, x%(±0)=(±Inf)
 24170:            Double.isNaN (zd) ? XEiJ.REG_CCR_C :  //引数がNaNでないのに結果がNaNのときはエラー。(±Inf)%y=NaN
 24171:            Double.isInfinite (xd) || Double.isInfinite (yd) ? 0 :  //引数が±Inf
 24172:            Double.isInfinite (zd) ? XEiJ.REG_CCR_V | XEiJ.REG_CCR_C :  //引数が±Infでないのに結果が±Infのときはオーバーフロー
 24173:            0);
 24174:   }  //fpkCDMOD()
 24175: 
 24176:   //fpkCFCMP ()
 24177:   //  $FEF2  __CFCMP
 24178:   //  32bit浮動小数点数の比較
 24179:   //  x<=>y
 24180:   //  <(a7).s:32bit浮動小数点数。x
 24181:   //  <(a7).s:32bit浮動小数点数。y
 24182:   //  >ccr:lt=x<y,eq=x==y,gt=x>y
 24183:   public static void fpkCFCMP () throws M68kException {
 24184:     //([int]→float)<=>([int]→float)
 24185:     int a7 = XEiJ.regRn[15];
 24186:     float xf = Float.intBitsToFloat (mmuReadLongData (a7, 1));
 24187:     float yf = Float.intBitsToFloat (mmuReadLongData (a7 + 4, 1));
 24188:     XEiJ.regCCR = xf < yf ? XEiJ.REG_CCR_N | XEiJ.REG_CCR_C : xf == yf ? XEiJ.REG_CCR_Z : 0;  //どちらかがNaNのときは0
 24189:   }  //fpkCFCMP()
 24190: 
 24191:   //fpkCFADD ()
 24192:   //  $FEF3  __CFADD
 24193:   //  32bit浮動小数点数の加算
 24194:   //  <(a7).s:32bit浮動小数点数。被加算数x
 24195:   //  <4(a7).s:32bit浮動小数点数。加算数y
 24196:   //  >(a7).s:32bit浮動小数点数。和x+y
 24197:   //  >ccr:cs=エラー,vs=オーバーフロー
 24198:   public static void fpkCFADD () throws M68kException {
 24199:     //([int]→float)+([int]→float)→[int]
 24200:     int a7 = XEiJ.regRn[15];
 24201:     float xf = Float.intBitsToFloat (mmuReadLongData (a7, 1));
 24202:     float yf = Float.intBitsToFloat (mmuReadLongData (a7 + 4, 1));
 24203:     float zf = xf + yf;
 24204:     int h = Float.floatToIntBits (zf);
 24205:     if (FEFunction.FPK_FPCP_NAN && h == 0x7fc00000) {
 24206:       h = 0x7fffffff;
 24207:     }
 24208:     mmuWriteLongData (a7, h, 1);
 24209:     XEiJ.regCCR = (Float.isNaN (xf) || Float.isNaN (yf) ? 0 :  //引数がNaN
 24210:            Float.isNaN (zf) ? XEiJ.REG_CCR_C :  //引数がNaNでないのに結果がNaNのときはエラー。(+Inf)+(-Inf)=NaN
 24211:            Float.isInfinite (xf) || Float.isInfinite (yf) ? 0 :  //引数が±Inf
 24212:            Float.isInfinite (zf) ? XEiJ.REG_CCR_V | XEiJ.REG_CCR_C :  //引数が±Infでないのに結果が±Infのときはオーバーフロー
 24213:            0);
 24214:   }  //fpkCFADD()
 24215: 
 24216:   //fpkCFSUB ()
 24217:   //  $FEF4  __CFSUB
 24218:   //  32bit浮動小数点数の減算
 24219:   //  <(a7).s:32bit浮動小数点数。被減算数x
 24220:   //  <4(a7).s:32bit浮動小数点数。減算数y
 24221:   //  >(a7).s:32bit浮動小数点数。差x-y
 24222:   //  >ccr:cs=エラー,vs=オーバーフロー
 24223:   public static void fpkCFSUB () throws M68kException {
 24224:     //([int]→float)-([int]→float)→[int]
 24225:     int a7 = XEiJ.regRn[15];
 24226:     float xf = Float.intBitsToFloat (mmuReadLongData (a7, 1));
 24227:     float yf = Float.intBitsToFloat (mmuReadLongData (a7 + 4, 1));
 24228:     float zf = xf - yf;
 24229:     int h = Float.floatToIntBits (zf);
 24230:     if (FEFunction.FPK_FPCP_NAN && h == 0x7fc00000) {
 24231:       h = 0x7fffffff;
 24232:     }
 24233:     mmuWriteLongData (a7, h, 1);
 24234:     XEiJ.regCCR = (Float.isNaN (xf) || Float.isNaN (yf) ? 0 :  //引数がNaN
 24235:            Float.isNaN (zf) ? XEiJ.REG_CCR_C :  //引数がNaNでないのに結果がNaNのときはエラー。(+Inf)-(+Inf)=NaN
 24236:            Float.isInfinite (xf) || Float.isInfinite (yf) ? 0 :  //引数が±Inf
 24237:            Float.isInfinite (zf) ? XEiJ.REG_CCR_V | XEiJ.REG_CCR_C :  //引数が±Infでないのに結果が±Infのときはオーバーフロー
 24238:            0);
 24239:   }  //fpkCFSUB()
 24240: 
 24241:   //fpkCFMUL ()
 24242:   //  $FEF5  __CFMUL
 24243:   //  32bit浮動小数点数の乗算
 24244:   //  <(a7).s:32bit浮動小数点数。被乗数x
 24245:   //  <4(a7).s:32bit浮動小数点数。乗数y
 24246:   //  >(a7).s:32bit浮動小数点数。積x*y
 24247:   //  >ccr:0=エラーなし,CCR_C=アンダーフロー,CCR_V|CCR_C=オーバーフロー
 24248:   public static void fpkCFMUL () throws M68kException {
 24249:     //([int]→float)*([int]→float)→[int]
 24250:     int a7 = XEiJ.regRn[15];
 24251:     float xf = Float.intBitsToFloat (mmuReadLongData (a7, 1));
 24252:     float yf = Float.intBitsToFloat (mmuReadLongData (a7 + 4, 1));
 24253:     float zf = xf * yf;
 24254:     int h = Float.floatToIntBits (zf);
 24255:     if (FEFunction.FPK_FPCP_NAN && h == 0x7fc00000) {
 24256:       h = 0x7fffffff;
 24257:     }
 24258:     mmuWriteLongData (a7, h, 1);
 24259:     XEiJ.regCCR = (Float.isNaN (xf) || Float.isNaN (yf) ? 0 :  //引数がNaN
 24260:            Float.isNaN (zf) ? XEiJ.REG_CCR_C :  //引数がNaNでないのに結果がNaNのときはエラー。(±0)*(±Inf)=NaN
 24261:            Float.isInfinite (xf) || Float.isInfinite (yf) ? 0 :  //引数が±Inf
 24262:            Float.isInfinite (zf) ? XEiJ.REG_CCR_V | XEiJ.REG_CCR_C :  //引数が±Infでないのに結果が±Infのときはオーバーフロー
 24263:            0);
 24264:   }  //fpkCFMUL()
 24265: 
 24266:   //fpkCFDIV ()
 24267:   //  $FEF6  __CFDIV
 24268:   //  32bit浮動小数点数の除算
 24269:   //  <(a7).s:32bit浮動小数点数。被除数x
 24270:   //  <4(a7).s:32bit浮動小数点数。除数y
 24271:   //  >(a7).s:32bit浮動小数点数。商x/y。ゼロ除算のときは不定
 24272:   //  >ccr:cs=エラー,eq=ゼロ除算,vs=オーバーフロー
 24273:   public static void fpkCFDIV () throws M68kException {
 24274:     //([int]→float)/([int]→float)→[int]
 24275:     int a7 = XEiJ.regRn[15];
 24276:     float xf = Float.intBitsToFloat (mmuReadLongData (a7, 1));
 24277:     float yf = Float.intBitsToFloat (mmuReadLongData (a7 + 4, 1));
 24278:     float zf = xf / yf;
 24279:     int h = Float.floatToIntBits (zf);
 24280:     if (FEFunction.FPK_FPCP_NAN && h == 0x7fc00000) {
 24281:       h = 0x7fffffff;
 24282:     }
 24283:     mmuWriteLongData (a7, h, 1);
 24284:     XEiJ.regCCR = (Float.isNaN (xf) || Float.isNaN (yf) ? 0 :  //引数がNaN
 24285:            Float.isNaN (zf) ? XEiJ.REG_CCR_C :  //引数がNaNでないのに結果がNaNのときはエラー。(±0)/(±0)=NaN
 24286:            Float.isInfinite (xf) || Float.isInfinite (yf) ? 0 :  //引数が±Inf。(±Inf)/(±0)=(±Inf)
 24287:            yf == 0.0F ? XEiJ.REG_CCR_Z | XEiJ.REG_CCR_C :  //除数が±0のときはゼロ除算
 24288:            Float.isInfinite (zf) ? XEiJ.REG_CCR_V | XEiJ.REG_CCR_C :  //引数が±Infでないのに結果が±Infのときはオーバーフロー
 24289:            0);
 24290:   }  //fpkCFDIV()
 24291: 
 24292:   //fpkCFMOD ()
 24293:   //  $FEF7  __CFMOD
 24294:   //  32bit浮動小数点数の剰余算
 24295:   //  <(a7).s:32bit浮動小数点数。被除数x
 24296:   //  <4(a7).s:32bit浮動小数点数。除数y
 24297:   //  >(a7).s:32bit浮動小数点数。余りx%y。ゼロ除算のときは不定
 24298:   //  >ccr:cs=エラー,eq=ゼロ除算
 24299:   public static void fpkCFMOD () throws M68kException {
 24300:     //([int]→float)%([int]→float)→[int]
 24301:     int a7 = XEiJ.regRn[15];
 24302:     float xf = Float.intBitsToFloat (mmuReadLongData (a7, 1));
 24303:     float yf = Float.intBitsToFloat (mmuReadLongData (a7 + 4, 1));
 24304:     float zf = xf % yf;
 24305:     int h = Float.floatToIntBits (zf);
 24306:     if (FEFunction.FPK_FPCP_NAN && h == 0x7fc00000) {
 24307:       h = 0x7fffffff;
 24308:     }
 24309:     mmuWriteLongData (a7, h, 1);
 24310:     XEiJ.regCCR = (Float.isNaN (xf) || Float.isNaN (yf) ? 0 :  //引数がNaN
 24311:            yf == 0.0F ? XEiJ.REG_CCR_Z | XEiJ.REG_CCR_C :  //除数が0のときはゼロ除算。(±Inf)%(±0)=NaN, x%(±0)=(±Inf)
 24312:            Float.isNaN (zf) ? XEiJ.REG_CCR_C :  //引数がNaNでないのに結果がNaNのときはエラー。(±Inf)%y=NaN
 24313:            Float.isInfinite (xf) || Float.isInfinite (yf) ? 0 :  //引数が±Inf
 24314:            Float.isInfinite (zf) ? XEiJ.REG_CCR_V | XEiJ.REG_CCR_C :  //引数が±Infでないのに結果が±Infのときはオーバーフロー
 24315:            0);
 24316:   }  //fpkCFMOD()
 24317: 
 24318:   //fpkCDTST ()
 24319:   //  $FEF8  __CDTST
 24320:   //  64bit浮動小数点数と0の比較
 24321:   //  x<=>0
 24322:   //  <(a7).d:64bit浮動小数点数。x
 24323:   //  >ccr:lt=x<0,eq=x==0,gt=x>0
 24324:   public static void fpkCDTST () throws M68kException {
 24325:     if (true) {
 24326:       int a7 = XEiJ.regRn[15];
 24327:       long l = (long) mmuReadLongData (a7, 1) << 32 | 0xffffffffL & mmuReadLongData (a7 + 4, 1);
 24328:       XEiJ.regCCR = l << 1 == 0L ? XEiJ.REG_CCR_Z : 0L <= l ? 0 : XEiJ.REG_CCR_N;  //NaNのときは0
 24329:     } else {
 24330:       //[int,int]→[long]→double
 24331:       int a7 = XEiJ.regRn[15];
 24332:       double d = Double.longBitsToDouble ((long) mmuReadLongData (a7, 1) << 32 | 0xffffffffL & mmuReadLongData (a7 + 4, 1));
 24333:       XEiJ.regCCR = d < 0.0 ? XEiJ.REG_CCR_N : d == 0.0 ? XEiJ.REG_CCR_Z : 0;  //NaNのときは0
 24334:     }
 24335:   }  //fpkCDTST()
 24336: 
 24337:   //fpkCFTST ()
 24338:   //  $FEF9  __CFTST
 24339:   //  32bit浮動小数点数と0の比較
 24340:   //  x<=>0
 24341:   //  <(a7).s:32bit浮動小数点数。x
 24342:   //  >ccr:lt=x<0,eq=x==0,gt=x>0
 24343:   public static void fpkCFTST () throws M68kException {
 24344:     //[int]→float
 24345:     if (true) {
 24346:       int h = mmuReadLongData (XEiJ.regRn[15], 1);
 24347:       XEiJ.regCCR = h << 1 == 0 ? XEiJ.REG_CCR_Z : 0 <= h ? 0 : XEiJ.REG_CCR_N;  //NaNのときは0
 24348:     } else {
 24349:       //([int]→float)<=>0
 24350:       float f = Float.intBitsToFloat (mmuReadLongData (XEiJ.regRn[15], 1));
 24351:       XEiJ.regCCR = f < 0.0F ? XEiJ.REG_CCR_N : f == 0.0F ? XEiJ.REG_CCR_Z : 0;  //NaNのときは0
 24352:     }
 24353:   }  //fpkCFTST()
 24354: 
 24355:   //fpkCDINC ()
 24356:   //  $FEFA  __CDINC
 24357:   //  64bit浮動小数点数に1を加える
 24358:   //  <(a7).d:64bit浮動小数点数。x
 24359:   //  >(a7).d:64bit浮動小数点数。x+1
 24360:   public static void fpkCDINC () throws M68kException {
 24361:     //([int,int]→[long]→double)+1→[long]→[int,int]
 24362:     int a7 = XEiJ.regRn[15];
 24363:     double xd = Double.longBitsToDouble ((long) mmuReadLongData (a7, 1) << 32 | 0xffffffffL & mmuReadLongData (a7 + 4, 1));
 24364:     double zd = xd + 1.0;
 24365:     long l = Double.doubleToLongBits (zd);
 24366:     if (FEFunction.FPK_FPCP_NAN && l == 0x7ff8000000000000L) {
 24367:       l = 0x7fffffffffffffffL;
 24368:     }
 24369:     mmuWriteLongData (a7, (int) (l >>> 32), 1);
 24370:     mmuWriteLongData (a7 + 4, (int) l, 1);
 24371:     XEiJ.regCCR = Double.isInfinite (zd) && !Double.isInfinite (xd) ? XEiJ.REG_CCR_V | XEiJ.REG_CCR_C : 0;  //結果が±Infだが引数が±Infでないときはオーバーフロー
 24372:   }  //fpkCDINC()
 24373: 
 24374:   //fpkCFINC ()
 24375:   //  $FEFB  __CFINC
 24376:   //  32bit浮動小数点数に1を加える
 24377:   //  <(a7).s:32bit浮動小数点数。x
 24378:   //  >(a7).s:32bit浮動小数点数。x+1
 24379:   public static void fpkCFINC () throws M68kException {
 24380:     //([int]→float)+1→[int]
 24381:     int a7 = XEiJ.regRn[15];
 24382:     float xf = Float.intBitsToFloat (mmuReadLongData (a7, 1));
 24383:     float zf = xf + 1.0F;
 24384:     int h = Float.floatToIntBits (zf);
 24385:     if (FEFunction.FPK_FPCP_NAN && h == 0x7fc00000) {
 24386:       h = 0x7fffffff;
 24387:     }
 24388:     mmuWriteLongData (a7, h, 1);
 24389:     XEiJ.regCCR = Double.isInfinite (zf) && !Float.isInfinite (xf) ? XEiJ.REG_CCR_V | XEiJ.REG_CCR_C : 0;  //結果が±Infだが引数が±Infでないときはオーバーフロー
 24390:   }  //fpkCFINC()
 24391: 
 24392:   //fpkCDDEC ()
 24393:   //  $FEFC  __CDDEC
 24394:   //  64bit浮動小数点数から1を引く
 24395:   //  <(a7).d:64bit浮動小数点数。x
 24396:   //  >(a7).d:64bit浮動小数点数。x-1
 24397:   public static void fpkCDDEC () throws M68kException {
 24398:     //([int,int]→[long]→double)-1→[long]→[int,int]
 24399:     int a7 = XEiJ.regRn[15];
 24400:     double xd = Double.longBitsToDouble ((long) mmuReadLongData (a7, 1) << 32 | 0xffffffffL & mmuReadLongData (a7 + 4, 1));
 24401:     double zd = xd - 1.0;
 24402:     long l = Double.doubleToLongBits (zd);
 24403:     if (FEFunction.FPK_FPCP_NAN && l == 0x7ff8000000000000L) {
 24404:       l = 0x7fffffffffffffffL;
 24405:     }
 24406:     mmuWriteLongData (a7, (int) (l >>> 32), 1);
 24407:     mmuWriteLongData (a7 + 4, (int) l, 1);
 24408:     XEiJ.regCCR = Double.isInfinite (zd) && !Double.isInfinite (xd) ? XEiJ.REG_CCR_V | XEiJ.REG_CCR_C : 0;  //結果が±Infだが引数が±Infでないときはオーバーフロー
 24409:   }  //fpkCDDEC()
 24410: 
 24411:   //fpkCFDEC ()
 24412:   //  $FEFD  __CFDEC
 24413:   //  32bit浮動小数点数から1を引く
 24414:   //  <(a7).s:32bit浮動小数点数。x
 24415:   //  >(a7).s:32bit浮動小数点数。x-1
 24416:   public static void fpkCFDEC () throws M68kException {
 24417:     //([int]→float)-1→[int]
 24418:     int a7 = XEiJ.regRn[15];
 24419:     float xf = Float.intBitsToFloat (mmuReadLongData (a7, 1));
 24420:     float zf = xf - 1.0F;
 24421:     int h = Float.floatToIntBits (zf);
 24422:     if (FEFunction.FPK_FPCP_NAN && h == 0x7fc00000) {
 24423:       h = 0x7fffffff;
 24424:     }
 24425:     mmuWriteLongData (a7, h, 1);
 24426:     XEiJ.regCCR = Double.isInfinite (zf) && !Float.isInfinite (xf) ? XEiJ.REG_CCR_V | XEiJ.REG_CCR_C : 0;  //結果が±Infだが引数が±Infでないときはオーバーフロー
 24427:   }  //fpkCFDEC()
 24428: 
 24429: 
 24430: 
 24431:   //========================================================================================
 24432:   //$$MMU メモリ管理ユニット
 24433: 
 24434:   public static final boolean MMU_DEBUG_COMMAND = false;
 24435:   public static final boolean MMU_DEBUG_TRANSLATION = false;
 24436:   public static final boolean MMU_NOT_ALLOCATE_CACHE = false;  //true=アドレス変換キャッシュをアロケートしない
 24437: 
 24438:   //--------------------------------------------------------------------------------
 24439:   //論理アドレスと物理アドレス
 24440:   //
 24441:   //  ページサイズが4KBの場合
 24442:   //              ┌──  7 ──┬──  7 ──┬── 6──┬─────12─────┐
 24443:   //               31          2524          1817        1211                     0
 24444:   //              ┏━━━━━━┯━━━━━━┯━━━━━┯━━━━━━━━━━━┓
 24445:   //        論理  ┃   ルート   │  ポインタ  │  ページ  │        ページ        ┃
 24446:   //      アドレス┃インデックス│インデックス インデックス       オフセット      ┃
 24447:   //              ┗━━↓━━━┷━━↓━━━┷━━↓━━┷━━━━━↓━━━━━┛
 24448:   //          ┌────┘            │            └────┐      └──────┐
 24449:   //          │    ルートテーブル    │   ポインタテーブル   │    ページテーブル  │
 24450:   //        ┌┼→┏━━━━━━━┓┌┼→┏━━━━━━━┓┌┼→┏━━━━━━━┓│
 24451:   //        ││ 0┃              ┃││ 0┃              ┃││ 0┃              ┃│
 24452:   //        ││  ┃              ┃││  ┃              ┃│└→┠───────┨│
 24453:   //        │└→┠───────┨││  ┃              ┃│    ┃    ページ    ┃│
 24454:   //      ルート  ┃    ルート    ┃│└→┠───────┨│┌─←ディスクリプタ┃│
 24455:   //     ポインタ ┃ディスクリプタ→┘    ┃   ポインタ   ┃││  ┠───────┨│
 24456:   //              ┠───────┨      ┃ディスクリプタ→┘│63┃              ┃│
 24457:   //              ┃              ┃      ┠───────┨  │  ┗━━━━━━━┛│
 24458:   //           127┃              ┃   127┃              ┃  │                    │
 24459:   //              ┗━━━━━━━┛      ┗━━━━━━━┛  │                    │
 24460:   //                                  ┌───────────┘      ┌──────┘
 24461:   //              ┏━━━━━━━━━↓━━━━━━━━━┯━━━━━↓━━━━━┓
 24462:   //        物理  ┃              物理ページ              │        ページ        ┃
 24463:   //      アドレス┃               アドレス               │      オフセット      ┃
 24464:   //              ┗━━━━━━━━━━━━━━━━━━━┷━━━━━━━━━━━┛
 24465:   //               31                                    1211                     0
 24466:   //              └─────────20─────────┴─────12─────┘
 24467:   //
 24468:   //  ページサイズが8KBの場合
 24469:   //              ┌──  7 ──┬──  7 ──┬─  5 ─┬───── 13 ─────┐
 24470:   //               31          2524          1817      1312                       0
 24471:   //              ┏━━━━━━┯━━━━━━┯━━━━┯━━━━━━━━━━━━┓
 24472:   //        論理  ┃   ルート   │  ポインタ  │ ページ │         ページ         ┃
 24473:   //      アドレス┃インデックス│インデックスインデックス       オフセット       ┃
 24474:   //              ┗━━↓━━━┷━━↓━━━┷━━↓━┷━━━━━━↓━━━━━┛
 24475:   //          ┌────┘            │            └────┐      └──────┐
 24476:   //          │    ルートテーブル    │   ポインタテーブル   │    ページテーブル  │
 24477:   //        ┌┼→┏━━━━━━━┓┌┼→┏━━━━━━━┓┌┼→┏━━━━━━━┓│
 24478:   //        ││ 0┃              ┃││ 0┃              ┃││ 0┃              ┃│
 24479:   //        ││  ┃              ┃││  ┃              ┃│└→┠───────┨│
 24480:   //        │└→┠───────┨││  ┃              ┃│    ┃    ページ    ┃│
 24481:   //      ルート  ┃    ルート    ┃│└→┠───────┨│┌─←ディスクリプタ┃│
 24482:   //     ポインタ ┃ディスクリプタ→┘    ┃   ポインタ   ┃││  ┠───────┨│
 24483:   //              ┠───────┨      ┃ディスクリプタ→┘│31┃              ┃│
 24484:   //              ┃              ┃      ┠───────┨  │  ┗━━━━━━━┛│
 24485:   //           127┃              ┃   127┃              ┃  │                    │
 24486:   //              ┗━━━━━━━┛      ┗━━━━━━━┛  │                    │
 24487:   //                                  ┌───────────┘      ┌──────┘
 24488:   //              ┏━━━━━━━━━↓━━━━━━━━┯━━━━━━↓━━━━━┓
 24489:   //        物理  ┃             物理ページ             │         ページ         ┃
 24490:   //      アドレス┃              アドレス              │       オフセット       ┃
 24491:   //              ┗━━━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━┛
 24492:   //               31                                  1312                       0
 24493:   //              └──────── 19 ────────┴───── 13 ─────┘
 24494:   //
 24495:   public static final int MMU_ROOT_INDEX_BIT0       = 25;
 24496:   public static final int MMU_POINTER_INDEX_BIT0    = 18;
 24497:   public static final int MMU_PAGE_INDEX_BIT0_4KB   = 12;
 24498:   public static final int MMU_PAGE_INDEX_BIT0_8KB   = 13;
 24499:   public static final int MMU_PAGE_SIZE_4KB         = 1 << MMU_PAGE_INDEX_BIT0_4KB;
 24500:   public static final int MMU_PAGE_SIZE_8KB         = 1 << MMU_PAGE_INDEX_BIT0_8KB;
 24501:   //                                                    33222222_22221111_111111
 24502:   //                                                    10987654_32109876_54321098_76543210
 24503:   public static final int MMU_ROOT_INDEX_MASK       = 0b11111110_00000000_00000000_00000000;
 24504:   public static final int MMU_POINTER_INDEX_MASK    = 0b00000001_11111100_00000000_00000000;
 24505:   public static final int MMU_PAGE_INDEX_MASK_4KB   = 0b00000000_00000011_11110000_00000000;
 24506:   public static final int MMU_PAGE_INDEX_MASK_8KB   = 0b00000000_00000011_11100000_00000000;
 24507:   public static final int MMU_PAGE_OFFSET_MASK_4KB  = 0b00000000_00000000_00001111_11111111;
 24508:   public static final int MMU_PAGE_OFFSET_MASK_8KB  = 0b00000000_00000000_00011111_11111111;
 24509:   public static final int MMU_PAGE_ADDRESS_MASK_4KB = 0b11111111_11111111_11110000_00000000;
 24510:   public static final int MMU_PAGE_ADDRESS_MASK_8KB = 0b11111111_11111111_11100000_00000000;
 24511: 
 24512:   //--------------------------------------------------------------------------------
 24513:   //透過変換レジスタ
 24514:   //
 24515:   //  DTT0  データ透過変換レジスタ0
 24516:   //  DTT1  データ透過変換レジスタ1
 24517:   //  ITT0  命令透過変換レジスタ0
 24518:   //  ITT1  命令透過変換レジスタ1
 24519:   //      31  30  29  28  27  26  25  24  23  22  21  20  19  18  17  16  15  14  13  12  11  10   9   8   7   6   5   4   3   2   1   0
 24520:   //    ┏━━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━━┯━┯━┯━┯━━━━━┯━┯━┯━┯━━━┯━━━┯━┯━━━┓
 24521:   //    ┃      論理アドレスベース      │      論理アドレスマスク      │ E│IS│US│     0    │U1│U0│ 0│  CM  │   0  │ W│   0  ┃
 24522:   //    ┗━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━┷━┷━┷━┷━━━━━┷━┷━┷━┷━━━┷━━━┷━┷━━━┛
 24523:   public static final int MMU_TTR_BASE            = 255 << 24;  //x  Logical Address Base
 24524:   public static final int MMU_TTR_MASK            = 255 << 16;  //x  Logical Address Mask
 24525:   public static final int MMU_TTR_ENABLE          =   1 << 15;  //x  E   Enable
 24526:   public static final int MMU_TTR_IGNORE_FC2      =   1 << 14;  //x  IS  Ignore FC2 when matching
 24527:   public static final int MMU_TTR_USER_SUPERVISOR =   1 << 13;  //x  US  User or Supervisor when IS=0
 24528:   public static final int MMU_TTR_US_USER         =   0 << 13;  //         Match only if FC2=0 (user mode access)
 24529:   public static final int MMU_TTR_US_SUPERVISOR   =   1 << 13;  //         Match only if FC2=1 (supervisor mode access)
 24530:   public static final int MMU_TTR_WRITE_PROTECT   =   1 <<  2;  //x  W   Write Protect
 24531:   public static int mmuDTT0;  //DTT0
 24532:   public static int mmuDTT1;  //DTT1
 24533:   public static int mmuITT0;  //ITT0
 24534:   public static int mmuITT1;  //ITT1
 24535:   //  透過変換マップ
 24536:   //    インデックス
 24537:   //      a >>> 24
 24538:   //    値
 24539:   //      -1  透過変換あり,ライトプロテクトあり → リードのときアドレス変換なし、ライトのときアクセスフォルト
 24540:   //       0  透過変換なし                      → アドレス変換あり
 24541:   //       1  透過変換あり,ライトプロテクトなし → アドレス変換なし
 24542:   public static int[] mmuUserDataTransparent;  //ユーザデータ透過変換マップ
 24543:   public static int[] mmuUserCodeTransparent;  //ユーザ命令透過変換マップ
 24544:   public static int[] mmuSuperDataTransparent;  //スーパーバイザデータ透過変換マップ
 24545:   public static int[] mmuSuperCodeTransparent;  //スーパーバイザ命令透過変換マップ
 24546:   public static int[] mmuUserDataDifference;  //ユーザデータ透過変換差分マップ
 24547:   public static int[] mmuUserCodeDifference;  //ユーザ命令透過変換差分マップ
 24548:   public static int[] mmuSuperDataDifference;  //スーパーバイザデータ透過変換差分マップ
 24549:   public static int[] mmuSuperCodeDifference;  //スーパーバイザ命令透過変換差分マップ
 24550: 
 24551:   //d = mmuGetDTT0 ()
 24552:   //  DTT0を読む
 24553:   public static int mmuGetDTT0 () {
 24554:     return mmuDTT0;
 24555:   }  //mmuGetDTT0()
 24556: 
 24557:   //d = mmuGetDTT1 ()
 24558:   //  DTT1を読む
 24559:   public static int mmuGetDTT1 () {
 24560:     return mmuDTT1;
 24561:   }  //mmuGetDTT1()
 24562: 
 24563:   //d = mmuGetITT0 ()
 24564:   //  ITT0を読む
 24565:   public static int mmuGetITT0 () {
 24566:     return mmuITT0;
 24567:   }  //mmuGetITT0()
 24568: 
 24569:   //d = mmuGetITT1 ()
 24570:   //  ITT1を読む
 24571:   public static int mmuGetITT1 () {
 24572:     return mmuITT1;
 24573:   }  //mmuGetITT1()
 24574: 
 24575:   //mmuSetDTT0 (d)
 24576:   //  DTT0に書く
 24577:   public static void mmuSetDTT0 (int d) {
 24578:     mmuSetDataTransparent (d, mmuDTT1);
 24579:     if (MMU_DEBUG_COMMAND) {
 24580:       System.out.printf ("%08x mmuSetDTT0(0x%08x)\n", XEiJ.regPC0, mmuDTT0);
 24581:     }
 24582:   }  //mmuSetDTT0(int)
 24583: 
 24584:   //mmuSetDTT1 (d)
 24585:   //  DTT1に書く
 24586:   public static void mmuSetDTT1 (int d) {
 24587:     mmuSetDataTransparent (mmuDTT0, d);
 24588:     if (MMU_DEBUG_COMMAND) {
 24589:       System.out.printf ("%08x mmuSetDTT1(0x%08x)\n", XEiJ.regPC0, mmuDTT1);
 24590:     }
 24591:   }  //mmuSetDTT1(int)
 24592: 
 24593:   //mmuSetDataTransparent (d0, d1)
 24594:   //  DTT0,DTT1に書く
 24595:   //  データ透過変換マップを更新する
 24596:   //  DTT0とDTT1の両方がヒットするときDTT0を用いるため、DTT1の変換を展開してからDTT0の変換を上書きする
 24597:   //  DTT1でライトプロテクトされていてもDTT0でライトプロテクトされていなければ書き込める
 24598:   public static void mmuSetDataTransparent (int d0, int d1) {
 24599:     mmuDTT0 = d0 & 0xffffe364;
 24600:     mmuDTT1 = d1 & 0xffffe364;
 24601:     //透過変換マップと透過変換差分マップを入れ換える
 24602:     {
 24603:       int[] t = mmuUserDataDifference;
 24604:       mmuUserDataDifference = mmuUserDataTransparent;
 24605:       mmuUserDataTransparent = t;
 24606:       t = mmuSuperDataDifference;
 24607:       mmuSuperDataDifference = mmuSuperDataTransparent;
 24608:       mmuSuperDataTransparent = t;
 24609:     }
 24610:     //透過変換マップを構築する
 24611:     Arrays.fill (mmuUserDataTransparent, 0);  //透過変換なし
 24612:     Arrays.fill (mmuSuperDataTransparent, 0);  //透過変換なし
 24613:     if ((short) mmuDTT1 < 0) {  //(mmuDTT1 & MMU_TTR_ENABLE) != 0。有効
 24614:       int mask = ~mmuDTT1 >>> 16 & 255;
 24615:       int base = mmuDTT1 >>> 24 & mask;
 24616:       int writeProtect = (mmuDTT1 & MMU_TTR_WRITE_PROTECT) != 0 ? -1 : 1;  //-1=ライトプロテクトあり,1=ライトプロテクトなし
 24617:       if ((mmuDTT1 & MMU_TTR_IGNORE_FC2) != 0 ||
 24618:           (mmuDTT1 & MMU_TTR_USER_SUPERVISOR) == MMU_TTR_US_USER) {  //ユーザモードで有効
 24619:         for (int block = 0; block < 256; block++) {
 24620:           //if (((block << 24 ^ mmuDTT1) & ~mmuDTT1 << 8) >>> 24 == 0) {
 24621:           if ((block & mask) == base) {
 24622:             mmuUserDataTransparent[block] = writeProtect;
 24623:           }
 24624:         }
 24625:       }
 24626:       if ((mmuDTT1 & MMU_TTR_IGNORE_FC2) != 0 ||
 24627:           (mmuDTT1 & MMU_TTR_USER_SUPERVISOR) == MMU_TTR_US_SUPERVISOR) {  //スーパーバイザモードで有効
 24628:         for (int block = 0; block < 256; block++) {
 24629:           //if (((block << 24 ^ mmuDTT1) & ~mmuDTT1 << 8) >>> 24 == 0) {
 24630:           if ((block & mask) == base) {
 24631:             mmuSuperDataTransparent[block] = writeProtect;
 24632:           }
 24633:         }
 24634:       }
 24635:     }
 24636:     if ((short) mmuDTT0 < 0) {  //(mmuDTT0 & MMU_TTR_ENABLE) != 0。有効
 24637:       int mask = ~mmuDTT0 >>> 16 & 255;
 24638:       int base = mmuDTT0 >>> 24 & mask;
 24639:       int writeProtect = (mmuDTT0 & MMU_TTR_WRITE_PROTECT) != 0 ? -1 : 1;  //-1=ライトプロテクトあり,1=ライトプロテクトなし
 24640:       if ((mmuDTT0 & MMU_TTR_IGNORE_FC2) != 0 ||
 24641:           (mmuDTT0 & MMU_TTR_USER_SUPERVISOR) == MMU_TTR_US_USER) {  //ユーザモードで有効
 24642:         for (int block = 0; block < 256; block++) {
 24643:           //if (((block << 24 ^ mmuDTT0) & ~mmuDTT0 << 8) >>> 24 == 0) {
 24644:           if ((block & mask) == base) {
 24645:             mmuUserDataTransparent[block] = writeProtect;
 24646:           }
 24647:         }
 24648:       }
 24649:       if ((mmuDTT0 & MMU_TTR_IGNORE_FC2) != 0 ||
 24650:           (mmuDTT0 & MMU_TTR_USER_SUPERVISOR) == MMU_TTR_US_SUPERVISOR) {  //スーパーバイザモードで有効
 24651:         for (int block = 0; block < 256; block++) {
 24652:           //if (((block << 24 ^ mmuDTT0) & ~mmuDTT0 << 8) >>> 24 == 0) {
 24653:           if ((block & mask) == base) {
 24654:             mmuSuperDataTransparent[block] = writeProtect;
 24655:           }
 24656:         }
 24657:       }
 24658:     }
 24659:     //透過変換差分マップを作る
 24660:     int difference = 0;
 24661:     for (int block = 0; block < 256; block++) {
 24662:       difference |= mmuUserDataDifference[block] -= mmuUserDataTransparent[block];
 24663:       difference |= mmuSuperDataDifference[block] -= mmuSuperDataTransparent[block];
 24664:     }
 24665:     //透過変換の状態が変化したブロックのエントリを無効化する
 24666:     if (difference != 0) {
 24667:       for (int i = 0; i < 4 * MMU_CACHE_WAYS * MMU_HASH_SIZE; i += 4) {
 24668:         int logicalPage = mmuUserDataCache[i];
 24669:         if (logicalPage != 1 &&  //有効なエントリで
 24670:             mmuUserDataDifference[logicalPage >>> 24] != 0) {  //透過変換の状態が変化した
 24671:           mmuUserDataCache[i] = mmuUserDataCache[i + 1] = mmuUserDataCache[i + 2] = mmuUserDataCache[i + 3] = 1;  //無効化する
 24672:         }
 24673:         logicalPage = mmuSuperDataCache[i];
 24674:         if (logicalPage != 1 &&  //有効なエントリで
 24675:             mmuSuperDataDifference[logicalPage >>> 24] != 0) {  //透過変換の状態が変化した
 24676:           mmuSuperDataCache[i] = mmuSuperDataCache[i + 1] = mmuSuperDataCache[i + 2] = mmuSuperDataCache[i + 3] = 1;  //無効化する
 24677:         }
 24678:       }
 24679:     }
 24680:   }  //mmuSetDataTransparent(int,int)
 24681: 
 24682:   //mmuSetITT0 (d)
 24683:   //  ITT0に書く
 24684:   public static void mmuSetITT0 (int d) {
 24685:     mmuSetCodeTransparent (d, mmuITT1);
 24686:     if (MMU_DEBUG_COMMAND) {
 24687:       System.out.printf ("%08x mmuSetITT0(0x%08x)\n", XEiJ.regPC0, mmuITT0);
 24688:     }
 24689:   }  //mmuSetITT0(int)
 24690: 
 24691:   //mmuSetITT1 (d)
 24692:   //  ITT1に書く
 24693:   public static void mmuSetITT1 (int d) {
 24694:     mmuSetCodeTransparent (mmuITT0, d);
 24695:     if (MMU_DEBUG_COMMAND) {
 24696:       System.out.printf ("%08x mmuSetITT1(0x%08x)\n", XEiJ.regPC0, mmuITT1);
 24697:     }
 24698:   }  //mmuSetITT1(int)
 24699: 
 24700:   //mmuSetCodeTransparent (d0, d1)
 24701:   //  ITT0,ITT1に書く
 24702:   //  命令透過変換マップを更新する
 24703:   //  ITT0とITT1の両方がヒットするときITT0を用いるため、ITT1の変換を展開してからITT0の変換を上書きする
 24704:   public static void mmuSetCodeTransparent (int d0, int d1) {
 24705:     mmuITT0 = d0 & 0xffffe364;
 24706:     mmuITT1 = d1 & 0xffffe364;
 24707:     //透過変換マップと透過変換差分マップを入れ換える
 24708:     {
 24709:       int[] t = mmuUserCodeDifference;
 24710:       mmuUserCodeDifference = mmuUserCodeTransparent;
 24711:       mmuUserCodeTransparent = t;
 24712:       t = mmuSuperCodeDifference;
 24713:       mmuSuperCodeDifference = mmuSuperCodeTransparent;
 24714:       mmuSuperCodeTransparent = t;
 24715:     }
 24716:     //透過変換マップを構築する
 24717:     Arrays.fill (mmuUserCodeTransparent, 0);  //透過変換なし
 24718:     Arrays.fill (mmuSuperCodeTransparent, 0);  //透過変換なし
 24719:     if ((short) mmuITT1 < 0) {  //(mmuITT1 & MMU_TTR_ENABLE) != 0。有効
 24720:       int mask = ~mmuITT1 >>> 16 & 255;
 24721:       int base = mmuITT1 >>> 24 & mask;
 24722:       int writeProtect = (mmuITT1 & MMU_TTR_WRITE_PROTECT) != 0 ? -1 : 1;  //-1=ライトプロテクトあり,1=ライトプロテクトなし
 24723:       if ((mmuITT1 & MMU_TTR_IGNORE_FC2) != 0 ||
 24724:           (mmuITT1 & MMU_TTR_USER_SUPERVISOR) == MMU_TTR_US_USER) {  //ユーザモードで有効
 24725:         for (int block = 0; block < 256; block++) {
 24726:           //if (((block << 24 ^ mmuITT1) & ~mmuITT1 << 8) >>> 24 == 0) {
 24727:           if ((block & mask) == base) {
 24728:             mmuUserCodeTransparent[block] = writeProtect;
 24729:           }
 24730:         }
 24731:       }
 24732:       if ((mmuITT1 & MMU_TTR_IGNORE_FC2) != 0 ||
 24733:           (mmuITT1 & MMU_TTR_USER_SUPERVISOR) == MMU_TTR_US_SUPERVISOR) {  //スーパーバイザモードで有効
 24734:         for (int block = 0; block < 256; block++) {
 24735:           //if (((block << 24 ^ mmuITT1) & ~mmuITT1 << 8) >>> 24 == 0) {
 24736:           if ((block & mask) == base) {
 24737:             mmuSuperCodeTransparent[block] = writeProtect;
 24738:           }
 24739:         }
 24740:       }
 24741:     }
 24742:     if ((short) mmuITT0 < 0) {  //(mmuITT0 & MMU_TTR_ENABLE) != 0。有効
 24743:       int mask = ~mmuITT0 >>> 16 & 255;
 24744:       int base = mmuITT0 >>> 24 & mask;
 24745:       int writeProtect = (mmuITT0 & MMU_TTR_WRITE_PROTECT) != 0 ? -1 : 1;  //-1=ライトプロテクトあり,1=ライトプロテクトなし
 24746:       if ((mmuITT0 & MMU_TTR_IGNORE_FC2) != 0 ||
 24747:           (mmuITT0 & MMU_TTR_USER_SUPERVISOR) == MMU_TTR_US_USER) {  //ユーザモードで有効
 24748:         for (int block = 0; block < 256; block++) {
 24749:           //if (((block << 24 ^ mmuITT0) & ~mmuITT0 << 8) >>> 24 == 0) {
 24750:           if ((block & mask) == base) {
 24751:             mmuUserCodeTransparent[block] = writeProtect;
 24752:           }
 24753:         }
 24754:       }
 24755:       if ((mmuITT0 & MMU_TTR_IGNORE_FC2) != 0 ||
 24756:           (mmuITT0 & MMU_TTR_USER_SUPERVISOR) == MMU_TTR_US_SUPERVISOR) {  //スーパーバイザモードで有効
 24757:         for (int block = 0; block < 256; block++) {
 24758:           //if (((block << 24 ^ mmuITT0) & ~mmuITT0 << 8) >>> 24 == 0) {
 24759:           if ((block & mask) == base) {
 24760:             mmuSuperCodeTransparent[block] = writeProtect;
 24761:           }
 24762:         }
 24763:       }
 24764:     }
 24765:     //透過変換差分マップを作る
 24766:     int difference = 0;
 24767:     for (int block = 0; block < 256; block++) {
 24768:       difference |= mmuUserCodeDifference[block] -= mmuUserCodeTransparent[block];
 24769:       difference |= mmuSuperCodeDifference[block] -= mmuSuperCodeTransparent[block];
 24770:     }
 24771:     //透過変換の状態が変化したブロックのエントリを無効化する
 24772:     if (difference != 0) {
 24773:       for (int i = 0; i < 4 * MMU_CACHE_WAYS * MMU_HASH_SIZE; i += 4) {
 24774:         int logicalPage = mmuUserCodeCache[i];
 24775:         if (logicalPage != 1 &&  //有効なエントリで
 24776:             mmuUserCodeDifference[logicalPage >>> 24] != 0) {  //透過変換の状態が変化した
 24777:           mmuUserCodeCache[i] = mmuUserCodeCache[i + 1] = mmuUserCodeCache[i + 2] = mmuUserCodeCache[i + 3] = 1;  //無効化する
 24778:         }
 24779:         logicalPage = mmuSuperCodeCache[i];
 24780:         if (logicalPage != 1 &&  //有効なエントリで
 24781:             mmuSuperCodeDifference[logicalPage >>> 24] != 0) {  //透過変換の状態が変化した
 24782:           mmuSuperCodeCache[i] = mmuSuperCodeCache[i + 1] = mmuSuperCodeCache[i + 2] = mmuSuperCodeCache[i + 3] = 1;  //無効化する
 24783:         }
 24784:       }
 24785:     }
 24786:   }  //mmuSetCodeTransparent(int,int)
 24787: 
 24788:   //--------------------------------------------------------------------------------
 24789:   //変換制御レジスタ
 24790:   //
 24791:   //  TCR  変換制御レジスタ
 24792:   //      31  30  29  28  27  26  25  24  23  22  21  20  19  18  17  16  15  14  13  12  11  10   9   8   7   6   5   4   3   2   1   0
 24793:   //    ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┯━┯━┯━┯━┯━┯━┯━━━┯━━━┯━┯━━━┯━━━┯━┓
 24794:   //    ┃                               0                              │ E│ P NAD NAI FOTC FITC  DCO │  DUO │DWO   DCI │  DUI │ 0┃
 24795:   //    ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┷━┷━┷━┷━┷━┷━┷━━━┷━━━┷━┷━━━┷━━━┷━┛
 24796:   public static final int MMU_TCR_ENABLE    = 1 << 15;  //x  E     Enable
 24797:   public static final int MMU_TCR_PAGE_SIZE = 1 << 14;  //x  P     Page Size
 24798:   public static final int MMU_TCR_P_4KB     = 0 << 14;  //           4KB
 24799:   public static final int MMU_TCR_P_8KB     = 1 << 14;  //           8KB
 24800:   public static final int MMU_TCR_NAD       = 1 << 13;  //x  NAD   No Allocate Mode (Data ATC)。データATCはヒットするが更新されない
 24801:   public static final int MMU_TCR_NAI       = 1 << 12;  //x  NAI   No Allocate Mode (Instruction ATC)。命令ATCはヒットするが更新されない
 24802:   public static final int MMU_TCR_FOTC      = 1 << 11;  //   FOTC  1/2-Cache Mode (Data ATC)。データATCは0=64エントリ,1=32エントリ
 24803:   public static final int MMU_TCR_FITC      = 1 << 10;  //   FITC  1/2-Cache Mode (Instruction ATC)。命令ATCは0=64エントリ,1=32エントリ
 24804:   public static final int MMU_TCR_DCO       = 3 <<  8;  //   DCO   Default Cache Mode (Data Cache)。デフォルトデータキャッシュモード
 24805:   public static final int MMU_TCR_DUO       = 3 <<  6;  //   DUO   Default UPA bits (Data Cache)。デフォルトデータUPA
 24806:   public static final int MMU_TCR_DWO       = 1 <<  5;  //   DWO   Default Write Protect (Data Cache)。デフォルトライトプロテクト
 24807:   public static final int MMU_TCR_DCI       = 3 <<  3;  //   DCI   Default Cache Mode (Instruction Cache)。デフォルト命令キャッシュモード
 24808:   public static final int MMU_TCR_DUI       = 3 <<  1;  //   DUI   Default UPA bits (Instruction Cache)。デフォルト命令UPA
 24809:   public static int mmuTCR;  //TCR
 24810:   public static boolean mmuEnabled;  //true=アドレス変換有効
 24811:   public static boolean mmu4KB;  //false=8KB,true=4KB
 24812:   public static boolean mmuNotAllocateData;  //true=データアドレス変換キャッシュをアロケートしない
 24813:   public static boolean mmuNotAllocateCode;  //true=命令アドレス変換キャッシュをアロケートしない
 24814:   public static int mmuPageSize;  //ページサイズ
 24815:   public static int mmuPageAddressMask;  //ページアドレスのマスク
 24816:   public static int mmuPageOffsetMask;  //ページオフセットのマスク
 24817:   public static int mmuPageIndexMask;  //ページインデックスのマスク
 24818:   public static int mmuPageIndexBit2;  //ページインデックスのbit番号-2
 24819:   public static int mmuPageTableMask;  //ページテーブルの先頭アドレスのマスク
 24820: 
 24821:   //d = mmuGetTCR ()
 24822:   //  TCRを読む
 24823:   public static int mmuGetTCR () {
 24824:     return mmuTCR;
 24825:   }  //mmuGetTCR()
 24826: 
 24827:   //mmuSetTCR (d)
 24828:   //  TCRに書く
 24829:   public static void mmuSetTCR (int d) {
 24830:     mmuInvalidateAllCache ();  //高速化のためアドレス変換していないときもキャッシュに乗せているので、アドレス変換を有効にしたときキャッシュを初期化する必要がある
 24831:     mmuTCR = d & 0x0000fffe;
 24832:     mmuEnabled = (short) d < 0;  //(d & MMU_TCR_ENABLE) != 0
 24833:     mmu4KB = (d & MMU_TCR_PAGE_SIZE) == MMU_TCR_P_4KB;
 24834:     mmuNotAllocateData = (d & MMU_TCR_NAD) != 0;
 24835:     mmuNotAllocateCode = (d & MMU_TCR_NAI) != 0;
 24836:     if (mmu4KB) {  //4KB
 24837:       mmuPageSize = MMU_PAGE_SIZE_4KB;
 24838:       mmuPageAddressMask = MMU_PAGE_ADDRESS_MASK_4KB;
 24839:       mmuPageOffsetMask = MMU_PAGE_OFFSET_MASK_4KB;
 24840:       mmuPageIndexMask = MMU_PAGE_INDEX_MASK_4KB;
 24841:       mmuPageIndexBit2 = MMU_PAGE_INDEX_BIT0_4KB - 2;
 24842:       mmuPageTableMask = MMU_DESCRIPTOR_PAGE_TABLE_ADDRESS_4KB;
 24843:     } else {  //8KB
 24844:       mmuPageSize = MMU_PAGE_SIZE_8KB;
 24845:       mmuPageAddressMask = MMU_PAGE_ADDRESS_MASK_8KB;
 24846:       mmuPageOffsetMask = MMU_PAGE_OFFSET_MASK_8KB;
 24847:       mmuPageIndexMask = MMU_PAGE_INDEX_MASK_8KB;
 24848:       mmuPageIndexBit2 = MMU_PAGE_INDEX_BIT0_8KB - 2;
 24849:       mmuPageTableMask = MMU_DESCRIPTOR_PAGE_TABLE_ADDRESS_8KB;
 24850:     }
 24851:     if (MMU_DEBUG_COMMAND) {
 24852:       System.out.printf ("%08x mmuSetTCR(0x%08x)\n", XEiJ.regPC0, mmuTCR);
 24853:       System.out.printf ("  mmuEnabled=%b\n", mmuEnabled);
 24854:       System.out.printf ("  mmu4KB=%b\n", mmu4KB);
 24855:       System.out.printf ("  mmuPageSize=0x%08x\n", mmuPageSize);
 24856:       System.out.printf ("  mmuPageAddressMask=0x%08x\n", mmuPageAddressMask);
 24857:       System.out.printf ("  mmuPageOffsetMask=0x%08x\n", mmuPageOffsetMask);
 24858:       System.out.printf ("  mmuPageIndexMask=0x%08x\n", mmuPageIndexMask);
 24859:       System.out.printf ("  mmuPageIndexBit2=%d\n", mmuPageIndexBit2);
 24860:       System.out.printf ("  mmuPageTableMask=%d\n", mmuPageTableMask);
 24861:     }
 24862:   }  //mmuSetTCR(int)
 24863: 
 24864:   //--------------------------------------------------------------------------------
 24865:   //アドレス変換テーブル
 24866: 
 24867:   //  URP  ユーザルートポインタ
 24868:   //  SRP  スーパーバイザルートポインタ
 24869:   //      31  30  29  28  27  26  25  24  23  22  21  20  19  18  17  16  15  14  13  12  11  10   9   8   7   6   5   4   3   2   1   0
 24870:   //    ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━━━━┓
 24871:   //    ┃                                  ルートテーブルアドレス                                  │                 0                ┃
 24872:   //    ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━━┛
 24873:   public static int mmuURP;  //URP
 24874:   public static int mmuSRP;  //SRP
 24875: 
 24876:   //d = mmuGetURP ()
 24877:   //  URPを読む
 24878:   public static int mmuGetURP () {
 24879:     return mmuURP;
 24880:   }  //mmuGetURP()
 24881: 
 24882:   //d = mmuGetSRP ()
 24883:   //  SRPを読む
 24884:   public static int mmuGetSRP () {
 24885:     return mmuSRP;
 24886:   }  //mmuGetSRP()
 24887: 
 24888:   //mmuSetURP (d)
 24889:   //  URPに書く
 24890:   public static void mmuSetURP (int d) throws M68kException {
 24891:     mmuURP = d &= 0xfffffe00;
 24892:     Arrays.fill (mmuUserDataCache, 1);
 24893:     Arrays.fill (mmuUserCodeCache, 1);
 24894:     if (MMU_DEBUG_COMMAND) {
 24895:       System.out.printf ("%08x mmuSetURP(0x%08x)\n", XEiJ.regPC0, mmuURP);
 24896:     }
 24897:     if (RootPointerList.RTL_ON) {
 24898:       RootPointerList.rtlSetRootPointer (d, false);
 24899:     }
 24900:   }  //mmuSetURP(int)
 24901: 
 24902:   //mmuSetSRP (d)
 24903:   //  SRPに書く
 24904:   public static void mmuSetSRP (int d) {
 24905:     mmuSRP = d &= 0xfffffe00;
 24906:     Arrays.fill (mmuSuperDataCache, 1);
 24907:     Arrays.fill (mmuSuperCodeCache, 1);
 24908:     if (MMU_DEBUG_COMMAND) {
 24909:       System.out.printf ("%08x mmuSetSRP(0x%08x)\n", XEiJ.regPC0, mmuSRP);
 24910:     }
 24911:     if (RootPointerList.RTL_ON) {
 24912:       RootPointerList.rtlSetRootPointer (d, true);
 24913:     }
 24914:   }  //mmuSetSRP(int)
 24915: 
 24916:   //  ディスクリプタ
 24917:   //
 24918:   //    ルートテーブルディスクリプタ
 24919:   //      31  30  29  28  27  26  25  24  23  22  21  20  19  18  17  16  15  14  13  12  11  10   9   8   7   6   5   4   3   2   1   0
 24920:   //    ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┯━━━━━━━━━┯━┯━┯━━━┓
 24921:   //    ┃                                 ポインタテーブルアドレス                                 │         X        │ U│ W│  UDT ┃
 24922:   //    ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┷━━━━━━━━━┷━┷━┷━━━┛
 24923:   //
 24924:   //    4KBポインタテーブルディスクリプタ
 24925:   //      31  30  29  28  27  26  25  24  23  22  21  20  19  18  17  16  15  14  13  12  11  10   9   8   7   6   5   4   3   2   1   0
 24926:   //    ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┯━━━┯━┯━┯━━━┓
 24927:   //    ┃                                        ページテーブルアドレス                                        │   X  │ U│ W│  UDT ┃
 24928:   //    ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┷━━━┷━┷━┷━━━┛
 24929:   //
 24930:   //    8KBポインタテーブルディスクリプタ
 24931:   //      31  30  29  28  27  26  25  24  23  22  21  20  19  18  17  16  15  14  13  12  11  10   9   8   7   6   5   4   3   2   1   0
 24932:   //    ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┯━┯━┯━┯━━━┓
 24933:   //    ┃                                          ページテーブルアドレス                                          │ X│ U│ W│  UDT ┃
 24934:   //    ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┷━┷━┷━┷━━━┛
 24935:   //
 24936:   //    4KBページテーブルディスクリプタ
 24937:   //      31  30  29  28  27  26  25  24  23  22  21  20  19  18  17  16  15  14  13  12  11  10   9   8   7   6   5   4   3   2   1   0
 24938:   //    ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┯━┯━┯━┯━┯━┯━━━┯━┯━┯━┯━━━┓
 24939:   //    ┃                              物理ページアドレス                              │UR│ G│U1│U0│ S│  CM  │ M│ U│ W│  PDT ┃
 24940:   //    ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┷━┷━┷━┷━┷━┷━━━┷━┷━┷━┷━━━┛
 24941:   //
 24942:   //    8KBページテーブルディスクリプタ
 24943:   //      31  30  29  28  27  26  25  24  23  22  21  20  19  18  17  16  15  14  13  12  11  10   9   8   7   6   5   4   3   2   1   0
 24944:   //    ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┯━┯━┯━┯━┯━┯━┯━━━┯━┯━┯━┯━━━┓
 24945:   //    ┃                            物理ページアドレス                            │UR│UR│ G│U1│U0│ S│  CM  │ M│ U│ W│  PDT ┃
 24946:   //    ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┷━┷━┷━┷━┷━┷━┷━━━┷━┷━┷━┷━━━┛
 24947:   //
 24948:   //    間接ページテーブルディスクリプタ
 24949:   //      31  30  29  28  27  26  25  24  23  22  21  20  19  18  17  16  15  14  13  12  11  10   9   8   7   6   5   4   3   2   1   0
 24950:   //    ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┯━━━┓
 24951:   //    ┃                                             ページディスクリプタアドレス                                             │  PDT ┃
 24952:   //    ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┷━━━┛
 24953:   public static final int MMU_DESCRIPTOR_POINTER_TABLE_ADDRESS  = -1 <<  9;  //x  Pointer Table Address
 24954:   public static final int MMU_DESCRIPTOR_PAGE_TABLE_ADDRESS_4KB = -1 <<  6;  //x  Page Table Address (4KB)
 24955:   public static final int MMU_DESCRIPTOR_PAGE_TABLE_ADDRESS_8KB = -1 <<  5;  //x  Page Table Address (8KB)
 24956:   public static final int MMU_DESCRIPTOR_GLOBAL                 =  1 << 10;  //x  G    Global
 24957:   public static final int MMU_DESCRIPTOR_SUPERVISOR_PROTECTED   =  1 <<  7;  //x  S    Supervisor Protected
 24958:   public static final int MMU_DESCRIPTOR_MODIFIED               =  1 <<  4;  //x  M    Modified
 24959:   public static final int MMU_DESCRIPTOR_USED                   =  1 <<  3;  //x  U    Used
 24960:   public static final int MMU_DESCRIPTOR_WRITE_PROTECTED        =  1 <<  2;  //x  W    Write Protected
 24961:   public static final int MMU_DESCRIPTOR_UDT                    =  2 <<  0;  //x  UDT  Upper Level Descriptor Type
 24962:   public static final int MMU_DESCRIPTOR_PDT                    =  3 <<  0;  //x  PDT  Page Descriptor Type
 24963:   public static final int MMU_DESCRIPTOR_TYPE_INVALID           =  0 <<  0;  //          Invalid
 24964:   public static final int MMU_DESCRIPTOR_TYPE_INDIRECT          =  2 <<  0;  //          Indirect
 24965:   public static final int MMU_DESCRIPTOR_INDIRECT_ADDRESS       = -1 <<  2;  //x  Descriptor Address
 24966: 
 24967:   //--------------------------------------------------------------------------------
 24968:   //アドレス変換キャッシュ
 24969:   //
 24970:   //  構造
 24971:   //    ユーザモード
 24972:   //      ライン0
 24973:   //        エントリ0
 24974:   //          [0]  論理ページアドレス。リード用。1=無効
 24975:   //          [1]  論理ページアドレス。ライト用。修正済みかつライトプロテクトされていないときだけ有効。1=無効
 24976:   //          [2]  物理ページアドレス。1=無効
 24977:   //          [3]  グローバルフラグ。-1=Global,0=NonGlobal,1=無効
 24978:   //        エントリ1
 24979:   //        エントリ2
 24980:   //        エントリ3
 24981:   //      ライン1
 24982:   //          :
 24983:   //      ライン63
 24984:   //    スーパーバイザモード
 24985:   //      ライン0
 24986:   //        エントリ0
 24987:   //          [0]  論理ページアドレス。リード用。1=無効
 24988:   //          [1]  論理ページアドレス。ライト用。修正済みかつライトプロテクトされていないときだけ有効。1=無効
 24989:   //          [2]  物理ページアドレス。1=無効
 24990:   //          [3]  グローバルフラグ。-1=Global,0=NonGlobal,1=無効
 24991:   //        エントリ1
 24992:   //        エントリ2
 24993:   //        エントリ3
 24994:   //      ライン1
 24995:   //          :
 24996:   //      ライン63
 24997:   //
 24998:   //  ハッシュ関数
 24999:   //    次の関数で32bitの論理ページアドレスを6bitのライン番号に変換する
 25000:   //      a * 0x5efc103f >>> 26
 25001:   //    32bitの中に幅6bit以内で6bitまでセットする組み合わせは1+1+2+4+8+16+32*27=896通りあるが、
 25002:   //    それらをa*x>>>26で0~63になるべく均一に分散させる係数を2^32通りの中から探して以下の24個を得た
 25003:   //      0x5efbf041  0x5efc0fc1  0x5efc103f  0x5f03efc1  0x5f03f03f  0x5f040fbf
 25004:   //      0x60fbf041  0x60fc0fc1  0x60fc103f  0x6103efc1  0x6103f03f  0x61040fbf
 25005:   //      0x9efbf041  0x9efc0fc1  0x9efc103f  0x9f03efc1  0x9f03f03f  0x9f040fbf
 25006:   //      0xa0fbf041  0xa0fc0fc1  0xa0fc103f  0xa103efc1  0xa103f03f  0xa1040fbf
 25007:   //    この中で(0..63)<<12と(0..63)<<13がそれぞれすべて分離するのは
 25008:   //      0x5efc103f
 25009:   //      0x60fc103f
 25010:   //      0x9efc103f
 25011:   //      0xa0fc103f
 25012:   //    この4個はほぼ同じパターンなので0x5efc103fを係数として用いることにする
 25013:   //      perl -e "for$x(0x5efc103f){printf'  //        0x%x%c',$x,10;for$b(7..15){@c=(0)x64;for$n(0..63){$a=$n<<$b;$c[$a*$x>>26&63]++;}printf'  //        %2d %s%c',$b,join('',@c),10;}}"
 25014:   //      0x5efc103f
 25015:   //       7 2111111111111111111111111111111101111111111111111111111111111111
 25016:   //       8 1111111111111111111111111111111111111111111111111111111111111111
 25017:   //       9 1111111111111111111111111111111111111111111111111111111111111111
 25018:   //      10 1111111111111111111111111111111111111111111111111111111111111111
 25019:   //      11 1111111111111111111111111111111111111111111111111111111111111111
 25020:   //      12 1111111111111111111111111111111111111111111111111111111111111111
 25021:   //      13 1111111111111111111111111111111111111111111111111111111111111111
 25022:   //      14 1111111111111111111111111111111111111111111111111111111111111111
 25023:   //      15 2011111111111111111111111111111111111111111111111111111111111111
 25024:   //    ページサイズが2^8=256バイトから2^14=16384バイトまで、それぞれ先頭の64ページがすべて異なるハッシュ値を持つことがわかる
 25025:   //
 25026:   //  1wayセットアソシアティブ
 25027:   //    ハッシュ値が衝突したときの速度低下を抑えるため4waysにしてみたが効果がなさそうなので1wayに戻してある
 25028:   //    ハッシュ関数を工夫してあるので4waysにしてもほとんどの場合は1番目でヒットするか4番目まですべてミスするかのどちらかになる
 25029:   //    1wayを4waysにするとミスしたときの条件分岐が1回から4回に増えてテーブルサーチの開始が遅れる
 25030:   //    2ways以上では参照するときに1番目に比較するエントリとアロケートするときに押し出すエントリを適切に選択するための仕組みが必要
 25031:   //
 25032:   //  LRU(least recently used)方式(2ways以上の場合)
 25033:   //    アロケートはラインの中で最も古いエントリを切り捨てて最も新しいエントリを追加する方法で行う
 25034:   //    アドレス変換キャッシュは最も新しいエントリが繰り返しアクセスされる場合が多く、ハッシュ関数で十分に分散させられているので、
 25035:   //    ここではエントリを常に新しい順にソートしておく方法を用いる
 25036:   //    2番目以降のエントリがヒットしたときエントリを並べ替えなければならないので遅くなるが、1番目のヒット率が十分に高ければ問題ない
 25037:   //
 25038:   //  グローバルフラグ
 25039:   //    関連する命令
 25040:   //      PFLUSHA       アドレス変換キャッシュのすべてのエントリを無効化する
 25041:   //      PFLUSHAN      アドレス変換キャッシュのNonGlobalなエントリを無効化する
 25042:   //      PFLUSH (An)   アドレス変換キャッシュの、DFC=1またはDFC=2ならばユーザモード、DFC=5またはDFC=6ならばスーパーバイザモードの、
 25043:   //                    論理ページアドレスがAnのエントリを無効化する
 25044:   //      PFLUSHN (An)  アドレス変換キャッシュの、DFC=1またはDFC=2ならばユーザモード、DFC=5またはDFC=6ならばスーパーバイザモードの、
 25045:   //                    論理ページアドレスがAnかつNonGlobalのエントリを無効化する
 25046:   //    グローバルフラグはこれらの命令の動作を変更する以外の機能を持たない
 25047:   //
 25048:   public static final int MMU_HASH_BITS = 6;
 25049:   public static final int MMU_HASH_SIZE = 1 << MMU_HASH_BITS;
 25050:   public static final int MMU_HASH_COEFF = 0x5efc103f;  //ハッシュ関数の係数
 25051:   public static final int MMU_CACHE_WAYS = 1;  //1=1way,4=4waysセットアソシアティブ
 25052:   public static final int[] mmuUserDataCache = new int[4 * MMU_CACHE_WAYS * MMU_HASH_SIZE];
 25053:   public static final int[] mmuUserCodeCache = new int[4 * MMU_CACHE_WAYS * MMU_HASH_SIZE];
 25054:   public static final int[] mmuSuperDataCache = new int[4 * MMU_CACHE_WAYS * MMU_HASH_SIZE];
 25055:   public static final int[] mmuSuperCodeCache = new int[4 * MMU_CACHE_WAYS * MMU_HASH_SIZE];
 25056: 
 25057:   //mmuInvalidateAllCache ()
 25058:   //  PFLUSHA
 25059:   //  アドレス変換キャッシュのすべてのエントリを無効化する
 25060:   public static void mmuInvalidateAllCache () {
 25061:     Arrays.fill (mmuUserDataCache, 1);
 25062:     Arrays.fill (mmuUserCodeCache, 1);
 25063:     Arrays.fill (mmuSuperDataCache, 1);
 25064:     Arrays.fill (mmuSuperCodeCache, 1);
 25065:   }  //mmuInvalidateAllCache()
 25066: 
 25067:   //mmuInvalidateAllNonGlobalCache ()
 25068:   //  PFLUSHAN
 25069:   //  アドレス変換キャッシュのNonGlobalなエントリを無効化する
 25070:   public static void mmuInvalidateAllNonGlobalCache () {
 25071:     for (int i = 0; i < 4 * MMU_CACHE_WAYS * MMU_HASH_SIZE; i += 4) {
 25072:       if (mmuUserDataCache[i + 3] == 0) {  //エントリが有効かつNonGlobal
 25073:         mmuUserDataCache[i] = mmuUserDataCache[i + 1] = mmuUserDataCache[i + 2] = mmuUserDataCache[i + 3] = 1;
 25074:       }
 25075:       if (mmuUserCodeCache[i + 3] == 0) {  //エントリが有効かつNonGlobal
 25076:         mmuUserCodeCache[i] = mmuUserCodeCache[i + 1] = mmuUserCodeCache[i + 2] = mmuUserCodeCache[i + 3] = 1;
 25077:       }
 25078:       if (mmuSuperDataCache[i + 3] == 0) {  //エントリが有効かつNonGlobal
 25079:         mmuSuperDataCache[i] = mmuSuperDataCache[i + 1] = mmuSuperDataCache[i + 2] = mmuSuperDataCache[i + 3] = 1;
 25080:       }
 25081:       if (mmuSuperCodeCache[i + 3] == 0) {  //エントリが有効かつNonGlobal
 25082:         mmuSuperCodeCache[i] = mmuSuperCodeCache[i + 1] = mmuSuperCodeCache[i + 2] = mmuSuperCodeCache[i + 3] = 1;
 25083:       }
 25084:     }
 25085:   }  //mmuInvalidateAllNonGlobalCache()
 25086: 
 25087:   //mmuInvalidateCache (a)
 25088:   //  PFLUSH (An)
 25089:   //  アドレス変換キャッシュの、DFC=1またはDFC=2ならばユーザモード、DFC=5またはDFC=6ならばスーパーバイザモードの、
 25090:   //  論理ページアドレスがAnのエントリを無効化する
 25091:   public static void mmuInvalidateCache (int a) {
 25092:     int logicalPage = a & mmuPageAddressMask;
 25093:     boolean supervisor = (0b10011111 << 24 << XEiJ.mpuDFC) < 0;
 25094:     boolean instruction = (0b00101010 << 24 << XEiJ.mpuDFC) < 0;
 25095:     int[] cache = (supervisor ?
 25096:                    instruction ? mmuSuperCodeCache : mmuSuperDataCache :
 25097:                    instruction ? mmuUserCodeCache : mmuUserDataCache);
 25098:     int head = (logicalPage * MMU_HASH_COEFF >>> -MMU_HASH_BITS) * (4 * MMU_CACHE_WAYS);  //先頭のエントリ
 25099:     if (MMU_CACHE_WAYS == 1) {  //1way
 25100:       if (cache[head] == logicalPage) {  //エントリが有効かつ論理ページアドレスがAn
 25101:         cache[head] = cache[head + 1] = cache[head + 2] = cache[head + 3] = 1;  //末尾を空ける
 25102:         return;
 25103:       }
 25104:     } else {  //2ways以上
 25105:       int tail = head + (4 * MMU_CACHE_WAYS - 4);  //末尾のエントリ
 25106:       for (int i = head; i <= tail; i += 4) {
 25107:         if (cache[i] == logicalPage) {  //エントリが有効かつ論理ページアドレスがAn
 25108:           for (int j = i; j < tail; j += 4) {  //後ろを詰める
 25109:             cache[j    ] = cache[j + 4];
 25110:             cache[j + 1] = cache[j + 5];
 25111:             cache[j + 2] = cache[j + 6];
 25112:             cache[j + 3] = cache[j + 7];
 25113:           }
 25114:           cache[tail] = cache[tail + 1] = cache[tail + 2] = cache[tail + 3] = 1;  //末尾を空ける
 25115:           return;
 25116:         }
 25117:       }
 25118:     }
 25119:   }  //mmuInvalidateCache(int)
 25120: 
 25121:   //mmuInvalidateNonGlobalCache (a)
 25122:   //  PFLUSHN (An)
 25123:   //  アドレス変換キャッシュの、DFC=1またはDFC=2ならばユーザモード、DFC=5またはDFC=6ならばスーパーバイザモードの、
 25124:   //  論理ページアドレスがAnかつNonGlobalのエントリを無効化する
 25125:   public static void mmuInvalidateNonGlobalCache (int a) {
 25126:     int logicalPage = a & mmuPageAddressMask;
 25127:     boolean supervisor = (0b10011111 << 24 << XEiJ.mpuDFC) < 0;
 25128:     boolean instruction = (0b00101010 << 24 << XEiJ.mpuDFC) < 0;
 25129:     int[] cache = (supervisor ?
 25130:                    instruction ? mmuSuperCodeCache : mmuSuperDataCache :
 25131:                    instruction ? mmuUserCodeCache : mmuUserDataCache);
 25132:     int head = (logicalPage * MMU_HASH_COEFF >>> -MMU_HASH_BITS) * (4 * MMU_CACHE_WAYS);  //先頭のエントリ
 25133:     if (MMU_CACHE_WAYS == 1) {  //1way
 25134:       if (cache[head] == logicalPage) {  //エントリが有効かつ論理ページアドレスがAn
 25135:         if (cache[head + 3] == 0) {  //エントリが有効かつNonGlobal
 25136:           cache[head] = cache[head + 1] = cache[head + 2] = cache[head + 3] = 1;  //末尾を空ける
 25137:         }
 25138:         return;  //論理ページアドレスがAnのエントリは1つだけなのでそれがNonGlobalでなければ何もしないで終了する
 25139:       }
 25140:     } else {  //2ways以上
 25141:       int tail = head + (4 * MMU_CACHE_WAYS - 4);  //末尾のエントリ
 25142:       for (int i = head; i <= tail; i += 4) {
 25143:         if (cache[i] == logicalPage) {  //エントリが有効かつ論理ページアドレスがAn
 25144:           if (cache[i + 3] == 0) {  //エントリが有効かつNonGlobal
 25145:             for (int j = i; j < tail; j += 4) {  //後ろを詰める
 25146:               cache[j    ] = cache[j + 4];
 25147:               cache[j + 1] = cache[j + 5];
 25148:               cache[j + 2] = cache[j + 6];
 25149:               cache[j + 3] = cache[j + 7];
 25150:             }
 25151:             cache[tail] = cache[tail + 1] = cache[tail + 2] = cache[tail + 3] = 1;  //末尾を空ける
 25152:           }
 25153:           return;  //論理ページアドレスがAnのエントリは1つだけなのでそれがNonGlobalでなければ何もしないで終了する
 25154:         }
 25155:       }
 25156:     }
 25157:   }  //mmuInvalidateNonGlobalCache(int)
 25158: 
 25159:   //--------------------------------------------------------------------------------
 25160:   //初期化
 25161: 
 25162:   //mmuInit ()
 25163:   //  初期化
 25164:   public static void mmuInit () {
 25165:     mmuUserDataTransparent = new int[256];
 25166:     mmuUserCodeTransparent = new int[256];
 25167:     mmuSuperDataTransparent = new int[256];
 25168:     mmuSuperCodeTransparent = new int[256];
 25169:     mmuUserDataDifference = new int[256];
 25170:     mmuUserCodeDifference = new int[256];
 25171:     mmuSuperDataDifference = new int[256];
 25172:     mmuSuperCodeDifference = new int[256];
 25173:     mmuReset ();
 25174:   }  //mmuInit()
 25175: 
 25176:   //mmuReset ()
 25177:   //  リセット
 25178:   public static void mmuReset () {
 25179:     mmuSetDataTransparent (0, 0);
 25180:     mmuSetCodeTransparent (0, 0);
 25181:     mmuSetTCR (0);
 25182:   }  //mmuReset()
 25183: 
 25184:   //--------------------------------------------------------------------------------
 25185:   //バスアクセス
 25186:   //
 25187:   //    ByteSign  byte  バイト符号拡張
 25188:   //    ByteZero  int   バイトゼロ拡張
 25189:   //    WordSign  int   ワード符号拡張
 25190:   //    WordZero  int   ワードゼロ拡張
 25191:   //    Long      int   ロング
 25192:   //    Quad      long  クワッド
 25193:   //
 25194:   //    Data    データ  1  先頭
 25195:   //    Second  データ  1  2番目
 25196:   //    Even    データ  2  先頭
 25197:   //    Four    データ  4  先頭
 25198:   //    Code    コード  2  先頭
 25199:   //    Opword  コード  2  先頭(命令ワード)
 25200:   //    Exword  コード  2  2番目(拡張ワード)
 25201:   //
 25202:   //  バイト
 25203:   //       0   1   2   3   4   5   6   7   8   9  10  11  12  13  14  15
 25204:   //    ┳━┯━┯━┯━┳━┯━┯━┯━┳━┯━┯━┯━┳━┯━┯━┯━┳
 25205:   //    ┃  │  │  │  ┃  │  │  │  ┃  │  │  │  ┃  │  │  │  ┃
 25206:   //    ┻━┷━┷━┷━┻━┷━┷━┷━┻━┷━┷━┷━┻━┷━┷━┷━┻
 25207:   //    ┏━┓
 25208:   //    ┃ B┃
 25209:   //    ┗━┛
 25210:   //        0
 25211:   //
 25212:   //  ワード
 25213:   //    偶数
 25214:   //       0   1   2   3   4   5   6   7   8   9  10  11  12  13  14  15
 25215:   //    ┳━┯━┯━┯━┳━┯━┯━┯━┳━┯━┯━┯━┳━┯━┯━┯━┳
 25216:   //    ┃  │  │  │  ┃  │  │  │  ┃  │  │  │  ┃  │  │  │  ┃
 25217:   //    ┻━┷━┷━┷━┻━┷━┷━┷━┻━┷━┷━┷━┻━┷━┷━┷━┻
 25218:   //    ┏━━━┓
 25219:   //    ┃   W  ┃
 25220:   //    ┗━━━┛
 25221:   //            0
 25222:   //    奇数
 25223:   //      -1   0   1   2   3   4   5   6   7   8   9  10  11  12  13  14
 25224:   //    ┳━┯━┯━┯━┳━┯━┯━┯━┳━┯━┯━┯━┳━┯━┯━┯━┳
 25225:   //    ┃  │  │  │  ┃  │  │  │  ┃  │  │  │  ┃  │  │  │  ┃
 25226:   //    ┻━┷━┷━┷━┻━┷━┷━┷━┻━┷━┷━┷━┻━┷━┷━┷━┻
 25227:   //        ┏━┳━┓
 25228:   //        ┃ B┃ B┃
 25229:   //        ┗━┻━┛
 25230:   //            8   0
 25231:   //
 25232:   //  ロング
 25233:   //    4の倍数
 25234:   //       0   1   2   3   4   5   6   7   8   9  10  11  12  13  14  15
 25235:   //    ┳━┯━┯━┯━┳━┯━┯━┯━┳━┯━┯━┯━┳━┯━┯━┯━┳
 25236:   //    ┃  │  │  │  ┃  │  │  │  ┃  │  │  │  ┃  │  │  │  ┃
 25237:   //    ┻━┷━┷━┷━┻━┷━┷━┷━┻━┷━┷━┷━┻━┷━┷━┷━┻
 25238:   //    ┏━━━━━━━┓
 25239:   //    ┃       L      ┃
 25240:   //    ┗━━━━━━━┛
 25241:   //                    0
 25242:   //    4の倍数+1
 25243:   //      -1   0   1   2   3   4   5   6   7   8   9  10  11  12  13  14
 25244:   //    ┳━┯━┯━┯━┳━┯━┯━┯━┳━┯━┯━┯━┳━┯━┯━┯━┳
 25245:   //    ┃  │  │  │  ┃  │  │  │  ┃  │  │  │  ┃  │  │  │  ┃
 25246:   //    ┻━┷━┷━┷━┻━┷━┷━┷━┻━┷━┷━┷━┻━┷━┷━┷━┻
 25247:   //        ┏━┳━━━┳━┓
 25248:   //        ┃ B┃   W  ┃ B┃
 25249:   //        ┗━┻━━━┻━┛
 25250:   //           24       8   0
 25251:   //    4の倍数+2
 25252:   //      -2  -1   0   1   2   3   4   5   6   7   8   9  10  11  12  13
 25253:   //    ┳━┯━┯━┯━┳━┯━┯━┯━┳━┯━┯━┯━┳━┯━┯━┯━┳
 25254:   //    ┃  │  │  │  ┃  │  │  │  ┃  │  │  │  ┃  │  │  │  ┃
 25255:   //    ┻━┷━┷━┷━┻━┷━┷━┷━┻━┷━┷━┷━┻━┷━┷━┷━┻
 25256:   //            ┏━━━┳━━━┓
 25257:   //            ┃   W  ┃   W  ┃
 25258:   //            ┗━━━┻━━━┛
 25259:   //                   16       0
 25260:   //    4の倍数+3
 25261:   //      -3  -2  -1   0   1   2   3   4   5   6   7   8   9  10  11  12
 25262:   //    ┳━┯━┯━┯━┳━┯━┯━┯━┳━┯━┯━┯━┳━┯━┯━┯━┳
 25263:   //    ┃  │  │  │  ┃  │  │  │  ┃  │  │  │  ┃  │  │  │  ┃
 25264:   //    ┻━┷━┷━┷━┻━┷━┷━┷━┻━┷━┷━┷━┻━┷━┷━┷━┻
 25265:   //                ┏━┳━━━┳━┓
 25266:   //                ┃ B┃   W  ┃ B┃
 25267:   //                ┗━┻━━━┻━┛
 25268:   //                   24       8   0
 25269:   //
 25270:   //  クワッド
 25271:   //    4の倍数
 25272:   //       0   1   2   3   4   5   6   7   8   9  10  11  12  13  14  15
 25273:   //    ┳━┯━┯━┯━┳━┯━┯━┯━┳━┯━┯━┯━┳━┯━┯━┯━┳
 25274:   //    ┃  │  │  │  ┃  │  │  │  ┃  │  │  │  ┃  │  │  │  ┃
 25275:   //    ┻━┷━┷━┷━┻━┷━┷━┷━┻━┷━┷━┷━┻━┷━┷━┷━┻
 25276:   //    ┏━━━━━━━┳━━━━━━━┓
 25277:   //    ┃       L      ┃       L      ┃
 25278:   //    ┗━━━━━━━┻━━━━━━━┛
 25279:   //                   32               0
 25280:   //    4の倍数+1
 25281:   //      -1   0   1   2   3   4   5   6   7   8   9  10  11  12  13  14
 25282:   //    ┳━┯━┯━┯━┳━┯━┯━┯━┳━┯━┯━┯━┳━┯━┯━┯━┳
 25283:   //    ┃  │  │  │  ┃  │  │  │  ┃  │  │  │  ┃  │  │  │  ┃
 25284:   //    ┻━┷━┷━┷━┻━┷━┷━┷━┻━┷━┷━┷━┻━┷━┷━┷━┻
 25285:   //        ┏━┳━━━┳━━━━━━━┳━┓
 25286:   //        ┃ B┃   W  ┃       L      ┃ B┃
 25287:   //        ┗━┻━━━┻━━━━━━━┻━┛
 25288:   //           56      40               8   0
 25289:   //    4の倍数+2
 25290:   //      -2  -1   0   1   2   3   4   5   6   7   8   9  10  11  12  13
 25291:   //    ┳━┯━┯━┯━┳━┯━┯━┯━┳━┯━┯━┯━┳━┯━┯━┯━┳
 25292:   //    ┃  │  │  │  ┃  │  │  │  ┃  │  │  │  ┃  │  │  │  ┃
 25293:   //    ┻━┷━┷━┷━┻━┷━┷━┷━┻━┷━┷━┷━┻━┷━┷━┷━┻
 25294:   //            ┏━━━┳━━━━━━━┳━━━┓
 25295:   //            ┃   W  ┃       L      ┃   W  ┃
 25296:   //            ┗━━━┻━━━━━━━┻━━━┛
 25297:   //                   48              16       0
 25298:   //    4の倍数+3
 25299:   //      -3  -2  -1   0   1   2   3   4   5   6   7   8   9  10  11  12
 25300:   //    ┳━┯━┯━┯━┳━┯━┯━┯━┳━┯━┯━┯━┳━┯━┯━┯━┳
 25301:   //    ┃  │  │  │  ┃  │  │  │  ┃  │  │  │  ┃  │  │  │  ┃
 25302:   //    ┻━┷━┷━┷━┻━┷━┷━┷━┻━┷━┷━┷━┻━┷━┷━┷━┻
 25303:   //                ┏━┳━━━━━━━┳━━━┳━┓
 25304:   //                ┃ B┃       L      ┃   W  ┃ B┃
 25305:   //                ┗━┻━━━━━━━┻━━━┻━┛
 25306:   //                   56              24       8   0
 25307:   //
 25308: 
 25309:   //--------------------------------------------------------------------------------
 25310:   //ピーク
 25311:   //  デバッガ用
 25312:   //  エラーや副作用なしでリードする
 25313:   //  アドレス変換はピーク
 25314:   //  ページフォルトやバスエラーのときは-1をキャストした値を返す
 25315: 
 25316:   //d = mmuPeekByteSign (a, f)
 25317:   //  ピークバイト符号拡張
 25318:   public static byte mmuPeekByteSign (int a, int f) {
 25319:     f = f == -1 ? XEiJ.regSRS != 0 ? 5 : 1 : f & 7;
 25320:     MemoryMappedDevice[] mm = (DataBreakPoint.DBP_ON ?
 25321:                                (f & 4) != 0 ? DataBreakPoint.dbpSuperMap : DataBreakPoint.dbpUserMap :
 25322:                                (f & 4) != 0 ? XEiJ.busSuperMap : XEiJ.busUserMap);
 25323:     //    01234567
 25324:     if (0b01100110 << 24 << f < 0) {  //SFC=1,2,5,6。アドレス変換あり
 25325:       int a0 = mmuTranslatePeek (a, f & 4, f & 2);
 25326:       return (a ^ a0) != 1 ? mm[a0 >>> XEiJ.BUS_PAGE_BITS].mmdPbs (a0) : -1;
 25327:     } else if (f != 7) {  //SFC=0,3,4。アドレス変換なし
 25328:       return mm[a >>> XEiJ.BUS_PAGE_BITS].mmdPbs (a);
 25329:     } else {
 25330:       return -1;
 25331:     }
 25332:   }  //mmuPeekByteSign(int,int)
 25333: 
 25334:   //d = mmuPeekByteSignData (a, supervisor)
 25335:   //  ピークバイト符号拡張(データ)
 25336:   public static byte mmuPeekByteSignData (int a, int supervisor) {
 25337:     MemoryMappedDevice[] mm = supervisor != 0 ? DataBreakPoint.DBP_ON ? DataBreakPoint.dbpSuperMap : XEiJ.busSuperMap : DataBreakPoint.DBP_ON ? DataBreakPoint.dbpUserMap : XEiJ.busUserMap;
 25338:     int a0 = mmuTranslatePeek (a, supervisor, 0);
 25339:     return (a ^ a0) == 1 ? -1 : mm[a0 >>> XEiJ.BUS_PAGE_BITS].mmdPbs (a0);
 25340:   }  //mmuPeekByteSignData(int,int)
 25341: 
 25342:   //d = mmuPeekByteSignCode (a, supervisor)
 25343:   //  ピークバイト符号拡張(コード)
 25344:   public static byte mmuPeekByteSignCode (int a, int supervisor) {
 25345:     MemoryMappedDevice[] mm = supervisor != 0 ? DataBreakPoint.DBP_ON ? DataBreakPoint.dbpSuperMap : XEiJ.busSuperMap : DataBreakPoint.DBP_ON ? DataBreakPoint.dbpUserMap : XEiJ.busUserMap;
 25346:     int a0 = mmuTranslatePeek (a, supervisor, 1);
 25347:     return (a ^ a0) == 1 ? -1 : mm[a0 >>> XEiJ.BUS_PAGE_BITS].mmdPbs (a0);
 25348:   }  //mmuPeekByteSignCode(int,int)
 25349: 
 25350:   //d = mmuPeekByteZeroData (a, supervisor)
 25351:   //  ピークバイトゼロ拡張(データ)
 25352:   public static int mmuPeekByteZeroData (int a, int supervisor) {
 25353:     MemoryMappedDevice[] mm = supervisor != 0 ? DataBreakPoint.DBP_ON ? DataBreakPoint.dbpSuperMap : XEiJ.busSuperMap : DataBreakPoint.DBP_ON ? DataBreakPoint.dbpUserMap : XEiJ.busUserMap;
 25354:     int a0 = mmuTranslatePeek (a, supervisor, 0);
 25355:     return (a ^ a0) == 1 ? 255 : mm[a0 >>> XEiJ.BUS_PAGE_BITS].mmdPbz (a0);
 25356:   }  //mmuPeekByteZeroData(int,int)
 25357: 
 25358:   //d = mmuPeekByteZeroCode (a, supervisor)
 25359:   //  ピークバイトゼロ拡張(コード)
 25360:   public static int mmuPeekByteZeroCode (int a, int supervisor) {
 25361:     MemoryMappedDevice[] mm = supervisor != 0 ? DataBreakPoint.DBP_ON ? DataBreakPoint.dbpSuperMap : XEiJ.busSuperMap : DataBreakPoint.DBP_ON ? DataBreakPoint.dbpUserMap : XEiJ.busUserMap;
 25362:     int a0 = mmuTranslatePeek (a, supervisor, 1);
 25363:     return (a ^ a0) == 1 ? 255 : mm[a0 >>> XEiJ.BUS_PAGE_BITS].mmdPbz (a0);
 25364:   }  //mmuPeekByteZeroCode(int,int)
 25365: 
 25366:   //d = mmuPeekWordSign (a, f)
 25367:   //  ピークワード符号拡張
 25368:   public static int mmuPeekWordSign (int a, int f) {
 25369:     f = f == -1 ? XEiJ.regSRS != 0 ? 5 : 1 : f & 7;
 25370:     MemoryMappedDevice[] mm = (DataBreakPoint.DBP_ON ?
 25371:                                (f & 4) != 0 ? DataBreakPoint.dbpSuperMap : DataBreakPoint.dbpUserMap :
 25372:                                (f & 4) != 0 ? XEiJ.busSuperMap : XEiJ.busUserMap);
 25373:     //    01234567
 25374:     if (0b01100110 << 24 << f < 0) {  //SFC=1,2,5,6。アドレス変換あり
 25375:       int a0 = mmuTranslatePeek (a, f & 4, f & 2);
 25376:       if ((a & 1) == 0) {  //偶数
 25377:         return (a ^ a0) != 1 ? mm[a0 >>> XEiJ.BUS_PAGE_BITS].mmdPws (a0) : -1;
 25378:       } else {  //奇数
 25379:         int a1 = mmuTranslatePeek (a + 1, f & 4, f & 2);
 25380:         return (((a     ^ a0) != 1 ? mm[a0 >>> XEiJ.BUS_PAGE_BITS].mmdPbs (a0) :  -1) << 8 |
 25381:                 ((a + 1 ^ a1) != 1 ? mm[a1 >>> XEiJ.BUS_PAGE_BITS].mmdPbz (a1) : 255));
 25382:       }
 25383:     } else if (f != 7) {  //SFC=0,3,4。アドレス変換なし
 25384:       if ((a & 1) == 0) {  //偶数
 25385:         return mm[a >>> XEiJ.BUS_PAGE_BITS].mmdPws (a);
 25386:       } else {  //奇数
 25387:         return (mm[a     >>> XEiJ.BUS_PAGE_BITS].mmdPbs (a    ) << 8 |
 25388:                 mm[a + 1 >>> XEiJ.BUS_PAGE_BITS].mmdPbz (a + 1));
 25389:       }
 25390:     } else {
 25391:       return -1;
 25392:     }
 25393:   }  //mmuPeekWordSign(int,int)
 25394: 
 25395:   //d = mmuPeekWordSignData (a, supervisor)
 25396:   //  ピークワード符号拡張(データ)
 25397:   public static int mmuPeekWordSignData (int a, int supervisor) {
 25398:     MemoryMappedDevice[] mm = supervisor != 0 ? DataBreakPoint.DBP_ON ? DataBreakPoint.dbpSuperMap : XEiJ.busSuperMap : DataBreakPoint.DBP_ON ? DataBreakPoint.dbpUserMap : XEiJ.busUserMap;
 25399:     int a0 = mmuTranslatePeek (a, supervisor, 0);  //a+1が必要なので上書き不可
 25400:     if ((a & 1) == 0) {  //偶数
 25401:       return (a0 & 1) != 0 ? -1 : mm[a0 >>> XEiJ.BUS_PAGE_BITS].mmdPws (a0);
 25402:     } else {  //奇数
 25403:       int a1 = mmuTranslatePeek (a + 1, supervisor, 0);
 25404:       return (((a0 & 1) == 0 ?  -1 : mm[a0 >>> XEiJ.BUS_PAGE_BITS].mmdPbs (a0)) << 8 |
 25405:               ((a1 & 1) != 0 ? 255 : mm[a1 >>> XEiJ.BUS_PAGE_BITS].mmdPbz (a1)));
 25406:     }
 25407:   }  //mmuPeekWordSignData(int,int)
 25408: 
 25409:   //d = mmuPeekWordSignEven (a, supervisor)
 25410:   //  ピークワード符号拡張(偶数)
 25411:   public static int mmuPeekWordSignEven (int a, int supervisor) {
 25412:     MemoryMappedDevice[] mm = supervisor != 0 ? DataBreakPoint.DBP_ON ? DataBreakPoint.dbpSuperMap : XEiJ.busSuperMap : DataBreakPoint.DBP_ON ? DataBreakPoint.dbpUserMap : XEiJ.busUserMap;
 25413:     a = mmuTranslatePeek (a, supervisor, 0);
 25414:     return (a & 1) != 0 ? -1 : mm[a >>> XEiJ.BUS_PAGE_BITS].mmdPws (a);
 25415:   }  //mmuPeekWordSignEven(int,int)
 25416: 
 25417:   //d = mmuPeekWordSignCode (a, supervisor)
 25418:   //  ピークワード符号拡張(コード)
 25419:   public static int mmuPeekWordSignCode (int a, int supervisor) {
 25420:     MemoryMappedDevice[] mm = supervisor != 0 ? DataBreakPoint.DBP_ON ? DataBreakPoint.dbpSuperMap : XEiJ.busSuperMap : DataBreakPoint.DBP_ON ? DataBreakPoint.dbpUserMap : XEiJ.busUserMap;
 25421:     a = mmuTranslatePeek (a, supervisor, 1);
 25422:     return (a & 1) != 0 ? -1 : mm[a >>> XEiJ.BUS_PAGE_BITS].mmdPws (a);
 25423:   }  //mmuPeekWordSignCode(int,int)
 25424: 
 25425:   //d = mmuPeekWordZeroData (a, supervisor)
 25426:   //  ピークワードゼロ拡張(データ)
 25427:   public static int mmuPeekWordZeroData (int a, int supervisor) {
 25428:     MemoryMappedDevice[] mm = supervisor != 0 ? DataBreakPoint.DBP_ON ? DataBreakPoint.dbpSuperMap : XEiJ.busSuperMap : DataBreakPoint.DBP_ON ? DataBreakPoint.dbpUserMap : XEiJ.busUserMap;
 25429:     int a0 = mmuTranslatePeek (a, supervisor, 0);  //a+1が必要なので上書き不可
 25430:     if ((a & 1) == 0) {  //偶数
 25431:       return (a0 & 1) != 0 ? 65535 : mm[a0 >>> XEiJ.BUS_PAGE_BITS].mmdPwz (a0);
 25432:     } else {  //奇数
 25433:       int a1 = mmuTranslatePeek (a + 1, supervisor, 0);
 25434:       return (((a0 & 1) == 0 ? 255 : mm[a0 >>> XEiJ.BUS_PAGE_BITS].mmdPbz (a0)) << 8 |
 25435:               ((a1 & 1) != 0 ? 255 : mm[a1 >>> XEiJ.BUS_PAGE_BITS].mmdPbz (a1)));
 25436:     }
 25437:   }  //mmuPeekWordZeroData(int,int)
 25438: 
 25439:   //d = mmuPeekWordZeroEven (a, supervisor)
 25440:   //  ピークワードゼロ拡張(偶数)
 25441:   public static int mmuPeekWordZeroEven (int a, int supervisor) {
 25442:     MemoryMappedDevice[] mm = supervisor != 0 ? DataBreakPoint.DBP_ON ? DataBreakPoint.dbpSuperMap : XEiJ.busSuperMap : DataBreakPoint.DBP_ON ? DataBreakPoint.dbpUserMap : XEiJ.busUserMap;
 25443:     a = mmuTranslatePeek (a, supervisor, 0);
 25444:     return (a & 1) != 0 ? 65535 : mm[a >>> XEiJ.BUS_PAGE_BITS].mmdPwz (a);
 25445:   }  //mmuPeekWordZeroEven(int,int)
 25446: 
 25447:   //d = mmuPeekWordZeroCode (a, supervisor)
 25448:   //  ピークワードゼロ拡張(コード)
 25449:   public static int mmuPeekWordZeroCode (int a, int supervisor) {
 25450:     MemoryMappedDevice[] mm = supervisor != 0 ? DataBreakPoint.DBP_ON ? DataBreakPoint.dbpSuperMap : XEiJ.busSuperMap : DataBreakPoint.DBP_ON ? DataBreakPoint.dbpUserMap : XEiJ.busUserMap;
 25451:     a = mmuTranslatePeek (a, supervisor, 1);
 25452:     return (a & 1) != 0 ? 65535 : mm[a >>> XEiJ.BUS_PAGE_BITS].mmdPwz (a);
 25453:   }  //mmuPeekWordZeroCode(int,int)
 25454: 
 25455:   //d = mmuPeekLong (a, f)
 25456:   //  ピークロング
 25457:   public static int mmuPeekLong (int a, int f) {
 25458:     f = f == -1 ? XEiJ.regSRS != 0 ? 5 : 1 : f & 7;
 25459:     MemoryMappedDevice[] mm = (DataBreakPoint.DBP_ON ?
 25460:                                (f & 4) != 0 ? DataBreakPoint.dbpSuperMap : DataBreakPoint.dbpUserMap :
 25461:                                (f & 4) != 0 ? XEiJ.busSuperMap : XEiJ.busUserMap);
 25462:     //    01234567
 25463:     if (0b01100110 << 24 << f < 0) {  //SFC=1,2,5,6。アドレス変換あり
 25464:       int a0 = mmuTranslatePeek (a, f & 4, f & 2);
 25465:       if ((a & 3) == 0) {  //4の倍数
 25466:         return (a ^ a0) != 1 ? mm[a0 >>> XEiJ.BUS_PAGE_BITS].mmdPls (a0) : -1;
 25467:       } else if ((a & 1) == 0) {  //4の倍数ではない偶数
 25468:         int a2 = mmuTranslatePeek (a + 2, f & 4, f & 2);
 25469:         return (((a     ^ a0) != 1 ? mm[a0 >>> XEiJ.BUS_PAGE_BITS].mmdPws (a0) :    -1) << 16 |
 25470:                 ((a + 2 ^ a2) != 1 ? mm[a2 >>> XEiJ.BUS_PAGE_BITS].mmdPwz (a2) : 65535));
 25471:       } else {  //奇数
 25472:         int a1 = mmuTranslatePeek (a + 1, f & 4, f & 2);
 25473:         int a3 = mmuTranslatePeek (a + 3, f & 4, f & 2);
 25474:         return (((a     ^ a0) != 1 ? mm[a0 >>> XEiJ.BUS_PAGE_BITS].mmdPbs (a0) :    -1) << 24 |
 25475:                 ((a + 1 ^ a1) != 1 ? mm[a1 >>> XEiJ.BUS_PAGE_BITS].mmdPwz (a1) : 65535) <<  8 |
 25476:                 ((a + 3 ^ a3) != 1 ? mm[a3 >>> XEiJ.BUS_PAGE_BITS].mmdPbz (a3) :   255));
 25477:       }
 25478:     } else if (f != 7) {  //SFC=0,3,4。アドレス変換なし
 25479:       if ((a & 3) == 0) {  //4の倍数
 25480:         return mm[a >>> XEiJ.BUS_PAGE_BITS].mmdPls (a);
 25481:       } else if ((a & 1) == 0) {  //4の倍数ではない偶数
 25482:         return (mm[a     >>> XEiJ.BUS_PAGE_BITS].mmdPws (a    ) << 16 |
 25483:                 mm[a + 2 >>> XEiJ.BUS_PAGE_BITS].mmdPwz (a + 2));
 25484:       } else {  //奇数
 25485:         return (mm[a     >>> XEiJ.BUS_PAGE_BITS].mmdPbs (a    ) << 24 |
 25486:                 mm[a + 1 >>> XEiJ.BUS_PAGE_BITS].mmdPwz (a + 1) <<  8 |
 25487:                 mm[a + 3 >>> XEiJ.BUS_PAGE_BITS].mmdPbz (a + 3));
 25488:       }
 25489:     } else {
 25490:       return -1;
 25491:     }
 25492:   }  //mmuPeekLong(int,int)
 25493: 
 25494:   //d = mmuPeekLongData (a, supervisor)
 25495:   //  ピークロング(データ)
 25496:   public static int mmuPeekLongData (int a, int supervisor) {
 25497:     MemoryMappedDevice[] mm = supervisor != 0 ? DataBreakPoint.DBP_ON ? DataBreakPoint.dbpSuperMap : XEiJ.busSuperMap : DataBreakPoint.DBP_ON ? DataBreakPoint.dbpUserMap : XEiJ.busUserMap;
 25498:     int a0 = mmuTranslatePeek (a, supervisor, 0);  //a+1,a+2,a+3が必要なので上書き不可
 25499:     if ((a & 3) == 0) {  //4の倍数
 25500:       return (a0 & 1) != 0 ? -1 : mm[a0 >>> XEiJ.BUS_PAGE_BITS].mmdPls (a0);
 25501:     } else if ((a & 1) == 0) {  //4の倍数+2
 25502:       int a2 = mmuTranslatePeek (a + 2, supervisor, 0);
 25503:       return (((a0 & 1) != 0 ?    -1 : mm[a0 >>> XEiJ.BUS_PAGE_BITS].mmdPws (a0)) << 16 |
 25504:               ((a2 & 1) != 0 ? 65535 : mm[a2 >>> XEiJ.BUS_PAGE_BITS].mmdPwz (a2)));
 25505:     } else {  //奇数
 25506:       int a1 = mmuTranslatePeek (a + 1, supervisor, 0);
 25507:       int a3 = mmuTranslatePeek (a + 3, supervisor, 0);
 25508:       return (((a0 & 1) == 0 ?    -1 : mm[a0 >>> XEiJ.BUS_PAGE_BITS].mmdPbs (a0)) << 24 |
 25509:               ((a1 & 1) != 0 ? 65535 : mm[a1 >>> XEiJ.BUS_PAGE_BITS].mmdPwz (a1)) << 16 |
 25510:               ((a3 & 1) != 0 ?   255 : mm[a3 >>> XEiJ.BUS_PAGE_BITS].mmdPbz (a3)));
 25511:     }
 25512:   }  //mmuPeekLongData(int,int)
 25513: 
 25514:   //d = mmuPeekLongEven (a, supervisor)
 25515:   //  ピークロング(偶数)
 25516:   public static int mmuPeekLongEven (int a, int supervisor) {
 25517:     MemoryMappedDevice[] mm = supervisor != 0 ? DataBreakPoint.DBP_ON ? DataBreakPoint.dbpSuperMap : XEiJ.busSuperMap : DataBreakPoint.DBP_ON ? DataBreakPoint.dbpUserMap : XEiJ.busUserMap;
 25518:     int a0 = mmuTranslatePeek (a, supervisor, 0);  //a+2が必要なので上書き不可
 25519:     if ((a & 2) == 0) {  //4の倍数
 25520:       return (a0 & 1) != 0 ? -1 : mm[a0 >>> XEiJ.BUS_PAGE_BITS].mmdPls (a0);
 25521:     } else {  //4の倍数+2
 25522:       int a2 = mmuTranslatePeek (a + 2, supervisor, 0);
 25523:       return (((a0 & 1) != 0 ?    -1 : mm[a0 >>> XEiJ.BUS_PAGE_BITS].mmdPws (a0)) << 16 |
 25524:               ((a2 & 1) != 0 ? 65535 : mm[a2 >>> XEiJ.BUS_PAGE_BITS].mmdPwz (a2)));
 25525:     }
 25526:   }  //mmuPeekLongEven(int,int)
 25527: 
 25528:   //d = mmuPeekLongFour (a, supervisor)
 25529:   //  ピークロング(4の倍数)
 25530:   public static int mmuPeekLongFour (int a, int supervisor) {
 25531:     MemoryMappedDevice[] mm = supervisor != 0 ? DataBreakPoint.DBP_ON ? DataBreakPoint.dbpSuperMap : XEiJ.busSuperMap : DataBreakPoint.DBP_ON ? DataBreakPoint.dbpUserMap : XEiJ.busUserMap;
 25532:     a = mmuTranslatePeek (a, supervisor, 0);
 25533:     return (a & 1) != 0 ? -1 : mm[a >>> XEiJ.BUS_PAGE_BITS].mmdPls (a);
 25534:   }  //mmuPeekLongFour(int,int)
 25535: 
 25536:   //d = mmuPeekLongCode (a, supervisor)
 25537:   //  ピークロング(コード)
 25538:   public static int mmuPeekLongCode (int a, int supervisor) {
 25539:     MemoryMappedDevice[] mm = supervisor != 0 ? DataBreakPoint.DBP_ON ? DataBreakPoint.dbpSuperMap : XEiJ.busSuperMap : DataBreakPoint.DBP_ON ? DataBreakPoint.dbpUserMap : XEiJ.busUserMap;
 25540:     int a0 = mmuTranslatePeek (a, supervisor, 1);  //a+2が必要なので上書き不可
 25541:     if ((a & 2) == 0) {  //4の倍数
 25542:       return (a0 & 1) != 0 ? -1 : mm[a0 >>> XEiJ.BUS_PAGE_BITS].mmdPls (a0);
 25543:     } else {  //4の倍数+2
 25544:       int a2 = mmuTranslatePeek (a + 2, supervisor, 1);
 25545:       return (((a0 & 1) != 0 ?    -1 : mm[a0 >>> XEiJ.BUS_PAGE_BITS].mmdPws (a0)) << 16 |
 25546:               ((a2 & 1) != 0 ? 65535 : mm[a2 >>> XEiJ.BUS_PAGE_BITS].mmdPwz (a2)));
 25547:     }
 25548:   }  //mmuPeekLongCode(int,int)
 25549: 
 25550:   //d = mmuPeekQuad (a, f)
 25551:   //  ピーククワッド
 25552:   public static long mmuPeekQuad (int a, int f) {
 25553:     return (long) mmuPeekLong (a, f) << 32 | mmuPeekLong (a + 4, f) & 0xffffffffL;
 25554:   }  //mmuPeekQuad(int,int)
 25555: 
 25556:   //d = mmuPeekQuadData (a, supervisor)
 25557:   //  ピーククワッド(データ)
 25558:   public static long mmuPeekQuadData (int a, int supervisor) {
 25559:     MemoryMappedDevice[] mm = supervisor != 0 ? DataBreakPoint.DBP_ON ? DataBreakPoint.dbpSuperMap : XEiJ.busSuperMap : DataBreakPoint.DBP_ON ? DataBreakPoint.dbpUserMap : XEiJ.busUserMap;
 25560:     int a0 = mmuTranslatePeek (a, supervisor, 0);  //a+1,a+2,a+3,a+4,a+5,a+6,a+7が必要なので上書き不可
 25561:     if ((a & 3) == 0) {  //4の倍数
 25562:       int a4 = mmuTranslatePeek (a + 4, supervisor, 0);  //4の倍数
 25563:       return ((long) ((a0 & 1) != 0 ? -1 : mm[a0 >>> XEiJ.BUS_PAGE_BITS].mmdPls (a0)) << 32 |
 25564:               (long) ((a4 & 1) != 0 ? -1 : mm[a4 >>> XEiJ.BUS_PAGE_BITS].mmdPls (a4)) & 0x00000000ffffffffL);
 25565:     } else if ((a & 1) == 0) {  //4の倍数+2
 25566:       int a2 = mmuTranslatePeek (a + 2, supervisor, 0);  //4の倍数
 25567:       int a6 = mmuTranslatePeek (a + 6, supervisor, 0);  //4の倍数
 25568:       return ((long) ((a0 & 1) != 0 ?    -1 : mm[a0 >>> XEiJ.BUS_PAGE_BITS].mmdPws (a0)) << 48 |
 25569:               (long) ((a2 & 1) != 0 ?    -1 : mm[a2 >>> XEiJ.BUS_PAGE_BITS].mmdPls (a2)) << 16 & 0x0000ffffffff0000L |
 25570:               (long) ((a6 & 1) != 0 ? 65535 : mm[a6 >>> XEiJ.BUS_PAGE_BITS].mmdPwz (a6)));
 25571:     } else if ((a & 3) == 1) {  //4の倍数+1
 25572:       int a1 = mmuTranslatePeek (a + 1, supervisor, 0);  //4の倍数+2
 25573:       int a3 = mmuTranslatePeek (a + 3, supervisor, 0);  //4の倍数
 25574:       int a7 = mmuTranslatePeek (a + 7, supervisor, 0);  //4の倍数
 25575:       return ((long) ((a0 & 1) != 0 ?    -1 : mm[a0 >>> XEiJ.BUS_PAGE_BITS].mmdPbs (a0)) << 56 |
 25576:               (long) ((a1 & 1) != 0 ? 65535 : mm[a1 >>> XEiJ.BUS_PAGE_BITS].mmdPwz (a1)) << 40 |
 25577:               (long) ((a3 & 1) != 0 ?    -1 : mm[a3 >>> XEiJ.BUS_PAGE_BITS].mmdPls (a3)) <<  8 & 0x000000ffffffff00L |
 25578:               (long) ((a7 & 1) != 0 ?   255 : mm[a7 >>> XEiJ.BUS_PAGE_BITS].mmdPbz (a7)));
 25579:     } else {  //4の倍数+3
 25580:       int a1 = mmuTranslatePeek (a + 1, supervisor, 0);  //4の倍数
 25581:       int a5 = mmuTranslatePeek (a + 5, supervisor, 0);  //4の倍数
 25582:       int a7 = mmuTranslatePeek (a + 7, supervisor, 0);  //4の倍数+2
 25583:       return ((long) ((a0 & 1) != 0 ?    -1 : mm[a0 >>> XEiJ.BUS_PAGE_BITS].mmdPbs (a0)) << 56 |
 25584:               (long) ((a1 & 1) != 0 ?    -1 : mm[a1 >>> XEiJ.BUS_PAGE_BITS].mmdPls (a1)) << 24 & 0x00ffffffff000000L |
 25585:               (long) ((a5 & 1) != 0 ? 65535 : mm[a5 >>> XEiJ.BUS_PAGE_BITS].mmdPwz (a5)) <<  8 |
 25586:               (long) ((a7 & 1) != 0 ?   255 : mm[a7 >>> XEiJ.BUS_PAGE_BITS].mmdPbz (a7)));
 25587:     }
 25588:   }  //mmuPeekQuadData(int,int)
 25589: 
 25590:   //d = mmuPeekQuadEven (a, supervisor)
 25591:   //  ピーククワッド(偶数)
 25592:   public static long mmuPeekQuadEven (int a, int supervisor) {
 25593:     MemoryMappedDevice[] mm = supervisor != 0 ? DataBreakPoint.DBP_ON ? DataBreakPoint.dbpSuperMap : XEiJ.busSuperMap : DataBreakPoint.DBP_ON ? DataBreakPoint.dbpUserMap : XEiJ.busUserMap;
 25594:     int a0 = mmuTranslatePeek (a, supervisor, 0);  //a+2,a+4,a+6が必要なので上書き不可
 25595:     if ((a & 2) == 0) {  //4の倍数
 25596:       int a4 = mmuTranslatePeek (a + 4, supervisor, 0);  //4の倍数
 25597:       return ((long) ((a0 & 1) != 0 ? -1 : mm[a0 >>> XEiJ.BUS_PAGE_BITS].mmdPls (a0)) << 32 |
 25598:               (long) ((a4 & 1) != 0 ? -1 : mm[a4 >>> XEiJ.BUS_PAGE_BITS].mmdPls (a4)) & 0x00000000ffffffffL);
 25599:     } else {  //4の倍数+2
 25600:       int a2 = mmuTranslatePeek (a + 2, supervisor, 0);  //4の倍数
 25601:       int a6 = mmuTranslatePeek (a + 6, supervisor, 0);  //4の倍数
 25602:       return ((long) ((a0 & 1) != 0 ?    -1 : mm[a0 >>> XEiJ.BUS_PAGE_BITS].mmdPws (a0)) << 48 |
 25603:               (long) ((a2 & 1) != 0 ?    -1 : mm[a2 >>> XEiJ.BUS_PAGE_BITS].mmdPls (a2)) << 16 & 0x0000ffffffff0000L |
 25604:               (long) ((a6 & 1) != 0 ? 65535 : mm[a6 >>> XEiJ.BUS_PAGE_BITS].mmdPwz (a6)));
 25605:     }
 25606:   }  //mmuPeekQuadEven(int,int)
 25607: 
 25608:   //d = mmuPeekQuadFour (a, supervisor)
 25609:   //  ピーククワッド(4の倍数)
 25610:   public static long mmuPeekQuadFour (int a, int supervisor) {
 25611:     MemoryMappedDevice[] mm = supervisor != 0 ? DataBreakPoint.DBP_ON ? DataBreakPoint.dbpSuperMap : XEiJ.busSuperMap : DataBreakPoint.DBP_ON ? DataBreakPoint.dbpUserMap : XEiJ.busUserMap;
 25612:     int a0 = mmuTranslatePeek (a    , supervisor, 0);  //4の倍数。a+4が必要なので上書き不可
 25613:     int a4 = mmuTranslatePeek (a + 4, supervisor, 0);  //4の倍数
 25614:     return ((long) ((a0 & 1) != 0 ? -1 : mm[a0 >>> XEiJ.BUS_PAGE_BITS].mmdPls (a0)) << 32 |
 25615:             (long) ((a4 & 1) != 0 ? -1 : mm[a4 >>> XEiJ.BUS_PAGE_BITS].mmdPls (a4)) & 0x00000000ffffffffL);
 25616:   }  //mmuPeekQuadFour(int,int)
 25617: 
 25618:   //d = mmuPeekQuadCode (a, supervisor)
 25619:   //  ピーククワッド(コード)
 25620:   public static long mmuPeekQuadCode (int a, int supervisor) {
 25621:     MemoryMappedDevice[] mm = supervisor != 0 ? DataBreakPoint.DBP_ON ? DataBreakPoint.dbpSuperMap : XEiJ.busSuperMap : DataBreakPoint.DBP_ON ? DataBreakPoint.dbpUserMap : XEiJ.busUserMap;
 25622:     int a0 = mmuTranslatePeek (a, supervisor, 1);  //a+2,a+4,a+6が必要なので上書き不可
 25623:     if ((a & 2) == 0) {  //4の倍数
 25624:       int a4 = mmuTranslatePeek (a + 4, supervisor, 1);
 25625:       return ((long) ((a0 & 1) != 0 ? -1 : mm[a0 >>> XEiJ.BUS_PAGE_BITS].mmdPls (a0)) << 32 |
 25626:               (long) ((a4 & 1) != 0 ? -1 : mm[a4 >>> XEiJ.BUS_PAGE_BITS].mmdPls (a4)) & 0x00000000ffffffffL);
 25627:     } else {  //4の倍数+2
 25628:       int a2 = mmuTranslatePeek (a + 2, supervisor, 1);  //4の倍数
 25629:       int a6 = mmuTranslatePeek (a + 6, supervisor, 1);  //4の倍数
 25630:       return ((long) ((a0 & 1) != 0 ?    -1 : mm[a0 >>> XEiJ.BUS_PAGE_BITS].mmdPws (a0)) << 48 |
 25631:               (long) ((a2 & 1) != 0 ?    -1 : mm[a2 >>> XEiJ.BUS_PAGE_BITS].mmdPls (a2)) << 16 & 0x0000ffffffff0000L |
 25632:               (long) ((a6 & 1) != 0 ? 65535 : mm[a6 >>> XEiJ.BUS_PAGE_BITS].mmdPwz (a6)));
 25633:     }
 25634:   }  //mmuPeekQuadCode(int,int)
 25635: 
 25636:   //mmuPeekExtended (a, b, f)
 25637:   //  ピークエクステンデッド
 25638:   public static void mmuPeekExtended (int a, byte[] b, int f) {
 25639:     for (int i = 0; i < 12; i++) {
 25640:       b[i] = mmuPeekByteSign (a + i, f);
 25641:     }
 25642:   }  //mmuPeekExtended(int,int,byte[])
 25643: 
 25644:   //len = mmuPeekStrlen (a, l)
 25645:   public static int mmuPeekStrlen (int a, int l, int supervisor) {
 25646:     for (int i = 0; i < l; i++) {
 25647:       if (mmuPeekByteZeroData (a + i, supervisor) == 0) {
 25648:         return i;
 25649:       }
 25650:     }
 25651:     return l;
 25652:   }  //mmuPeekStrlen(int,int,int)
 25653: 
 25654:   //bool = mmuPeekEquals (a, str)
 25655:   //  アドレスaから始まるSJISの文字列とstrをSJISに変換してエスケープシーケンスを展開した文字列を比較する
 25656:   //  終端の\0まで比較するときはstrに\0を含めること
 25657:   //  \x??で任意のSJISの文字を書ける
 25658:   //  SJISに変換できない文字は'※'とみなす
 25659:   //  スーパーバイザモード比較する
 25660:   public static boolean mmuPeekEquals (int a, String str) {
 25661:     int len = str.length ();
 25662:     for (int i = 0; i < len; i++) {
 25663:       int c = str.charAt (i);
 25664:       if (c == '\\') {  //エスケープシーケンス。SJIS変換を省略する
 25665:         int d = i + 1 < len ? str.charAt (i + 1) : -1;  //2文字目
 25666:         if ((d & -4) == '0') {  // \[0-3][0-7]{0,2}
 25667:           c = d & 7;
 25668:           d = i + 2 < len ? str.charAt (i + 2) : -1;  //3文字目
 25669:           if ((d & -8) == '0') {
 25670:             c = c << 3 | (d & 7);
 25671:             d = i + 3 < len ? str.charAt (i + 3) : -1;  //4文字目
 25672:             if ((d & -8) == '0') {
 25673:               c = c << 3 | (d & 7);
 25674:               i++;  //4文字
 25675:             }
 25676:             i++;  //3文字
 25677:           }
 25678:           i++;  //2文字
 25679:         } else if ((d & -4) == '4') {  // \[4-7][0-7]?
 25680:           c = d & 7;
 25681:           d = i + 2 < len ? str.charAt (i + 2) : -1;  //3文字目
 25682:           if ((d & -8) == '0') {
 25683:             c = c << 3 | (d & 7);
 25684:             i++;  //3文字
 25685:           }
 25686:           i++;  //2文字
 25687:         } else if (d == 'b') {  // \b
 25688:           c = 0x08;  //BS
 25689:           i++;  //2文字
 25690:         } else if (d == 't') {  // \t
 25691:           c = 0x09;  //HT
 25692:           i++;  //2文字
 25693:         } else if (d == 'n') {  // \n
 25694:           c = 0x0a;  //LF
 25695:           i++;  //2文字
 25696:         } else if (d == 'v') {  // \v
 25697:           c = 0x0b;  //VT
 25698:           i++;  //2文字
 25699:         } else if (d == 'f') {  // \f
 25700:           c = 0x0c;  //FF
 25701:           i++;  //2文字
 25702:         } else if (d == 'r') {  // \r
 25703:           c = 0x0d;  //CR
 25704:           i++;  //2文字
 25705:         } else if (d == 'x' &&
 25706:                    i + 3 < len &&
 25707:                    CharacterCode.chrIsXdigit (str.charAt (i + 2)) &&
 25708:                    CharacterCode.chrIsXdigit (str.charAt (i + 3))) {  // \x[0-9A-Fa-f]{2}
 25709:           c = (CharacterCode.chrDigit (str.charAt (i + 2)) << 4 |
 25710:                CharacterCode.chrDigit (str.charAt (i + 3)));
 25711:           i += 3;  //4文字
 25712:         } else if ('!' <= d && d <= '~') {
 25713:           c = d;
 25714:           i++;  //2文字
 25715:         }
 25716:         if (mmuPeekByteZeroData (a++, 1) != c) {
 25717:           return false;
 25718:         }
 25719:       } else {  //エスケープシーケンス以外
 25720:         int s = CharacterCode.chrCharToSJIS[c];
 25721:         if (s == 0 && c != 0) {
 25722:           s = 0x81a6;  //'※'
 25723:         }
 25724:         if (s >> 8 != 0) {  //2バイトコード
 25725:           if (mmuPeekByteZeroData (a++, 1) != s >> 8) {
 25726:             return false;
 25727:           }
 25728:         }
 25729:         if (mmuPeekByteZeroData (a++, 1) != (s & 0xff)) {
 25730:           return false;
 25731:         }
 25732:       }
 25733:     }  //for
 25734:     return true;
 25735:   }  //mmuPeekEquals
 25736: 
 25737:   //s = mmuPeekStringL (a, l, supervisor)
 25738:   //sb = mmuPeekStringL (sb, a, l, supervisor)
 25739:   //  ピークストリング(長さ指定)
 25740:   //  文字列を読み出す
 25741:   //  対応する文字がないときは'.'または'※'になる
 25742:   //  制御コードは'.'になる
 25743:   public static String mmuPeekStringL (int a, int l, int supervisor) {
 25744:     return mmuPeekStringL (new StringBuilder (), a, l, supervisor).toString ();
 25745:   }  //mmuPeekStringL(int,int,int)
 25746:   public static StringBuilder mmuPeekStringL (StringBuilder sb, int a, int l, int supervisor) {
 25747:     for (int i = 0; i < l; i++) {
 25748:       int s = mmuPeekByteZeroData (a + i, supervisor);
 25749:       char c;
 25750:       if (0x81 <= s && s <= 0x9f || 0xe0 <= s && s <= 0xef) {  //SJISの2バイトコードの1バイト目
 25751:         int t = i + 1 < l ? mmuPeekByteZeroData (a + i + 1, supervisor) : 0;
 25752:         if (0x40 <= t && t != 0x7f && t <= 0xfc) {  //SJISの2バイトコードの2バイト目
 25753:           c = CharacterCode.chrSJISToChar[s << 8 | t];  //2バイトで変換する
 25754:           if (c == 0) {  //対応する文字がない
 25755:             c = '※';
 25756:           }
 25757:           i++;
 25758:         } else {  //SJISの2バイトコードの2バイト目ではない
 25759:           c = '.';  //SJISの2バイトコードの1バイト目ではなかった
 25760:         }
 25761:       } else {  //SJISの2バイトコードの1バイト目ではない
 25762:         c = CharacterCode.chrSJISToChar[s];  //1バイトで変換する
 25763:         if (c < 0x20 || c == 0x7f) {  //対応する文字がないまたは制御コード
 25764:           c = '.';
 25765:         }
 25766:       }
 25767:       sb.append (c);
 25768:     }
 25769:     return sb;
 25770:   }  //mmuPeekString(StringBuilder,int,int,int)
 25771: 
 25772:   //s = mmuPeekStringZ (a, f)
 25773:   //sb = mmuPeekStringZ (sb, a, f)
 25774:   //  ピークストリング
 25775:   //  文字列をSJISからUTF-16に変換しながらメモリから読み出す
 25776:   //  '\0'の手前まで読み出す
 25777:   //  UTF-16に変換できない文字は'\ufffd'になる
 25778:   public static String mmuPeekStringZ (int a, int f) {
 25779:     return mmuPeekStringZ (new StringBuilder (), a, f).toString ();
 25780:   }  //mmuPeekStringZ(int,int)
 25781:   public static StringBuilder mmuPeekStringZ (StringBuilder sb, int a, int f) {
 25782:     for (;;) {
 25783:       int s = mmuPeekByteSign (a++, f) & 255;
 25784:       if (s == 0) {
 25785:         break;
 25786:       }
 25787:       int u;
 25788:       if (0x81 <= s && s <= 0x9f || 0xe0 <= s && s <= 0xef) {  //SJISの2バイトコードの1バイト目
 25789:         int t = mmuPeekByteSign (a++, f) & 255;
 25790:         if (t == 0) {
 25791:           sb.append ('\ufffd');
 25792:           break;
 25793:         }
 25794:         if (0x40 <= t && t != 0x7f && t <= 0xfc) {  //SJISの2バイトコードの2バイト目
 25795:           t |= s << 8;
 25796:           u = CharacterCode.chrSJISToChar[t];  //2バイトで変換する
 25797:           if (u == 0) {  //変換できない
 25798:             u = 0xfffd;
 25799:           }
 25800:         } else {  //SJISの2バイトコードの2バイト目ではない
 25801:           u = 0xfffd;
 25802:         }
 25803:       } else {  //SJISの2バイトコードの1バイト目ではない
 25804:         u = CharacterCode.chrSJISToChar[s];  //1バイトで変換する
 25805:         if (u == 0) {  //変換できない
 25806:           u = 0xfffd;
 25807:         }
 25808:       }
 25809:       sb.append ((char) u);
 25810:     }
 25811:     return sb;
 25812:   }  //mmuPeekStringZ(StringBuilder,int,int)
 25813: 
 25814:   //--------------------------------------------------------------------------------
 25815:   //リード
 25816:   //  アドレス変換はリード
 25817:   //  FSLWのRead and WriteはRead
 25818: 
 25819:   //d = mmuReadByteSignData (a, supervisor)
 25820:   //  リードバイト符号拡張(データ)
 25821:   public static byte mmuReadByteSignData (int a, int supervisor) throws M68kException {
 25822:     if (supervisor != 0) {  //スーパーバイザモード
 25823:       M68kException.m6eFSLW = M68kException.M6E_FSLW_IOMA_FIRST | M68kException.M6E_FSLW_RW_READ | M68kException.M6E_FSLW_SIZE_BYTE | M68kException.M6E_FSLW_TM_SUPER_DATA;
 25824:       int a0 = mmuTranslateReadSuperData (a);
 25825:       return (DataBreakPoint.DBP_ON ? DataBreakPoint.dbpSuperMap : XEiJ.busSuperMap)[a0 >>> XEiJ.BUS_PAGE_BITS].mmdRbs (a0);
 25826:     } else {  //ユーザモード
 25827:       M68kException.m6eFSLW = M68kException.M6E_FSLW_IOMA_FIRST | M68kException.M6E_FSLW_RW_READ | M68kException.M6E_FSLW_SIZE_BYTE | M68kException.M6E_FSLW_TM_USER_DATA;
 25828:       int a0 = mmuTranslateReadUserData (a);
 25829:       return (DataBreakPoint.DBP_ON ? DataBreakPoint.dbpUserMap : XEiJ.busUserMap)[a0 >>> XEiJ.BUS_PAGE_BITS].mmdRbs (a0);
 25830:     }
 25831:   }  //mmuReadByteSignData(int,int)
 25832: 
 25833:   //d = mmuReadByteZeroData (a, supervisor)
 25834:   //  リードバイトゼロ拡張(データ)
 25835:   public static int mmuReadByteZeroData (int a, int supervisor) throws M68kException {
 25836:     if (supervisor != 0) {  //スーパーバイザモード
 25837:       M68kException.m6eFSLW = M68kException.M6E_FSLW_IOMA_FIRST | M68kException.M6E_FSLW_RW_READ | M68kException.M6E_FSLW_SIZE_BYTE | M68kException.M6E_FSLW_TM_SUPER_DATA;
 25838:       int a0 = mmuTranslateReadSuperData (a);
 25839:       return (DataBreakPoint.DBP_ON ? DataBreakPoint.dbpSuperMap : XEiJ.busSuperMap)[a0 >>> XEiJ.BUS_PAGE_BITS].mmdRbz (a0);
 25840:     } else {  //ユーザモード
 25841:       M68kException.m6eFSLW = M68kException.M6E_FSLW_IOMA_FIRST | M68kException.M6E_FSLW_RW_READ | M68kException.M6E_FSLW_SIZE_BYTE | M68kException.M6E_FSLW_TM_USER_DATA;
 25842:       int a0 = mmuTranslateReadUserData (a);
 25843:       return (DataBreakPoint.DBP_ON ? DataBreakPoint.dbpUserMap : XEiJ.busUserMap)[a0 >>> XEiJ.BUS_PAGE_BITS].mmdRbz (a0);
 25844:     }
 25845:   }  //mmuReadByteZeroData(int,int)
 25846: 
 25847:   //d = mmuReadByteSignExword (a, supervisor)
 25848:   //  リードバイト符号拡張(拡張ワード)
 25849:   public static byte mmuReadByteSignExword (int a, int supervisor) throws M68kException {
 25850:     if (supervisor != 0) {  //スーパーバイザモード
 25851:       M68kException.m6eFSLW = M68kException.M6E_FSLW_IOMA_EXWORD | M68kException.M6E_FSLW_RW_READ | M68kException.M6E_FSLW_SIZE_BYTE | M68kException.M6E_FSLW_TM_SUPER_CODE;
 25852:       int a0 = mmuTranslateReadSuperCode (a);
 25853:       return (DataBreakPoint.DBP_ON ? DataBreakPoint.dbpSuperMap : XEiJ.busSuperMap)[a0 >>> XEiJ.BUS_PAGE_BITS].mmdRbs (a0);
 25854:     } else {  //ユーザモード
 25855:       M68kException.m6eFSLW = M68kException.M6E_FSLW_IOMA_EXWORD | M68kException.M6E_FSLW_RW_READ | M68kException.M6E_FSLW_SIZE_BYTE | M68kException.M6E_FSLW_TM_USER_CODE;
 25856:       int a0 = mmuTranslateReadUserCode (a);
 25857:       return (DataBreakPoint.DBP_ON ? DataBreakPoint.dbpUserMap : XEiJ.busUserMap)[a0 >>> XEiJ.BUS_PAGE_BITS].mmdRbs (a0);
 25858:     }
 25859:   }  //mmuReadByteSignExword(int,int)
 25860: 
 25861:   //d = mmuReadByteZeroExword (a, supervisor)
 25862:   //  リードバイトゼロ拡張(拡張ワード)
 25863:   public static int mmuReadByteZeroExword (int a, int supervisor) throws M68kException {
 25864:     if (supervisor != 0) {  //スーパーバイザモード
 25865:       M68kException.m6eFSLW = M68kException.M6E_FSLW_IOMA_EXWORD | M68kException.M6E_FSLW_RW_READ | M68kException.M6E_FSLW_SIZE_BYTE | M68kException.M6E_FSLW_TM_SUPER_CODE;
 25866:       int a0 = mmuTranslateReadSuperCode (a);
 25867:       return (DataBreakPoint.DBP_ON ? DataBreakPoint.dbpSuperMap : XEiJ.busSuperMap)[a0 >>> XEiJ.BUS_PAGE_BITS].mmdRbz (a0);
 25868:     } else {  //ユーザモード
 25869:       M68kException.m6eFSLW = M68kException.M6E_FSLW_IOMA_EXWORD | M68kException.M6E_FSLW_RW_READ | M68kException.M6E_FSLW_SIZE_BYTE | M68kException.M6E_FSLW_TM_USER_CODE;
 25870:       int a0 = mmuTranslateReadUserCode (a);
 25871:       return (DataBreakPoint.DBP_ON ? DataBreakPoint.dbpUserMap : XEiJ.busUserMap)[a0 >>> XEiJ.BUS_PAGE_BITS].mmdRbz (a0);
 25872:     }
 25873:   }  //mmuReadByteZeroExword(int,int)
 25874: 
 25875:   //d = mmuReadWordSignData (a, supervisor)
 25876:   //  リードワード符号拡張(データ)
 25877:   public static int mmuReadWordSignData (int a, int supervisor) throws M68kException {
 25878:     if (supervisor != 0) {  //スーパーバイザモード
 25879:       M68kException.m6eFSLW = M68kException.M6E_FSLW_IOMA_FIRST | M68kException.M6E_FSLW_RW_READ | M68kException.M6E_FSLW_SIZE_WORD | M68kException.M6E_FSLW_TM_SUPER_DATA;
 25880:       int a0 = mmuTranslateReadSuperData (a);  //a+1が必要なので上書き不可
 25881:       if ((a & 1) == 0) {  //偶数
 25882:         return (DataBreakPoint.DBP_ON ? DataBreakPoint.dbpSuperMap : XEiJ.busSuperMap)[a0 >>> XEiJ.BUS_PAGE_BITS].mmdRws (a0);
 25883:       } else {  //奇数
 25884:         int d0 = (DataBreakPoint.DBP_ON ? DataBreakPoint.dbpSuperMap : XEiJ.busSuperMap)[a0 >>> XEiJ.BUS_PAGE_BITS].mmdRbs (a0);
 25885:         M68kException.m6eFSLW ^= M68kException.M6E_FSLW_IOMA_FIRST ^ M68kException.M6E_FSLW_IOMA_SECOND;
 25886:         int a1 = mmuTranslateReadSuperData (a + 1);  //偶数
 25887:         return (d0 << 8 |
 25888:                 (DataBreakPoint.DBP_ON ? DataBreakPoint.dbpSuperMap : XEiJ.busSuperMap)[a1 >>> XEiJ.BUS_PAGE_BITS].mmdRbz (a1));
 25889:       }
 25890:     } else {  //ユーザモード
 25891:       M68kException.m6eFSLW = M68kException.M6E_FSLW_IOMA_FIRST | M68kException.M6E_FSLW_RW_READ | M68kException.M6E_FSLW_SIZE_WORD | M68kException.M6E_FSLW_TM_USER_DATA;
 25892:       int a0 = mmuTranslateReadUserData (a);  //a+1が必要なので上書き不可
 25893:       if ((a & 1) == 0) {  //偶数
 25894:         return (DataBreakPoint.DBP_ON ? DataBreakPoint.dbpUserMap : XEiJ.busUserMap)[a0 >>> XEiJ.BUS_PAGE_BITS].mmdRws (a0);
 25895:       } else {  //奇数
 25896:         int d0 = (DataBreakPoint.DBP_ON ? DataBreakPoint.dbpUserMap : XEiJ.busUserMap)[a0 >>> XEiJ.BUS_PAGE_BITS].mmdRbs (a0);
 25897:         M68kException.m6eFSLW ^= M68kException.M6E_FSLW_IOMA_FIRST ^ M68kException.M6E_FSLW_IOMA_SECOND;
 25898:         int a1 = mmuTranslateReadUserData (a + 1);  //偶数
 25899:         return (d0 << 8 |
 25900:                 (DataBreakPoint.DBP_ON ? DataBreakPoint.dbpUserMap : XEiJ.busUserMap)[a1 >>> XEiJ.BUS_PAGE_BITS].mmdRbz (a1));
 25901:       }
 25902:     }
 25903:   }  //mmuReadWordSignData(int,int)
 25904: 
 25905:   //d = mmuReadWordZeroData (a, supervisor)
 25906:   //  リードワードゼロ拡張(データ)
 25907:   public static int mmuReadWordZeroData (int a, int supervisor) throws M68kException {
 25908:     if (supervisor != 0) {  //スーパーバイザモード
 25909:       M68kException.m6eFSLW = M68kException.M6E_FSLW_IOMA_FIRST | M68kException.M6E_FSLW_RW_READ | M68kException.M6E_FSLW_SIZE_WORD | M68kException.M6E_FSLW_TM_SUPER_DATA;
 25910:       int a0 = mmuTranslateReadSuperData (a);  //a+1が必要なので上書き不可
 25911:       if ((a & 1) == 0) {  //偶数
 25912:         return (DataBreakPoint.DBP_ON ? DataBreakPoint.dbpSuperMap : XEiJ.busSuperMap)[a0 >>> XEiJ.BUS_PAGE_BITS].mmdRwz (a0);
 25913:       } else {  //奇数
 25914:         int d0 = (DataBreakPoint.DBP_ON ? DataBreakPoint.dbpSuperMap : XEiJ.busSuperMap)[a0 >>> XEiJ.BUS_PAGE_BITS].mmdRbz (a0);
 25915:         M68kException.m6eFSLW ^= M68kException.M6E_FSLW_IOMA_FIRST ^ M68kException.M6E_FSLW_IOMA_SECOND;
 25916:         int a1 = mmuTranslateReadSuperData (a + 1);  //偶数
 25917:         return (d0 << 8 |
 25918:                 (DataBreakPoint.DBP_ON ? DataBreakPoint.dbpSuperMap : XEiJ.busSuperMap)[a1 >>> XEiJ.BUS_PAGE_BITS].mmdRbz (a1));
 25919:       }
 25920:     } else {  //ユーザモード
 25921:       M68kException.m6eFSLW = M68kException.M6E_FSLW_IOMA_FIRST | M68kException.M6E_FSLW_RW_READ | M68kException.M6E_FSLW_SIZE_WORD | M68kException.M6E_FSLW_TM_USER_DATA;
 25922:       int a0 = mmuTranslateReadUserData (a);  //a+1が必要なので上書き不可
 25923:       if ((a & 1) == 0) {  //偶数
 25924:         return (DataBreakPoint.DBP_ON ? DataBreakPoint.dbpUserMap : XEiJ.busUserMap)[a0 >>> XEiJ.BUS_PAGE_BITS].mmdRwz (a0);
 25925:       } else {  //奇数
 25926:         int d0 = (DataBreakPoint.DBP_ON ? DataBreakPoint.dbpUserMap : XEiJ.busUserMap)[a0 >>> XEiJ.BUS_PAGE_BITS].mmdRbz (a0);
 25927:         M68kException.m6eFSLW ^= M68kException.M6E_FSLW_IOMA_FIRST ^ M68kException.M6E_FSLW_IOMA_SECOND;
 25928:         int a1 = mmuTranslateReadUserData (a + 1);  //偶数
 25929:         return (d0 << 8 |
 25930:                 (DataBreakPoint.DBP_ON ? DataBreakPoint.dbpUserMap : XEiJ.busUserMap)[a1 >>> XEiJ.BUS_PAGE_BITS].mmdRbz (a1));
 25931:       }
 25932:     }
 25933:   }  //mmuReadWordZeroData(int,int)
 25934: 
 25935:   //d = mmuReadWordSignEven (a, supervisor)
 25936:   //  リードワード符号拡張(偶数)
 25937:   public static int mmuReadWordSignEven (int a, int supervisor) throws M68kException {
 25938:     if (supervisor != 0) {  //スーパーバイザモード
 25939:       M68kException.m6eFSLW = M68kException.M6E_FSLW_IOMA_FIRST | M68kException.M6E_FSLW_RW_READ | M68kException.M6E_FSLW_SIZE_WORD | M68kException.M6E_FSLW_TM_SUPER_DATA;
 25940:       a = mmuTranslateReadSuperData (a);
 25941:       return (DataBreakPoint.DBP_ON ? DataBreakPoint.dbpSuperMap : XEiJ.busSuperMap)[a >>> XEiJ.BUS_PAGE_BITS].mmdRws (a);
 25942:     } else {  //ユーザモード
 25943:       M68kException.m6eFSLW = M68kException.M6E_FSLW_IOMA_FIRST | M68kException.M6E_FSLW_RW_READ | M68kException.M6E_FSLW_SIZE_WORD | M68kException.M6E_FSLW_TM_USER_DATA;
 25944:       a = mmuTranslateReadUserData (a);
 25945:       return (DataBreakPoint.DBP_ON ? DataBreakPoint.dbpUserMap : XEiJ.busUserMap)[a >>> XEiJ.BUS_PAGE_BITS].mmdRws (a);
 25946:     }
 25947:   }  //mmuReadWordSignEven(int,int)
 25948: 
 25949:   //d = mmuReadWordZeroEven (a, supervisor)
 25950:   //  リードワードゼロ拡張(偶数)
 25951:   public static int mmuReadWordZeroEven (int a, int supervisor) throws M68kException {
 25952:     if (supervisor != 0) {  //スーパーバイザモード
 25953:       M68kException.m6eFSLW = M68kException.M6E_FSLW_IOMA_FIRST | M68kException.M6E_FSLW_RW_READ | M68kException.M6E_FSLW_SIZE_WORD | M68kException.M6E_FSLW_TM_SUPER_DATA;
 25954:       a = mmuTranslateReadSuperData (a);
 25955:       return (DataBreakPoint.DBP_ON ? DataBreakPoint.dbpSuperMap : XEiJ.busSuperMap)[a >>> XEiJ.BUS_PAGE_BITS].mmdRwz (a);
 25956:     } else {  //ユーザモード
 25957:       M68kException.m6eFSLW = M68kException.M6E_FSLW_IOMA_FIRST | M68kException.M6E_FSLW_RW_READ | M68kException.M6E_FSLW_SIZE_WORD | M68kException.M6E_FSLW_TM_USER_DATA;
 25958:       a = mmuTranslateReadUserData (a);
 25959:       return (DataBreakPoint.DBP_ON ? DataBreakPoint.dbpUserMap : XEiJ.busUserMap)[a >>> XEiJ.BUS_PAGE_BITS].mmdRwz (a);
 25960:     }
 25961:   }  //mmuReadWordZeroEven(int,int)
 25962: 
 25963:   //d = mmuReadWordSignExword (a, supervisor)
 25964:   //  リードワード符号拡張(拡張ワード)
 25965:   public static int mmuReadWordSignExword (int a, int supervisor) throws M68kException {
 25966:     if (supervisor != 0) {  //スーパーバイザモード
 25967:       M68kException.m6eFSLW = M68kException.M6E_FSLW_IOMA_EXWORD | M68kException.M6E_FSLW_RW_READ | M68kException.M6E_FSLW_SIZE_WORD | M68kException.M6E_FSLW_TM_SUPER_CODE;
 25968:       a = mmuTranslateReadSuperCode (a);
 25969:       return (DataBreakPoint.DBP_ON ? DataBreakPoint.dbpSuperMap : XEiJ.busSuperMap)[a >>> XEiJ.BUS_PAGE_BITS].mmdRws (a);
 25970:     } else {  //ユーザモード
 25971:       M68kException.m6eFSLW = M68kException.M6E_FSLW_IOMA_EXWORD | M68kException.M6E_FSLW_RW_READ | M68kException.M6E_FSLW_SIZE_WORD | M68kException.M6E_FSLW_TM_USER_CODE;
 25972:       a = mmuTranslateReadUserCode (a);
 25973:       return (DataBreakPoint.DBP_ON ? DataBreakPoint.dbpUserMap : XEiJ.busUserMap)[a >>> XEiJ.BUS_PAGE_BITS].mmdRws (a);
 25974:     }
 25975:   }  //mmuReadWordSignExword(int,int)
 25976: 
 25977:   //d = mmuReadWordZeroExword (a, supervisor)
 25978:   //  リードワードゼロ拡張(拡張ワード)
 25979:   public static int mmuReadWordZeroExword (int a, int supervisor) throws M68kException {
 25980:     if (supervisor != 0) {  //スーパーバイザモード
 25981:       M68kException.m6eFSLW = M68kException.M6E_FSLW_IOMA_EXWORD | M68kException.M6E_FSLW_RW_READ | M68kException.M6E_FSLW_SIZE_WORD | M68kException.M6E_FSLW_TM_SUPER_CODE;
 25982:       a = mmuTranslateReadSuperCode (a);
 25983:       return (DataBreakPoint.DBP_ON ? DataBreakPoint.dbpSuperMap : XEiJ.busSuperMap)[a >>> XEiJ.BUS_PAGE_BITS].mmdRwz (a);
 25984:     } else {  //ユーザモード
 25985:       M68kException.m6eFSLW = M68kException.M6E_FSLW_IOMA_EXWORD | M68kException.M6E_FSLW_RW_READ | M68kException.M6E_FSLW_SIZE_WORD | M68kException.M6E_FSLW_TM_USER_CODE;
 25986:       a = mmuTranslateReadUserCode (a);
 25987:       return (DataBreakPoint.DBP_ON ? DataBreakPoint.dbpUserMap : XEiJ.busUserMap)[a >>> XEiJ.BUS_PAGE_BITS].mmdRwz (a);
 25988:     }
 25989:   }  //mmuReadWordZeroExword(int,int)
 25990: 
 25991:   //d = mmuReadWordSignOpword (a, supervisor)
 25992:   //  リードワード符号拡張(命令ワード)
 25993:   public static int mmuReadWordSignOpword (int a, int supervisor) throws M68kException {
 25994:     if (supervisor != 0) {  //スーパーバイザモード
 25995:       M68kException.m6eFSLW = M68kException.M6E_FSLW_IOMA_OPWORD | M68kException.M6E_FSLW_RW_READ | M68kException.M6E_FSLW_SIZE_WORD | M68kException.M6E_FSLW_TM_SUPER_CODE;
 25996:       a = mmuTranslateReadSuperCode (a);
 25997:       return (InstructionBreakPoint.IBP_ON ? InstructionBreakPoint.ibpOp1SuperMap : DataBreakPoint.DBP_ON ? DataBreakPoint.dbpSuperMap : XEiJ.busSuperMap)[a >>> XEiJ.BUS_PAGE_BITS].mmdRws (a);
 25998:     } else {  //ユーザモード
 25999:       M68kException.m6eFSLW = M68kException.M6E_FSLW_IOMA_OPWORD | M68kException.M6E_FSLW_RW_READ | M68kException.M6E_FSLW_SIZE_WORD | M68kException.M6E_FSLW_TM_USER_CODE;
 26000:       a = mmuTranslateReadUserCode (a);
 26001:       return (InstructionBreakPoint.IBP_ON ? InstructionBreakPoint.ibpOp1UserMap : DataBreakPoint.DBP_ON ? DataBreakPoint.dbpUserMap : XEiJ.busUserMap)[a >>> XEiJ.BUS_PAGE_BITS].mmdRws (a);
 26002:     }
 26003:   }  //mmuReadWordSignOpword(int,int)
 26004: 
 26005:   //d = mmuReadWordZeroOpword (a, supervisor)
 26006:   //  リードワードゼロ拡張(命令ワード)
 26007:   public static int mmuReadWordZeroOpword (int a, int supervisor) throws M68kException {
 26008:     if (supervisor != 0) {  //スーパーバイザモード
 26009:       M68kException.m6eFSLW = M68kException.M6E_FSLW_IOMA_OPWORD | M68kException.M6E_FSLW_RW_READ | M68kException.M6E_FSLW_SIZE_WORD | M68kException.M6E_FSLW_TM_SUPER_CODE;
 26010:       a = mmuTranslateReadSuperCode (a);
 26011:       return (InstructionBreakPoint.IBP_ON ? InstructionBreakPoint.ibpOp1SuperMap : DataBreakPoint.DBP_ON ? DataBreakPoint.dbpSuperMap : XEiJ.busSuperMap)[a >>> XEiJ.BUS_PAGE_BITS].mmdRwz (a);
 26012:     } else {  //ユーザモード
 26013:       M68kException.m6eFSLW = M68kException.M6E_FSLW_IOMA_OPWORD | M68kException.M6E_FSLW_RW_READ | M68kException.M6E_FSLW_SIZE_WORD | M68kException.M6E_FSLW_TM_USER_CODE;
 26014:       a = mmuTranslateReadUserCode (a);
 26015:       return (InstructionBreakPoint.IBP_ON ? InstructionBreakPoint.ibpOp1UserMap : DataBreakPoint.DBP_ON ? DataBreakPoint.dbpUserMap : XEiJ.busUserMap)[a >>> XEiJ.BUS_PAGE_BITS].mmdRwz (a);
 26016:     }
 26017:   }  //mmuReadWordZeroOpword(int,int)
 26018: 
 26019:   //d = mmuReadLongData (a, supervisor)
 26020:   //  リードロング(データ)
 26021:   public static int mmuReadLongData (int a, int supervisor) throws M68kException {
 26022:     if (supervisor != 0) {  //スーパーバイザモード
 26023:       M68kException.m6eFSLW = M68kException.M6E_FSLW_IOMA_FIRST | M68kException.M6E_FSLW_RW_READ | M68kException.M6E_FSLW_SIZE_LONG | M68kException.M6E_FSLW_TM_SUPER_DATA;
 26024:       int a0 = mmuTranslateReadSuperData (a);  //a+1,a+2,a+3が必要なので上書き不可
 26025:       if ((a & 3) == 0) {  //4の倍数
 26026:         return (DataBreakPoint.DBP_ON ? DataBreakPoint.dbpSuperMap : XEiJ.busSuperMap)[a0 >>> XEiJ.BUS_PAGE_BITS].mmdRls (a0);
 26027:       } else if ((a & 1) == 0) {  //4の倍数+2
 26028:         int d0 = (DataBreakPoint.DBP_ON ? DataBreakPoint.dbpSuperMap : XEiJ.busSuperMap)[a0 >>> XEiJ.BUS_PAGE_BITS].mmdRws (a0);
 26029:         M68kException.m6eFSLW ^= M68kException.M6E_FSLW_IOMA_FIRST ^ M68kException.M6E_FSLW_IOMA_SECOND;
 26030:         int a2 = mmuTranslateReadSuperData (a + 2);  //偶数
 26031:         return (d0 << 16 |
 26032:                 (DataBreakPoint.DBP_ON ? DataBreakPoint.dbpSuperMap : XEiJ.busSuperMap)[a2 >>> XEiJ.BUS_PAGE_BITS].mmdRwz (a2));
 26033:       } else {  //奇数
 26034:         int d0 = (DataBreakPoint.DBP_ON ? DataBreakPoint.dbpSuperMap : XEiJ.busSuperMap)[a0 >>> XEiJ.BUS_PAGE_BITS].mmdRbs (a0);
 26035:         M68kException.m6eFSLW ^= M68kException.M6E_FSLW_IOMA_FIRST ^ M68kException.M6E_FSLW_IOMA_SECOND;
 26036:         int a1 = mmuTranslateReadSuperData (a + 1);  //偶数
 26037:         int a3 = mmuTranslateReadSuperData (a + 3);  //偶数
 26038:         return (d0 << 24 |
 26039:                 (DataBreakPoint.DBP_ON ? DataBreakPoint.dbpSuperMap : XEiJ.busSuperMap)[a1 >>> XEiJ.BUS_PAGE_BITS].mmdRwz (a1) << 8 |
 26040:                 (DataBreakPoint.DBP_ON ? DataBreakPoint.dbpSuperMap : XEiJ.busSuperMap)[a3 >>> XEiJ.BUS_PAGE_BITS].mmdRbz (a3));
 26041:       }
 26042:     } else {  //ユーザモード
 26043:       M68kException.m6eFSLW = M68kException.M6E_FSLW_IOMA_FIRST | M68kException.M6E_FSLW_RW_READ | M68kException.M6E_FSLW_SIZE_LONG | M68kException.M6E_FSLW_TM_USER_DATA;
 26044:       int a0 = mmuTranslateReadUserData (a);  //a+1,a+2,a+3が必要なので上書き不可
 26045:       if ((a & 3) == 0) {  //4の倍数
 26046:         return (DataBreakPoint.DBP_ON ? DataBreakPoint.dbpUserMap : XEiJ.busUserMap)[a0 >>> XEiJ.BUS_PAGE_BITS].mmdRls (a0);
 26047:       } else if ((a & 1) == 0) {  //4の倍数+2
 26048:         int d0 = (DataBreakPoint.DBP_ON ? DataBreakPoint.dbpUserMap : XEiJ.busUserMap)[a0 >>> XEiJ.BUS_PAGE_BITS].mmdRws (a0);
 26049:         M68kException.m6eFSLW ^= M68kException.M6E_FSLW_IOMA_FIRST ^ M68kException.M6E_FSLW_IOMA_SECOND;
 26050:         int a2 = mmuTranslateReadUserData (a + 2);  //偶数
 26051:         return (d0 << 16 |
 26052:                 (DataBreakPoint.DBP_ON ? DataBreakPoint.dbpUserMap : XEiJ.busUserMap)[a2 >>> XEiJ.BUS_PAGE_BITS].mmdRwz (a2));
 26053:       } else {  //奇数
 26054:         int d0 = (DataBreakPoint.DBP_ON ? DataBreakPoint.dbpUserMap : XEiJ.busUserMap)[a0 >>> XEiJ.BUS_PAGE_BITS].mmdRbs (a0);
 26055:         M68kException.m6eFSLW ^= M68kException.M6E_FSLW_IOMA_FIRST ^ M68kException.M6E_FSLW_IOMA_SECOND;
 26056:         int a1 = mmuTranslateReadUserData (a + 1);  //偶数
 26057:         int a3 = mmuTranslateReadUserData (a + 3);  //偶数
 26058:         return (d0 << 24 |
 26059:                 (DataBreakPoint.DBP_ON ? DataBreakPoint.dbpUserMap : XEiJ.busUserMap)[a1 >>> XEiJ.BUS_PAGE_BITS].mmdRwz (a1) << 8 |
 26060:                 (DataBreakPoint.DBP_ON ? DataBreakPoint.dbpUserMap : XEiJ.busUserMap)[a3 >>> XEiJ.BUS_PAGE_BITS].mmdRbz (a3));
 26061:       }
 26062:     }
 26063:   }  //mmuReadLongData(int,int)
 26064: 
 26065:   //d = mmuReadLongEven (a, supervisor)
 26066:   //  リードロング(偶数)
 26067:   public static int mmuReadLongEven (int a, int supervisor) throws M68kException {
 26068:     if (supervisor != 0) {  //スーパーバイザモード
 26069:       M68kException.m6eFSLW = M68kException.M6E_FSLW_IOMA_FIRST | M68kException.M6E_FSLW_RW_READ | M68kException.M6E_FSLW_SIZE_LONG | M68kException.M6E_FSLW_TM_SUPER_DATA;
 26070:       int a0 = mmuTranslateReadSuperData (a);  //a+2が必要なので上書き不可
 26071:       if ((a & 2) == 0) {  //4の倍数
 26072:         return (DataBreakPoint.DBP_ON ? DataBreakPoint.dbpSuperMap : XEiJ.busSuperMap)[a0 >>> XEiJ.BUS_PAGE_BITS].mmdRls (a0);
 26073:       } else {  //4の倍数+2
 26074:         int d0 = (DataBreakPoint.DBP_ON ? DataBreakPoint.dbpSuperMap : XEiJ.busSuperMap)[a0 >>> XEiJ.BUS_PAGE_BITS].mmdRws (a0);
 26075:         M68kException.m6eFSLW ^= M68kException.M6E_FSLW_IOMA_FIRST ^ M68kException.M6E_FSLW_IOMA_SECOND;
 26076:         int a2 = mmuTranslateReadSuperData (a + 2);  //偶数
 26077:         return (d0 << 16 |
 26078:                 (DataBreakPoint.DBP_ON ? DataBreakPoint.dbpSuperMap : XEiJ.busSuperMap)[a2 >>> XEiJ.BUS_PAGE_BITS].mmdRwz (a2));
 26079:       }
 26080:     } else {  //ユーザモード
 26081:       M68kException.m6eFSLW = M68kException.M6E_FSLW_IOMA_FIRST | M68kException.M6E_FSLW_RW_READ | M68kException.M6E_FSLW_SIZE_LONG | M68kException.M6E_FSLW_TM_USER_DATA;
 26082:       int a0 = mmuTranslateReadUserData (a);  //a+2が必要なので上書き不可
 26083:       if ((a & 2) == 0) {  //4の倍数
 26084:         return (DataBreakPoint.DBP_ON ? DataBreakPoint.dbpUserMap : XEiJ.busUserMap)[a0 >>> XEiJ.BUS_PAGE_BITS].mmdRls (a0);
 26085:       } else {  //4の倍数+2
 26086:         int d0 = (DataBreakPoint.DBP_ON ? DataBreakPoint.dbpUserMap : XEiJ.busUserMap)[a0 >>> XEiJ.BUS_PAGE_BITS].mmdRws (a0);
 26087:         M68kException.m6eFSLW ^= M68kException.M6E_FSLW_IOMA_FIRST ^ M68kException.M6E_FSLW_IOMA_SECOND;
 26088:         int a2 = mmuTranslateReadUserData (a + 2);  //偶数
 26089:         return (d0 << 16 |
 26090:                 (DataBreakPoint.DBP_ON ? DataBreakPoint.dbpUserMap : XEiJ.busUserMap)[a2 >>> XEiJ.BUS_PAGE_BITS].mmdRwz (a2));
 26091:       }
 26092:     }
 26093:   }  //mmuReadLongEven(int,int)
 26094: 
 26095:   //d = mmuReadLongExword (a, supervisor)
 26096:   //  リードロング(拡張ワード)
 26097:   public static int mmuReadLongExword (int a, int supervisor) throws M68kException {
 26098:     if (supervisor != 0) {  //スーパーバイザモード
 26099:       M68kException.m6eFSLW = M68kException.M6E_FSLW_IOMA_EXWORD | M68kException.M6E_FSLW_RW_READ | M68kException.M6E_FSLW_SIZE_LONG | M68kException.M6E_FSLW_TM_SUPER_CODE;
 26100:       int a0 = mmuTranslateReadSuperData (a);  //a+2が必要なので上書き不可
 26101:       if ((a & 2) == 0) {  //4の倍数
 26102:         return (DataBreakPoint.DBP_ON ? DataBreakPoint.dbpSuperMap : XEiJ.busSuperMap)[a0 >>> XEiJ.BUS_PAGE_BITS].mmdRls (a0);
 26103:       } else {  //4の倍数+2
 26104:         int a2 = mmuTranslateReadSuperData (a + 2);  //偶数
 26105:         return ((DataBreakPoint.DBP_ON ? DataBreakPoint.dbpSuperMap : XEiJ.busSuperMap)[a0 >>> XEiJ.BUS_PAGE_BITS].mmdRws (a0) << 16 |
 26106:                 (DataBreakPoint.DBP_ON ? DataBreakPoint.dbpSuperMap : XEiJ.busSuperMap)[a2 >>> XEiJ.BUS_PAGE_BITS].mmdRwz (a2));
 26107:       }
 26108:     } else {  //ユーザモード
 26109:       M68kException.m6eFSLW = M68kException.M6E_FSLW_IOMA_EXWORD | M68kException.M6E_FSLW_RW_READ | M68kException.M6E_FSLW_SIZE_LONG | M68kException.M6E_FSLW_TM_USER_CODE;
 26110:       int a0 = mmuTranslateReadUserData (a);  //a+2が必要なので上書き不可
 26111:       if ((a & 2) == 0) {  //4の倍数
 26112:         return (DataBreakPoint.DBP_ON ? DataBreakPoint.dbpUserMap : XEiJ.busUserMap)[a0 >>> XEiJ.BUS_PAGE_BITS].mmdRls (a0);
 26113:       } else {  //4の倍数+2
 26114:         int a2 = mmuTranslateReadUserData (a + 2);  //偶数
 26115:         return ((DataBreakPoint.DBP_ON ? DataBreakPoint.dbpUserMap : XEiJ.busUserMap)[a0 >>> XEiJ.BUS_PAGE_BITS].mmdRws (a0) << 16 |
 26116:                 (DataBreakPoint.DBP_ON ? DataBreakPoint.dbpUserMap : XEiJ.busUserMap)[a2 >>> XEiJ.BUS_PAGE_BITS].mmdRwz (a2));
 26117:       }
 26118:     }
 26119:   }  //mmuReadLongExword(int,int)
 26120: 
 26121:   //d = mmuReadLongFour (a, supervisor)
 26122:   //  リードロング(4の倍数)
 26123:   public static int mmuReadLongFour (int a, int supervisor) throws M68kException {
 26124:     if (supervisor != 0) {  //スーパーバイザモード
 26125:       M68kException.m6eFSLW = M68kException.M6E_FSLW_IOMA_FIRST | M68kException.M6E_FSLW_RW_READ | M68kException.M6E_FSLW_SIZE_LONG | M68kException.M6E_FSLW_TM_SUPER_DATA;
 26126:       a = mmuTranslateReadSuperData (a);
 26127:       return (DataBreakPoint.DBP_ON ? DataBreakPoint.dbpSuperMap : XEiJ.busSuperMap)[a >>> XEiJ.BUS_PAGE_BITS].mmdRls (a);
 26128:     } else {  //ユーザモード
 26129:       M68kException.m6eFSLW = M68kException.M6E_FSLW_IOMA_FIRST | M68kException.M6E_FSLW_RW_READ | M68kException.M6E_FSLW_SIZE_LONG | M68kException.M6E_FSLW_TM_USER_DATA;
 26130:       a = mmuTranslateReadUserData (a);
 26131:       return (DataBreakPoint.DBP_ON ? DataBreakPoint.dbpUserMap : XEiJ.busUserMap)[a >>> XEiJ.BUS_PAGE_BITS].mmdRls (a);
 26132:     }
 26133:   }  //mmuReadLongFour(int,int)
 26134: 
 26135:   //l = mmuReadQuadData (a, supervisor)
 26136:   //  リードクワッド(データ)
 26137:   public static long mmuReadQuadData (int a, int supervisor) throws M68kException {
 26138:     if (supervisor != 0) {  //スーパーバイザモード
 26139:       M68kException.m6eFSLW = M68kException.M6E_FSLW_IOMA_FIRST | M68kException.M6E_FSLW_RW_READ | M68kException.M6E_FSLW_SIZE_QUAD | M68kException.M6E_FSLW_TM_SUPER_DATA;
 26140:       int a0 = mmuTranslateReadSuperData (a);  //a+1,a+2,a+3,a+4,a+5,a+6,a+7が必要なので上書き不可
 26141:       if ((a & 3) == 0) {  //4の倍数
 26142:         int a4 = mmuTranslateReadSuperData (a + 4);  //4の倍数
 26143:         return ((long) (DataBreakPoint.DBP_ON ? DataBreakPoint.dbpSuperMap : XEiJ.busSuperMap)[a0 >>> XEiJ.BUS_PAGE_BITS].mmdRls (a0) << 32 |
 26144:                 (long) (DataBreakPoint.DBP_ON ? DataBreakPoint.dbpSuperMap : XEiJ.busSuperMap)[a4 >>> XEiJ.BUS_PAGE_BITS].mmdRls (a4) & 0x00000000ffffffffL);
 26145:       } else if ((a & 1) == 0) {  //4の倍数+2
 26146:         int d0 = (DataBreakPoint.DBP_ON ? DataBreakPoint.dbpSuperMap : XEiJ.busSuperMap)[a0 >>> XEiJ.BUS_PAGE_BITS].mmdRws (a0);
 26147:         M68kException.m6eFSLW ^= M68kException.M6E_FSLW_IOMA_FIRST ^ M68kException.M6E_FSLW_IOMA_SECOND;
 26148:         int a2 = mmuTranslateReadSuperData (a + 2);  //4の倍数
 26149:         int a6 = mmuTranslateReadSuperData (a + 6);  //4の倍数
 26150:         return ((long) d0 << 48 |
 26151:                 (long) (DataBreakPoint.DBP_ON ? DataBreakPoint.dbpSuperMap : XEiJ.busSuperMap)[a2 >>> XEiJ.BUS_PAGE_BITS].mmdRls (a2) << 16 & 0x0000ffffffff0000L |
 26152:                 (long) (DataBreakPoint.DBP_ON ? DataBreakPoint.dbpSuperMap : XEiJ.busSuperMap)[a6 >>> XEiJ.BUS_PAGE_BITS].mmdRwz (a6));
 26153:       } else if ((a & 3) == 1) {  //4の倍数+1
 26154:         int d0 = (DataBreakPoint.DBP_ON ? DataBreakPoint.dbpSuperMap : XEiJ.busSuperMap)[a0 >>> XEiJ.BUS_PAGE_BITS].mmdRbs (a0);
 26155:         M68kException.m6eFSLW ^= M68kException.M6E_FSLW_IOMA_FIRST ^ M68kException.M6E_FSLW_IOMA_SECOND;
 26156:         int a1 = mmuTranslateReadSuperData (a + 1);  //4の倍数+2
 26157:         int a3 = mmuTranslateReadSuperData (a + 3);  //4の倍数
 26158:         int a7 = mmuTranslateReadSuperData (a + 7);  //4の倍数
 26159:         return ((long) d0 << 56 |
 26160:                 (long) (DataBreakPoint.DBP_ON ? DataBreakPoint.dbpSuperMap : XEiJ.busSuperMap)[a1 >>> XEiJ.BUS_PAGE_BITS].mmdRwz (a1) << 40 |
 26161:                 (long) (DataBreakPoint.DBP_ON ? DataBreakPoint.dbpSuperMap : XEiJ.busSuperMap)[a3 >>> XEiJ.BUS_PAGE_BITS].mmdRls (a3) << 8 & 0x000000ffffffff00L |
 26162:                 (long) (DataBreakPoint.DBP_ON ? DataBreakPoint.dbpSuperMap : XEiJ.busSuperMap)[a7 >>> XEiJ.BUS_PAGE_BITS].mmdRbz (a7));
 26163:       } else {  //  //4の倍数+3
 26164:         int d0 = (DataBreakPoint.DBP_ON ? DataBreakPoint.dbpSuperMap : XEiJ.busSuperMap)[a0 >>> XEiJ.BUS_PAGE_BITS].mmdRbs (a0);
 26165:         M68kException.m6eFSLW ^= M68kException.M6E_FSLW_IOMA_FIRST ^ M68kException.M6E_FSLW_IOMA_SECOND;
 26166:         int a1 = mmuTranslateReadSuperData (a + 1);  //4の倍数
 26167:         int a5 = mmuTranslateReadSuperData (a + 5);  //4の倍数
 26168:         int a7 = mmuTranslateReadSuperData (a + 7);  //4の倍数+2
 26169:         return ((long) d0 << 56 |
 26170:                 (long) (DataBreakPoint.DBP_ON ? DataBreakPoint.dbpSuperMap : XEiJ.busSuperMap)[a1 >>> XEiJ.BUS_PAGE_BITS].mmdRls (a1) << 24 & 0x00ffffffff000000L |
 26171:                 (long) (DataBreakPoint.DBP_ON ? DataBreakPoint.dbpSuperMap : XEiJ.busSuperMap)[a5 >>> XEiJ.BUS_PAGE_BITS].mmdRwz (a5) << 8 |
 26172:                 (long) (DataBreakPoint.DBP_ON ? DataBreakPoint.dbpSuperMap : XEiJ.busSuperMap)[a7 >>> XEiJ.BUS_PAGE_BITS].mmdRbz (a7));
 26173:       }
 26174:     } else {  //ユーザモード
 26175:       M68kException.m6eFSLW = M68kException.M6E_FSLW_IOMA_FIRST | M68kException.M6E_FSLW_RW_READ | M68kException.M6E_FSLW_SIZE_QUAD | M68kException.M6E_FSLW_TM_USER_DATA;
 26176:       int a0 = mmuTranslateReadUserData (a);  //a+1,a+2,a+3,a+4,a+5,a+6,a+7が必要なので上書き不可
 26177:       if ((a & 3) == 0) {  //4の倍数
 26178:         int a4 = mmuTranslateReadUserData (a + 4);  //4の倍数
 26179:         return ((long) (DataBreakPoint.DBP_ON ? DataBreakPoint.dbpUserMap : XEiJ.busUserMap)[a0 >>> XEiJ.BUS_PAGE_BITS].mmdRls (a0) << 32 |
 26180:                 (long) (DataBreakPoint.DBP_ON ? DataBreakPoint.dbpUserMap : XEiJ.busUserMap)[a4 >>> XEiJ.BUS_PAGE_BITS].mmdRls (a4) & 0x00000000ffffffffL);
 26181:       } else if ((a & 1) == 0) {  //4の倍数+2
 26182:         int d0 = (DataBreakPoint.DBP_ON ? DataBreakPoint.dbpUserMap : XEiJ.busUserMap)[a0 >>> XEiJ.BUS_PAGE_BITS].mmdRws (a0);
 26183:         M68kException.m6eFSLW ^= M68kException.M6E_FSLW_IOMA_FIRST ^ M68kException.M6E_FSLW_IOMA_SECOND;
 26184:         int a2 = mmuTranslateReadUserData (a + 2);  //4の倍数
 26185:         int a6 = mmuTranslateReadUserData (a + 6);  //4の倍数
 26186:         return ((long) d0 << 48 |
 26187:                 (long) (DataBreakPoint.DBP_ON ? DataBreakPoint.dbpUserMap : XEiJ.busUserMap)[a2 >>> XEiJ.BUS_PAGE_BITS].mmdRls (a2) << 16 & 0x0000ffffffff0000L |
 26188:                 (long) (DataBreakPoint.DBP_ON ? DataBreakPoint.dbpUserMap : XEiJ.busUserMap)[a6 >>> XEiJ.BUS_PAGE_BITS].mmdRwz (a6));
 26189:       } else if ((a & 3) == 1) {  //4の倍数+1
 26190:         int d0 = (DataBreakPoint.DBP_ON ? DataBreakPoint.dbpUserMap : XEiJ.busUserMap)[a0 >>> XEiJ.BUS_PAGE_BITS].mmdRbs (a0);
 26191:         M68kException.m6eFSLW ^= M68kException.M6E_FSLW_IOMA_FIRST ^ M68kException.M6E_FSLW_IOMA_SECOND;
 26192:         int a1 = mmuTranslateReadUserData (a + 1);  //4の倍数+2
 26193:         int a3 = mmuTranslateReadUserData (a + 3);  //4の倍数
 26194:         int a7 = mmuTranslateReadUserData (a + 7);  //4の倍数
 26195:         return ((long) d0 << 56 |
 26196:                 (long) (DataBreakPoint.DBP_ON ? DataBreakPoint.dbpUserMap : XEiJ.busUserMap)[a1 >>> XEiJ.BUS_PAGE_BITS].mmdRwz (a1) << 40 |
 26197:                 (long) (DataBreakPoint.DBP_ON ? DataBreakPoint.dbpUserMap : XEiJ.busUserMap)[a3 >>> XEiJ.BUS_PAGE_BITS].mmdRls (a3) << 8 & 0x000000ffffffff00L |
 26198:                 (long) (DataBreakPoint.DBP_ON ? DataBreakPoint.dbpUserMap : XEiJ.busUserMap)[a7 >>> XEiJ.BUS_PAGE_BITS].mmdRbz (a7));
 26199:       } else {  //  //4の倍数+3
 26200:         int d0 = (DataBreakPoint.DBP_ON ? DataBreakPoint.dbpUserMap : XEiJ.busUserMap)[a0 >>> XEiJ.BUS_PAGE_BITS].mmdRbs (a0);
 26201:         M68kException.m6eFSLW ^= M68kException.M6E_FSLW_IOMA_FIRST ^ M68kException.M6E_FSLW_IOMA_SECOND;
 26202:         int a1 = mmuTranslateReadUserData (a + 1);  //4の倍数
 26203:         int a5 = mmuTranslateReadUserData (a + 5);  //4の倍数
 26204:         int a7 = mmuTranslateReadUserData (a + 7);  //4の倍数+2
 26205:         return ((long) d0 << 56 |
 26206:                 (long) (DataBreakPoint.DBP_ON ? DataBreakPoint.dbpUserMap : XEiJ.busUserMap)[a1 >>> XEiJ.BUS_PAGE_BITS].mmdRls (a1) << 24 & 0x00ffffffff000000L |
 26207:                 (long) (DataBreakPoint.DBP_ON ? DataBreakPoint.dbpUserMap : XEiJ.busUserMap)[a5 >>> XEiJ.BUS_PAGE_BITS].mmdRwz (a5) << 8 |
 26208:                 (long) (DataBreakPoint.DBP_ON ? DataBreakPoint.dbpUserMap : XEiJ.busUserMap)[a7 >>> XEiJ.BUS_PAGE_BITS].mmdRbz (a7));
 26209:       }
 26210:     }
 26211:   }  //mmuReadQuadData(int,int)
 26212: 
 26213:   //l = mmuReadQuadSecond (a, supervisor)
 26214:   //  リードクワッド(2番目)
 26215:   //  エクステンデッドとラインの2番目で使う
 26216:   public static long mmuReadQuadSecond (int a, int supervisor) throws M68kException {
 26217:     if (supervisor != 0) {  //スーパーバイザモード
 26218:       M68kException.m6eFSLW = M68kException.M6E_FSLW_IOMA_SECOND | M68kException.M6E_FSLW_RW_READ | M68kException.M6E_FSLW_SIZE_QUAD | M68kException.M6E_FSLW_TM_SUPER_DATA;
 26219:       int a0 = mmuTranslateReadSuperData (a);  //a+1,a+2,a+3,a+4,a+5,a+6,a+7が必要なので上書き不可
 26220:       if ((a & 3) == 0) {  //4の倍数
 26221:         int a4 = mmuTranslateReadSuperData (a + 4);  //4の倍数
 26222:         return ((long) (DataBreakPoint.DBP_ON ? DataBreakPoint.dbpSuperMap : XEiJ.busSuperMap)[a0 >>> XEiJ.BUS_PAGE_BITS].mmdRls (a0) << 32 |
 26223:                 (long) (DataBreakPoint.DBP_ON ? DataBreakPoint.dbpSuperMap : XEiJ.busSuperMap)[a4 >>> XEiJ.BUS_PAGE_BITS].mmdRls (a4) & 0x00000000ffffffffL);
 26224:       } else if ((a & 1) == 0) {  //4の倍数+2
 26225:         int a2 = mmuTranslateReadSuperData (a + 2);  //4の倍数
 26226:         int a6 = mmuTranslateReadSuperData (a + 6);  //4の倍数
 26227:         return ((long) (DataBreakPoint.DBP_ON ? DataBreakPoint.dbpSuperMap : XEiJ.busSuperMap)[a0 >>> XEiJ.BUS_PAGE_BITS].mmdRws (a0) << 48 |
 26228:                 (long) (DataBreakPoint.DBP_ON ? DataBreakPoint.dbpSuperMap : XEiJ.busSuperMap)[a2 >>> XEiJ.BUS_PAGE_BITS].mmdRls (a2) << 16 & 0x0000ffffffff0000L |
 26229:                 (long) (DataBreakPoint.DBP_ON ? DataBreakPoint.dbpSuperMap : XEiJ.busSuperMap)[a6 >>> XEiJ.BUS_PAGE_BITS].mmdRwz (a6));
 26230:       } else if ((a & 3) == 1) {  //4の倍数+1
 26231:         int a1 = mmuTranslateReadSuperData (a + 1);  //4の倍数+2
 26232:         int a3 = mmuTranslateReadSuperData (a + 3);  //4の倍数
 26233:         int a7 = mmuTranslateReadSuperData (a + 7);  //4の倍数
 26234:         return ((long) (DataBreakPoint.DBP_ON ? DataBreakPoint.dbpSuperMap : XEiJ.busSuperMap)[a0 >>> XEiJ.BUS_PAGE_BITS].mmdRbs (a0) << 56 |
 26235:                 (long) (DataBreakPoint.DBP_ON ? DataBreakPoint.dbpSuperMap : XEiJ.busSuperMap)[a1 >>> XEiJ.BUS_PAGE_BITS].mmdRwz (a1) << 40 |
 26236:                 (long) (DataBreakPoint.DBP_ON ? DataBreakPoint.dbpSuperMap : XEiJ.busSuperMap)[a3 >>> XEiJ.BUS_PAGE_BITS].mmdRls (a3) << 8 & 0x000000ffffffff00L |
 26237:                 (long) (DataBreakPoint.DBP_ON ? DataBreakPoint.dbpSuperMap : XEiJ.busSuperMap)[a7 >>> XEiJ.BUS_PAGE_BITS].mmdRbz (a7));
 26238:       } else {  //  //4の倍数+3
 26239:         int a1 = mmuTranslateReadSuperData (a + 1);  //4の倍数
 26240:         int a5 = mmuTranslateReadSuperData (a + 5);  //4の倍数
 26241:         int a7 = mmuTranslateReadSuperData (a + 7);  //4の倍数+2
 26242:         return ((long) (DataBreakPoint.DBP_ON ? DataBreakPoint.dbpSuperMap : XEiJ.busSuperMap)[a0 >>> XEiJ.BUS_PAGE_BITS].mmdRbs (a0) << 56 |
 26243:                 (long) (DataBreakPoint.DBP_ON ? DataBreakPoint.dbpSuperMap : XEiJ.busSuperMap)[a1 >>> XEiJ.BUS_PAGE_BITS].mmdRls (a1) << 24 & 0x00ffffffff000000L |
 26244:                 (long) (DataBreakPoint.DBP_ON ? DataBreakPoint.dbpSuperMap : XEiJ.busSuperMap)[a5 >>> XEiJ.BUS_PAGE_BITS].mmdRwz (a5) << 8 |
 26245:                 (long) (DataBreakPoint.DBP_ON ? DataBreakPoint.dbpSuperMap : XEiJ.busSuperMap)[a7 >>> XEiJ.BUS_PAGE_BITS].mmdRbz (a7));
 26246:       }
 26247:     } else {  //ユーザモード
 26248:       M68kException.m6eFSLW = M68kException.M6E_FSLW_IOMA_SECOND | M68kException.M6E_FSLW_RW_READ | M68kException.M6E_FSLW_SIZE_QUAD | M68kException.M6E_FSLW_TM_USER_DATA;
 26249:       int a0 = mmuTranslateReadUserData (a);  //a+1,a+2,a+3,a+4,a+5,a+6,a+7が必要なので上書き不可
 26250:       if ((a & 3) == 0) {  //4の倍数
 26251:         int a4 = mmuTranslateReadUserData (a + 4);  //4の倍数
 26252:         return ((long) (DataBreakPoint.DBP_ON ? DataBreakPoint.dbpUserMap : XEiJ.busUserMap)[a0 >>> XEiJ.BUS_PAGE_BITS].mmdRls (a0) << 32 |
 26253:                 (long) (DataBreakPoint.DBP_ON ? DataBreakPoint.dbpUserMap : XEiJ.busUserMap)[a4 >>> XEiJ.BUS_PAGE_BITS].mmdRls (a4) & 0x00000000ffffffffL);
 26254:       } else if ((a & 1) == 0) {  //4の倍数+2
 26255:         int a2 = mmuTranslateReadUserData (a + 2);  //4の倍数
 26256:         int a6 = mmuTranslateReadUserData (a + 6);  //4の倍数
 26257:         return ((long) (DataBreakPoint.DBP_ON ? DataBreakPoint.dbpUserMap : XEiJ.busUserMap)[a0 >>> XEiJ.BUS_PAGE_BITS].mmdRws (a0) << 48 |
 26258:                 (long) (DataBreakPoint.DBP_ON ? DataBreakPoint.dbpUserMap : XEiJ.busUserMap)[a2 >>> XEiJ.BUS_PAGE_BITS].mmdRls (a2) << 16 & 0x0000ffffffff0000L |
 26259:                 (long) (DataBreakPoint.DBP_ON ? DataBreakPoint.dbpUserMap : XEiJ.busUserMap)[a6 >>> XEiJ.BUS_PAGE_BITS].mmdRwz (a6));
 26260:       } else if ((a & 3) == 1) {  //4の倍数+1
 26261:         int a1 = mmuTranslateReadUserData (a + 1);  //4の倍数+2
 26262:         int a3 = mmuTranslateReadUserData (a + 3);  //4の倍数
 26263:         int a7 = mmuTranslateReadUserData (a + 7);  //4の倍数
 26264:         return ((long) (DataBreakPoint.DBP_ON ? DataBreakPoint.dbpUserMap : XEiJ.busUserMap)[a0 >>> XEiJ.BUS_PAGE_BITS].mmdRbs (a0) << 56 |
 26265:                 (long) (DataBreakPoint.DBP_ON ? DataBreakPoint.dbpUserMap : XEiJ.busUserMap)[a1 >>> XEiJ.BUS_PAGE_BITS].mmdRwz (a1) << 40 |
 26266:                 (long) (DataBreakPoint.DBP_ON ? DataBreakPoint.dbpUserMap : XEiJ.busUserMap)[a3 >>> XEiJ.BUS_PAGE_BITS].mmdRls (a3) << 8 & 0x000000ffffffff00L |
 26267:                 (long) (DataBreakPoint.DBP_ON ? DataBreakPoint.dbpUserMap : XEiJ.busUserMap)[a7 >>> XEiJ.BUS_PAGE_BITS].mmdRbz (a7));
 26268:       } else {  //  //4の倍数+3
 26269:         int a1 = mmuTranslateReadUserData (a + 1);  //4の倍数
 26270:         int a5 = mmuTranslateReadUserData (a + 5);  //4の倍数
 26271:         int a7 = mmuTranslateReadUserData (a + 7);  //4の倍数+2
 26272:         return ((long) (DataBreakPoint.DBP_ON ? DataBreakPoint.dbpUserMap : XEiJ.busUserMap)[a0 >>> XEiJ.BUS_PAGE_BITS].mmdRbs (a0) << 56 |
 26273:                 (long) (DataBreakPoint.DBP_ON ? DataBreakPoint.dbpUserMap : XEiJ.busUserMap)[a1 >>> XEiJ.BUS_PAGE_BITS].mmdRls (a1) << 24 & 0x00ffffffff000000L |
 26274:                 (long) (DataBreakPoint.DBP_ON ? DataBreakPoint.dbpUserMap : XEiJ.busUserMap)[a5 >>> XEiJ.BUS_PAGE_BITS].mmdRwz (a5) << 8 |
 26275:                 (long) (DataBreakPoint.DBP_ON ? DataBreakPoint.dbpUserMap : XEiJ.busUserMap)[a7 >>> XEiJ.BUS_PAGE_BITS].mmdRbz (a7));
 26276:       }
 26277:     }
 26278:   }  //mmuReadQuadSecond(int,int)
 26279: 
 26280:   //l = mmuReadQuadExword (a, supervisor)
 26281:   //  リードクワッド(拡張ワード)
 26282:   //  イミディエイトで使う
 26283:   public static long mmuReadQuadExword (int a, int supervisor) throws M68kException {
 26284:     if (supervisor != 0) {  //スーパーバイザモード
 26285:       M68kException.m6eFSLW = M68kException.M6E_FSLW_IOMA_EXWORD | M68kException.M6E_FSLW_RW_READ | M68kException.M6E_FSLW_SIZE_QUAD | M68kException.M6E_FSLW_TM_SUPER_CODE;
 26286:       int a0 = mmuTranslateReadSuperData (a);  //a+2,a+4,a+6が必要なので上書き不可
 26287:       if ((a & 2) == 0) {  //4の倍数
 26288:         int a4 = mmuTranslateReadSuperData (a + 4);  //4の倍数
 26289:         return ((long) (DataBreakPoint.DBP_ON ? DataBreakPoint.dbpSuperMap : XEiJ.busSuperMap)[a0 >>> XEiJ.BUS_PAGE_BITS].mmdRls (a0) << 32 |
 26290:                 (long) (DataBreakPoint.DBP_ON ? DataBreakPoint.dbpSuperMap : XEiJ.busSuperMap)[a4 >>> XEiJ.BUS_PAGE_BITS].mmdRls (a4) & 0x00000000ffffffffL);
 26291:       } else {  //4の倍数+2
 26292:         int a2 = mmuTranslateReadSuperData (a + 2);  //4の倍数
 26293:         int a6 = mmuTranslateReadSuperData (a + 6);  //4の倍数
 26294:         return ((long) (DataBreakPoint.DBP_ON ? DataBreakPoint.dbpSuperMap : XEiJ.busSuperMap)[a0 >>> XEiJ.BUS_PAGE_BITS].mmdRws (a0) << 48 |
 26295:                 (long) (DataBreakPoint.DBP_ON ? DataBreakPoint.dbpSuperMap : XEiJ.busSuperMap)[a2 >>> XEiJ.BUS_PAGE_BITS].mmdRls (a2) << 16 & 0x0000ffffffff0000L |
 26296:                 (long) (DataBreakPoint.DBP_ON ? DataBreakPoint.dbpSuperMap : XEiJ.busSuperMap)[a6 >>> XEiJ.BUS_PAGE_BITS].mmdRwz (a6));
 26297:       }
 26298:     } else {  //ユーザモード
 26299:       M68kException.m6eFSLW = M68kException.M6E_FSLW_IOMA_EXWORD | M68kException.M6E_FSLW_RW_READ | M68kException.M6E_FSLW_SIZE_QUAD | M68kException.M6E_FSLW_TM_USER_CODE;
 26300:       int a0 = mmuTranslateReadUserData (a);  //a+2,a+4,a+6が必要なので上書き不可
 26301:       if ((a & 2) == 0) {  //4の倍数
 26302:         int a4 = mmuTranslateReadUserData (a + 4);  //4の倍数
 26303:         return ((long) (DataBreakPoint.DBP_ON ? DataBreakPoint.dbpUserMap : XEiJ.busUserMap)[a0 >>> XEiJ.BUS_PAGE_BITS].mmdRls (a0) << 32 |
 26304:                 (long) (DataBreakPoint.DBP_ON ? DataBreakPoint.dbpUserMap : XEiJ.busUserMap)[a4 >>> XEiJ.BUS_PAGE_BITS].mmdRls (a4) & 0x00000000ffffffffL);
 26305:       } else {  //4の倍数+2
 26306:         int a2 = mmuTranslateReadUserData (a + 2);  //4の倍数
 26307:         int a6 = mmuTranslateReadUserData (a + 6);  //4の倍数
 26308:         return ((long) (DataBreakPoint.DBP_ON ? DataBreakPoint.dbpUserMap : XEiJ.busUserMap)[a0 >>> XEiJ.BUS_PAGE_BITS].mmdRws (a0) << 48 |
 26309:                 (long) (DataBreakPoint.DBP_ON ? DataBreakPoint.dbpUserMap : XEiJ.busUserMap)[a2 >>> XEiJ.BUS_PAGE_BITS].mmdRls (a2) << 16 & 0x0000ffffffff0000L |
 26310:                 (long) (DataBreakPoint.DBP_ON ? DataBreakPoint.dbpUserMap : XEiJ.busUserMap)[a6 >>> XEiJ.BUS_PAGE_BITS].mmdRwz (a6));
 26311:       }
 26312:     }
 26313:   }  //mmuReadQuadExword(int,int)
 26314: 
 26315:   //mmuReadByteArray (address, array, offset, length, supervisor)
 26316:   //  リードバイト配列
 26317:   public static void mmuReadByteArray (int address, byte[] array, int offset, int length, int supervisor) throws M68kException {
 26318:     if (false) {  //1バイトずつアドレス変換する
 26319:       for (int index = 0; index < length; index++) {
 26320:         array[offset + index] = mmuReadByteSignData (address + index, supervisor);
 26321:       }
 26322:     } else {  //1ページずつアドレス変換する
 26323:       int pageSize = Math.min (XEiJ.BUS_PAGE_SIZE, mmuPageSize);
 26324:       if (supervisor != 0) {  //スーパーバイザモード
 26325:         if (false) {  //1バイトずつ転送する
 26326:           M68kException.m6eFSLW = M68kException.M6E_FSLW_IOMA_FIRST | M68kException.M6E_FSLW_RW_READ | M68kException.M6E_FSLW_SIZE_BYTE | M68kException.M6E_FSLW_TM_SUPER_DATA;
 26327:         }
 26328:         MemoryMappedDevice[] mm = DataBreakPoint.DBP_ON ? DataBreakPoint.dbpSuperMap : XEiJ.busSuperMap;
 26329:         while (0 < length) {
 26330:           int l = Math.min (pageSize - (address & (pageSize - 1)), length);  //今回転送する長さ
 26331:           int t = mmuTranslateReadSuperData (address);
 26332:           MemoryMappedDevice d = mm[t >>> XEiJ.BUS_PAGE_BITS];
 26333:           if (false) {  //1バイトずつ転送する
 26334:             for (int i = 0; i < l; i++) {
 26335:               array[offset + i] = d.mmdRbs (t + i);
 26336:             }
 26337:           } else {  //4バイトずつ転送する。ウェイトサイクルを減らす
 26338:             int o = offset;
 26339:             int z = t + l;
 26340:             if ((t & 1) != 0 && t < z) {  //2n+1で残り1以上。1バイト転送する
 26341:               M68kException.m6eFSLW = M68kException.M6E_FSLW_IOMA_FIRST | M68kException.M6E_FSLW_RW_READ | M68kException.M6E_FSLW_SIZE_BYTE | M68kException.M6E_FSLW_TM_SUPER_DATA;
 26342:               array[o++] = d.mmdRbs (t++);
 26343:             }
 26344:             if ((t & 2) != 0 && t + 1 < z) {  //4n+2で残り2以上。2バイト転送する
 26345:               M68kException.m6eFSLW = M68kException.M6E_FSLW_IOMA_FIRST | M68kException.M6E_FSLW_RW_READ | M68kException.M6E_FSLW_SIZE_WORD | M68kException.M6E_FSLW_TM_SUPER_DATA;
 26346:               int x = d.mmdRws (t);
 26347:               array[o    ] = (byte) (x >> 8);
 26348:               array[o + 1] = (byte)  x;
 26349:               t += 2;
 26350:               o += 2;
 26351:             }
 26352:             if (t + 3 < z) {  //4nで残り4以上。4バイトずつ転送する
 26353:               M68kException.m6eFSLW = M68kException.M6E_FSLW_IOMA_FIRST | M68kException.M6E_FSLW_RW_READ | M68kException.M6E_FSLW_SIZE_LONG | M68kException.M6E_FSLW_TM_SUPER_DATA;
 26354:               do {
 26355:                 int x = d.mmdRls (t);
 26356:                 array[o    ] = (byte) (x >> 24);
 26357:                 array[o + 1] = (byte) (x >> 16);
 26358:                 array[o + 2] = (byte) (x >>  8);
 26359:                 array[o + 3] = (byte)  x;
 26360:                 t += 4;
 26361:                 o += 4;
 26362:               } while (t + 3 < z);
 26363:             }
 26364:             if (t + 1 < z) {  //4nで残り2または3。2バイト転送する
 26365:               M68kException.m6eFSLW = M68kException.M6E_FSLW_IOMA_FIRST | M68kException.M6E_FSLW_RW_READ | M68kException.M6E_FSLW_SIZE_WORD | M68kException.M6E_FSLW_TM_SUPER_DATA;
 26366:               int x = d.mmdRws (t);
 26367:               array[o    ] = (byte) (x >> 8);
 26368:               array[o + 1] = (byte)  x;
 26369:               t += 2;
 26370:               o += 2;
 26371:             }
 26372:             if (t < z) {  //4nで残り1。1バイト転送する
 26373:               M68kException.m6eFSLW = M68kException.M6E_FSLW_IOMA_FIRST | M68kException.M6E_FSLW_RW_READ | M68kException.M6E_FSLW_SIZE_BYTE | M68kException.M6E_FSLW_TM_SUPER_DATA;
 26374:               array[o++] = d.mmdRbs (t++);
 26375:             }
 26376:           }  //if 1バイトずつ/4バイトずつ
 26377:           address += l;
 26378:           offset += l;
 26379:           length -= l;
 26380:         }  //while 0<length
 26381:       } else {  //ユーザモード
 26382:         if (false) {  //1バイトずつ転送する
 26383:           M68kException.m6eFSLW = M68kException.M6E_FSLW_IOMA_FIRST | M68kException.M6E_FSLW_RW_READ | M68kException.M6E_FSLW_SIZE_BYTE | M68kException.M6E_FSLW_TM_USER_DATA;
 26384:         }
 26385:         MemoryMappedDevice[] mm = DataBreakPoint.DBP_ON ? DataBreakPoint.dbpUserMap : XEiJ.busUserMap;
 26386:         while (0 < length) {
 26387:           int l = Math.min (pageSize - (address & (pageSize - 1)), length);  //今回転送する長さ
 26388:           int t = mmuTranslateReadUserData (address);
 26389:           MemoryMappedDevice d = mm[t >>> XEiJ.BUS_PAGE_BITS];
 26390:           if (false) {  //1バイトずつ転送する
 26391:             for (int i = 0; i < l; i++) {
 26392:               array[offset + i] = d.mmdRbs (t + i);
 26393:             }
 26394:           } else {  //4バイトずつ転送する。ウェイトサイクルを減らす
 26395:             int o = offset;
 26396:             int z = t + l;
 26397:             if ((t & 1) != 0 && t < z) {  //2n+1で残り1以上。1バイト転送する
 26398:               M68kException.m6eFSLW = M68kException.M6E_FSLW_IOMA_FIRST | M68kException.M6E_FSLW_RW_READ | M68kException.M6E_FSLW_SIZE_BYTE | M68kException.M6E_FSLW_TM_USER_DATA;
 26399:               array[o++] = d.mmdRbs (t++);
 26400:             }
 26401:             if ((t & 2) != 0 && t + 1 < z) {  //4n+2で残り2以上。2バイト転送する
 26402:               M68kException.m6eFSLW = M68kException.M6E_FSLW_IOMA_FIRST | M68kException.M6E_FSLW_RW_READ | M68kException.M6E_FSLW_SIZE_WORD | M68kException.M6E_FSLW_TM_USER_DATA;
 26403:               int x = d.mmdRws (t);
 26404:               array[o    ] = (byte) (x >> 8);
 26405:               array[o + 1] = (byte)  x;
 26406:               t += 2;
 26407:               o += 2;
 26408:             }
 26409:             if (t + 3 < z) {  //4nで残り4以上。4バイトずつ転送する
 26410:               M68kException.m6eFSLW = M68kException.M6E_FSLW_IOMA_FIRST | M68kException.M6E_FSLW_RW_READ | M68kException.M6E_FSLW_SIZE_LONG | M68kException.M6E_FSLW_TM_USER_DATA;
 26411:               do {
 26412:                 int x = d.mmdRls (t);
 26413:                 array[o    ] = (byte) (x >> 24);
 26414:                 array[o + 1] = (byte) (x >> 16);
 26415:                 array[o + 2] = (byte) (x >>  8);
 26416:                 array[o + 3] = (byte)  x;
 26417:                 t += 4;
 26418:                 o += 4;
 26419:               } while (t + 3 < z);
 26420:             }
 26421:             if (t + 1 < z) {  //4nで残り2または3。2バイト転送する
 26422:               M68kException.m6eFSLW = M68kException.M6E_FSLW_IOMA_FIRST | M68kException.M6E_FSLW_RW_READ | M68kException.M6E_FSLW_SIZE_WORD | M68kException.M6E_FSLW_TM_USER_DATA;
 26423:               int x = d.mmdRws (t);
 26424:               array[o    ] = (byte) (x >> 8);
 26425:               array[o + 1] = (byte)  x;
 26426:               t += 2;
 26427:               o += 2;
 26428:             }
 26429:             if (t < z) {  //4nで残り1。1バイト転送する
 26430:               M68kException.m6eFSLW = M68kException.M6E_FSLW_IOMA_FIRST | M68kException.M6E_FSLW_RW_READ | M68kException.M6E_FSLW_SIZE_BYTE | M68kException.M6E_FSLW_TM_USER_DATA;
 26431:               array[o++] = d.mmdRbs (t++);
 26432:             }
 26433:           }  //if 1バイトずつ/4バイトずつ
 26434:           address += l;
 26435:           offset += l;
 26436:           length -= l;
 26437:         }  //while 0<length
 26438:       }  //if スーパーバイザモード/ユーザモード
 26439:     }  //if 1バイトずつ/1ページずつ
 26440:   }  //mmuReadByteArray(int,byte[],int,int,int)
 26441: 
 26442:   //--------------------------------------------------------------------------------
 26443:   //リードモディファイライトのリード
 26444:   //  アドレス変換はライト
 26445:   //  FSLWのRead and WriteはRead-Modify-Write
 26446: 
 26447:   //d = mmuModifyByteSignData (a, supervisor)
 26448:   //  リードモディファイライトのリードバイト符号拡張(データ)
 26449:   public static byte mmuModifyByteSignData (int a, int supervisor) throws M68kException {
 26450:     if (supervisor != 0) {  //スーパーバイザモード
 26451:       M68kException.m6eFSLW = M68kException.M6E_FSLW_IOMA_FIRST | M68kException.M6E_FSLW_RW_MODIFY | M68kException.M6E_FSLW_SIZE_BYTE | M68kException.M6E_FSLW_TM_SUPER_DATA;
 26452:       int a0 = mmuTranslateWriteSuperData (a);
 26453:       return (a ^ a0) == 1 ? -1 : (DataBreakPoint.DBP_ON ? DataBreakPoint.dbpSuperMap : XEiJ.busSuperMap)[a0 >>> XEiJ.BUS_PAGE_BITS].mmdRbs (a0);
 26454:     } else {  //ユーザモード
 26455:       M68kException.m6eFSLW = M68kException.M6E_FSLW_IOMA_FIRST | M68kException.M6E_FSLW_RW_MODIFY | M68kException.M6E_FSLW_SIZE_BYTE | M68kException.M6E_FSLW_TM_USER_DATA;
 26456:       int a0 = mmuTranslateWriteUserData (a);
 26457:       return (a ^ a0) == 1 ? -1 : (DataBreakPoint.DBP_ON ? DataBreakPoint.dbpUserMap : XEiJ.busUserMap)[a0 >>> XEiJ.BUS_PAGE_BITS].mmdRbs (a0);
 26458:     }
 26459:   }  //mmuModifyByteSignData(int,int)
 26460: 
 26461:   //d = mmuModifyByteZeroData (a, supervisor)
 26462:   //  リードモディファイライトのリードバイトゼロ拡張(データ)
 26463:   public static int mmuModifyByteZeroData (int a, int supervisor) throws M68kException {
 26464:     if (supervisor != 0) {  //スーパーバイザモード
 26465:       M68kException.m6eFSLW = M68kException.M6E_FSLW_IOMA_FIRST | M68kException.M6E_FSLW_RW_MODIFY | M68kException.M6E_FSLW_SIZE_BYTE | M68kException.M6E_FSLW_TM_SUPER_DATA;
 26466:       int a0 = mmuTranslateWriteSuperData (a);
 26467:       return (a ^ a0) == 1 ? 255 : (DataBreakPoint.DBP_ON ? DataBreakPoint.dbpSuperMap : XEiJ.busSuperMap)[a0 >>> XEiJ.BUS_PAGE_BITS].mmdRbz (a0);
 26468:     } else {  //ユーザモード
 26469:       M68kException.m6eFSLW = M68kException.M6E_FSLW_IOMA_FIRST | M68kException.M6E_FSLW_RW_MODIFY | M68kException.M6E_FSLW_SIZE_BYTE | M68kException.M6E_FSLW_TM_USER_DATA;
 26470:       int a0 = mmuTranslateWriteUserData (a);
 26471:       return (a ^ a0) == 1 ? 255 : (DataBreakPoint.DBP_ON ? DataBreakPoint.dbpUserMap : XEiJ.busUserMap)[a0 >>> XEiJ.BUS_PAGE_BITS].mmdRbz (a0);
 26472:     }
 26473:   }  //mmuModifyByteZeroData(int,int)
 26474: 
 26475:   //d = mmuModifyWordSignData (a, supervisor)
 26476:   //  リードモディファイライトのリードワード符号拡張(データ)
 26477:   public static int mmuModifyWordSignData (int a, int supervisor) throws M68kException {
 26478:     if (supervisor != 0) {  //スーパーバイザモード
 26479:       M68kException.m6eFSLW = M68kException.M6E_FSLW_IOMA_FIRST | M68kException.M6E_FSLW_RW_MODIFY | M68kException.M6E_FSLW_SIZE_WORD | M68kException.M6E_FSLW_TM_SUPER_DATA;
 26480:       int a0 = mmuTranslateWriteSuperData (a);  //a+1が必要なので上書き不可
 26481:       if ((a & 1) == 0) {  //偶数
 26482:         return (DataBreakPoint.DBP_ON ? DataBreakPoint.dbpSuperMap : XEiJ.busSuperMap)[a0 >>> XEiJ.BUS_PAGE_BITS].mmdRws (a0);
 26483:       } else {  //奇数
 26484:         int d0 = (DataBreakPoint.DBP_ON ? DataBreakPoint.dbpSuperMap : XEiJ.busSuperMap)[a0 >>> XEiJ.BUS_PAGE_BITS].mmdRbs (a0);
 26485:         M68kException.m6eFSLW ^= M68kException.M6E_FSLW_IOMA_FIRST ^ M68kException.M6E_FSLW_IOMA_SECOND;
 26486:         int a1 = mmuTranslateWriteSuperData (a + 1);  //偶数
 26487:         return (d0 << 8 |
 26488:                 (DataBreakPoint.DBP_ON ? DataBreakPoint.dbpSuperMap : XEiJ.busSuperMap)[a1 >>> XEiJ.BUS_PAGE_BITS].mmdRbz (a1));
 26489:       }
 26490:     } else {  //ユーザモード
 26491:       M68kException.m6eFSLW = M68kException.M6E_FSLW_IOMA_FIRST | M68kException.M6E_FSLW_RW_MODIFY | M68kException.M6E_FSLW_SIZE_WORD | M68kException.M6E_FSLW_TM_USER_DATA;
 26492:       int a0 = mmuTranslateWriteUserData (a);  //a+1が必要なので上書き不可
 26493:       if ((a & 1) == 0) {  //偶数
 26494:         return (DataBreakPoint.DBP_ON ? DataBreakPoint.dbpUserMap : XEiJ.busUserMap)[a0 >>> XEiJ.BUS_PAGE_BITS].mmdRws (a0);
 26495:       } else {  //奇数
 26496:         int d0 = (DataBreakPoint.DBP_ON ? DataBreakPoint.dbpUserMap : XEiJ.busUserMap)[a0 >>> XEiJ.BUS_PAGE_BITS].mmdRbs (a0);
 26497:         M68kException.m6eFSLW ^= M68kException.M6E_FSLW_IOMA_FIRST ^ M68kException.M6E_FSLW_IOMA_SECOND;
 26498:         int a1 = mmuTranslateWriteUserData (a + 1);  //偶数
 26499:         return (d0 << 8 |
 26500:                 (DataBreakPoint.DBP_ON ? DataBreakPoint.dbpUserMap : XEiJ.busUserMap)[a1 >>> XEiJ.BUS_PAGE_BITS].mmdRbz (a1));
 26501:       }
 26502:     }
 26503:   }  //mmuModifyWordSignData(int,int)
 26504: 
 26505:   //d = mmuModifyWordZeroData (a, supervisor)
 26506:   //  リードモディファイライトのリードワードゼロ拡張(データ)
 26507:   public static int mmuModifyWordZeroData (int a, int supervisor) throws M68kException {
 26508:     if (supervisor != 0) {  //スーパーバイザモード
 26509:       M68kException.m6eFSLW = M68kException.M6E_FSLW_IOMA_FIRST | M68kException.M6E_FSLW_RW_MODIFY | M68kException.M6E_FSLW_SIZE_WORD | M68kException.M6E_FSLW_TM_SUPER_DATA;
 26510:       int a0 = mmuTranslateWriteSuperData (a);  //a+1が必要なので上書き不可
 26511:       if ((a & 1) == 0) {  //偶数
 26512:         return (DataBreakPoint.DBP_ON ? DataBreakPoint.dbpSuperMap : XEiJ.busSuperMap)[a0 >>> XEiJ.BUS_PAGE_BITS].mmdRwz (a0);
 26513:       } else {  //奇数
 26514:         int d0 = (DataBreakPoint.DBP_ON ? DataBreakPoint.dbpSuperMap : XEiJ.busSuperMap)[a0 >>> XEiJ.BUS_PAGE_BITS].mmdRbz (a0);
 26515:         M68kException.m6eFSLW ^= M68kException.M6E_FSLW_IOMA_FIRST ^ M68kException.M6E_FSLW_IOMA_SECOND;
 26516:         int a1 = mmuTranslateWriteSuperData (a + 1);  //偶数
 26517:         return (d0 << 8 |
 26518:                 (DataBreakPoint.DBP_ON ? DataBreakPoint.dbpSuperMap : XEiJ.busSuperMap)[a1 >>> XEiJ.BUS_PAGE_BITS].mmdRbz (a1));
 26519:       }
 26520:     } else {  //ユーザモード
 26521:       M68kException.m6eFSLW = M68kException.M6E_FSLW_IOMA_FIRST | M68kException.M6E_FSLW_RW_MODIFY | M68kException.M6E_FSLW_SIZE_WORD | M68kException.M6E_FSLW_TM_USER_DATA;
 26522:       int a0 = mmuTranslateWriteUserData (a);  //a+1が必要なので上書き不可
 26523:       if ((a & 1) == 0) {  //偶数
 26524:         return (DataBreakPoint.DBP_ON ? DataBreakPoint.dbpUserMap : XEiJ.busUserMap)[a0 >>> XEiJ.BUS_PAGE_BITS].mmdRwz (a0);
 26525:       } else {  //奇数
 26526:         int d0 = (DataBreakPoint.DBP_ON ? DataBreakPoint.dbpUserMap : XEiJ.busUserMap)[a0 >>> XEiJ.BUS_PAGE_BITS].mmdRbz (a0);
 26527:         M68kException.m6eFSLW ^= M68kException.M6E_FSLW_IOMA_FIRST ^ M68kException.M6E_FSLW_IOMA_SECOND;
 26528:         int a1 = mmuTranslateWriteUserData (a + 1);  //偶数
 26529:         return (d0 << 8 |
 26530:                 (DataBreakPoint.DBP_ON ? DataBreakPoint.dbpUserMap : XEiJ.busUserMap)[a1 >>> XEiJ.BUS_PAGE_BITS].mmdRbz (a1));
 26531:       }
 26532:     }
 26533:   }  //mmuModifyWordZeroData(int,int)
 26534: 
 26535:   //d = mmuModifyWordSignEven (a, supervisor)
 26536:   //  リードモディファイライトのリードワード符号拡張(偶数)
 26537:   public static int mmuModifyWordSignEven (int a, int supervisor) throws M68kException {
 26538:     if (supervisor != 0) {  //スーパーバイザモード
 26539:       M68kException.m6eFSLW = M68kException.M6E_FSLW_IOMA_FIRST | M68kException.M6E_FSLW_RW_MODIFY | M68kException.M6E_FSLW_SIZE_WORD | M68kException.M6E_FSLW_TM_SUPER_DATA;
 26540:       a = mmuTranslateWriteSuperData (a);
 26541:       return (DataBreakPoint.DBP_ON ? DataBreakPoint.dbpSuperMap : XEiJ.busSuperMap)[a >>> XEiJ.BUS_PAGE_BITS].mmdRws (a);
 26542:     } else {  //ユーザモード
 26543:       M68kException.m6eFSLW = M68kException.M6E_FSLW_IOMA_FIRST | M68kException.M6E_FSLW_RW_MODIFY | M68kException.M6E_FSLW_SIZE_WORD | M68kException.M6E_FSLW_TM_USER_DATA;
 26544:       a = mmuTranslateWriteUserData (a);
 26545:       return (DataBreakPoint.DBP_ON ? DataBreakPoint.dbpUserMap : XEiJ.busUserMap)[a >>> XEiJ.BUS_PAGE_BITS].mmdRws (a);
 26546:     }
 26547:   }  //mmuModifyWordSignEven(int,int)
 26548: 
 26549:   //d = mmuModifyWordZeroEven (a, supervisor)
 26550:   //  リードモディファイライトのリードワードゼロ拡張(偶数)
 26551:   public static int mmuModifyWordZeroEven (int a, int supervisor) throws M68kException {
 26552:     if (supervisor != 0) {  //スーパーバイザモード
 26553:       M68kException.m6eFSLW = M68kException.M6E_FSLW_IOMA_FIRST | M68kException.M6E_FSLW_RW_MODIFY | M68kException.M6E_FSLW_SIZE_WORD | M68kException.M6E_FSLW_TM_SUPER_DATA;
 26554:       a = mmuTranslateWriteSuperData (a);
 26555:       return (DataBreakPoint.DBP_ON ? DataBreakPoint.dbpSuperMap : XEiJ.busSuperMap)[a >>> XEiJ.BUS_PAGE_BITS].mmdRwz (a);
 26556:     } else {  //ユーザモード
 26557:       M68kException.m6eFSLW = M68kException.M6E_FSLW_IOMA_FIRST | M68kException.M6E_FSLW_RW_MODIFY | M68kException.M6E_FSLW_SIZE_WORD | M68kException.M6E_FSLW_TM_USER_DATA;
 26558:       a = mmuTranslateWriteUserData (a);
 26559:       return (DataBreakPoint.DBP_ON ? DataBreakPoint.dbpUserMap : XEiJ.busUserMap)[a >>> XEiJ.BUS_PAGE_BITS].mmdRwz (a);
 26560:     }
 26561:   }  //mmuModifyWordZeroEven(int,int)
 26562: 
 26563:   //d = mmuModifyLongData (a, supervisor)
 26564:   //  リードモディファイライトのリードロング(データ)
 26565:   public static int mmuModifyLongData (int a, int supervisor) throws M68kException {
 26566:     if (supervisor != 0) {  //スーパーバイザモード
 26567:       M68kException.m6eFSLW = M68kException.M6E_FSLW_IOMA_FIRST | M68kException.M6E_FSLW_RW_MODIFY | M68kException.M6E_FSLW_SIZE_LONG | M68kException.M6E_FSLW_TM_SUPER_DATA;
 26568:       int a0 = mmuTranslateWriteSuperData (a);  //a+1,a+2,a+3が必要なので上書き不可
 26569:       if ((a & 3) == 0) {  //4の倍数
 26570:         return (DataBreakPoint.DBP_ON ? DataBreakPoint.dbpSuperMap : XEiJ.busSuperMap)[a0 >>> XEiJ.BUS_PAGE_BITS].mmdRls (a0);
 26571:       } else if ((a & 1) == 0) {  //4の倍数+2
 26572:         int d0 = (DataBreakPoint.DBP_ON ? DataBreakPoint.dbpSuperMap : XEiJ.busSuperMap)[a0 >>> XEiJ.BUS_PAGE_BITS].mmdRws (a0);
 26573:         M68kException.m6eFSLW ^= M68kException.M6E_FSLW_IOMA_FIRST ^ M68kException.M6E_FSLW_IOMA_SECOND;
 26574:         int a2 = mmuTranslateWriteSuperData (a + 2);  //偶数
 26575:         return (d0 << 16 |
 26576:                 (DataBreakPoint.DBP_ON ? DataBreakPoint.dbpSuperMap : XEiJ.busSuperMap)[a2 >>> XEiJ.BUS_PAGE_BITS].mmdRwz (a2));
 26577:       } else {  //奇数
 26578:         int d0 = (DataBreakPoint.DBP_ON ? DataBreakPoint.dbpSuperMap : XEiJ.busSuperMap)[a0 >>> XEiJ.BUS_PAGE_BITS].mmdRbs (a0);
 26579:         M68kException.m6eFSLW ^= M68kException.M6E_FSLW_IOMA_FIRST ^ M68kException.M6E_FSLW_IOMA_SECOND;
 26580:         int a1 = mmuTranslateWriteSuperData (a + 1);  //偶数
 26581:         int a3 = mmuTranslateWriteSuperData (a + 3);  //偶数
 26582:         return (d0 << 24 |
 26583:                 (DataBreakPoint.DBP_ON ? DataBreakPoint.dbpSuperMap : XEiJ.busSuperMap)[a1 >>> XEiJ.BUS_PAGE_BITS].mmdRwz (a1) << 8 |
 26584:                 (DataBreakPoint.DBP_ON ? DataBreakPoint.dbpSuperMap : XEiJ.busSuperMap)[a3 >>> XEiJ.BUS_PAGE_BITS].mmdRbz (a3));
 26585:       }
 26586:     } else {  //ユーザモード
 26587:       M68kException.m6eFSLW = M68kException.M6E_FSLW_IOMA_FIRST | M68kException.M6E_FSLW_RW_MODIFY | M68kException.M6E_FSLW_SIZE_LONG | M68kException.M6E_FSLW_TM_USER_DATA;
 26588:       int a0 = mmuTranslateWriteUserData (a);  //a+1,a+2,a+3が必要なので上書き不可
 26589:       if ((a & 3) == 0) {  //4の倍数
 26590:         return (DataBreakPoint.DBP_ON ? DataBreakPoint.dbpUserMap : XEiJ.busUserMap)[a0 >>> XEiJ.BUS_PAGE_BITS].mmdRls (a0);
 26591:       } else if ((a & 1) == 0) {  //4の倍数+2
 26592:         int d0 = (DataBreakPoint.DBP_ON ? DataBreakPoint.dbpUserMap : XEiJ.busUserMap)[a0 >>> XEiJ.BUS_PAGE_BITS].mmdRws (a0);
 26593:         M68kException.m6eFSLW ^= M68kException.M6E_FSLW_IOMA_FIRST ^ M68kException.M6E_FSLW_IOMA_SECOND;
 26594:         int a2 = mmuTranslateWriteUserData (a + 2);  //偶数
 26595:         return (d0 << 16 |
 26596:                 (DataBreakPoint.DBP_ON ? DataBreakPoint.dbpUserMap : XEiJ.busUserMap)[a2 >>> XEiJ.BUS_PAGE_BITS].mmdRwz (a2));
 26597:       } else {  //奇数
 26598:         int d0 = (DataBreakPoint.DBP_ON ? DataBreakPoint.dbpUserMap : XEiJ.busUserMap)[a0 >>> XEiJ.BUS_PAGE_BITS].mmdRbs (a0);
 26599:         M68kException.m6eFSLW ^= M68kException.M6E_FSLW_IOMA_FIRST ^ M68kException.M6E_FSLW_IOMA_SECOND;
 26600:         int a1 = mmuTranslateWriteUserData (a + 1);  //偶数
 26601:         int a3 = mmuTranslateWriteUserData (a + 3);  //偶数
 26602:         return (d0 << 24 |
 26603:                 (DataBreakPoint.DBP_ON ? DataBreakPoint.dbpUserMap : XEiJ.busUserMap)[a1 >>> XEiJ.BUS_PAGE_BITS].mmdRwz (a1) << 8 |
 26604:                 (DataBreakPoint.DBP_ON ? DataBreakPoint.dbpUserMap : XEiJ.busUserMap)[a3 >>> XEiJ.BUS_PAGE_BITS].mmdRbz (a3));
 26605:       }
 26606:     }
 26607:   }  //mmuModifyLongData(int,int)
 26608: 
 26609:   //d = mmuModifyLongEven (a, supervisor)
 26610:   //  リードモディファイライトのリードロング(偶数)
 26611:   public static int mmuModifyLongEven (int a, int supervisor) throws M68kException {
 26612:     if (supervisor != 0) {  //スーパーバイザモード
 26613:       M68kException.m6eFSLW = M68kException.M6E_FSLW_IOMA_FIRST | M68kException.M6E_FSLW_RW_MODIFY | M68kException.M6E_FSLW_SIZE_LONG | M68kException.M6E_FSLW_TM_SUPER_DATA;
 26614:       int a0 = mmuTranslateWriteSuperData (a);  //a+2が必要なので上書き不可
 26615:       if ((a & 2) == 0) {  //4の倍数
 26616:         return (DataBreakPoint.DBP_ON ? DataBreakPoint.dbpSuperMap : XEiJ.busSuperMap)[a0 >>> XEiJ.BUS_PAGE_BITS].mmdRls (a0);
 26617:       } else {  //4の倍数+2
 26618:         int d0 = (DataBreakPoint.DBP_ON ? DataBreakPoint.dbpSuperMap : XEiJ.busSuperMap)[a0 >>> XEiJ.BUS_PAGE_BITS].mmdRws (a0);
 26619:         M68kException.m6eFSLW ^= M68kException.M6E_FSLW_IOMA_FIRST ^ M68kException.M6E_FSLW_IOMA_SECOND;
 26620:         int a2 = mmuTranslateWriteSuperData (a + 2);  //偶数
 26621:         return (d0 << 16 |
 26622:                 (DataBreakPoint.DBP_ON ? DataBreakPoint.dbpSuperMap : XEiJ.busSuperMap)[a2 >>> XEiJ.BUS_PAGE_BITS].mmdRwz (a2));
 26623:       }
 26624:     } else {  //ユーザモード
 26625:       M68kException.m6eFSLW = M68kException.M6E_FSLW_IOMA_FIRST | M68kException.M6E_FSLW_RW_MODIFY | M68kException.M6E_FSLW_SIZE_LONG | M68kException.M6E_FSLW_TM_USER_DATA;
 26626:       int a0 = mmuTranslateWriteUserData (a);  //a+2が必要なので上書き不可
 26627:       if ((a & 2) == 0) {  //4の倍数
 26628:         return (DataBreakPoint.DBP_ON ? DataBreakPoint.dbpUserMap : XEiJ.busUserMap)[a0 >>> XEiJ.BUS_PAGE_BITS].mmdRls (a0);
 26629:       } else {  //4の倍数+2
 26630:         int d0 = (DataBreakPoint.DBP_ON ? DataBreakPoint.dbpUserMap : XEiJ.busUserMap)[a0 >>> XEiJ.BUS_PAGE_BITS].mmdRws (a0);
 26631:         M68kException.m6eFSLW ^= M68kException.M6E_FSLW_IOMA_FIRST ^ M68kException.M6E_FSLW_IOMA_SECOND;
 26632:         int a2 = mmuTranslateWriteUserData (a + 2);  //偶数
 26633:         return (d0 << 16 |
 26634:                 (DataBreakPoint.DBP_ON ? DataBreakPoint.dbpUserMap : XEiJ.busUserMap)[a2 >>> XEiJ.BUS_PAGE_BITS].mmdRwz (a2));
 26635:       }
 26636:     }
 26637:   }  //mmuModifyLongEven(int,int)
 26638: 
 26639:   //d = mmuModifyLongFour (a, supervisor)
 26640:   //  リードモディファイライトのリードロング(4の倍数)
 26641:   public static int mmuModifyLongFour (int a, int supervisor) throws M68kException {
 26642:     if (supervisor != 0) {  //スーパーバイザモード
 26643:       M68kException.m6eFSLW = M68kException.M6E_FSLW_IOMA_FIRST | M68kException.M6E_FSLW_RW_MODIFY | M68kException.M6E_FSLW_SIZE_LONG | M68kException.M6E_FSLW_TM_SUPER_DATA;
 26644:       a = mmuTranslateWriteSuperData (a);
 26645:       return (DataBreakPoint.DBP_ON ? DataBreakPoint.dbpSuperMap : XEiJ.busSuperMap)[a >>> XEiJ.BUS_PAGE_BITS].mmdRls (a);
 26646:     } else {  //ユーザモード
 26647:       M68kException.m6eFSLW = M68kException.M6E_FSLW_IOMA_FIRST | M68kException.M6E_FSLW_RW_MODIFY | M68kException.M6E_FSLW_SIZE_LONG | M68kException.M6E_FSLW_TM_USER_DATA;
 26648:       a = mmuTranslateWriteUserData (a);
 26649:       return (DataBreakPoint.DBP_ON ? DataBreakPoint.dbpUserMap : XEiJ.busUserMap)[a >>> XEiJ.BUS_PAGE_BITS].mmdRls (a);
 26650:     }
 26651:   }  //mmuModifyLongFour(int,int)
 26652: 
 26653:   //--------------------------------------------------------------------------------
 26654:   //ポーク
 26655:   //  デバッガ用
 26656:   //  エラーや副作用なしでライトする
 26657: 
 26658:   //mmuPokeByte (a, x, f)
 26659:   //  ポークバイト
 26660:   public static void mmuPokeByte (int a, int x, int f) {
 26661:     f = f == -1 ? XEiJ.regSRS != 0 ? 5 : 1 : f & 7;
 26662:     MemoryMappedDevice[] mm = (DataBreakPoint.DBP_ON ?
 26663:                                (f & 4) != 0 ? DataBreakPoint.dbpSuperMap : DataBreakPoint.dbpUserMap :
 26664:                                (f & 4) != 0 ? XEiJ.busSuperMap : XEiJ.busUserMap);
 26665:     //    01234567
 26666:     if (0b01100110 << 24 << f < 0) {  //DFC=1,2,5,6。アドレス変換あり
 26667:       int a0 = mmuTranslatePeek (a, f & 4, f & 2);
 26668:       if ((a ^ a0) != 1) {
 26669:         mm[a0 >>> XEiJ.BUS_PAGE_BITS].mmdVb (a0, x);
 26670:       }
 26671:     } else if (f != 7) {  //DFC=0,3,4。アドレス変換なし
 26672:       mm[a >>> XEiJ.BUS_PAGE_BITS].mmdVb (a, x);
 26673:     }
 26674:   }  //mmuPokeByte(int,int,int)
 26675: 
 26676:   //mmuPokeByteData (a, d, supervisor)
 26677:   //  ポークバイト(データ)
 26678:   public static void mmuPokeByteData (int a, int d, int supervisor) {
 26679:     MemoryMappedDevice[] mm = supervisor != 0 ? DataBreakPoint.DBP_ON ? DataBreakPoint.dbpSuperMap : XEiJ.busSuperMap : DataBreakPoint.DBP_ON ? DataBreakPoint.dbpUserMap : XEiJ.busUserMap;
 26680:     int a0 = mmuTranslatePeek (a, supervisor, 0);
 26681:     if ((a ^ a0) != 1) {
 26682:       //mm[a >>> XEiJ.BUS_PAGE_BITS].mmdVb (a0, d);
 26683:       XEiJ.busVb (a0, d);
 26684:     }
 26685:   }  //mmuPokeByteData(int,int,int)
 26686: 
 26687:   //mmuPokeWord (a, x, f)
 26688:   //  ポークワード
 26689:   public static void mmuPokeWord (int a, int x, int f) {
 26690:     f = f == -1 ? XEiJ.regSRS != 0 ? 5 : 1 : f & 7;
 26691:     MemoryMappedDevice[] mm = (DataBreakPoint.DBP_ON ?
 26692:                                (f & 4) != 0 ? DataBreakPoint.dbpSuperMap : DataBreakPoint.dbpUserMap :
 26693:                                (f & 4) != 0 ? XEiJ.busSuperMap : XEiJ.busUserMap);
 26694:     //    01234567
 26695:     if (0b01100110 << 24 << f < 0) {  //DFC=1,2,5,6。アドレス変換あり
 26696:       int a0 = mmuTranslatePeek (a, f & 4, f & 2);
 26697:       if ((a & 1) == 0) {  //偶数
 26698:         if ((a ^ a0) != 1) {
 26699:           mm[a0 >>> XEiJ.BUS_PAGE_BITS].mmdVw (a0, x);
 26700:         }
 26701:       } else {  //奇数
 26702:         int a1 = mmuTranslatePeek (a + 1, f & 4, f & 2);
 26703:         if ((a     ^ a0) != 1) {
 26704:           mm[a0 >>> XEiJ.BUS_PAGE_BITS].mmdVb (a0, x >> 8);
 26705:         }
 26706:         if ((a + 1 ^ a1) != 1) {
 26707:           mm[a1 >>> XEiJ.BUS_PAGE_BITS].mmdVb (a1, x     );
 26708:         }
 26709:       }
 26710:     } else if (f != 7) {  //DFC=0,3,4。アドレス変換なし
 26711:       if ((a & 1) == 0) {  //偶数
 26712:         mm[a >>> XEiJ.BUS_PAGE_BITS].mmdVw (a, x);
 26713:       } else {  //奇数
 26714:         mm[a     >>> XEiJ.BUS_PAGE_BITS].mmdVb (a    , x >> 8);
 26715:         mm[a + 1 >>> XEiJ.BUS_PAGE_BITS].mmdVb (a + 1, x     );
 26716:       }
 26717:     }
 26718:   }  //mmuPokeWord(int,int,int)
 26719: 
 26720:   //mmuPokeWordData (a, d, supervisor)
 26721:   //  ポークワード(データ)
 26722:   public static void mmuPokeWordData (int a, int d, int supervisor) {
 26723:     mmuPokeByteData (a, d >> 8, supervisor);
 26724:     mmuPokeByteData (a + 1, d, supervisor);
 26725:   }  //mmuPokeWordData(int,int,int)
 26726: 
 26727:   //mmuPokeLong (a, x, f)
 26728:   //  ポークロング
 26729:   public static void mmuPokeLong (int a, int x, int f) {
 26730:     f = f == -1 ? XEiJ.regSRS != 0 ? 5 : 1 : f & 7;
 26731:     MemoryMappedDevice[] mm = (DataBreakPoint.DBP_ON ?
 26732:                                (f & 4) != 0 ? DataBreakPoint.dbpSuperMap : DataBreakPoint.dbpUserMap :
 26733:                                (f & 4) != 0 ? XEiJ.busSuperMap : XEiJ.busUserMap);
 26734:     //    01234567
 26735:     if (0b01100110 << 24 << f < 0) {  //DFC=1,2,5,6。アドレス変換あり
 26736:       int a0 = mmuTranslatePeek (a, f & 4, f & 2);
 26737:       if ((a & 3) == 0) {  //4の倍数
 26738:         if ((a ^ a0) != 1) {
 26739:           mm[a0 >>> XEiJ.BUS_PAGE_BITS].mmdVl (a0, x);
 26740:         }
 26741:       } else if ((a & 1) == 0) {  //4の倍数ではない偶数
 26742:         int a2 = mmuTranslatePeek (a + 2, f & 4, f & 2);
 26743:         if ((a     ^ a0) != 1) {
 26744:           mm[a0 >>> XEiJ.BUS_PAGE_BITS].mmdVw (a0, x >> 16);
 26745:         }
 26746:         if ((a + 2 ^ a2) != 1) {
 26747:           mm[a2 >>> XEiJ.BUS_PAGE_BITS].mmdVw (a2, x);
 26748:         }
 26749:       } else {  //奇数
 26750:         int a1 = mmuTranslatePeek (a + 1, f & 4, f & 2);
 26751:         int a3 = mmuTranslatePeek (a + 3, f & 4, f & 2);
 26752:         if ((a     ^ a0) != 1) {
 26753:           mm[a0 >>> XEiJ.BUS_PAGE_BITS].mmdVb (a0, x >> 24);
 26754:         }
 26755:         if ((a + 1 ^ a1) != 1) {
 26756:           mm[a1 >>> XEiJ.BUS_PAGE_BITS].mmdVw (a1, x >>  8);
 26757:         }
 26758:         if ((a + 3 ^ a3) != 1) {
 26759:           mm[a3 >>> XEiJ.BUS_PAGE_BITS].mmdVb (a3, x);
 26760:         }
 26761:       }
 26762:     } else if (f != 7) {  //DFC=0,3,4。アドレス変換なし
 26763:       if ((a & 3) == 0) {  //4の倍数
 26764:         mm[a >>> XEiJ.BUS_PAGE_BITS].mmdVl (a, x);
 26765:       } else if ((a & 1) == 0) {  //4の倍数ではない偶数
 26766:         mm[a     >>> XEiJ.BUS_PAGE_BITS].mmdVw (a    , x >> 16);
 26767:         mm[a + 2 >>> XEiJ.BUS_PAGE_BITS].mmdVw (a + 2, x      );
 26768:       } else {  //奇数
 26769:         mm[a     >>> XEiJ.BUS_PAGE_BITS].mmdVb (a,     x >> 24);
 26770:         mm[a + 1 >>> XEiJ.BUS_PAGE_BITS].mmdVw (a + 1, x >>  8);
 26771:         mm[a + 3 >>> XEiJ.BUS_PAGE_BITS].mmdVb (a + 3, x      );
 26772:       }
 26773:     }
 26774:   }  //mmuPokeLong(int,int,int)
 26775: 
 26776:   //mmuPokeLongData (a, d, supervisor)
 26777:   //  ポークロング(データ)
 26778:   public static void mmuPokeLongData (int a, int d, int supervisor) {
 26779:     mmuPokeByteData (a, d >> 24, supervisor);
 26780:     mmuPokeByteData (a + 1, d >> 16, supervisor);
 26781:     mmuPokeByteData (a + 2, d >> 8, supervisor);
 26782:     mmuPokeByteData (a + 3, d, supervisor);
 26783:   }  //mmuPokeLongData(int,int,int)
 26784: 
 26785:   //mmuPokeQuad (a, x, f)
 26786:   //  ポーククワッド
 26787:   public static void mmuPokeQuad (int a, long x, int f) {
 26788:     mmuPokeLong (a    , (int) (x >> 32), f);
 26789:     mmuPokeLong (a + 4, (int)  x       , f);
 26790:   }  //mmuPokeQuad(int,long,int)
 26791: 
 26792:   //mmuPokeExtended (a, b, f)
 26793:   public static void mmuPokeExtended (int a, byte[] b, int f) {
 26794:     for (int i = 0; i < 12; i++) {
 26795:       mmuPokeByte (a + i, b[i], f);
 26796:     }
 26797:   }  //mmuPokeQuad(int,long,int)
 26798: 
 26799:   //a = mmuPokeStringZ (a, str, f)
 26800:   //  ポークストリング
 26801:   //  文字列をUTF-16からSJISに変換しながらメモリに書き込む
 26802:   //  文字列に'\0'が含まれるときはその手前まで書き込む
 26803:   //  SJISに変換できない文字は'※'になる
 26804:   //  最後に'\0'を書き込む
 26805:   //  '\0'を含まない書き込んだ文字列を返す
 26806:   public static String mmuPokeStringZ (int a, String str, int f) {
 26807:     StringBuilder sb = new StringBuilder ();
 26808:     int l = str.length ();
 26809:     for (int i = 0; i < l; i++) {
 26810:       int u = str.charAt (i);
 26811:       if (u == '\0') {
 26812:         break;
 26813:       }
 26814:       int s = CharacterCode.chrCharToSJIS[u];  //SJISに変換する
 26815:       if (s == 0) {  //変換できない
 26816:         s = 0x81a6;  //'※'
 26817:       }
 26818:       if (s >> 8 != 0) {
 26819:         mmuPokeByte (a++, s >> 8, f);
 26820:       }
 26821:       mmuPokeByte (a++, s, f);
 26822:       u = CharacterCode.chrSJISToChar[s];  //UTF-16に変換する
 26823:       if (u == 0) {  //変換できない
 26824:         u = 0xfffd;
 26825:       }
 26826:       sb.append ((char) u);
 26827:     }
 26828:     mmuPokeByte (a, 0, f);  //'\0'
 26829:     return sb.toString ();
 26830:   }  //mmuPokeStringZ(int,String,int)
 26831: 
 26832:   //--------------------------------------------------------------------------------
 26833:   //ライト
 26834:   //  アドレス変換はライト
 26835:   //  FSLWのRead and WriteはWrite
 26836: 
 26837:   //mmuWriteByteData (a, d, supervisor)
 26838:   //  ライトバイト符号拡張(データ)
 26839:   public static void mmuWriteByteData (int a, int d, int supervisor) throws M68kException {
 26840:     if (supervisor != 0) {  //スーパーバイザモード
 26841:       M68kException.m6eFSLW = M68kException.M6E_FSLW_IOMA_FIRST | M68kException.M6E_FSLW_RW_WRITE | M68kException.M6E_FSLW_SIZE_BYTE | M68kException.M6E_FSLW_TM_SUPER_DATA;
 26842:       int t = mmuTranslateWriteSuperData (a);
 26843:       (DataBreakPoint.DBP_ON ? DataBreakPoint.dbpSuperMap : XEiJ.busSuperMap)[t >>> XEiJ.BUS_PAGE_BITS].mmdWb (t, d);
 26844:     } else {  //ユーザモード
 26845:       M68kException.m6eFSLW = M68kException.M6E_FSLW_IOMA_FIRST | M68kException.M6E_FSLW_RW_WRITE | M68kException.M6E_FSLW_SIZE_BYTE | M68kException.M6E_FSLW_TM_USER_DATA;
 26846:       int t = mmuTranslateWriteUserData (a);
 26847:       (DataBreakPoint.DBP_ON ? DataBreakPoint.dbpUserMap : XEiJ.busUserMap)[t >>> XEiJ.BUS_PAGE_BITS].mmdWb (t, d);
 26848:     }
 26849:   }  //mmuWriteByteData(int,int,int)
 26850: 
 26851:   //mmuWriteWordData (a, d, supervisor)
 26852:   //  ライトワード符号拡張(データ)
 26853:   public static void mmuWriteWordData (int a, int d, int supervisor) throws M68kException {
 26854:     if (supervisor != 0) {  //スーパーバイザモード
 26855:       M68kException.m6eFSLW = M68kException.M6E_FSLW_IOMA_FIRST | M68kException.M6E_FSLW_RW_WRITE | M68kException.M6E_FSLW_SIZE_WORD | M68kException.M6E_FSLW_TM_SUPER_DATA;
 26856:       int t = mmuTranslateWriteSuperData (a);  //a+1が必要なので上書き不可
 26857:       if ((a & 1) == 0) {  //偶数
 26858:         (DataBreakPoint.DBP_ON ? DataBreakPoint.dbpSuperMap : XEiJ.busSuperMap)[t >>> XEiJ.BUS_PAGE_BITS].mmdWw (t, d);
 26859:       } else {  //奇数
 26860:         (DataBreakPoint.DBP_ON ? DataBreakPoint.dbpSuperMap : XEiJ.busSuperMap)[t >>> XEiJ.BUS_PAGE_BITS].mmdWb (t, d >> 8);
 26861:         M68kException.m6eFSLW ^= M68kException.M6E_FSLW_IOMA_FIRST ^ M68kException.M6E_FSLW_IOMA_SECOND;
 26862:         t = mmuTranslateWriteSuperData (a + 1);  //偶数
 26863:         (DataBreakPoint.DBP_ON ? DataBreakPoint.dbpSuperMap : XEiJ.busSuperMap)[t >>> XEiJ.BUS_PAGE_BITS].mmdWb (t, d);
 26864:       }
 26865:     } else {  //ユーザモード
 26866:       M68kException.m6eFSLW = M68kException.M6E_FSLW_IOMA_FIRST | M68kException.M6E_FSLW_RW_WRITE | M68kException.M6E_FSLW_SIZE_WORD | M68kException.M6E_FSLW_TM_USER_DATA;
 26867:       int t = mmuTranslateWriteUserData (a);  //a+1が必要なので上書き不可
 26868:       if ((a & 1) == 0) {  //偶数
 26869:         (DataBreakPoint.DBP_ON ? DataBreakPoint.dbpUserMap : XEiJ.busUserMap)[t >>> XEiJ.BUS_PAGE_BITS].mmdWw (t, d);
 26870:       } else {  //奇数
 26871:         (DataBreakPoint.DBP_ON ? DataBreakPoint.dbpUserMap : XEiJ.busUserMap)[t >>> XEiJ.BUS_PAGE_BITS].mmdWb (t, d >> 8);
 26872:         M68kException.m6eFSLW ^= M68kException.M6E_FSLW_IOMA_FIRST ^ M68kException.M6E_FSLW_IOMA_SECOND;
 26873:         t = mmuTranslateWriteUserData (a + 1);  //偶数
 26874:         (DataBreakPoint.DBP_ON ? DataBreakPoint.dbpUserMap : XEiJ.busUserMap)[t >>> XEiJ.BUS_PAGE_BITS].mmdWb (t, d);
 26875:       }
 26876:     }
 26877:   }  //mmuWriteWordData(int,int,int)
 26878: 
 26879:   //mmuWriteWordEven (a, d, supervisor)
 26880:   //  ライトワード符号拡張(偶数)
 26881:   public static void mmuWriteWordEven (int a, int d, int supervisor) throws M68kException {
 26882:     if (supervisor != 0) {  //スーパーバイザモード
 26883:       M68kException.m6eFSLW = M68kException.M6E_FSLW_IOMA_FIRST | M68kException.M6E_FSLW_RW_WRITE | M68kException.M6E_FSLW_SIZE_WORD | M68kException.M6E_FSLW_TM_SUPER_DATA;
 26884:       a = mmuTranslateWriteSuperData (a);
 26885:       (DataBreakPoint.DBP_ON ? DataBreakPoint.dbpSuperMap : XEiJ.busSuperMap)[a >>> XEiJ.BUS_PAGE_BITS].mmdWw (a, d);
 26886:     } else {  //ユーザモード
 26887:       M68kException.m6eFSLW = M68kException.M6E_FSLW_IOMA_FIRST | M68kException.M6E_FSLW_RW_WRITE | M68kException.M6E_FSLW_SIZE_WORD | M68kException.M6E_FSLW_TM_USER_DATA;
 26888:       a = mmuTranslateWriteUserData (a);
 26889:       (DataBreakPoint.DBP_ON ? DataBreakPoint.dbpUserMap : XEiJ.busUserMap)[a >>> XEiJ.BUS_PAGE_BITS].mmdWw (a, d);
 26890:     }
 26891:   }  //mmuWriteWordEven(int,int,int)
 26892: 
 26893:   //mmuWriteLongData (a, d, supervisor)
 26894:   //  ライトロング(データ)
 26895:   public static void mmuWriteLongData (int a, int d, int supervisor) throws M68kException {
 26896:     if (supervisor != 0) {  //スーパーバイザモード
 26897:       M68kException.m6eFSLW = M68kException.M6E_FSLW_IOMA_FIRST | M68kException.M6E_FSLW_RW_WRITE | M68kException.M6E_FSLW_SIZE_LONG | M68kException.M6E_FSLW_TM_SUPER_DATA;
 26898:       int t = mmuTranslateWriteSuperData (a);  //a+1,a+2,a+3が必要なので上書き不可
 26899:       if ((a & 3) == 0) {  //4の倍数
 26900:         (DataBreakPoint.DBP_ON ? DataBreakPoint.dbpSuperMap : XEiJ.busSuperMap)[t >>> XEiJ.BUS_PAGE_BITS].mmdWl (t, d);
 26901:       } else if ((a & 1) == 0) {  //4の倍数+2
 26902:         (DataBreakPoint.DBP_ON ? DataBreakPoint.dbpSuperMap : XEiJ.busSuperMap)[t >>> XEiJ.BUS_PAGE_BITS].mmdWw (t, d >> 16);
 26903:         M68kException.m6eFSLW ^= M68kException.M6E_FSLW_IOMA_FIRST ^ M68kException.M6E_FSLW_IOMA_SECOND;
 26904:         t = mmuTranslateWriteSuperData (a + 2);  //偶数
 26905:         (DataBreakPoint.DBP_ON ? DataBreakPoint.dbpSuperMap : XEiJ.busSuperMap)[t >>> XEiJ.BUS_PAGE_BITS].mmdWw (t, d);
 26906:       } else {  //奇数
 26907:         (DataBreakPoint.DBP_ON ? DataBreakPoint.dbpSuperMap : XEiJ.busSuperMap)[t >>> XEiJ.BUS_PAGE_BITS].mmdWb (t, d >> 24);
 26908:         M68kException.m6eFSLW ^= M68kException.M6E_FSLW_IOMA_FIRST ^ M68kException.M6E_FSLW_IOMA_SECOND;
 26909:         t = mmuTranslateWriteSuperData (a + 1);  //偶数
 26910:         (DataBreakPoint.DBP_ON ? DataBreakPoint.dbpSuperMap : XEiJ.busSuperMap)[t >>> XEiJ.BUS_PAGE_BITS].mmdWw (t, d >> 8);
 26911:         t = mmuTranslateWriteSuperData (a + 3);  //偶数
 26912:         (DataBreakPoint.DBP_ON ? DataBreakPoint.dbpSuperMap : XEiJ.busSuperMap)[t >>> XEiJ.BUS_PAGE_BITS].mmdWb (t, d);
 26913:       }
 26914:     } else {  //ユーザモード
 26915:       M68kException.m6eFSLW = M68kException.M6E_FSLW_IOMA_FIRST | M68kException.M6E_FSLW_RW_WRITE | M68kException.M6E_FSLW_SIZE_LONG | M68kException.M6E_FSLW_TM_USER_DATA;
 26916:       int t = mmuTranslateWriteUserData (a);  //a+1,a+2,a+3が必要なので上書き不可
 26917:       if ((a & 3) == 0) {  //4の倍数
 26918:         (DataBreakPoint.DBP_ON ? DataBreakPoint.dbpUserMap : XEiJ.busUserMap)[t >>> XEiJ.BUS_PAGE_BITS].mmdWl (t, d);
 26919:       } else if ((a & 1) == 0) {  //4の倍数+2
 26920:         (DataBreakPoint.DBP_ON ? DataBreakPoint.dbpUserMap : XEiJ.busUserMap)[t >>> XEiJ.BUS_PAGE_BITS].mmdWw (t, d >> 16);
 26921:         M68kException.m6eFSLW ^= M68kException.M6E_FSLW_IOMA_FIRST ^ M68kException.M6E_FSLW_IOMA_SECOND;
 26922:         t = mmuTranslateWriteUserData (a + 2);  //偶数
 26923:         (DataBreakPoint.DBP_ON ? DataBreakPoint.dbpUserMap : XEiJ.busUserMap)[t >>> XEiJ.BUS_PAGE_BITS].mmdWw (t, d);
 26924:       } else {  //奇数
 26925:         (DataBreakPoint.DBP_ON ? DataBreakPoint.dbpUserMap : XEiJ.busUserMap)[t >>> XEiJ.BUS_PAGE_BITS].mmdWb (t, d >> 24);
 26926:         M68kException.m6eFSLW ^= M68kException.M6E_FSLW_IOMA_FIRST ^ M68kException.M6E_FSLW_IOMA_SECOND;
 26927:         t = mmuTranslateWriteUserData (a + 1);  //偶数
 26928:         (DataBreakPoint.DBP_ON ? DataBreakPoint.dbpUserMap : XEiJ.busUserMap)[t >>> XEiJ.BUS_PAGE_BITS].mmdWw (t, d >> 8);
 26929:         t = mmuTranslateWriteUserData (a + 3);  //偶数
 26930:         (DataBreakPoint.DBP_ON ? DataBreakPoint.dbpUserMap : XEiJ.busUserMap)[t >>> XEiJ.BUS_PAGE_BITS].mmdWb (t, d);
 26931:       }
 26932:     }
 26933:   }  //mmuWriteLongData(int,int,int)
 26934: 
 26935:   //mmuWriteLongEven (a, d, supervisor)
 26936:   //  ライトロング(偶数)
 26937:   public static void mmuWriteLongEven (int a, int d, int supervisor) throws M68kException {
 26938:     if (supervisor != 0) {  //スーパーバイザモード
 26939:       M68kException.m6eFSLW = M68kException.M6E_FSLW_IOMA_FIRST | M68kException.M6E_FSLW_RW_WRITE | M68kException.M6E_FSLW_SIZE_LONG | M68kException.M6E_FSLW_TM_SUPER_DATA;
 26940:       int t = mmuTranslateWriteSuperData (a);  //a+2が必要なので上書き不可
 26941:       if ((a & 2) == 0) {  //4の倍数
 26942:         (DataBreakPoint.DBP_ON ? DataBreakPoint.dbpSuperMap : XEiJ.busSuperMap)[t >>> XEiJ.BUS_PAGE_BITS].mmdWl (t, d);
 26943:       } else {  //4の倍数+2
 26944:         (DataBreakPoint.DBP_ON ? DataBreakPoint.dbpSuperMap : XEiJ.busSuperMap)[t >>> XEiJ.BUS_PAGE_BITS].mmdWw (t, d >> 16);
 26945:         M68kException.m6eFSLW ^= M68kException.M6E_FSLW_IOMA_FIRST ^ M68kException.M6E_FSLW_IOMA_SECOND;
 26946:         t = mmuTranslateWriteSuperData (a + 2);  //偶数
 26947:         (DataBreakPoint.DBP_ON ? DataBreakPoint.dbpSuperMap : XEiJ.busSuperMap)[t >>> XEiJ.BUS_PAGE_BITS].mmdWw (t, d);
 26948:       }
 26949:     } else {  //ユーザモード
 26950:       M68kException.m6eFSLW = M68kException.M6E_FSLW_IOMA_FIRST | M68kException.M6E_FSLW_RW_WRITE | M68kException.M6E_FSLW_SIZE_LONG | M68kException.M6E_FSLW_TM_USER_DATA;
 26951:       int t = mmuTranslateWriteUserData (a);  //a+2が必要なので上書き不可
 26952:       if ((a & 2) == 0) {  //4の倍数
 26953:         (DataBreakPoint.DBP_ON ? DataBreakPoint.dbpUserMap : XEiJ.busUserMap)[t >>> XEiJ.BUS_PAGE_BITS].mmdWl (t, d);
 26954:       } else {  //4の倍数+2
 26955:         (DataBreakPoint.DBP_ON ? DataBreakPoint.dbpUserMap : XEiJ.busUserMap)[t >>> XEiJ.BUS_PAGE_BITS].mmdWw (t, d >> 16);
 26956:         M68kException.m6eFSLW ^= M68kException.M6E_FSLW_IOMA_FIRST ^ M68kException.M6E_FSLW_IOMA_SECOND;
 26957:         t = mmuTranslateWriteUserData (a + 2);  //偶数
 26958:         (DataBreakPoint.DBP_ON ? DataBreakPoint.dbpUserMap : XEiJ.busUserMap)[t >>> XEiJ.BUS_PAGE_BITS].mmdWw (t, d);
 26959:       }
 26960:     }
 26961:   }  //mmuWriteLongEven(int,int,int)
 26962: 
 26963:   //mmuWriteLongFour (a, d, supervisor)
 26964:   //  ライトロング(4の倍数)
 26965:   public static void mmuWriteLongFour (int a, int d, int supervisor) throws M68kException {
 26966:     if (supervisor != 0) {  //スーパーバイザモード
 26967:       M68kException.m6eFSLW = M68kException.M6E_FSLW_IOMA_FIRST | M68kException.M6E_FSLW_RW_WRITE | M68kException.M6E_FSLW_SIZE_LONG | M68kException.M6E_FSLW_TM_SUPER_DATA;
 26968:       a = mmuTranslateWriteSuperData (a);
 26969:       (DataBreakPoint.DBP_ON ? DataBreakPoint.dbpSuperMap : XEiJ.busSuperMap)[a >>> XEiJ.BUS_PAGE_BITS].mmdWl (a, d);
 26970:     } else {  //ユーザモード
 26971:       M68kException.m6eFSLW = M68kException.M6E_FSLW_IOMA_FIRST | M68kException.M6E_FSLW_RW_WRITE | M68kException.M6E_FSLW_SIZE_LONG | M68kException.M6E_FSLW_TM_USER_DATA;
 26972:       a = mmuTranslateWriteUserData (a);
 26973:       (DataBreakPoint.DBP_ON ? DataBreakPoint.dbpUserMap : XEiJ.busUserMap)[a >>> XEiJ.BUS_PAGE_BITS].mmdWl (a, d);
 26974:     }
 26975:   }  //mmuWriteLongFour(int,int,int)
 26976: 
 26977:   //mmuWriteQuadData (a, d, supervisor)
 26978:   //  ライトクワッド(データ)
 26979:   public static void mmuWriteQuadData (int a, long d, int supervisor) throws M68kException {
 26980:     if (supervisor != 0) {  //スーパーバイザモード
 26981:       M68kException.m6eFSLW = M68kException.M6E_FSLW_IOMA_FIRST | M68kException.M6E_FSLW_RW_WRITE | M68kException.M6E_FSLW_SIZE_QUAD | M68kException.M6E_FSLW_TM_SUPER_DATA;
 26982:       int t = mmuTranslateWriteSuperData (a);  //a+1,a+2,a+3,a+4,a+5,a+6,a+7が必要なので上書き不可
 26983:       if ((a & 3) == 0) {  //4の倍数
 26984:         (DataBreakPoint.DBP_ON ? DataBreakPoint.dbpSuperMap : XEiJ.busSuperMap)[t >>> XEiJ.BUS_PAGE_BITS].mmdWl (t, (int) (d >> 32));
 26985:         t = mmuTranslateWriteSuperData (a + 4);  //4の倍数
 26986:         (DataBreakPoint.DBP_ON ? DataBreakPoint.dbpSuperMap : XEiJ.busSuperMap)[t >>> XEiJ.BUS_PAGE_BITS].mmdWl (t, (int) d);
 26987:       } else if ((a & 1) == 0) {  //4の倍数+2
 26988:         (DataBreakPoint.DBP_ON ? DataBreakPoint.dbpSuperMap : XEiJ.busSuperMap)[t >>> XEiJ.BUS_PAGE_BITS].mmdWw (t, (int) (d >> 48));
 26989:         M68kException.m6eFSLW ^= M68kException.M6E_FSLW_IOMA_FIRST ^ M68kException.M6E_FSLW_IOMA_SECOND;
 26990:         t = mmuTranslateWriteSuperData (a + 2);  //4の倍数
 26991:         (DataBreakPoint.DBP_ON ? DataBreakPoint.dbpSuperMap : XEiJ.busSuperMap)[t >>> XEiJ.BUS_PAGE_BITS].mmdWl (t, (int) (d >> 16));
 26992:         t = mmuTranslateWriteSuperData (a + 6);  //4の倍数
 26993:         (DataBreakPoint.DBP_ON ? DataBreakPoint.dbpSuperMap : XEiJ.busSuperMap)[t >>> XEiJ.BUS_PAGE_BITS].mmdWw (t, (int) d);
 26994:       } else if ((a & 3) == 1) {  //4の倍数+1
 26995:         (DataBreakPoint.DBP_ON ? DataBreakPoint.dbpSuperMap : XEiJ.busSuperMap)[t >>> XEiJ.BUS_PAGE_BITS].mmdWb (t, (int) (d >> 56));
 26996:         M68kException.m6eFSLW ^= M68kException.M6E_FSLW_IOMA_FIRST ^ M68kException.M6E_FSLW_IOMA_SECOND;
 26997:         t = mmuTranslateWriteSuperData (a + 1);  //4の倍数+2
 26998:         (DataBreakPoint.DBP_ON ? DataBreakPoint.dbpSuperMap : XEiJ.busSuperMap)[t >>> XEiJ.BUS_PAGE_BITS].mmdWw (t, (int) (d >> 40));
 26999:         t = mmuTranslateWriteSuperData (a + 3);  //4の倍数
 27000:         (DataBreakPoint.DBP_ON ? DataBreakPoint.dbpSuperMap : XEiJ.busSuperMap)[t >>> XEiJ.BUS_PAGE_BITS].mmdWl (t, (int) (d >> 8));
 27001:         t = mmuTranslateWriteSuperData (a + 7);  //4の倍数
 27002:         (DataBreakPoint.DBP_ON ? DataBreakPoint.dbpSuperMap : XEiJ.busSuperMap)[t >>> XEiJ.BUS_PAGE_BITS].mmdWb (t, (int) d);
 27003:       } else {  //  //4の倍数+3
 27004:         (DataBreakPoint.DBP_ON ? DataBreakPoint.dbpSuperMap : XEiJ.busSuperMap)[t >>> XEiJ.BUS_PAGE_BITS].mmdWb (t, (int) (d >> 56));
 27005:         M68kException.m6eFSLW ^= M68kException.M6E_FSLW_IOMA_FIRST ^ M68kException.M6E_FSLW_IOMA_SECOND;
 27006:         t = mmuTranslateWriteSuperData (a + 1);  //4の倍数
 27007:         (DataBreakPoint.DBP_ON ? DataBreakPoint.dbpSuperMap : XEiJ.busSuperMap)[t >>> XEiJ.BUS_PAGE_BITS].mmdWl (t, (int) (d >> 24));
 27008:         t = mmuTranslateWriteSuperData (a + 5);  //4の倍数
 27009:         (DataBreakPoint.DBP_ON ? DataBreakPoint.dbpSuperMap : XEiJ.busSuperMap)[t >>> XEiJ.BUS_PAGE_BITS].mmdWw (t, (int) (d >> 8));
 27010:         t = mmuTranslateWriteSuperData (a + 7);  //4の倍数+2
 27011:         (DataBreakPoint.DBP_ON ? DataBreakPoint.dbpSuperMap : XEiJ.busSuperMap)[t >>> XEiJ.BUS_PAGE_BITS].mmdWb (t, (int) d);
 27012:       }
 27013:     } else {  //ユーザモード
 27014:       M68kException.m6eFSLW = M68kException.M6E_FSLW_IOMA_FIRST | M68kException.M6E_FSLW_RW_WRITE | M68kException.M6E_FSLW_SIZE_QUAD | M68kException.M6E_FSLW_TM_USER_DATA;
 27015:       int t = mmuTranslateWriteUserData (a);  //a+1,a+2,a+3,a+4,a+5,a+6,a+7が必要なので上書き不可
 27016:       if ((a & 3) == 0) {  //4の倍数
 27017:         (DataBreakPoint.DBP_ON ? DataBreakPoint.dbpUserMap : XEiJ.busUserMap)[t >>> XEiJ.BUS_PAGE_BITS].mmdWl (t, (int) (d >> 32));
 27018:         t = mmuTranslateWriteUserData (a + 4);  //4の倍数
 27019:         (DataBreakPoint.DBP_ON ? DataBreakPoint.dbpUserMap : XEiJ.busUserMap)[t >>> XEiJ.BUS_PAGE_BITS].mmdWl (t, (int) d);
 27020:       } else if ((a & 1) == 0) {  //4の倍数+2
 27021:         (DataBreakPoint.DBP_ON ? DataBreakPoint.dbpUserMap : XEiJ.busUserMap)[t >>> XEiJ.BUS_PAGE_BITS].mmdWw (t, (int) (d >> 48));
 27022:         M68kException.m6eFSLW ^= M68kException.M6E_FSLW_IOMA_FIRST ^ M68kException.M6E_FSLW_IOMA_SECOND;
 27023:         t = mmuTranslateWriteUserData (a + 2);  //4の倍数
 27024:         (DataBreakPoint.DBP_ON ? DataBreakPoint.dbpUserMap : XEiJ.busUserMap)[t >>> XEiJ.BUS_PAGE_BITS].mmdWl (t, (int) (d >> 16));
 27025:         t = mmuTranslateWriteUserData (a + 6);  //4の倍数
 27026:         (DataBreakPoint.DBP_ON ? DataBreakPoint.dbpUserMap : XEiJ.busUserMap)[t >>> XEiJ.BUS_PAGE_BITS].mmdWw (t, (int) d);
 27027:       } else if ((a & 3) == 1) {  //4の倍数+1
 27028:         (DataBreakPoint.DBP_ON ? DataBreakPoint.dbpUserMap : XEiJ.busUserMap)[t >>> XEiJ.BUS_PAGE_BITS].mmdWb (t, (int) (d >> 56));
 27029:         M68kException.m6eFSLW ^= M68kException.M6E_FSLW_IOMA_FIRST ^ M68kException.M6E_FSLW_IOMA_SECOND;
 27030:         t = mmuTranslateWriteUserData (a + 1);  //4の倍数+2
 27031:         (DataBreakPoint.DBP_ON ? DataBreakPoint.dbpUserMap : XEiJ.busUserMap)[t >>> XEiJ.BUS_PAGE_BITS].mmdWw (t, (int) (d >> 40));
 27032:         t = mmuTranslateWriteUserData (a + 3);  //4の倍数
 27033:         (DataBreakPoint.DBP_ON ? DataBreakPoint.dbpUserMap : XEiJ.busUserMap)[t >>> XEiJ.BUS_PAGE_BITS].mmdWl (t, (int) (d >> 8));
 27034:         t = mmuTranslateWriteUserData (a + 7);  //4の倍数
 27035:         (DataBreakPoint.DBP_ON ? DataBreakPoint.dbpUserMap : XEiJ.busUserMap)[t >>> XEiJ.BUS_PAGE_BITS].mmdWb (t, (int) d);
 27036:       } else {  //  //4の倍数+3
 27037:         (DataBreakPoint.DBP_ON ? DataBreakPoint.dbpUserMap : XEiJ.busUserMap)[t >>> XEiJ.BUS_PAGE_BITS].mmdWb (t, (int) (d >> 56));
 27038:         M68kException.m6eFSLW ^= M68kException.M6E_FSLW_IOMA_FIRST ^ M68kException.M6E_FSLW_IOMA_SECOND;
 27039:         t = mmuTranslateWriteUserData (a + 1);  //4の倍数
 27040:         (DataBreakPoint.DBP_ON ? DataBreakPoint.dbpUserMap : XEiJ.busUserMap)[t >>> XEiJ.BUS_PAGE_BITS].mmdWl (t, (int) (d >> 24));
 27041:         t = mmuTranslateWriteUserData (a + 5);  //4の倍数
 27042:         (DataBreakPoint.DBP_ON ? DataBreakPoint.dbpUserMap : XEiJ.busUserMap)[t >>> XEiJ.BUS_PAGE_BITS].mmdWw (t, (int) (d >> 8));
 27043:         t = mmuTranslateWriteUserData (a + 7);  //4の倍数+2
 27044:         (DataBreakPoint.DBP_ON ? DataBreakPoint.dbpUserMap : XEiJ.busUserMap)[t >>> XEiJ.BUS_PAGE_BITS].mmdWb (t, (int) d);
 27045:       }
 27046:     }
 27047:   }  //mmuWriteQuadData(int,long,int)
 27048: 
 27049:   //mmuWriteQuadSecond (a, d, supervisor)
 27050:   //  ライトクワッド(2番目)
 27051:   //  エクステンデッドとラインの2番目で使う
 27052:   public static void mmuWriteQuadSecond (int a, long d, int supervisor) throws M68kException {
 27053:     if (supervisor != 0) {  //スーパーバイザモード
 27054:       M68kException.m6eFSLW = M68kException.M6E_FSLW_IOMA_SECOND | M68kException.M6E_FSLW_RW_WRITE | M68kException.M6E_FSLW_SIZE_QUAD | M68kException.M6E_FSLW_TM_SUPER_DATA;
 27055:       int t = mmuTranslateWriteSuperData (a);  //a+1,a+2,a+3,a+4,a+5,a+6,a+7が必要なので上書き不可
 27056:       if ((a & 3) == 0) {  //4の倍数
 27057:         (DataBreakPoint.DBP_ON ? DataBreakPoint.dbpSuperMap : XEiJ.busSuperMap)[t >>> XEiJ.BUS_PAGE_BITS].mmdWl (t, (int) (d >> 32));
 27058:         t = mmuTranslateWriteSuperData (a + 4);  //4の倍数
 27059:         (DataBreakPoint.DBP_ON ? DataBreakPoint.dbpSuperMap : XEiJ.busSuperMap)[t >>> XEiJ.BUS_PAGE_BITS].mmdWl (t, (int) d);
 27060:       } else if ((a & 1) == 0) {  //4の倍数+2
 27061:         (DataBreakPoint.DBP_ON ? DataBreakPoint.dbpSuperMap : XEiJ.busSuperMap)[t >>> XEiJ.BUS_PAGE_BITS].mmdWw (t, (int) (d >> 48));
 27062:         t = mmuTranslateWriteSuperData (a + 2);  //4の倍数
 27063:         (DataBreakPoint.DBP_ON ? DataBreakPoint.dbpSuperMap : XEiJ.busSuperMap)[t >>> XEiJ.BUS_PAGE_BITS].mmdWl (t, (int) (d >> 16));
 27064:         t = mmuTranslateWriteSuperData (a + 6);  //4の倍数
 27065:         (DataBreakPoint.DBP_ON ? DataBreakPoint.dbpSuperMap : XEiJ.busSuperMap)[t >>> XEiJ.BUS_PAGE_BITS].mmdWw (t, (int) d);
 27066:       } else if ((a & 3) == 1) {  //4の倍数+1
 27067:         (DataBreakPoint.DBP_ON ? DataBreakPoint.dbpSuperMap : XEiJ.busSuperMap)[t >>> XEiJ.BUS_PAGE_BITS].mmdWb (t, (int) (d >> 56));
 27068:         t = mmuTranslateWriteSuperData (a + 1);  //4の倍数+2
 27069:         (DataBreakPoint.DBP_ON ? DataBreakPoint.dbpSuperMap : XEiJ.busSuperMap)[t >>> XEiJ.BUS_PAGE_BITS].mmdWw (t, (int) (d >> 40));
 27070:         t = mmuTranslateWriteSuperData (a + 3);  //4の倍数
 27071:         (DataBreakPoint.DBP_ON ? DataBreakPoint.dbpSuperMap : XEiJ.busSuperMap)[t >>> XEiJ.BUS_PAGE_BITS].mmdWl (t, (int) (d >> 8));
 27072:         t = mmuTranslateWriteSuperData (a + 7);  //4の倍数
 27073:         (DataBreakPoint.DBP_ON ? DataBreakPoint.dbpSuperMap : XEiJ.busSuperMap)[t >>> XEiJ.BUS_PAGE_BITS].mmdWb (t, (int) d);
 27074:       } else {  //  //4の倍数+3
 27075:         (DataBreakPoint.DBP_ON ? DataBreakPoint.dbpSuperMap : XEiJ.busSuperMap)[t >>> XEiJ.BUS_PAGE_BITS].mmdWb (t, (int) (d >> 56));
 27076:         t = mmuTranslateWriteSuperData (a + 1);  //4の倍数
 27077:         (DataBreakPoint.DBP_ON ? DataBreakPoint.dbpSuperMap : XEiJ.busSuperMap)[t >>> XEiJ.BUS_PAGE_BITS].mmdWl (t, (int) (d >> 24));
 27078:         t = mmuTranslateWriteSuperData (a + 5);  //4の倍数
 27079:         (DataBreakPoint.DBP_ON ? DataBreakPoint.dbpSuperMap : XEiJ.busSuperMap)[t >>> XEiJ.BUS_PAGE_BITS].mmdWw (t, (int) (d >> 8));
 27080:         t = mmuTranslateWriteSuperData (a + 7);  //4の倍数+2
 27081:         (DataBreakPoint.DBP_ON ? DataBreakPoint.dbpSuperMap : XEiJ.busSuperMap)[t >>> XEiJ.BUS_PAGE_BITS].mmdWb (t, (int) d);
 27082:       }
 27083:     } else {  //ユーザモード
 27084:       M68kException.m6eFSLW = M68kException.M6E_FSLW_IOMA_SECOND | M68kException.M6E_FSLW_RW_WRITE | M68kException.M6E_FSLW_SIZE_QUAD | M68kException.M6E_FSLW_TM_USER_DATA;
 27085:       int t = mmuTranslateWriteUserData (a);  //a+1,a+2,a+3,a+4,a+5,a+6,a+7が必要なので上書き不可
 27086:       if ((a & 3) == 0) {  //4の倍数
 27087:         (DataBreakPoint.DBP_ON ? DataBreakPoint.dbpUserMap : XEiJ.busUserMap)[t >>> XEiJ.BUS_PAGE_BITS].mmdWl (t, (int) (d >> 32));
 27088:         t = mmuTranslateWriteUserData (a + 4);  //4の倍数
 27089:         (DataBreakPoint.DBP_ON ? DataBreakPoint.dbpUserMap : XEiJ.busUserMap)[t >>> XEiJ.BUS_PAGE_BITS].mmdWl (t, (int) d);
 27090:       } else if ((a & 1) == 0) {  //4の倍数+2
 27091:         (DataBreakPoint.DBP_ON ? DataBreakPoint.dbpUserMap : XEiJ.busUserMap)[t >>> XEiJ.BUS_PAGE_BITS].mmdWw (t, (int) (d >> 48));
 27092:         t = mmuTranslateWriteUserData (a + 2);  //4の倍数
 27093:         (DataBreakPoint.DBP_ON ? DataBreakPoint.dbpUserMap : XEiJ.busUserMap)[t >>> XEiJ.BUS_PAGE_BITS].mmdWl (t, (int) (d >> 16));
 27094:         t = mmuTranslateWriteUserData (a + 6);  //4の倍数
 27095:         (DataBreakPoint.DBP_ON ? DataBreakPoint.dbpUserMap : XEiJ.busUserMap)[t >>> XEiJ.BUS_PAGE_BITS].mmdWw (t, (int) d);
 27096:       } else if ((a & 3) == 1) {  //4の倍数+1
 27097:         (DataBreakPoint.DBP_ON ? DataBreakPoint.dbpUserMap : XEiJ.busUserMap)[t >>> XEiJ.BUS_PAGE_BITS].mmdWb (t, (int) (d >> 56));
 27098:         t = mmuTranslateWriteUserData (a + 1);  //4の倍数+2
 27099:         (DataBreakPoint.DBP_ON ? DataBreakPoint.dbpUserMap : XEiJ.busUserMap)[t >>> XEiJ.BUS_PAGE_BITS].mmdWw (t, (int) (d >> 40));
 27100:         t = mmuTranslateWriteUserData (a + 3);  //4の倍数
 27101:         (DataBreakPoint.DBP_ON ? DataBreakPoint.dbpUserMap : XEiJ.busUserMap)[t >>> XEiJ.BUS_PAGE_BITS].mmdWl (t, (int) (d >> 8));
 27102:         t = mmuTranslateWriteUserData (a + 7);  //4の倍数
 27103:         (DataBreakPoint.DBP_ON ? DataBreakPoint.dbpUserMap : XEiJ.busUserMap)[t >>> XEiJ.BUS_PAGE_BITS].mmdWb (t, (int) d);
 27104:       } else {  //  //4の倍数+3
 27105:         (DataBreakPoint.DBP_ON ? DataBreakPoint.dbpUserMap : XEiJ.busUserMap)[t >>> XEiJ.BUS_PAGE_BITS].mmdWb (t, (int) (d >> 56));
 27106:         t = mmuTranslateWriteUserData (a + 1);  //4の倍数
 27107:         (DataBreakPoint.DBP_ON ? DataBreakPoint.dbpUserMap : XEiJ.busUserMap)[t >>> XEiJ.BUS_PAGE_BITS].mmdWl (t, (int) (d >> 24));
 27108:         t = mmuTranslateWriteUserData (a + 5);  //4の倍数
 27109:         (DataBreakPoint.DBP_ON ? DataBreakPoint.dbpUserMap : XEiJ.busUserMap)[t >>> XEiJ.BUS_PAGE_BITS].mmdWw (t, (int) (d >> 8));
 27110:         t = mmuTranslateWriteUserData (a + 7);  //4の倍数+2
 27111:         (DataBreakPoint.DBP_ON ? DataBreakPoint.dbpUserMap : XEiJ.busUserMap)[t >>> XEiJ.BUS_PAGE_BITS].mmdWb (t, (int) d);
 27112:       }
 27113:     }
 27114:   }  //mmuWriteQuadSecond(int,int,int)
 27115: 
 27116:   //mmuWriteByteArray (address, array, offset, length, supervisor)
 27117:   //  ライトバイト配列
 27118:   public static void mmuWriteByteArray (int address, byte[] array, int offset, int length, int supervisor) throws M68kException {
 27119:     if (false) {  //1バイトずつアドレス変換する
 27120:       for (int index = 0; index < length; index++) {
 27121:         mmuWriteByteData (address + index, array[offset + index], supervisor);
 27122:       }
 27123:     } else {  //1ページずつアドレス変換する
 27124:       int pageSize = Math.min (XEiJ.BUS_PAGE_SIZE, mmuPageSize);
 27125:       if (supervisor != 0) {  //スーパーバイザモード
 27126:         if (false) {  //1バイトずつ転送する
 27127:           M68kException.m6eFSLW = M68kException.M6E_FSLW_IOMA_FIRST | M68kException.M6E_FSLW_RW_WRITE | M68kException.M6E_FSLW_SIZE_BYTE | M68kException.M6E_FSLW_TM_SUPER_DATA;
 27128:         }
 27129:         MemoryMappedDevice[] mm = DataBreakPoint.DBP_ON ? DataBreakPoint.dbpSuperMap : XEiJ.busSuperMap;
 27130:         while (0 < length) {
 27131:           int l = Math.min (pageSize - (address & (pageSize - 1)), length);  //今回転送する長さ
 27132:           int t = mmuTranslateWriteSuperData (address);
 27133:           MemoryMappedDevice d = mm[t >>> XEiJ.BUS_PAGE_BITS];
 27134:           if (false) {  //1バイトずつ転送する
 27135:             for (int i = 0; i < l; i++) {
 27136:               d.mmdWb (t + i, array[offset + i]);
 27137:             }
 27138:           } else {  //4バイトずつ転送する。ウェイトサイクルを減らす
 27139:             int o = offset;
 27140:             int z = t + l;
 27141:             if ((t & 1) != 0 && t < z) {  //2n+1で残り1以上。1バイト転送する
 27142:               M68kException.m6eFSLW = M68kException.M6E_FSLW_IOMA_FIRST | M68kException.M6E_FSLW_RW_WRITE | M68kException.M6E_FSLW_SIZE_BYTE | M68kException.M6E_FSLW_TM_SUPER_DATA;
 27143:               d.mmdWb (t++, array[o++]);
 27144:             }
 27145:             if ((t & 2) != 0 && t + 1 < z) {  //4n+2で残り2以上。2バイト転送する
 27146:               M68kException.m6eFSLW = M68kException.M6E_FSLW_IOMA_FIRST | M68kException.M6E_FSLW_RW_WRITE | M68kException.M6E_FSLW_SIZE_WORD | M68kException.M6E_FSLW_TM_SUPER_DATA;
 27147:               d.mmdWw (t,
 27148:                        (array[o    ]      ) <<  8 |
 27149:                        (array[o + 1] & 255));
 27150:               t += 2;
 27151:               o += 2;
 27152:             }
 27153:             if (t + 3 < z) {  //4nで残り4以上。4バイトずつ転送する
 27154:               M68kException.m6eFSLW = M68kException.M6E_FSLW_IOMA_FIRST | M68kException.M6E_FSLW_RW_WRITE | M68kException.M6E_FSLW_SIZE_LONG | M68kException.M6E_FSLW_TM_SUPER_DATA;
 27155:               do {
 27156:                 d.mmdWl (t,
 27157:                          (array[o    ]      ) << 24 |
 27158:                          (array[o + 1] & 255) << 16 |
 27159:                          (array[o + 2] & 255) <<  8 |
 27160:                          (array[o + 3] & 255));
 27161:                 t += 4;
 27162:                 o += 4;
 27163:               } while (t + 3 < z);
 27164:             }
 27165:             if (t + 1 < z) {  //4nで残り2または3。2バイト転送する
 27166:               M68kException.m6eFSLW = M68kException.M6E_FSLW_IOMA_FIRST | M68kException.M6E_FSLW_RW_WRITE | M68kException.M6E_FSLW_SIZE_WORD | M68kException.M6E_FSLW_TM_SUPER_DATA;
 27167:               d.mmdWw (t,
 27168:                        (array[o    ]      ) <<  8 |
 27169:                        (array[o + 1] & 255));
 27170:               t += 2;
 27171:               o += 2;
 27172:             }
 27173:             if (t < z) {  //4nで残り1。1バイト転送する
 27174:               M68kException.m6eFSLW = M68kException.M6E_FSLW_IOMA_FIRST | M68kException.M6E_FSLW_RW_WRITE | M68kException.M6E_FSLW_SIZE_BYTE | M68kException.M6E_FSLW_TM_SUPER_DATA;
 27175:               d.mmdWb (t++, array[o++]);
 27176:             }
 27177:           }  //if 1バイトずつ/4バイトずつ
 27178:           address += l;
 27179:           offset += l;
 27180:           length -= l;
 27181:         }  //while 0<length
 27182:       } else {  //ユーザモード
 27183:         if (false) {  //1バイトずつ転送する
 27184:           M68kException.m6eFSLW = M68kException.M6E_FSLW_IOMA_FIRST | M68kException.M6E_FSLW_RW_WRITE | M68kException.M6E_FSLW_SIZE_BYTE | M68kException.M6E_FSLW_TM_USER_DATA;
 27185:         }
 27186:         MemoryMappedDevice[] mm = DataBreakPoint.DBP_ON ? DataBreakPoint.dbpUserMap : XEiJ.busUserMap;
 27187:         while (0 < length) {
 27188:           int l = Math.min (pageSize - (address & (pageSize - 1)), length);  //今回転送する長さ
 27189:           int t = mmuTranslateWriteUserData (address);
 27190:           MemoryMappedDevice d = mm[t >>> XEiJ.BUS_PAGE_BITS];
 27191:           if (false) {  //1バイトずつ転送する
 27192:             for (int i = 0; i < l; i++) {
 27193:               d.mmdWb (t + i, array[offset + i]);
 27194:             }
 27195:           } else {  //4バイトずつ転送する。ウェイトサイクルを減らす
 27196:             int o = offset;
 27197:             int z = t + l;
 27198:             if ((t & 1) != 0 && t < z) {  //2n+1で残り1以上。1バイト転送する
 27199:               M68kException.m6eFSLW = M68kException.M6E_FSLW_IOMA_FIRST | M68kException.M6E_FSLW_RW_WRITE | M68kException.M6E_FSLW_SIZE_BYTE | M68kException.M6E_FSLW_TM_USER_DATA;
 27200:               d.mmdWb (t++, array[o++]);
 27201:             }
 27202:             if ((t & 2) != 0 && t + 1 < z) {  //4n+2で残り2以上。2バイト転送する
 27203:               M68kException.m6eFSLW = M68kException.M6E_FSLW_IOMA_FIRST | M68kException.M6E_FSLW_RW_WRITE | M68kException.M6E_FSLW_SIZE_WORD | M68kException.M6E_FSLW_TM_USER_DATA;
 27204:               d.mmdWw (t,
 27205:                        (array[o    ]      ) <<  8 |
 27206:                        (array[o + 1] & 255));
 27207:               t += 2;
 27208:               o += 2;
 27209:             }
 27210:             if (t + 3 < z) {  //4nで残り4以上。4バイトずつ転送する
 27211:               M68kException.m6eFSLW = M68kException.M6E_FSLW_IOMA_FIRST | M68kException.M6E_FSLW_RW_WRITE | M68kException.M6E_FSLW_SIZE_LONG | M68kException.M6E_FSLW_TM_USER_DATA;
 27212:               do {
 27213:                 d.mmdWl (t,
 27214:                          (array[o    ]      ) << 24 |
 27215:                          (array[o + 1] & 255) << 16 |
 27216:                          (array[o + 2] & 255) <<  8 |
 27217:                          (array[o + 3] & 255));
 27218:                 t += 4;
 27219:                 o += 4;
 27220:               } while (t + 3 < z);
 27221:             }
 27222:             if (t + 1 < z) {  //4nで残り2または3。2バイト転送する
 27223:               M68kException.m6eFSLW = M68kException.M6E_FSLW_IOMA_FIRST | M68kException.M6E_FSLW_RW_WRITE | M68kException.M6E_FSLW_SIZE_WORD | M68kException.M6E_FSLW_TM_USER_DATA;
 27224:               d.mmdWw (t,
 27225:                        (array[o    ]      ) <<  8 |
 27226:                        (array[o + 1] & 255));
 27227:               t += 2;
 27228:               o += 2;
 27229:             }
 27230:             if (t < z) {  //4nで残り1。1バイト転送する
 27231:               M68kException.m6eFSLW = M68kException.M6E_FSLW_IOMA_FIRST | M68kException.M6E_FSLW_RW_WRITE | M68kException.M6E_FSLW_SIZE_BYTE | M68kException.M6E_FSLW_TM_USER_DATA;
 27232:               d.mmdWb (t++, array[o++]);
 27233:             }
 27234:           }  //if 1バイトずつ/4バイトずつ
 27235:           address += l;
 27236:           offset += l;
 27237:           length -= l;
 27238:         }  //while 0<length
 27239:       }  //if スーパーバイザモード/ユーザモード
 27240:     }  //if 1バイトずつ/1ページずつ
 27241:   }  //mmuWriteByteArray(int,byte[],int,int,int)
 27242: 
 27243:   //--------------------------------------------------------------------------------
 27244:   //アドレス変換
 27245: 
 27246:   //pa = mmuLoadPhysicalAddressRead (a)
 27247:   //  PLPAR (An)
 27248:   //  DFCに従って論理アドレスを物理アドレスに変換する(リードアクセス)
 27249:   //    DFC  1=ユーザデータ,2=ユーザ命令,5=スーパーバイザデータ,6=スーパーバイザ命令
 27250:   //    pa   物理アドレス
 27251:   //    a    論理アドレス
 27252:   public static int mmuLoadPhysicalAddressRead (int a) throws M68kException {
 27253:     M68kException.m6eFSLW = M68kException.M6E_FSLW_IOMA_FIRST | M68kException.M6E_FSLW_RW_READ | M68kException.M6E_FSLW_SIZE_BYTE | XEiJ.mpuDFC << 16;
 27254:     return ((0b10011111 << 24 << XEiJ.mpuDFC) < 0 ?
 27255:             (0b00101010 << 24 << XEiJ.mpuDFC) < 0 ? mmuTranslateReadSuperCode (a) : mmuTranslateReadSuperData (a) :
 27256:             (0b00101010 << 24 << XEiJ.mpuDFC) < 0 ? mmuTranslateReadUserCode (a) : mmuTranslateReadUserData (a));
 27257:   }  //mmuLoadPhysicalAddressRead(int)
 27258: 
 27259:   //pa = mmuLoadPhysicalAddressWrite (a)
 27260:   //  PLPAW (An)
 27261:   //  DFCに従って論理アドレスを物理アドレスに変換する(ライトアクセス)
 27262:   //    DFC  1=ユーザデータ,2=ユーザ命令,5=スーパーバイザデータ,6=スーパーバイザ命令
 27263:   //    pa   物理アドレス
 27264:   //    a    論理アドレス
 27265:   public static int mmuLoadPhysicalAddressWrite (int a) throws M68kException {
 27266:     M68kException.m6eFSLW = M68kException.M6E_FSLW_IOMA_FIRST | M68kException.M6E_FSLW_RW_WRITE | M68kException.M6E_FSLW_SIZE_BYTE | XEiJ.mpuDFC << 16;
 27267:     return ((0b10011111 << 24 << XEiJ.mpuDFC) < 0 ?
 27268:             (0b00101010 << 24 << XEiJ.mpuDFC) < 0 ? mmuTranslateWriteSuperCode (a) : mmuTranslateWriteSuperData (a) :
 27269:             (0b00101010 << 24 << XEiJ.mpuDFC) < 0 ? mmuTranslateWriteUserCode (a) : mmuTranslateWriteUserData (a));
 27270:   }  //mmuLoadPhysicalAddressWrite(int)
 27271: 
 27272:   //pa = mmuTranslateReadUserData (a)
 27273:   //  アドレス変換を行う(リードユーザデータ)
 27274:   //    pa  物理アドレス
 27275:   //    a   論理アドレス
 27276:   //  M68kException.m6eFSLWのMA,RW,SIZE,TM,IOをセットしてから呼び出すこと
 27277:   public static int mmuTranslateReadUserData (int a) throws M68kException {
 27278:     int logicalPage = a & mmuPageAddressMask;  //論理ページアドレス
 27279:     int head = (logicalPage * MMU_HASH_COEFF >>> -MMU_HASH_BITS) * (4 * MMU_CACHE_WAYS);  //先頭のエントリ
 27280:     if (mmuUserDataCache[head] == logicalPage) {  //リード用の論理ページアドレスと一致した
 27281:       return mmuUserDataCache[head + 2] | (a & mmuPageOffsetMask);  //物理ページアドレスとページオフセットを連結する
 27282:     }
 27283:     if (MMU_CACHE_WAYS >= 2) {  //2ways以上
 27284:       int tail = head + (4 * MMU_CACHE_WAYS - 4);  //末尾のエントリ
 27285:       for (int i = head + 4; i <= tail; i += 4) {
 27286:         if (mmuUserDataCache[i] == logicalPage) {  //リード用の論理ページアドレスと一致した
 27287:           //int logicalRead  = mmuUserDataCache[i    ];
 27288:           int logicalWrite = mmuUserDataCache[i + 1];
 27289:           int physicalPage = mmuUserDataCache[i + 2];
 27290:           int globalFlag   = mmuUserDataCache[i + 3];
 27291:           for (; i > head; i -= 4) {
 27292:             mmuUserDataCache[i    ] = mmuUserDataCache[i - 4];
 27293:             mmuUserDataCache[i + 1] = mmuUserDataCache[i - 3];
 27294:             mmuUserDataCache[i + 2] = mmuUserDataCache[i - 2];
 27295:             mmuUserDataCache[i + 3] = mmuUserDataCache[i - 1];
 27296:           }
 27297:           mmuUserDataCache[i    ] = logicalPage;  //logicalRead
 27298:           mmuUserDataCache[i + 1] = logicalWrite;
 27299:           mmuUserDataCache[i + 2] = physicalPage;
 27300:           mmuUserDataCache[i + 3] = globalFlag;
 27301:           return physicalPage | (a & mmuPageOffsetMask);  //物理ページアドレスとページオフセットを連結する
 27302:         }
 27303:       }  //for i
 27304:     }
 27305:     return mmuTranslateCommon (a, false, false, false);
 27306:   }  //mmuTranslateReadUserData(int)
 27307: 
 27308:   //pa = mmuTranslateReadUserCode (a)
 27309:   //  アドレス変換を行う(リードユーザコード)
 27310:   //    pa  物理アドレス
 27311:   //    a   論理アドレス
 27312:   //  M68kException.m6eFSLWのMA,RW,SIZE,TM,IOをセットしてから呼び出すこと
 27313:   public static int mmuTranslateReadUserCode (int a) throws M68kException {
 27314:     int logicalPage = a & mmuPageAddressMask;  //論理ページアドレス
 27315:     int head = (logicalPage * MMU_HASH_COEFF >>> -MMU_HASH_BITS) * (4 * MMU_CACHE_WAYS);  //先頭のエントリ
 27316:     if (mmuUserCodeCache[head] == logicalPage) {  //リード用の論理ページアドレスと一致した
 27317:       return mmuUserCodeCache[head + 2] | (a & mmuPageOffsetMask);  //物理ページアドレスとページオフセットを連結する
 27318:     }
 27319:     if (MMU_CACHE_WAYS >= 2) {  //2ways以上
 27320:       int tail = head + (4 * MMU_CACHE_WAYS - 4);  //末尾のエントリ
 27321:       for (int i = head + 4; i <= tail; i += 4) {
 27322:         if (mmuUserCodeCache[i] == logicalPage) {  //リード用の論理ページアドレスと一致した
 27323:           //int logicalRead  = mmuUserCodeCache[i    ];
 27324:           int logicalWrite = mmuUserCodeCache[i + 1];
 27325:           int physicalPage = mmuUserCodeCache[i + 2];
 27326:           int globalFlag   = mmuUserCodeCache[i + 3];
 27327:           for (; i > head; i -= 4) {
 27328:             mmuUserCodeCache[i    ] = mmuUserCodeCache[i - 4];
 27329:             mmuUserCodeCache[i + 1] = mmuUserCodeCache[i - 3];
 27330:             mmuUserCodeCache[i + 2] = mmuUserCodeCache[i - 2];
 27331:             mmuUserCodeCache[i + 3] = mmuUserCodeCache[i - 1];
 27332:           }
 27333:           mmuUserCodeCache[head    ] = logicalPage;  //logicalRead
 27334:           mmuUserCodeCache[head + 1] = logicalWrite;
 27335:           mmuUserCodeCache[head + 2] = physicalPage;
 27336:           mmuUserCodeCache[head + 3] = globalFlag;
 27337:           return physicalPage | (a & mmuPageOffsetMask);  //物理ページアドレスとページオフセットを連結する
 27338:         }
 27339:       }  //for i
 27340:     }
 27341:     return mmuTranslateCommon (a, false, false, true);
 27342:   }  //mmuTranslateReadUserCode(int)
 27343: 
 27344:   //pa = mmuTranslateReadSuperData (a)
 27345:   //  アドレス変換を行う(リードスーパーバイザデータ)
 27346:   //    pa  物理アドレス
 27347:   //    a   論理アドレス
 27348:   //  M68kException.m6eFSLWのMA,RW,SIZE,TM,IOをセットしてから呼び出すこと
 27349:   public static int mmuTranslateReadSuperData (int a) throws M68kException {
 27350:     int logicalPage = a & mmuPageAddressMask;  //論理ページアドレス
 27351:     int head = (logicalPage * MMU_HASH_COEFF >>> -MMU_HASH_BITS) * (4 * MMU_CACHE_WAYS);  //先頭のエントリ
 27352:     if (mmuSuperDataCache[head] == logicalPage) {  //リード用の論理ページアドレスと一致した
 27353:       return mmuSuperDataCache[head + 2] | (a & mmuPageOffsetMask);  //物理ページアドレスとページオフセットを連結する
 27354:     }
 27355:     if (MMU_CACHE_WAYS >= 2) {  //2ways以上
 27356:       int tail = head + (4 * MMU_CACHE_WAYS - 4);  //末尾のエントリ
 27357:       for (int i = head + 4; i <= tail; i += 4) {
 27358:         if (mmuSuperDataCache[i] == logicalPage) {  //リード用の論理ページアドレスと一致した
 27359:           //int logicalRead  = mmuSuperDataCache[i    ];
 27360:           int logicalWrite = mmuSuperDataCache[i + 1];
 27361:           int physicalPage = mmuSuperDataCache[i + 2];
 27362:           int globalFlag   = mmuSuperDataCache[i + 3];
 27363:           for (; i > head; i -= 4) {
 27364:             mmuSuperDataCache[i    ] = mmuSuperDataCache[i - 4];
 27365:             mmuSuperDataCache[i + 1] = mmuSuperDataCache[i - 3];
 27366:             mmuSuperDataCache[i + 2] = mmuSuperDataCache[i - 2];
 27367:             mmuSuperDataCache[i + 3] = mmuSuperDataCache[i - 1];
 27368:           }
 27369:           mmuSuperDataCache[i    ] = logicalPage;  //logicalRead
 27370:           mmuSuperDataCache[i + 1] = logicalWrite;
 27371:           mmuSuperDataCache[i + 2] = physicalPage;
 27372:           mmuSuperDataCache[i + 3] = globalFlag;
 27373:           return physicalPage | (a & mmuPageOffsetMask);  //物理ページアドレスとページオフセットを連結する
 27374:         }
 27375:       }  //for i
 27376:     }
 27377:     return mmuTranslateCommon (a, false, true, false);
 27378:   }  //mmuTranslateReadSuperData(int)
 27379: 
 27380:   //pa = mmuTranslateReadSuperCode (a)
 27381:   //  アドレス変換を行う(リードスーパーバイザコード)
 27382:   //    pa  物理アドレス
 27383:   //    a   論理アドレス
 27384:   //  M68kException.m6eFSLWのMA,RW,SIZE,TM,IOをセットしてから呼び出すこと
 27385:   public static int mmuTranslateReadSuperCode (int a) throws M68kException {
 27386:     int logicalPage = a & mmuPageAddressMask;  //論理ページアドレス
 27387:     int head = (logicalPage * MMU_HASH_COEFF >>> -MMU_HASH_BITS) * (4 * MMU_CACHE_WAYS);  //先頭のエントリ
 27388:     if (mmuSuperCodeCache[head] == logicalPage) {  //リード用の論理ページアドレスと一致した
 27389:       return mmuSuperCodeCache[head + 2] | (a & mmuPageOffsetMask);  //物理ページアドレスとページオフセットを連結する
 27390:     }
 27391:     if (MMU_CACHE_WAYS >= 2) {  //2ways以上
 27392:       int tail = head + (4 * MMU_CACHE_WAYS - 4);  //末尾のエントリ
 27393:       for (int i = head + 4; i <= tail; i += 4) {
 27394:         if (mmuSuperCodeCache[i] == logicalPage) {  //リード用の論理ページアドレスと一致した
 27395:           //int logicalRead  = mmuSuperCodeCache[i    ];
 27396:           int logicalWrite = mmuSuperCodeCache[i + 1];
 27397:           int physicalPage = mmuSuperCodeCache[i + 2];
 27398:           int globalFlag   = mmuSuperCodeCache[i + 3];
 27399:           for (; i > head; i -= 4) {
 27400:             mmuSuperCodeCache[i    ] = mmuSuperCodeCache[i - 4];
 27401:             mmuSuperCodeCache[i + 1] = mmuSuperCodeCache[i - 3];
 27402:             mmuSuperCodeCache[i + 2] = mmuSuperCodeCache[i - 2];
 27403:             mmuSuperCodeCache[i + 3] = mmuSuperCodeCache[i - 1];
 27404:           }
 27405:           mmuSuperCodeCache[head    ] = logicalPage;  //logicalRead
 27406:           mmuSuperCodeCache[head + 1] = logicalWrite;
 27407:           mmuSuperCodeCache[head + 2] = physicalPage;
 27408:           mmuSuperCodeCache[head + 3] = globalFlag;
 27409:           return physicalPage | (a & mmuPageOffsetMask);  //物理ページアドレスとページオフセットを連結する
 27410:         }
 27411:       }  //for i
 27412:     }
 27413:     return mmuTranslateCommon (a, false, true, true);
 27414:   }  //mmuTranslateReadSuperCode(int)
 27415: 
 27416:   //pa = mmuTranslateWriteUserData (a)
 27417:   //  アドレス変換を行う(ライトユーザデータ)
 27418:   //    pa  物理アドレス
 27419:   //    a   論理アドレス
 27420:   //  M68kException.m6eFSLWのMA,RW,SIZE,TM,IOをセットしてから呼び出すこと
 27421:   public static int mmuTranslateWriteUserData (int a) throws M68kException {
 27422:     int logicalPage = a & mmuPageAddressMask;  //論理ページアドレス
 27423:     int head = (logicalPage * MMU_HASH_COEFF >>> -MMU_HASH_BITS) * (4 * MMU_CACHE_WAYS);  //先頭のエントリ
 27424:     if (mmuUserDataCache[head + 1] == logicalPage) {  //ライト用の論理ページアドレスと一致した
 27425:       return mmuUserDataCache[head + 2] | (a & mmuPageOffsetMask);  //物理ページアドレスとページオフセットを連結する
 27426:     }
 27427:     if (MMU_CACHE_WAYS >= 2) {  //2ways以上
 27428:       int tail = head + (4 * MMU_CACHE_WAYS - 4);  //末尾のエントリ
 27429:       for (int i = head + 4; i <= tail; i += 4) {
 27430:         if (mmuUserDataCache[i + 1] == logicalPage) {  //ライト用の論理ページアドレスと一致した
 27431:           int logicalRead  = mmuUserDataCache[i    ];
 27432:           //int logicalWrite = mmuUserDataCache[i + 1];
 27433:           int physicalPage = mmuUserDataCache[i + 2];
 27434:           int globalFlag   = mmuUserDataCache[i + 3];
 27435:           for (; i > head; i -= 4) {
 27436:             mmuUserDataCache[i    ] = mmuUserDataCache[i - 4];
 27437:             mmuUserDataCache[i + 1] = mmuUserDataCache[i - 3];
 27438:             mmuUserDataCache[i + 2] = mmuUserDataCache[i - 2];
 27439:             mmuUserDataCache[i + 3] = mmuUserDataCache[i - 1];
 27440:           }
 27441:           mmuUserDataCache[i    ] = logicalRead;
 27442:           mmuUserDataCache[i + 1] = logicalPage;  //logicalWrite
 27443:           mmuUserDataCache[i + 2] = physicalPage;
 27444:           mmuUserDataCache[i + 3] = globalFlag;
 27445:           return physicalPage | (a & mmuPageOffsetMask);  //物理ページアドレスとページオフセットを連結する
 27446:         }
 27447:       }  //for i
 27448:     }
 27449:     return mmuTranslateCommon (a, true, false, false);
 27450:   }  //mmuTranslateWriteUserData(int)
 27451: 
 27452:   //pa = mmuTranslateWriteUserCode (a)
 27453:   //  アドレス変換を行う(ライトユーザコード)
 27454:   //    pa  物理アドレス
 27455:   //    a   論理アドレス
 27456:   //  M68kException.m6eFSLWのMA,RW,SIZE,TM,IOをセットしてから呼び出すこと
 27457:   public static int mmuTranslateWriteUserCode (int a) throws M68kException {
 27458:     int logicalPage = a & mmuPageAddressMask;  //論理ページアドレス
 27459:     int head = (logicalPage * MMU_HASH_COEFF >>> -MMU_HASH_BITS) * (4 * MMU_CACHE_WAYS);  //先頭のエントリ
 27460:     if (mmuUserCodeCache[head + 1] == logicalPage) {  //ライト用の論理ページアドレスと一致した
 27461:       return mmuUserCodeCache[head + 2] | (a & mmuPageOffsetMask);  //物理ページアドレスとページオフセットを連結する
 27462:     }
 27463:     if (MMU_CACHE_WAYS >= 2) {  //2ways以上
 27464:       int tail = head + (4 * MMU_CACHE_WAYS - 4);  //末尾のエントリ
 27465:       for (int i = head + 4; i <= tail; i += 4) {
 27466:         if (mmuUserCodeCache[i + 1] == logicalPage) {  //ライト用の論理ページアドレスと一致した
 27467:           int logicalRead  = mmuUserCodeCache[i    ];
 27468:           //int logicalWrite = mmuUserCodeCache[i + 1];
 27469:           int physicalPage = mmuUserCodeCache[i + 2];
 27470:           int globalFlag   = mmuUserCodeCache[i + 3];
 27471:           for (; i > head; i -= 4) {
 27472:             mmuUserCodeCache[i    ] = mmuUserCodeCache[i - 4];
 27473:             mmuUserCodeCache[i + 1] = mmuUserCodeCache[i - 3];
 27474:             mmuUserCodeCache[i + 2] = mmuUserCodeCache[i - 2];
 27475:             mmuUserCodeCache[i + 3] = mmuUserCodeCache[i - 1];
 27476:           }
 27477:           mmuUserCodeCache[head    ] = logicalRead;
 27478:           mmuUserCodeCache[head + 1] = logicalPage;  //logicalWrite
 27479:           mmuUserCodeCache[head + 2] = physicalPage;
 27480:           mmuUserCodeCache[head + 3] = globalFlag;
 27481:           return physicalPage | (a & mmuPageOffsetMask);  //物理ページアドレスとページオフセットを連結する
 27482:         }
 27483:       }  //for i
 27484:     }
 27485:     return mmuTranslateCommon (a, true, false, true);
 27486:   }  //mmuTranslateWriteUserCode(int)
 27487: 
 27488:   //pa = mmuTranslateWriteSuperData (a)
 27489:   //  アドレス変換を行う(ライトスーパーバイザデータ)
 27490:   //    pa  物理アドレス
 27491:   //    a   論理アドレス
 27492:   //  M68kException.m6eFSLWのMA,RW,SIZE,TM,IOをセットしてから呼び出すこと
 27493:   public static int mmuTranslateWriteSuperData (int a) throws M68kException {
 27494:     int logicalPage = a & mmuPageAddressMask;  //論理ページアドレス
 27495:     int head = (logicalPage * MMU_HASH_COEFF >>> -MMU_HASH_BITS) * (4 * MMU_CACHE_WAYS);  //先頭のエントリ
 27496:     if (mmuSuperDataCache[head + 1] == logicalPage) {  //ライト用の論理ページアドレスと一致した
 27497:       return mmuSuperDataCache[head + 2] | (a & mmuPageOffsetMask);  //物理ページアドレスとページオフセットを連結する
 27498:     }
 27499:     if (MMU_CACHE_WAYS >= 2) {  //2ways以上
 27500:       int tail = head + (4 * MMU_CACHE_WAYS - 4);  //末尾のエントリ
 27501:       for (int i = head + 4; i <= tail; i += 4) {
 27502:         if (mmuSuperDataCache[i + 1] == logicalPage) {  //ライト用の論理ページアドレスと一致した
 27503:           int logicalRead  = mmuSuperDataCache[i    ];
 27504:           //int logicalWrite = mmuSuperDataCache[i + 1];
 27505:           int physicalPage = mmuSuperDataCache[i + 2];
 27506:           int globalFlag   = mmuSuperDataCache[i + 3];
 27507:           for (; i > head; i -= 4) {
 27508:             mmuSuperDataCache[i    ] = mmuSuperDataCache[i - 4];
 27509:             mmuSuperDataCache[i + 1] = mmuSuperDataCache[i - 3];
 27510:             mmuSuperDataCache[i + 2] = mmuSuperDataCache[i - 2];
 27511:             mmuSuperDataCache[i + 3] = mmuSuperDataCache[i - 1];
 27512:           }
 27513:           mmuSuperDataCache[i    ] = logicalRead;
 27514:           mmuSuperDataCache[i + 1] = logicalPage;  //logicalWrite
 27515:           mmuSuperDataCache[i + 2] = physicalPage;
 27516:           mmuSuperDataCache[i + 3] = globalFlag;
 27517:           return physicalPage | (a & mmuPageOffsetMask);  //物理ページアドレスとページオフセットを連結する
 27518:         }
 27519:       }  //for i
 27520:     }
 27521:     return mmuTranslateCommon (a, true, true, false);
 27522:   }  //mmuTranslateWriteSuperData(int)
 27523: 
 27524:   //pa = mmuTranslateWriteSuperCode (a)
 27525:   //  アドレス変換を行う(ライトスーパーバイザコード)
 27526:   //    pa  物理アドレス
 27527:   //    a   論理アドレス
 27528:   //  M68kException.m6eFSLWのMA,RW,SIZE,TM,IOをセットしてから呼び出すこと
 27529:   public static int mmuTranslateWriteSuperCode (int a) throws M68kException {
 27530:     int logicalPage = a & mmuPageAddressMask;  //論理ページアドレス
 27531:     int head = (logicalPage * MMU_HASH_COEFF >>> -MMU_HASH_BITS) * (4 * MMU_CACHE_WAYS);  //先頭のエントリ
 27532:     if (mmuSuperCodeCache[head + 1] == logicalPage) {  //ライト用の論理ページアドレスと一致した
 27533:       return mmuSuperCodeCache[head + 2] | (a & mmuPageOffsetMask);  //物理ページアドレスとページオフセットを連結する
 27534:     }
 27535:     if (MMU_CACHE_WAYS >= 2) {  //2ways以上
 27536:       int tail = head + (4 * MMU_CACHE_WAYS - 4);  //末尾のエントリ
 27537:       for (int i = head + 4; i <= tail; i += 4) {
 27538:         if (mmuSuperCodeCache[i + 1] == logicalPage) {  //ライト用の論理ページアドレスと一致した
 27539:           int logicalRead  = mmuSuperCodeCache[i    ];
 27540:           //int logicalWrite = mmuSuperCodeCache[i + 1];
 27541:           int physicalPage = mmuSuperCodeCache[i + 2];
 27542:           int globalFlag   = mmuSuperCodeCache[i + 3];
 27543:           for (; i > head; i -= 4) {
 27544:             mmuSuperCodeCache[i    ] = mmuSuperCodeCache[i - 4];
 27545:             mmuSuperCodeCache[i + 1] = mmuSuperCodeCache[i - 3];
 27546:             mmuSuperCodeCache[i + 2] = mmuSuperCodeCache[i - 2];
 27547:             mmuSuperCodeCache[i + 3] = mmuSuperCodeCache[i - 1];
 27548:           }
 27549:           mmuSuperCodeCache[head    ] = logicalRead;
 27550:           mmuSuperCodeCache[head + 1] = logicalPage;  //logicalWrite
 27551:           mmuSuperCodeCache[head + 2] = physicalPage;
 27552:           mmuSuperCodeCache[head + 3] = globalFlag;
 27553:           return physicalPage | (a & mmuPageOffsetMask);  //物理ページアドレスとページオフセットを連結する
 27554:         }
 27555:       }  //for i
 27556:     }
 27557:     return mmuTranslateCommon (a, true, true, true);
 27558:   }  //mmuTranslateWriteSuperCode(int)
 27559: 
 27560:   //pa = mmuTranslateCommon (a, write, supervisor, instruction)
 27561:   //  透過変換とテーブルサーチを行い、アドレス変換キャッシュ更新する
 27562:   //  アドレス変換キャッシュがミスしたときに呼び出す
 27563:   //    pa           物理アドレス
 27564:   //    a            論理アドレス
 27565:   //    write        true=ライト,false=リード
 27566:   //    supervisor   true=スーパーバイザ,false=ユーザ。通常はXEiJ.regSRS!=0、PLPAR/PLPAWでは(XEiJ.mpuDFC&4)!=0
 27567:   //    instruction  true=命令,false=データ。通常は命令フェッチまたは拡張ワードのときtrue、PLPAR/PLPAWでは(XEiJ.mpuDFC&2)!=0
 27568:   //  M68kException.m6eFSLWのMA,RW,SIZE,TM,IOをセットしてから呼び出すこと
 27569:   public static int mmuTranslateCommon (int a, boolean write, boolean supervisor, boolean instruction) throws M68kException {
 27570:     if (MMU_DEBUG_TRANSLATION) {
 27571:       System.out.printf ("%08x mmuTranslateCommon(0x%08x,%b,%b,%b)", XEiJ.regPC0, a, write, supervisor, instruction);
 27572:     }
 27573:     int logicalPage = a & mmuPageAddressMask;  //リード用の論理ページアドレス
 27574:     int logicalWrite;  //ライト用の論理ページアドレス
 27575:     int physicalPage;  //物理ページアドレス
 27576:     int globalFlag;  //グローバルフラグ。-1=Global,0=NonGlobal
 27577:     int pa;  //物理アドレス
 27578:     //透過変換
 27579:     //  透過変換はスーパーバイザモードかどうかを条件にすることができる(しないこともできる)
 27580:     //    条件が合わなければヒットしないだけで、スーパーバイザプロテクトのアクセスフォルトになならない
 27581:     //  透過変換をアドレス変換キャッシュに乗せる場合
 27582:     //    アドレス変換キャッシュがヒットしてバスエラーが発生したとき
 27583:     //      透過変換かどうかを再確認してFSLWのTTRをセットしなければならない
 27584:     //    透過変換レジスタが操作されたとき
 27585:     //      OFF→ONの領域だけでなくON→OFFの領域もフラッシュしなければならない
 27586:     //      透過変換レジスタを頻繁に操作されると重くなるかも知れない
 27587:     int tt = (supervisor ?
 27588:               instruction ? mmuSuperCodeTransparent : mmuSuperDataTransparent :
 27589:               instruction ? mmuUserCodeTransparent : mmuUserDataTransparent)[a >>> 24];
 27590:     if (tt != 0) {  //透過変換あり
 27591:       M68kException.m6eFSLW |= M68kException.M6E_FSLW_TRANSPARENT;
 27592:       if (write &&  //ライトで
 27593:           tt < 0) {  //透過変換によるライトプロテクト
 27594:         if (MMU_DEBUG_TRANSLATION) {
 27595:           System.out.printf (" write protected by transparent translation\n", a);
 27596:         }
 27597:         M68kException.m6eFSLW |= M68kException.M6E_FSLW_WRITE_PROTECT;
 27598:         M68kException.m6eNumber = M68kException.M6E_ACCESS_FAULT;
 27599:         M68kException.m6eAddress = a;
 27600:         throw M68kException.m6eSignal;
 27601:       }
 27602:       logicalWrite = logicalPage;  //ライト用の論理ページアドレス
 27603:       physicalPage = logicalPage;  //物理ページアドレス
 27604:       globalFlag = -1;  //グローバルフラグ。-1=Global,0=NonGlobal
 27605:       pa = a;
 27606:       if (MMU_DEBUG_TRANSLATION) {
 27607:         System.out.printf ("=0x%08x (transparent translation)\n", pa);
 27608:       }
 27609:     } else if (mmuEnabled) {  //透過変換なし、アドレス変換あり
 27610:       //テーブルサーチ
 27611:       //  スーパーバイザプロテクトまたはライトプロテクトで停止したときディスクリプタの使用済みフラグはセットされない
 27612:       //  リードモディファイライトはライトでアロケートするのでリードする前にライトプロテクトに引っかかる
 27613:       //    例えばROMの内容をインクリメントしようとしたときライトだけでなくリードも行われない
 27614:       M68kException.m6eFSLW |= M68kException.M6E_FSLW_TABLE_SEARCH;
 27615:       //ルートテーブル
 27616:       int rootDescriptorAddress = (supervisor ? mmuSRP : mmuURP) + ((a & MMU_ROOT_INDEX_MASK) >>> MMU_ROOT_INDEX_BIT0 - 2);  //ルートテーブルディスクリプタのアドレス
 27617:       MemoryMappedDevice rootDescriptorDevice = (DataBreakPoint.DBP_ON ? DataBreakPoint.dbpSuperMap : XEiJ.busSuperMap)[rootDescriptorAddress >>> XEiJ.BUS_PAGE_BITS];
 27618:       int rootDescriptor = rootDescriptorDevice.mmdRls (rootDescriptorAddress);  //ルートテーブルディスクリプタ
 27619:       if ((rootDescriptor & MMU_DESCRIPTOR_UDT) == MMU_DESCRIPTOR_TYPE_INVALID) {  //ディスクリプタが無効のとき
 27620:         if (MMU_DEBUG_TRANSLATION) {
 27621:           System.out.printf (" invalid root descriptor 0x%08x at 0x%08x\n", rootDescriptor, rootDescriptorAddress);
 27622:         }
 27623:         M68kException.m6eFSLW ^= M68kException.M6E_FSLW_TABLE_SEARCH ^ M68kException.M6E_FSLW_ROOT_DESCRIPTOR;
 27624:         M68kException.m6eNumber = M68kException.M6E_ACCESS_FAULT;
 27625:         M68kException.m6eAddress = a;
 27626:         throw M68kException.m6eSignal;
 27627:       }
 27628:       if (write &&  //ライトで
 27629:           (rootDescriptor & MMU_DESCRIPTOR_WRITE_PROTECTED) != 0) {  //ライトプロテクトされているとき
 27630:         if (MMU_DEBUG_TRANSLATION) {
 27631:           System.out.printf (" write protected by root descriptor 0x%08x at 0x%08x\n", rootDescriptor, rootDescriptorAddress);
 27632:         }
 27633:         M68kException.m6eFSLW ^= M68kException.M6E_FSLW_TABLE_SEARCH ^ M68kException.M6E_FSLW_WRITE_PROTECT;
 27634:         M68kException.m6eNumber = M68kException.M6E_ACCESS_FAULT;
 27635:         M68kException.m6eAddress = a;
 27636:         throw M68kException.m6eSignal;
 27637:       }
 27638:       if ((rootDescriptor & MMU_DESCRIPTOR_USED) == 0) {  //ディスクリプタが未使用のとき
 27639:         rootDescriptor |= MMU_DESCRIPTOR_USED;  //使用済み
 27640:         rootDescriptorDevice.mmdWl (rootDescriptorAddress, rootDescriptor);
 27641:       }
 27642:       //ポインタテーブル
 27643:       int pointerDescriptorAddress = (rootDescriptor & MMU_DESCRIPTOR_POINTER_TABLE_ADDRESS) + ((a & MMU_POINTER_INDEX_MASK) >>> MMU_POINTER_INDEX_BIT0 - 2);  //ポインタテーブルディスクリプタのアドレス
 27644:       MemoryMappedDevice pointerDescriptorDevice = (DataBreakPoint.DBP_ON ? DataBreakPoint.dbpSuperMap : XEiJ.busSuperMap)[pointerDescriptorAddress >>> XEiJ.BUS_PAGE_BITS];
 27645:       int pointerDescriptor = pointerDescriptorDevice.mmdRls (pointerDescriptorAddress);  //ポインタテーブルディスクリプタ
 27646:       if ((pointerDescriptor & MMU_DESCRIPTOR_UDT) == MMU_DESCRIPTOR_TYPE_INVALID) {  //ディスクリプタが無効のとき
 27647:         if (MMU_DEBUG_TRANSLATION) {
 27648:           System.out.printf (" invalid pointer descriptor 0x%08x at 0x%08x\n", pointerDescriptor, pointerDescriptorAddress);
 27649:         }
 27650:         M68kException.m6eFSLW ^= M68kException.M6E_FSLW_TABLE_SEARCH ^ M68kException.M6E_FSLW_POINTER_DESCRIPTOR;
 27651:         M68kException.m6eNumber = M68kException.M6E_ACCESS_FAULT;
 27652:         M68kException.m6eAddress = a;
 27653:         throw M68kException.m6eSignal;
 27654:       }
 27655:       if (write &&  //ライトで
 27656:           (pointerDescriptor & MMU_DESCRIPTOR_WRITE_PROTECTED) != 0) {  //ライトプロテクトされているとき
 27657:         if (MMU_DEBUG_TRANSLATION) {
 27658:           System.out.printf (" write protected by pointer descriptor 0x%08x at 0x%08x\n", pointerDescriptor, pointerDescriptorAddress);
 27659:         }
 27660:         M68kException.m6eFSLW ^= M68kException.M6E_FSLW_TABLE_SEARCH ^ M68kException.M6E_FSLW_WRITE_PROTECT;
 27661:         M68kException.m6eNumber = M68kException.M6E_ACCESS_FAULT;
 27662:         M68kException.m6eAddress = a;
 27663:         throw M68kException.m6eSignal;
 27664:       }
 27665:       if ((pointerDescriptor & MMU_DESCRIPTOR_USED) == 0) {  //ディスクリプタが未使用のとき
 27666:         pointerDescriptor |= MMU_DESCRIPTOR_USED;  //使用済み
 27667:         pointerDescriptorDevice.mmdWl (pointerDescriptorAddress, pointerDescriptor);
 27668:       }
 27669:       //ページテーブル
 27670:       int pageDescriptorAddress = (pointerDescriptor & mmuPageTableMask) + ((a & mmuPageIndexMask) >>> mmuPageIndexBit2);  //ページテーブルディスクリプタのアドレス
 27671:       MemoryMappedDevice pageDescriptorDevice = (DataBreakPoint.DBP_ON ? DataBreakPoint.dbpSuperMap : XEiJ.busSuperMap)[pageDescriptorAddress >>> XEiJ.BUS_PAGE_BITS];
 27672:       int pageDescriptor = pageDescriptorDevice.mmdRls (pageDescriptorAddress);  //ページテーブルディスクリプタ
 27673:       if ((pageDescriptor & MMU_DESCRIPTOR_PDT) == MMU_DESCRIPTOR_TYPE_INVALID) {  //ディスクリプタが無効のとき
 27674:         if (MMU_DEBUG_TRANSLATION) {
 27675:           System.out.printf (" invalid page descriptor 0x%08x at 0x%08x\n", pageDescriptor, pageDescriptorAddress);
 27676:         }
 27677:         M68kException.m6eFSLW ^= M68kException.M6E_FSLW_TABLE_SEARCH ^ M68kException.M6E_FSLW_PAGE_FAULT;
 27678:         M68kException.m6eNumber = M68kException.M6E_ACCESS_FAULT;
 27679:         M68kException.m6eAddress = a;
 27680:         throw M68kException.m6eSignal;
 27681:       }
 27682:       if ((pageDescriptor & MMU_DESCRIPTOR_PDT) == MMU_DESCRIPTOR_TYPE_INDIRECT) {  //ディスクリプタが間接のとき
 27683:         pageDescriptorAddress = pageDescriptor & MMU_DESCRIPTOR_INDIRECT_ADDRESS;  //ページテーブルディスクリプタのアドレス
 27684:         pageDescriptorDevice = (DataBreakPoint.DBP_ON ? DataBreakPoint.dbpSuperMap : XEiJ.busSuperMap)[pageDescriptorAddress >>> XEiJ.BUS_PAGE_BITS];
 27685:         pageDescriptor = pageDescriptorDevice.mmdRls (pageDescriptorAddress);  //ページテーブルディスクリプタ
 27686:         if ((pageDescriptor & MMU_DESCRIPTOR_PDT) == MMU_DESCRIPTOR_TYPE_INVALID) {  //ディスクリプタが無効のとき
 27687:           if (MMU_DEBUG_TRANSLATION) {
 27688:             System.out.printf (" invalid page descriptor 0x%08x at 0x%08x\n", pageDescriptor, pageDescriptorAddress);
 27689:           }
 27690:           M68kException.m6eFSLW ^= M68kException.M6E_FSLW_TABLE_SEARCH ^ M68kException.M6E_FSLW_PAGE_FAULT;
 27691:           M68kException.m6eNumber = M68kException.M6E_ACCESS_FAULT;
 27692:           M68kException.m6eAddress = a;
 27693:           throw M68kException.m6eSignal;
 27694:         }
 27695:         if ((pageDescriptor & MMU_DESCRIPTOR_PDT) == MMU_DESCRIPTOR_TYPE_INDIRECT) {  //ディスクリプタが二重間接のとき
 27696:           if (MMU_DEBUG_TRANSLATION) {
 27697:             System.out.printf (" indirect page descriptor 0x%08x at 0x%08x\n", pageDescriptor, pageDescriptorAddress);
 27698:           }
 27699:           M68kException.m6eFSLW ^= M68kException.M6E_FSLW_TABLE_SEARCH ^ M68kException.M6E_FSLW_INDIRECT_LEVEL;
 27700:           M68kException.m6eNumber = M68kException.M6E_ACCESS_FAULT;
 27701:           M68kException.m6eAddress = a;
 27702:           throw M68kException.m6eSignal;
 27703:         }
 27704:       }
 27705:       if (!supervisor &&  //ユーザモードで
 27706:           (pageDescriptor & MMU_DESCRIPTOR_SUPERVISOR_PROTECTED) != 0) {  //スーパーバイザプロテクトされているとき
 27707:         if (MMU_DEBUG_TRANSLATION) {
 27708:           System.out.printf (" supervisor protected by page descriptor 0x%08x at 0x%08x\n", pageDescriptor, pageDescriptorAddress);
 27709:         }
 27710:         M68kException.m6eFSLW ^= M68kException.M6E_FSLW_TABLE_SEARCH ^ M68kException.M6E_FSLW_SUPERVISOR_PROTECT;
 27711:         M68kException.m6eNumber = M68kException.M6E_ACCESS_FAULT;
 27712:         M68kException.m6eAddress = a;
 27713:         throw M68kException.m6eSignal;
 27714:       }
 27715:       if (write &&  //ライトで
 27716:           (pageDescriptor & MMU_DESCRIPTOR_WRITE_PROTECTED) != 0) {  //ライトプロテクトされているとき
 27717:         if (MMU_DEBUG_TRANSLATION) {
 27718:           System.out.printf (" write protected by page descriptor 0x%08x at 0x%08x\n", pageDescriptor, pageDescriptorAddress);
 27719:         }
 27720:         M68kException.m6eFSLW ^= M68kException.M6E_FSLW_TABLE_SEARCH ^ M68kException.M6E_FSLW_WRITE_PROTECT;
 27721:         M68kException.m6eNumber = M68kException.M6E_ACCESS_FAULT;
 27722:         M68kException.m6eAddress = a;
 27723:         throw M68kException.m6eSignal;
 27724:       }
 27725:       if ((pageDescriptor & MMU_DESCRIPTOR_USED) == 0) {  //ディスクリプタが未使用のとき
 27726:         pageDescriptor |= MMU_DESCRIPTOR_USED;  //使用済みにする
 27727:         pageDescriptorDevice.mmdWl (pageDescriptorAddress, pageDescriptor);
 27728:       }
 27729:       if (write &&  //ライトで
 27730:           (pageDescriptor & MMU_DESCRIPTOR_MODIFIED) == 0) {  //修正済みでないとき
 27731:         pageDescriptor |= MMU_DESCRIPTOR_MODIFIED;  //修正済みにする
 27732:         pageDescriptorDevice.mmdWl (pageDescriptorAddress, pageDescriptor);
 27733:       }
 27734:       //テーブルサーチ終了
 27735:       M68kException.m6eFSLW &= ~M68kException.M6E_FSLW_TABLE_SEARCH;
 27736:       //logicalWrite = (pageDescriptor & (MMU_DESCRIPTOR_MODIFIED | MMU_DESCRIPTOR_WRITE_PROTECTED)) == MMU_DESCRIPTOR_MODIFIED ? logicalPage : 1;  //ライト用の論理ページアドレス。修正済みかつライトプロテクトされていないときだけ有効
 27737:       logicalWrite = (pageDescriptor & MMU_DESCRIPTOR_WRITE_PROTECTED) == 0 ? logicalPage : 1;  //ライト用の論理ページアドレス。ライトプロテクトされていないときだけ有効
 27738:       physicalPage = pageDescriptor & mmuPageAddressMask;  //物理ページアドレス
 27739:       globalFlag = (pageDescriptor & MMU_DESCRIPTOR_GLOBAL) != 0 ? -1 : 0;  //グローバルフラグ。-1=Global,0=NonGlobal
 27740:       pa = physicalPage | a & mmuPageOffsetMask;  //物理ページアドレスとページオフセットを連結する
 27741:       if (MMU_DEBUG_TRANSLATION) {
 27742:         System.out.printf ("=0x%08x (table search)\n", pa);
 27743:         System.out.printf ("  rootTable=0x%08x\n", supervisor ? mmuSRP : mmuURP);
 27744:         System.out.printf ("  rootIndex=0x%08x\n", (a & MMU_ROOT_INDEX_MASK) >>> MMU_ROOT_INDEX_BIT0);
 27745:         System.out.printf ("  rootDescriptorAddress=0x%08x\n", rootDescriptorAddress);
 27746:         System.out.printf ("  rootDescriptor=0x%08x\n", rootDescriptor);
 27747:         System.out.printf ("  pointerTable=0x%08x\n", rootDescriptor & MMU_DESCRIPTOR_POINTER_TABLE_ADDRESS);
 27748:         System.out.printf ("  pointerIndex=0x%08x\n", (a & MMU_POINTER_INDEX_MASK) >>> MMU_POINTER_INDEX_BIT0);
 27749:         System.out.printf ("  pointerDescriptorAddress=0x%08x\n", pointerDescriptorAddress);
 27750:         System.out.printf ("  pointerDescriptor=0x%08x\n", pointerDescriptor);
 27751:         System.out.printf ("  pageTable=0x%08x\n", pointerDescriptor & mmuPageTableMask);
 27752:         System.out.printf ("  pageIndex=0x%08x\n", (a & mmuPageIndexMask) >>> mmuPageIndexBit2 + 2);
 27753:         System.out.printf ("  pageDescriptorAddress=0x%08x\n", pageDescriptorAddress);
 27754:         System.out.printf ("  pageDescriptor=0x%08x\n", pageDescriptor);
 27755:       }
 27756:     } else {  //透過変換なし、アドレス変換なし
 27757:       logicalWrite = logicalPage;  //ライト用の論理ページアドレス
 27758:       physicalPage = logicalPage;  //物理ページアドレス
 27759:       globalFlag = -1;  //グローバルフラグ。-1=Global,0=NonGlobal
 27760:       pa = a;
 27761:       if (MMU_DEBUG_TRANSLATION) {
 27762:         System.out.printf ("=0x%08x (no translation)\n", pa);
 27763:       }
 27764:     }
 27765:     if (!(MMU_NOT_ALLOCATE_CACHE ||
 27766:           (instruction ? mmuNotAllocateCode : mmuNotAllocateData))) {
 27767:       //アドレス変換キャッシュを更新する
 27768:       //  同じ論理ページアドレスのエントリが存在する場合
 27769:       //    (リードでアロケートしたとき修正済みでなかったためライトでアロケートしなかった場合)
 27770:       //    同じ論理ページアドレスのエントリよりも前にあるエントリを後ろにずらす
 27771:       //    空いた先頭のエントリに上書きする
 27772:       //  同じ論理ページアドレスのエントリが存在しない場合
 27773:       //    末尾以外のエントリを後ろにずらす
 27774:       //    空いた先頭のエントリに上書きする
 27775:       int[] cache = (supervisor ?
 27776:                      instruction ? mmuSuperCodeCache : mmuSuperDataCache :
 27777:                      instruction ? mmuUserCodeCache : mmuUserDataCache);
 27778:       int head = (logicalPage * MMU_HASH_COEFF >>> -MMU_HASH_BITS) * (4 * MMU_CACHE_WAYS);  //先頭のエントリ
 27779:       if (MMU_CACHE_WAYS >= 2) {  //2ways以上のとき
 27780:         int tail = head + (4 * MMU_CACHE_WAYS - 4);  //末尾のエントリ→捨てるエントリ
 27781:         if (write) {  //ライトのとき
 27782:           for (int i = head; i < tail; i += 4) {
 27783:             if (cache[i] == logicalPage) {  //リードでアロケートされていた
 27784:               tail = i;
 27785:               break;
 27786:             }
 27787:           }
 27788:         }
 27789:         //  捨てるエントリよりも前にあるエントリを後ろにずらす
 27790:         for (; tail > head; tail -= 4) {
 27791:           cache[tail    ] = cache[tail - 4];
 27792:           cache[tail + 1] = cache[tail - 3];
 27793:           cache[tail + 2] = cache[tail - 2];
 27794:           cache[tail + 3] = cache[tail - 1];
 27795:         }
 27796:       }
 27797:       //  先頭のエントリに上書きする
 27798:       cache[head    ] = logicalPage;  //リード用の論理ページアドレス
 27799:       cache[head + 1] = logicalWrite;  //ライト用の論理ページアドレス
 27800:       cache[head + 2] = physicalPage;  //物理ページアドレス
 27801:       cache[head + 3] = globalFlag;  //グローバルフラグ
 27802:       if (MMU_DEBUG_TRANSLATION) {
 27803:         System.out.printf ("  ATC[%d]={0x%08x,0x%08x,0x%08x,%d}\n",
 27804:                            head / (4 * MMU_CACHE_WAYS), logicalPage, logicalWrite, physicalPage, globalFlag);
 27805:       }
 27806:     }
 27807:     return pa;
 27808:   }  //mmuTranslateCommon(int,boolean,boolean,boolean)
 27809: 
 27810:   public static int mmuPeekFlags;
 27811: 
 27812:   //pa = mmuTranslatePeek (a, supervisor, instruction) {
 27813:   //  アドレス変換を行う(デバッガ用、例外なし、テーブル更新なし)
 27814:   //    pa           物理アドレス。a^1=エラー
 27815:   //    a            論理アドレス
 27816:   //    supervisor   0=ユーザ,0以外=スーパーバイザ。通常はXEiJ.regSRS、PLPAR/PLPAWではXEiJ.mpuDFC&4
 27817:   //    instruction  0=データ,0以外=命令。通常は命令フェッチまたは拡張ワードのとき1、PLPAR/PLPAWではXEiJ.mpuDFC&2
 27818:   public static int mmuTranslatePeek (int a, int supervisor, int instruction) {
 27819:     //透過変換の確認
 27820:     //  透過変換はスーパーバイザモードかどうかを条件にすることができる(しないこともできる)
 27821:     //  透過変換にスーパーバイザプロテクトの機能はない
 27822:     {
 27823:       int[] tta = new int[2];
 27824:       if (instruction != 0) {
 27825:         tta[0] = mmuITT0;
 27826:         tta[1] = mmuITT1;
 27827:       } else {
 27828:         tta[0] = mmuDTT0;
 27829:         tta[1] = mmuDTT1;
 27830:       }
 27831:       for (int i = 0; i < 2; i++) {
 27832:         int ttr = tta[i];
 27833:         if ((ttr & 0x8000) != 0 &&  //Enable
 27834:             ((ttr & 0x4000) != 0 || ((ttr & 0x2000) != 0) == (supervisor != 0)) &&
 27835:             ((a ^ ttr) & ~ttr << 8) >>> 24 == 0) {
 27836:           mmuPeekFlags = ttr & MMU_TTR_WRITE_PROTECT;
 27837:           return a;
 27838:         }
 27839:       }
 27840:     }
 27841:     //透過変換なし
 27842:     if (!mmuEnabled) {  //アドレス変換なし
 27843:       mmuPeekFlags = 0;
 27844:       return a;
 27845:     }
 27846:     //アドレス変換あり
 27847:     int logicalPage = a & mmuPageAddressMask;  //論理ページアドレス
 27848:     //テーブルサーチ開始
 27849:     //  スーパーバイザプロテクトまたはライトプロテクトで停止したときディスクリプタの使用済みフラグはセットされない
 27850:     //  リードモディファイライトはライトでアロケートするのでリードする前にライトプロテクトに引っかかる
 27851:     //    例えばROMの内容をインクリメントしようとしたときライトだけでなくリードも行われない
 27852:     //ルートテーブル
 27853:     int rootDescriptorAddress = (supervisor != 0 ? mmuSRP : mmuURP) + ((a & MMU_ROOT_INDEX_MASK) >>> MMU_ROOT_INDEX_BIT0 - 2);  //ルートテーブルディスクリプタのアドレス
 27854:     int rootDescriptor = XEiJ.busPlsf (rootDescriptorAddress);  //ルートテーブルディスクリプタ
 27855:     if ((rootDescriptor & MMU_DESCRIPTOR_UDT) == MMU_DESCRIPTOR_TYPE_INVALID) {  //ディスクリプタが無効のとき
 27856:       return a ^ 1;
 27857:     }
 27858:     //ポインタテーブル
 27859:     int pointerDescriptorAddress = (rootDescriptor & MMU_DESCRIPTOR_POINTER_TABLE_ADDRESS) + ((a & MMU_POINTER_INDEX_MASK) >>> MMU_POINTER_INDEX_BIT0 - 2);  //ポインタテーブルディスクリプタのアドレス
 27860:     int pointerDescriptor = XEiJ.busPlsf (pointerDescriptorAddress);  //ポインタテーブルディスクリプタ
 27861:     if ((pointerDescriptor & MMU_DESCRIPTOR_UDT) == MMU_DESCRIPTOR_TYPE_INVALID) {  //ディスクリプタが無効のとき
 27862:       return a ^ 1;
 27863:     }
 27864:     //ページテーブル
 27865:     int pageDescriptorAddress = (pointerDescriptor & mmuPageTableMask) + ((a & mmuPageIndexMask) >>> mmuPageIndexBit2);  //ページテーブルディスクリプタのアドレス
 27866:     int pageDescriptor = XEiJ.busPlsf (pageDescriptorAddress);  //ページテーブルディスクリプタ
 27867:     if ((pageDescriptor & MMU_DESCRIPTOR_PDT) == MMU_DESCRIPTOR_TYPE_INVALID) {  //ディスクリプタが無効のとき
 27868:       return a ^ 1;
 27869:     }
 27870:     if ((pageDescriptor & MMU_DESCRIPTOR_PDT) == MMU_DESCRIPTOR_TYPE_INDIRECT) {  //ディスクリプタが間接のとき
 27871:       pageDescriptorAddress = pageDescriptor & MMU_DESCRIPTOR_INDIRECT_ADDRESS;  //ページテーブルディスクリプタのアドレス
 27872:       pageDescriptor = XEiJ.busPlsf (pageDescriptorAddress);  //ページテーブルディスクリプタ
 27873:       if ((pageDescriptor & MMU_DESCRIPTOR_PDT) == MMU_DESCRIPTOR_TYPE_INVALID) {  //ディスクリプタが無効のとき
 27874:         return a ^ 1;
 27875:       }
 27876:       if ((pageDescriptor & MMU_DESCRIPTOR_PDT) == MMU_DESCRIPTOR_TYPE_INDIRECT) {  //ディスクリプタが二重間接のとき
 27877:         return a ^ 1;
 27878:       }
 27879:     }
 27880:     if (supervisor == 0 &&  //ユーザモードで
 27881:         (pageDescriptor & MMU_DESCRIPTOR_SUPERVISOR_PROTECTED) != 0) {  //スーパーバイザプロテクトされているとき
 27882:       return a ^ 1;
 27883:     }
 27884:     int physicalPage = pageDescriptor & mmuPageAddressMask;  //物理ページアドレス
 27885:     //テーブルサーチ終了
 27886:     mmuPeekFlags = pageDescriptor & (MMU_DESCRIPTOR_SUPERVISOR_PROTECTED |
 27887:                                      MMU_DESCRIPTOR_MODIFIED |
 27888:                                      MMU_DESCRIPTOR_USED |
 27889:                                      MMU_DESCRIPTOR_WRITE_PROTECTED);
 27890:     return physicalPage | a & mmuPageOffsetMask;  //物理ページアドレスとページオフセットを連結する
 27891:   }  //mmuTranslatePeek(int,int,int)
 27892: 
 27893: 
 27894: 
 27895: }  //class MC68060
 27896: 
 27897: 
 27898: