OSDN Git Service

[cgen]
authordj <dj>
Fri, 22 May 2009 17:37:43 +0000 (17:37 +0000)
committerdj <dj>
Fri, 22 May 2009 17:37:43 +0000 (17:37 +0000)
* cpu/mep.opc (mep_examine_ivc2_insns): Fix bug in ivc2 decoder.
(mep_config_map): Regenerate.

* cpu/mep-ivc2.cpu (h-ccr-ivc2): Add generic names as well as
ivc2-specific names.
(simm8p20): New.
(cmovc): move to after field definitions, use ivc2-specific
register names.
(cpmovi_b_P0S_P1): New.

[utils/mep]

* mepcfgtool.c (do_cgen_config_opc): Propagate endianness and VLIW
size to default configuration.

[sid/component/cgen-cpu/mep]

* mep-cop1-16-decode.cxx: Regenerate.
* mep-cop1-16-decode.h: Regenerate.
* mep-cop1-16-model.cxx: Regenerate.
* mep-cop1-16-model.h: Regenerate.
* mep-cop1-16-sem.cxx: Regenerate.
* mep-cop1-64-decode.cxx: Regenerate.
* mep-cop1-64-decode.h: Regenerate.
* mep-cop1-64-model.cxx: Regenerate.
* mep-cop1-64-model.h: Regenerate.
* mep-cop1-64-sem.cxx: Regenerate.

[opcodes]

* mep-asm.c: Regenerate.
* mep-desc.c: Regenerate.
* mep-desc.h: Regenerate.
* mep-dis.c: Regenerate.
* mep-ibld.c: Regenerate.
* mep-opc.c: Regenerate.
* mep-opc.h: Regenerate.

24 files changed:
cgen/ChangeLog
cgen/cpu/mep-ivc2.cpu
cgen/cpu/mep.opc
opcodes/ChangeLog
opcodes/mep-asm.c
opcodes/mep-desc.c
opcodes/mep-desc.h
opcodes/mep-dis.c
opcodes/mep-ibld.c
opcodes/mep-opc.c
opcodes/mep-opc.h
sid/component/cgen-cpu/mep/ChangeLog
sid/component/cgen-cpu/mep/mep-cop1-16-decode.cxx
sid/component/cgen-cpu/mep/mep-cop1-16-decode.h
sid/component/cgen-cpu/mep/mep-cop1-16-model.cxx
sid/component/cgen-cpu/mep/mep-cop1-16-model.h
sid/component/cgen-cpu/mep/mep-cop1-16-sem.cxx
sid/component/cgen-cpu/mep/mep-cop1-64-decode.cxx
sid/component/cgen-cpu/mep/mep-cop1-64-decode.h
sid/component/cgen-cpu/mep/mep-cop1-64-model.cxx
sid/component/cgen-cpu/mep/mep-cop1-64-model.h
sid/component/cgen-cpu/mep/mep-cop1-64-sem.cxx
utils/mep/ChangeLog
utils/mep/mepcfgtool.c

index 27309aa..7642b1e 100644 (file)
@@ -1,3 +1,15 @@
+2009-05-22  DJ Delorie  <dj@redhat.com>
+
+       * cpu/mep.opc (mep_examine_ivc2_insns): Fix bug in ivc2 decoder.
+       (mep_config_map): Regenerate.
+
+       * cpu/mep-ivc2.cpu (h-ccr-ivc2): Add generic names as well as
+       ivc2-specific names.
+       (simm8p20): New.
+       (cmovc): move to after field definitions, use ivc2-specific
+       register names.
+       (cpmovi_b_P0S_P1): New.
+       
 2009-05-19  DJ Delorie  <dj@redhat.com>
 
        * cpu/mep.opc: Regenerate configuration.
index f766d32..be9a622 100644 (file)
   (get (index) (c-call DI "h_ccr_get" index))
   (indices keyword ""
        (.splice
-        ($ivc2_acc0_0 16)
-        ($ivc2_acc0_1 17)
-        ($ivc2_acc0_2 18)
-        ($ivc2_acc0_3 19)
-        ($ivc2_acc0_4 20)
-        ($ivc2_acc0_5 21)
-        ($ivc2_acc0_6 22)
-        ($ivc2_acc0_7 23)
-
-        ($ivc2_acc1_0 24)
-        ($ivc2_acc1_1 25)
-        ($ivc2_acc1_2 26)
-        ($ivc2_acc1_3 27)
-        ($ivc2_acc1_4 28)
-        ($ivc2_acc1_5 29)
-        ($ivc2_acc1_6 30)
-        ($ivc2_acc1_7 31)
-
-        ($ivc2_csar0 0)
-        ($ivc2_csar1 15)
-        ($ivc2_cc 1)
-        ($ivc2_cofr0 4)
-        ($ivc2_cofr1 5)
-        ($ivc2_cofa0 6)
-        ($ivc2_cofa1 7)
-
-        ($ivc2_ccr2 2)
-        ($ivc2_ccr3 3)
-        ($ivc2_ccr12 12)
-        ($ivc2_ccr13 13)
-        ($ivc2_ccr14 14)
+
+        ($csar0 0)
+        ($cc 1)
+        ($cofr0 4)
+        ($cofr1 5)
+        ($cofa0 6)
+        ($cofa1 7)
+
+        ($csar1 15)
+
+        ($acc00 16)
+        ($acc01 17)
+        ($acc02 18)
+        ($acc03 19)
+        ($acc04 20)
+        ($acc05 21)
+        ($acc06 22)
+        ($acc07 23)
+
+        ($acc10 24)
+        ($acc11 25)
+        ($acc12 26)
+        ($acc13 27)
+        ($acc14 28)
+        ($acc15 29)
+        ($acc16 30)
+        ($acc17 31)
+        (.unsplice (.map -ccr-reg-pair (.iota 32)))
         )
   )
 )
 (dnop imm3p25 "Imm3p25" (all-mep-isas) h-uint f-ivc2-3u25)
 (dnop imm8p0  "Imm8p0"  (all-mep-isas) h-uint f-ivc2-8u0)
 (dnop simm8p0 "sImm8p0" (all-mep-isas) h-sint f-ivc2-8s0)
+(dnop simm8p20 "sImm8p20" (all-mep-isas) h-sint f-ivc2-8s20)
 (dnop imm8p20 "Imm8p20" (all-mep-isas) h-uint f-ivc2-8u20)
 
 (dnop crop "$CRo Pn" (all-mep-isas) h-cr64 f-ivc2-5u23)
 (dnop imm16p0 "Imm16p0" (all-mep-isas) h-uint f-ivc2-imm16p0)
 (dnop simm16p0 "sImm16p0" (all-mep-isas) h-sint f-ivc2-simm16p0)
 
+
+
+(df f-ivc2-crn     "ivc2 crn"      (all-mep-isas)  0 4 UINT #f #f)
+(df f-ivc2-crm     "ivc2 crm"      (all-mep-isas)  4 4 UINT #f #f)
+(df f-ivc2-ccrn-h1 "ccrx hi 1u20"  (all-mep-isas) 20 1 UINT #f #f)
+(df f-ivc2-ccrn-h2 "ccrx hi 2u20"  (all-mep-isas) 20 2 UINT #f #f)
+(df f-ivc2-ccrn-lo "ccrx lo 4u0"   (all-mep-isas)  0 4 UINT #f #f)
+(df f-ivc2-cmov1   "ivc2 cmov op1" (all-mep-isas) 8 12 UINT #f #f)
+(df f-ivc2-cmov2   "ivc2 cmov op2" (all-mep-isas) 22 6 UINT #f #f)
+(df f-ivc2-cmov3   "ivc2 cmov op2" (all-mep-isas) 28 4 UINT #f #f)
+
+(define-multi-ifield
+  (name f-ivc2-ccrn)
+  (comment "Coprocessor control register number field")
+  (attrs all-mep-isas)
+  (mode UINT)
+  (subfields f-ivc2-ccrn-h2 f-ivc2-ccrn-lo)
+  (insert (sequence ()
+                   (set (ifield f-ivc2-ccrn-h2)  (and (srl (ifield f-ivc2-ccrn) 4) #x3))
+                   (set (ifield f-ivc2-ccrn-lo)  (and (ifield f-ivc2-ccrn) #xf))))
+  (extract (set (ifield f-ivc2-ccrn)
+               (or (sll (ifield f-ivc2-ccrn-h2) 4)
+                   (ifield f-ivc2-ccrn-lo))))
+  )
+
+(define-multi-ifield
+  (name f-ivc2-crnx)
+  (comment "Coprocessor register number field")
+  (attrs all-mep-isas)
+  (mode UINT)
+  (subfields f-ivc2-ccrn-h1 f-ivc2-ccrn-lo)
+  (insert (sequence ()
+                   (set (ifield f-ivc2-ccrn-h1)  (and (srl (ifield f-ivc2-crnx) 4) #x1))
+                   (set (ifield f-ivc2-ccrn-lo)  (and (ifield f-ivc2-crnx) #xf))))
+  (extract (set (ifield f-ivc2-crnx)
+               (or (sll (ifield f-ivc2-ccrn-h1) 4)
+                   (ifield f-ivc2-ccrn-lo))))
+  )
+
+(dnop ivc2rm   "reg Rm"                  (all-mep-isas (CDATA REGNUM)) h-gpr  f-ivc2-crm)
+(dnop ivc2crn  "copro Rn (0-31, 64-bit"  (all-mep-isas (CDATA REGNUM)) h-cr64 f-ivc2-crnx)
+(dnop ivc2ccrn "copro control reg CCRn"  (all-mep-isas (CDATA REGNUM)) h-ccr-ivc2  f-ivc2-ccrn)
+(dnop ivc2c3ccrn "copro control reg CCRn"  (all-mep-isas (CDATA REGNUM)) h-ccr-ivc2  f-ccrn)
+
+; [--][--] [--][--] [--][--] [--]
+; 0----+-- --1----+ ----2--- -+--
+; 01234567 89012345 67890123 4567
+
+
 ; 1111 nnnn mmmm 0111 1111 0000 0000 N000   cmov =crn,rm
 (dni cmov-crn-rm
      "cmov CRn,Rm"
 (dni cmovc-ccrn-rm
      "cmovc CCRn,Rm"
      (OPTIONAL_CP_INSN ivc2-c3-isa (SLOTS C3) (INTRINSIC "cmovc1"))
-     "cmovc $ccrn,$rm"
-     (+ MAJ_15 ccrn rm (f-sub4 #x7)
+     "cmovc $ivc2c3ccrn,$rm"
+     (+ MAJ_15 ivc2c3ccrn rm (f-sub4 #x7)
        (f-ivc2-4u16 #xF) (f-ivc2-4u20 0) (f-ivc2-4u24 0) (f-30 1) (f-31 0))
-     (set ccrn rm)
+     (set ivc2c3ccrn rm)
      ()
 )
 
 (dni cmovc-rn-ccrm
      "cmovc Rm,CCRn"
      (OPTIONAL_CP_INSN ivc2-c3-isa (SLOTS C3) (INTRINSIC "cmovc2"))
-     "cmovc $rm,$ccrn"
-     (+ MAJ_15 ccrn rm (f-sub4 #x7)
+     "cmovc $rm,$ivc2c3ccrn"
+     (+ MAJ_15 ivc2c3ccrn rm (f-sub4 #x7)
        (f-ivc2-4u16 #xF) (f-ivc2-4u20 0) (f-ivc2-4u24 0) (f-30 1) (f-31 1))
-     (set rm ccrn)
+     (set rm ivc2c3ccrn)
      ()
 )
 
      ()
 )
 
-
-
-(df f-ivc2-crn     "ivc2 crn"      (all-mep-isas)  0 4 UINT #f #f)
-(df f-ivc2-crm     "ivc2 crm"      (all-mep-isas)  4 4 UINT #f #f)
-(df f-ivc2-ccrn-h1 "ccrx hi 1u20"  (all-mep-isas) 20 1 UINT #f #f)
-(df f-ivc2-ccrn-h2 "ccrx hi 2u20"  (all-mep-isas) 20 2 UINT #f #f)
-(df f-ivc2-ccrn-lo "ccrx lo 4u0"   (all-mep-isas)  0 4 UINT #f #f)
-(df f-ivc2-cmov1   "ivc2 cmov op1" (all-mep-isas) 8 12 UINT #f #f)
-(df f-ivc2-cmov2   "ivc2 cmov op2" (all-mep-isas) 22 6 UINT #f #f)
-(df f-ivc2-cmov3   "ivc2 cmov op2" (all-mep-isas) 28 4 UINT #f #f)
-
-(define-multi-ifield
-  (name f-ivc2-ccrn)
-  (comment "Coprocessor control register number field")
-  (attrs all-mep-isas)
-  (mode UINT)
-  (subfields f-ivc2-ccrn-h2 f-ivc2-ccrn-lo)
-  (insert (sequence ()
-                   (set (ifield f-ivc2-ccrn-h2)  (and (srl (ifield f-ivc2-ccrn) 4) #x3))
-                   (set (ifield f-ivc2-ccrn-lo)  (and (ifield f-ivc2-ccrn) #xf))))
-  (extract (set (ifield f-ivc2-ccrn)
-               (or (sll (ifield f-ivc2-ccrn-h2) 4)
-                   (ifield f-ivc2-ccrn-lo))))
-  )
-
-(define-multi-ifield
-  (name f-ivc2-crnx)
-  (comment "Coprocessor register number field")
-  (attrs all-mep-isas)
-  (mode UINT)
-  (subfields f-ivc2-ccrn-h1 f-ivc2-ccrn-lo)
-  (insert (sequence ()
-                   (set (ifield f-ivc2-ccrn-h1)  (and (srl (ifield f-ivc2-crnx) 4) #x1))
-                   (set (ifield f-ivc2-ccrn-lo)  (and (ifield f-ivc2-crnx) #xf))))
-  (extract (set (ifield f-ivc2-crnx)
-               (or (sll (ifield f-ivc2-ccrn-h1) 4)
-                   (ifield f-ivc2-ccrn-lo))))
-  )
-
-(dnop ivc2rm   "reg Rm"                  (all-mep-isas (CDATA REGNUM)) h-gpr  f-ivc2-crm)
-(dnop ivc2crn  "copro Rn (0-31, 64-bit"  (all-mep-isas (CDATA REGNUM)) h-cr64 f-ivc2-crnx)
-(dnop ivc2ccrn "copro control reg CCRn"  (all-mep-isas (CDATA REGNUM)) h-ccr  f-ivc2-ccrn)
-
-; [--][--] [--][--] [--][--] [--]
-; 0----+-- --1----+ ----2--- -+--
-; 01234567 89012345 67890123 4567
-
 ; nnnnmmmm 11110000 0000N000 0000      cmov =crn,rm
 (dni cmov-crn-rm-p0
      "cmov CRn,Rm"
   ()
   )
 
+; 00000000 10110 qqqqq 00iii iiiii   cpmovi.b =crqp,simm8p20 (p0_i)
+(dni cpmovi_b_P0S_P1 "cpmovi.b $crqp,simm8p20 Pn"
+  (OPTIONAL_CP_INSN ivc2-p0s-p1-isa (SLOTS P0S,P1) (INTRINSIC "cpmovi_b"))
+  "cpmovi.b $crqp,$simm8p20"
+  (+ (f-ivc2-8u0 #x0) (f-ivc2-5u8 #x16) crqp (f-ivc2-2u18 #x0)  imm8p20(f-ivc2-4u28 0))
+  (sequence ()
+       (c-call "check_option_cp" pc)
+       (set crqp (c-call DI "ivc2_cpmovi_b" pc simm8p20)) )
+  ()
+  )
+
 ; 00000000 11000 qqqqq ppppp 00000   cpadda1u.b crqp,crpp (p0_1)
 (dni cpadda1u_b_P1 "cpadda1u.b $crqp,$crpp Pn"
   (OPTIONAL_CP_INSN ivc2-p1-isa (SLOTS P1) (INTRINSIC "cpadda1u_b"))
index 4ef7897..a2416dc 100644 (file)
@@ -1303,7 +1303,7 @@ mep_examine_ivc2_insns (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED, bfd_vma pc ATTRIBUTE_
   else
     e = 0;
 
-  if ((buf[0^e] & 0xf0) != 0xf0)
+  if (((unsigned char)buf[0^e] & 0xf0) < 0xc0)
     {
       /*      <--00--><--11--><--22--><--33--><--44--><--55--><--66--><--77--> */
       /* V1   [-----core-----][--------p0s-------][------------p1------------] */
@@ -1528,7 +1528,7 @@ mep_config_map_struct mep_config_map[] =
 {
   /* config-map-start */
   /* Default entry: first module, with all options enabled. */
-  { "", 0,  EF_MEP_COP_IVC2 | EF_MEP_CPU_C5,1, 0, { 1, "\x20" }, { 1, "\x10" }, { 1, "\x8" }, { 1, "\x4" }, { 1, "\x3c" }, { 1, "\xc0" }, OPTION_MASK | (1 << CGEN_INSN_OPTIONAL_DSP_INSN) | (1 << CGEN_INSN_OPTIONAL_UCI_INSN) },
+  { "", 0,  EF_MEP_COP_IVC2 | EF_MEP_CPU_C5,0, 64, { 1, "\x20" }, { 1, "\x10" }, { 1, "\x8" }, { 1, "\x4" }, { 1, "\x3c" }, { 1, "\xc0" }, OPTION_MASK | (1 << CGEN_INSN_OPTIONAL_DSP_INSN) | (1 << CGEN_INSN_OPTIONAL_UCI_INSN) },
   { "default", CONFIG_DEFAULT, EF_MEP_COP_IVC2 | EF_MEP_CPU_C5, 0, 64, { 1, "\x20" }, { 1, "\x10" }, { 1, "\x8" }, { 1, "\x4" }, { 1, "\x3c" }, { 1, "\xc0" },
          0
        | (1 << CGEN_INSN_OPTIONAL_CP_INSN)
index 634ca03..d0b5d8e 100644 (file)
@@ -1,3 +1,13 @@
+2009-05-22  DJ Delorie  <dj@redhat.com>
+
+       * mep-asm.c: Regenerate.
+       * mep-desc.c: Regenerate.
+       * mep-desc.h: Regenerate.
+       * mep-dis.c: Regenerate.
+       * mep-ibld.c: Regenerate.
+       * mep-opc.c: Regenerate.
+       * mep-opc.h: Regenerate.
+
 2009-05-22  Dwarakanath Rajagopal  <dwarak.rajagopal@amd.com>
 
        * i386-opc.h (Cpusse5): Delete.
index 4f92cbd..1feff81 100644 (file)
@@ -980,8 +980,11 @@ mep_cgen_parse_operand (CGEN_CPU_DESC cd,
     case MEP_OPERAND_IVC_X_6_3 :
       errmsg = cgen_parse_unsigned_integer (cd, strp, MEP_OPERAND_IVC_X_6_3, (unsigned long *) (& fields->f_ivc2_3u6));
       break;
+    case MEP_OPERAND_IVC2C3CCRN :
+      errmsg = cgen_parse_keyword (cd, strp, & mep_cgen_opval_h_ccr_ivc2, & fields->f_ccrn);
+      break;
     case MEP_OPERAND_IVC2CCRN :
-      errmsg = cgen_parse_keyword (cd, strp, & mep_cgen_opval_h_ccr, & fields->f_ivc2_ccrn);
+      errmsg = cgen_parse_keyword (cd, strp, & mep_cgen_opval_h_ccr_ivc2, & fields->f_ivc2_ccrn);
       break;
     case MEP_OPERAND_IVC2CRN :
       errmsg = cgen_parse_keyword (cd, strp, & mep_cgen_opval_h_cr64, & fields->f_ivc2_crnx);
@@ -1112,6 +1115,9 @@ mep_cgen_parse_operand (CGEN_CPU_DESC cd,
     case MEP_OPERAND_SIMM8P0 :
       errmsg = cgen_parse_signed_integer (cd, strp, MEP_OPERAND_SIMM8P0, (long *) (& fields->f_ivc2_8s0));
       break;
+    case MEP_OPERAND_SIMM8P20 :
+      errmsg = cgen_parse_signed_integer (cd, strp, MEP_OPERAND_SIMM8P20, (long *) (& fields->f_ivc2_8s20));
+      break;
     case MEP_OPERAND_SIMM8P4 :
       errmsg = cgen_parse_signed_integer (cd, strp, MEP_OPERAND_SIMM8P4, (long *) (& fields->f_ivc2_8s4));
       break;
index dc64c7a..d8a1988 100644 (file)
@@ -466,40 +466,67 @@ CGEN_KEYWORD mep_cgen_opval_h_cr_ivc2 =
 
 static CGEN_KEYWORD_ENTRY mep_cgen_opval_h_ccr_ivc2_entries[] =
 {
-  { "$ivc2_acc0_0", 16, {0, {{{0, 0}}}}, 0, 0 },
-  { "$ivc2_acc0_1", 17, {0, {{{0, 0}}}}, 0, 0 },
-  { "$ivc2_acc0_2", 18, {0, {{{0, 0}}}}, 0, 0 },
-  { "$ivc2_acc0_3", 19, {0, {{{0, 0}}}}, 0, 0 },
-  { "$ivc2_acc0_4", 20, {0, {{{0, 0}}}}, 0, 0 },
-  { "$ivc2_acc0_5", 21, {0, {{{0, 0}}}}, 0, 0 },
-  { "$ivc2_acc0_6", 22, {0, {{{0, 0}}}}, 0, 0 },
-  { "$ivc2_acc0_7", 23, {0, {{{0, 0}}}}, 0, 0 },
-  { "$ivc2_acc1_0", 24, {0, {{{0, 0}}}}, 0, 0 },
-  { "$ivc2_acc1_1", 25, {0, {{{0, 0}}}}, 0, 0 },
-  { "$ivc2_acc1_2", 26, {0, {{{0, 0}}}}, 0, 0 },
-  { "$ivc2_acc1_3", 27, {0, {{{0, 0}}}}, 0, 0 },
-  { "$ivc2_acc1_4", 28, {0, {{{0, 0}}}}, 0, 0 },
-  { "$ivc2_acc1_5", 29, {0, {{{0, 0}}}}, 0, 0 },
-  { "$ivc2_acc1_6", 30, {0, {{{0, 0}}}}, 0, 0 },
-  { "$ivc2_acc1_7", 31, {0, {{{0, 0}}}}, 0, 0 },
-  { "$ivc2_csar0", 0, {0, {{{0, 0}}}}, 0, 0 },
-  { "$ivc2_csar1", 15, {0, {{{0, 0}}}}, 0, 0 },
-  { "$ivc2_cc", 1, {0, {{{0, 0}}}}, 0, 0 },
-  { "$ivc2_cofr0", 4, {0, {{{0, 0}}}}, 0, 0 },
-  { "$ivc2_cofr1", 5, {0, {{{0, 0}}}}, 0, 0 },
-  { "$ivc2_cofa0", 6, {0, {{{0, 0}}}}, 0, 0 },
-  { "$ivc2_cofa1", 7, {0, {{{0, 0}}}}, 0, 0 },
-  { "$ivc2_ccr2", 2, {0, {{{0, 0}}}}, 0, 0 },
-  { "$ivc2_ccr3", 3, {0, {{{0, 0}}}}, 0, 0 },
-  { "$ivc2_ccr12", 12, {0, {{{0, 0}}}}, 0, 0 },
-  { "$ivc2_ccr13", 13, {0, {{{0, 0}}}}, 0, 0 },
-  { "$ivc2_ccr14", 14, {0, {{{0, 0}}}}, 0, 0 }
+  { "$csar0", 0, {0, {{{0, 0}}}}, 0, 0 },
+  { "$cc", 1, {0, {{{0, 0}}}}, 0, 0 },
+  { "$cofr0", 4, {0, {{{0, 0}}}}, 0, 0 },
+  { "$cofr1", 5, {0, {{{0, 0}}}}, 0, 0 },
+  { "$cofa0", 6, {0, {{{0, 0}}}}, 0, 0 },
+  { "$cofa1", 7, {0, {{{0, 0}}}}, 0, 0 },
+  { "$csar1", 15, {0, {{{0, 0}}}}, 0, 0 },
+  { "$acc00", 16, {0, {{{0, 0}}}}, 0, 0 },
+  { "$acc01", 17, {0, {{{0, 0}}}}, 0, 0 },
+  { "$acc02", 18, {0, {{{0, 0}}}}, 0, 0 },
+  { "$acc03", 19, {0, {{{0, 0}}}}, 0, 0 },
+  { "$acc04", 20, {0, {{{0, 0}}}}, 0, 0 },
+  { "$acc05", 21, {0, {{{0, 0}}}}, 0, 0 },
+  { "$acc06", 22, {0, {{{0, 0}}}}, 0, 0 },
+  { "$acc07", 23, {0, {{{0, 0}}}}, 0, 0 },
+  { "$acc10", 24, {0, {{{0, 0}}}}, 0, 0 },
+  { "$acc11", 25, {0, {{{0, 0}}}}, 0, 0 },
+  { "$acc12", 26, {0, {{{0, 0}}}}, 0, 0 },
+  { "$acc13", 27, {0, {{{0, 0}}}}, 0, 0 },
+  { "$acc14", 28, {0, {{{0, 0}}}}, 0, 0 },
+  { "$acc15", 29, {0, {{{0, 0}}}}, 0, 0 },
+  { "$acc16", 30, {0, {{{0, 0}}}}, 0, 0 },
+  { "$acc17", 31, {0, {{{0, 0}}}}, 0, 0 },
+  { "$ccr0", 0, {0, {{{0, 0}}}}, 0, 0 },
+  { "$ccr1", 1, {0, {{{0, 0}}}}, 0, 0 },
+  { "$ccr2", 2, {0, {{{0, 0}}}}, 0, 0 },
+  { "$ccr3", 3, {0, {{{0, 0}}}}, 0, 0 },
+  { "$ccr4", 4, {0, {{{0, 0}}}}, 0, 0 },
+  { "$ccr5", 5, {0, {{{0, 0}}}}, 0, 0 },
+  { "$ccr6", 6, {0, {{{0, 0}}}}, 0, 0 },
+  { "$ccr7", 7, {0, {{{0, 0}}}}, 0, 0 },
+  { "$ccr8", 8, {0, {{{0, 0}}}}, 0, 0 },
+  { "$ccr9", 9, {0, {{{0, 0}}}}, 0, 0 },
+  { "$ccr10", 10, {0, {{{0, 0}}}}, 0, 0 },
+  { "$ccr11", 11, {0, {{{0, 0}}}}, 0, 0 },
+  { "$ccr12", 12, {0, {{{0, 0}}}}, 0, 0 },
+  { "$ccr13", 13, {0, {{{0, 0}}}}, 0, 0 },
+  { "$ccr14", 14, {0, {{{0, 0}}}}, 0, 0 },
+  { "$ccr15", 15, {0, {{{0, 0}}}}, 0, 0 },
+  { "$ccr16", 16, {0, {{{0, 0}}}}, 0, 0 },
+  { "$ccr17", 17, {0, {{{0, 0}}}}, 0, 0 },
+  { "$ccr18", 18, {0, {{{0, 0}}}}, 0, 0 },
+  { "$ccr19", 19, {0, {{{0, 0}}}}, 0, 0 },
+  { "$ccr20", 20, {0, {{{0, 0}}}}, 0, 0 },
+  { "$ccr21", 21, {0, {{{0, 0}}}}, 0, 0 },
+  { "$ccr22", 22, {0, {{{0, 0}}}}, 0, 0 },
+  { "$ccr23", 23, {0, {{{0, 0}}}}, 0, 0 },
+  { "$ccr24", 24, {0, {{{0, 0}}}}, 0, 0 },
+  { "$ccr25", 25, {0, {{{0, 0}}}}, 0, 0 },
+  { "$ccr26", 26, {0, {{{0, 0}}}}, 0, 0 },
+  { "$ccr27", 27, {0, {{{0, 0}}}}, 0, 0 },
+  { "$ccr28", 28, {0, {{{0, 0}}}}, 0, 0 },
+  { "$ccr29", 29, {0, {{{0, 0}}}}, 0, 0 },
+  { "$ccr30", 30, {0, {{{0, 0}}}}, 0, 0 },
+  { "$ccr31", 31, {0, {{{0, 0}}}}, 0, 0 }
 };
 
 CGEN_KEYWORD mep_cgen_opval_h_ccr_ivc2 =
 {
   & mep_cgen_opval_h_ccr_ivc2_entries[0],
-  28,
+  55,
   0, 0, 0, 0, ""
 };
 
@@ -1262,6 +1289,10 @@ const CGEN_OPERAND mep_cgen_operand_table[] =
   { "simm8p0", MEP_OPERAND_SIMM8P0, HW_H_SINT, 0, 8,
     { 0, { (const PTR) &mep_cgen_ifld_table[MEP_F_IVC2_8S0] } }, 
     { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\xfc" } }, { { CDATA_LONG, 0 } }, { { 1, 0 } } } }  },
+/* simm8p20: sImm8p20 */
+  { "simm8p20", MEP_OPERAND_SIMM8P20, HW_H_SINT, 20, 8,
+    { 0, { (const PTR) &mep_cgen_ifld_table[MEP_F_IVC2_8S20] } }, 
+    { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\xfc" } }, { { CDATA_LONG, 0 } }, { { 1, 0 } } } }  },
 /* imm8p20: Imm8p20 */
   { "imm8p20", MEP_OPERAND_IMM8P20, HW_H_UINT, 20, 8,
     { 0, { (const PTR) &mep_cgen_ifld_table[MEP_F_IVC2_8U20] } }, 
@@ -1311,9 +1342,13 @@ const CGEN_OPERAND mep_cgen_operand_table[] =
     { 2, { (const PTR) &MEP_F_IVC2_CRNX_MULTI_IFIELD[0] } }, 
     { 0|A(VIRTUAL), { { { (1<<MACH_BASE), 0 } }, { { 1, "\xfc" } }, { { CDATA_REGNUM, 0 } }, { { 1, 0 } } } }  },
 /* ivc2ccrn: copro control reg CCRn */
-  { "ivc2ccrn", MEP_OPERAND_IVC2CCRN, HW_H_CCR, 0, 6,
+  { "ivc2ccrn", MEP_OPERAND_IVC2CCRN, HW_H_CCR_IVC2, 0, 6,
     { 2, { (const PTR) &MEP_F_IVC2_CCRN_MULTI_IFIELD[0] } }, 
     { 0|A(VIRTUAL), { { { (1<<MACH_BASE), 0 } }, { { 1, "\xfc" } }, { { CDATA_REGNUM, 0 } }, { { 1, 0 } } } }  },
+/* ivc2c3ccrn: copro control reg CCRn */
+  { "ivc2c3ccrn", MEP_OPERAND_IVC2C3CCRN, HW_H_CCR_IVC2, 4, 6,
+    { 2, { (const PTR) &MEP_F_CCRN_MULTI_IFIELD[0] } }, 
+    { 0|A(VIRTUAL), { { { (1<<MACH_BASE), 0 } }, { { 1, "\xfc" } }, { { CDATA_REGNUM, 0 } }, { { 1, 0 } } } }  },
 /* sentinel */
   { 0, 0, 0, 0, 0,
     { 0, { (const PTR) 0 } },
@@ -2473,12 +2508,12 @@ static const CGEN_IBASE mep_cgen_insn_table[MAX_INSNS] =
     MEP_INSN_CMOV_RN_CRM, "cmov-rn-crm", "cmov", 32,
     { 0|A(OPTIONAL_CP_INSN), { { { (1<<MACH_BASE), 0 } }, { { 1, "\x10" } }, { { 0, 0 } }, { { CONFIG_NONE, 0 } }, { { (1<<SLOTS_C3), 0 } } } }
   },
-/* cmovc $ccrn,$rm */
+/* cmovc $ivc2c3ccrn,$rm */
   {
     MEP_INSN_CMOVC_CCRN_RM, "cmovc-ccrn-rm", "cmovc", 32,
     { 0|A(OPTIONAL_CP_INSN), { { { (1<<MACH_BASE), 0 } }, { { 1, "\x10" } }, { { 0, 0 } }, { { CONFIG_NONE, 0 } }, { { (1<<SLOTS_C3), 0 } } } }
   },
-/* cmovc $rm,$ccrn */
+/* cmovc $rm,$ivc2c3ccrn */
   {
     MEP_INSN_CMOVC_RN_CCRM, "cmovc-rn-ccrm", "cmovc", 32,
     { 0|A(OPTIONAL_CP_INSN), { { { (1<<MACH_BASE), 0 } }, { { 1, "\x10" } }, { { 0, 0 } }, { { CONFIG_NONE, 0 } }, { { (1<<SLOTS_C3), 0 } } } }
@@ -5253,6 +5288,11 @@ static const CGEN_IBASE mep_cgen_insn_table[MAX_INSNS] =
     MEP_INSN_C1NOP_P1, "c1nop_P1", "c1nop", 32,
     { 0|A(OPTIONAL_CP_INSN), { { { (1<<MACH_BASE), 0 } }, { { 1, "\x4" } }, { { 0, 0 } }, { { CONFIG_NONE, 0 } }, { { (1<<SLOTS_P1), 0 } } } }
   },
+/* cpmovi.b $crqp,$simm8p20 */
+  {
+    MEP_INSN_CPMOVI_B_P0S_P1, "cpmovi_b_P0S_P1", "cpmovi.b", 32,
+    { 0|A(OPTIONAL_CP_INSN), { { { (1<<MACH_BASE), 0 } }, { { 1, "\x24" } }, { { 0, 0 } }, { { CONFIG_NONE, 0 } }, { { (1<<SLOTS_P0S)|(1<<SLOTS_P1), 0 } } } }
+  },
 /* cpadda1u.b $crqp,$crpp */
   {
     MEP_INSN_CPADDA1U_B_P1, "cpadda1u_b_P1", "cpadda1u.b", 32,
index 19832e0..890227c 100644 (file)
@@ -263,15 +263,15 @@ typedef enum cgen_operand_type {
  , MEP_OPERAND_IMM5P7, MEP_OPERAND_IMM6P6, MEP_OPERAND_IMM8P4, MEP_OPERAND_SIMM8P4
  , MEP_OPERAND_IMM3P5, MEP_OPERAND_IMM3P12, MEP_OPERAND_IMM4P4, MEP_OPERAND_IMM4P10
  , MEP_OPERAND_IMM5P8, MEP_OPERAND_IMM5P3, MEP_OPERAND_IMM6P2, MEP_OPERAND_IMM5P23
- , MEP_OPERAND_IMM3P25, MEP_OPERAND_IMM8P0, MEP_OPERAND_SIMM8P0, MEP_OPERAND_IMM8P20
- , MEP_OPERAND_CROP, MEP_OPERAND_CRQP, MEP_OPERAND_CRPP, MEP_OPERAND_IVC_X_0_2
- , MEP_OPERAND_IVC_X_0_3, MEP_OPERAND_IVC_X_0_4, MEP_OPERAND_IVC_X_0_5, MEP_OPERAND_IMM16P0
- , MEP_OPERAND_SIMM16P0, MEP_OPERAND_IVC2RM, MEP_OPERAND_IVC2CRN, MEP_OPERAND_IVC2CCRN
- , MEP_OPERAND_MAX
+ , MEP_OPERAND_IMM3P25, MEP_OPERAND_IMM8P0, MEP_OPERAND_SIMM8P0, MEP_OPERAND_SIMM8P20
+ , MEP_OPERAND_IMM8P20, MEP_OPERAND_CROP, MEP_OPERAND_CRQP, MEP_OPERAND_CRPP
+ , MEP_OPERAND_IVC_X_0_2, MEP_OPERAND_IVC_X_0_3, MEP_OPERAND_IVC_X_0_4, MEP_OPERAND_IVC_X_0_5
+ , MEP_OPERAND_IMM16P0, MEP_OPERAND_SIMM16P0, MEP_OPERAND_IVC2RM, MEP_OPERAND_IVC2CRN
+ , MEP_OPERAND_IVC2CCRN, MEP_OPERAND_IVC2C3CCRN, MEP_OPERAND_MAX
 } CGEN_OPERAND_TYPE;
 
 /* Number of operands types.  */
-#define MAX_OPERANDS 120
+#define MAX_OPERANDS 122
 
 /* Maximum number of operands referenced by any insn.  */
 #define MAX_OPERAND_INSTANCES 8
index ee0d507..c1f3be3 100644 (file)
@@ -558,7 +558,7 @@ mep_examine_ivc2_insns (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED, bfd_vma pc ATTRIBUTE_
   else
     e = 0;
 
-  if ((buf[0^e] & 0xf0) != 0xf0)
+  if (((unsigned char)buf[0^e] & 0xf0) < 0xc0)
     {
       /*      <--00--><--11--><--22--><--33--><--44--><--55--><--66--><--77--> */
       /* V1   [-----core-----][--------p0s-------][------------p1------------] */
@@ -928,8 +928,11 @@ mep_cgen_print_operand (CGEN_CPU_DESC cd,
     case MEP_OPERAND_IVC_X_6_3 :
       print_normal (cd, info, fields->f_ivc2_3u6, 0, pc, length);
       break;
+    case MEP_OPERAND_IVC2C3CCRN :
+      print_keyword (cd, info, & mep_cgen_opval_h_ccr_ivc2, fields->f_ccrn, 0|(1<<CGEN_OPERAND_VIRTUAL));
+      break;
     case MEP_OPERAND_IVC2CCRN :
-      print_keyword (cd, info, & mep_cgen_opval_h_ccr, fields->f_ivc2_ccrn, 0|(1<<CGEN_OPERAND_VIRTUAL));
+      print_keyword (cd, info, & mep_cgen_opval_h_ccr_ivc2, fields->f_ivc2_ccrn, 0|(1<<CGEN_OPERAND_VIRTUAL));
       break;
     case MEP_OPERAND_IVC2CRN :
       print_keyword (cd, info, & mep_cgen_opval_h_cr64, fields->f_ivc2_crnx, 0|(1<<CGEN_OPERAND_VIRTUAL));
@@ -1060,6 +1063,9 @@ mep_cgen_print_operand (CGEN_CPU_DESC cd,
     case MEP_OPERAND_SIMM8P0 :
       print_normal (cd, info, fields->f_ivc2_8s0, 0|(1<<CGEN_OPERAND_SIGNED), pc, length);
       break;
+    case MEP_OPERAND_SIMM8P20 :
+      print_normal (cd, info, fields->f_ivc2_8s20, 0|(1<<CGEN_OPERAND_SIGNED), pc, length);
+      break;
     case MEP_OPERAND_SIMM8P4 :
       print_normal (cd, info, fields->f_ivc2_8s4, 0|(1<<CGEN_OPERAND_SIGNED), pc, length);
       break;
index 69fedea..bca4005 100644 (file)
@@ -878,6 +878,20 @@ mep_cgen_insert_operand (CGEN_CPU_DESC cd,
     case MEP_OPERAND_IVC_X_6_3 :
       errmsg = insert_normal (cd, fields->f_ivc2_3u6, 0, 0, 6, 3, 32, total_length, buffer);
       break;
+    case MEP_OPERAND_IVC2C3CCRN :
+      {
+{
+  FLD (f_ccrn_hi) = ((((unsigned int) (FLD (f_ccrn)) >> (4))) & (3));
+  FLD (f_ccrn_lo) = ((FLD (f_ccrn)) & (15));
+}
+        errmsg = insert_normal (cd, fields->f_ccrn_hi, 0, 0, 28, 2, 32, total_length, buffer);
+        if (errmsg)
+          break;
+        errmsg = insert_normal (cd, fields->f_ccrn_lo, 0, 0, 4, 4, 32, total_length, buffer);
+        if (errmsg)
+          break;
+      }
+      break;
     case MEP_OPERAND_IVC2CCRN :
       {
 {
@@ -1066,6 +1080,9 @@ mep_cgen_insert_operand (CGEN_CPU_DESC cd,
     case MEP_OPERAND_SIMM8P0 :
       errmsg = insert_normal (cd, fields->f_ivc2_8s0, 0|(1<<CGEN_IFLD_SIGNED), 0, 0, 8, 32, total_length, buffer);
       break;
+    case MEP_OPERAND_SIMM8P20 :
+      errmsg = insert_normal (cd, fields->f_ivc2_8s20, 0|(1<<CGEN_IFLD_SIGNED), 0, 20, 8, 32, total_length, buffer);
+      break;
     case MEP_OPERAND_SIMM8P4 :
       errmsg = insert_normal (cd, fields->f_ivc2_8s4, 0|(1<<CGEN_IFLD_SIGNED), 0, 4, 8, 32, total_length, buffer);
       break;
@@ -1442,6 +1459,15 @@ mep_cgen_extract_operand (CGEN_CPU_DESC cd,
     case MEP_OPERAND_IVC_X_6_3 :
       length = extract_normal (cd, ex_info, insn_value, 0, 0, 6, 3, 32, total_length, pc, & fields->f_ivc2_3u6);
       break;
+    case MEP_OPERAND_IVC2C3CCRN :
+      {
+        length = extract_normal (cd, ex_info, insn_value, 0, 0, 28, 2, 32, total_length, pc, & fields->f_ccrn_hi);
+        if (length <= 0) break;
+        length = extract_normal (cd, ex_info, insn_value, 0, 0, 4, 4, 32, total_length, pc, & fields->f_ccrn_lo);
+        if (length <= 0) break;
+  FLD (f_ccrn) = ((((FLD (f_ccrn_hi)) << (4))) | (FLD (f_ccrn_lo)));
+      }
+      break;
     case MEP_OPERAND_IVC2CCRN :
       {
         length = extract_normal (cd, ex_info, insn_value, 0, 0, 20, 2, 32, total_length, pc, & fields->f_ivc2_ccrn_h2);
@@ -1609,6 +1635,9 @@ mep_cgen_extract_operand (CGEN_CPU_DESC cd,
     case MEP_OPERAND_SIMM8P0 :
       length = extract_normal (cd, ex_info, insn_value, 0|(1<<CGEN_IFLD_SIGNED), 0, 0, 8, 32, total_length, pc, & fields->f_ivc2_8s0);
       break;
+    case MEP_OPERAND_SIMM8P20 :
+      length = extract_normal (cd, ex_info, insn_value, 0|(1<<CGEN_IFLD_SIGNED), 0, 20, 8, 32, total_length, pc, & fields->f_ivc2_8s20);
+      break;
     case MEP_OPERAND_SIMM8P4 :
       length = extract_normal (cd, ex_info, insn_value, 0|(1<<CGEN_IFLD_SIGNED), 0, 4, 8, 32, total_length, pc, & fields->f_ivc2_8s4);
       break;
@@ -1888,6 +1917,9 @@ mep_cgen_get_int_operand (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED,
     case MEP_OPERAND_IVC_X_6_3 :
       value = fields->f_ivc2_3u6;
       break;
+    case MEP_OPERAND_IVC2C3CCRN :
+      value = fields->f_ccrn;
+      break;
     case MEP_OPERAND_IVC2CCRN :
       value = fields->f_ivc2_ccrn;
       break;
@@ -2020,6 +2052,9 @@ mep_cgen_get_int_operand (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED,
     case MEP_OPERAND_SIMM8P0 :
       value = fields->f_ivc2_8s0;
       break;
+    case MEP_OPERAND_SIMM8P20 :
+      value = fields->f_ivc2_8s20;
+      break;
     case MEP_OPERAND_SIMM8P4 :
       value = fields->f_ivc2_8s4;
       break;
@@ -2265,6 +2300,9 @@ mep_cgen_get_vma_operand (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED,
     case MEP_OPERAND_IVC_X_6_3 :
       value = fields->f_ivc2_3u6;
       break;
+    case MEP_OPERAND_IVC2C3CCRN :
+      value = fields->f_ccrn;
+      break;
     case MEP_OPERAND_IVC2CCRN :
       value = fields->f_ivc2_ccrn;
       break;
@@ -2397,6 +2435,9 @@ mep_cgen_get_vma_operand (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED,
     case MEP_OPERAND_SIMM8P0 :
       value = fields->f_ivc2_8s0;
       break;
+    case MEP_OPERAND_SIMM8P20 :
+      value = fields->f_ivc2_8s20;
+      break;
     case MEP_OPERAND_SIMM8P4 :
       value = fields->f_ivc2_8s4;
       break;
@@ -2643,6 +2684,9 @@ mep_cgen_set_int_operand (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED,
     case MEP_OPERAND_IVC_X_6_3 :
       fields->f_ivc2_3u6 = value;
       break;
+    case MEP_OPERAND_IVC2C3CCRN :
+      fields->f_ccrn = value;
+      break;
     case MEP_OPERAND_IVC2CCRN :
       fields->f_ivc2_ccrn = value;
       break;
@@ -2763,6 +2807,9 @@ mep_cgen_set_int_operand (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED,
     case MEP_OPERAND_SIMM8P0 :
       fields->f_ivc2_8s0 = value;
       break;
+    case MEP_OPERAND_SIMM8P20 :
+      fields->f_ivc2_8s20 = value;
+      break;
     case MEP_OPERAND_SIMM8P4 :
       fields->f_ivc2_8s4 = value;
       break;
@@ -2994,6 +3041,9 @@ mep_cgen_set_vma_operand (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED,
     case MEP_OPERAND_IVC_X_6_3 :
       fields->f_ivc2_3u6 = value;
       break;
+    case MEP_OPERAND_IVC2C3CCRN :
+      fields->f_ccrn = value;
+      break;
     case MEP_OPERAND_IVC2CCRN :
       fields->f_ivc2_ccrn = value;
       break;
@@ -3114,6 +3164,9 @@ mep_cgen_set_vma_operand (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED,
     case MEP_OPERAND_SIMM8P0 :
       fields->f_ivc2_8s0 = value;
       break;
+    case MEP_OPERAND_SIMM8P20 :
+      fields->f_ivc2_8s20 = value;
+      break;
     case MEP_OPERAND_SIMM8P4 :
       fields->f_ivc2_8s4 = value;
       break;
index 7bf92b6..1a8321e 100644 (file)
@@ -92,7 +92,7 @@ mep_config_map_struct mep_config_map[] =
 {
   /* config-map-start */
   /* Default entry: first module, with all options enabled. */
-  { "", 0,  EF_MEP_COP_IVC2 | EF_MEP_CPU_C5,1, 0, { 1, "\x20" }, { 1, "\x10" }, { 1, "\x8" }, { 1, "\x4" }, { 1, "\x3c" }, { 1, "\xc0" }, OPTION_MASK | (1 << CGEN_INSN_OPTIONAL_DSP_INSN) | (1 << CGEN_INSN_OPTIONAL_UCI_INSN) },
+  { "", 0,  EF_MEP_COP_IVC2 | EF_MEP_CPU_C5,0, 64, { 1, "\x20" }, { 1, "\x10" }, { 1, "\x8" }, { 1, "\x4" }, { 1, "\x3c" }, { 1, "\xc0" }, OPTION_MASK | (1 << CGEN_INSN_OPTIONAL_DSP_INSN) | (1 << CGEN_INSN_OPTIONAL_UCI_INSN) },
   { "default", CONFIG_DEFAULT, EF_MEP_COP_IVC2 | EF_MEP_CPU_C5, 0, 64, { 1, "\x20" }, { 1, "\x10" }, { 1, "\x8" }, { 1, "\x4" }, { 1, "\x3c" }, { 1, "\xc0" },
          0
        | (1 << CGEN_INSN_OPTIONAL_CP_INSN)
@@ -558,6 +558,10 @@ static const CGEN_IFMT ifmt_cpmoviu_w_P0_P1 ATTRIBUTE_UNUSED = {
   32, 32, 0xf8300f, { { F (F_IVC2_IMM16P0) }, { F (F_IVC2_5U8) }, { F (F_IVC2_5U13) }, { F (F_IVC2_2U18) }, { F (F_IVC2_4U28) }, { 0 } }
 };
 
+static const CGEN_IFMT ifmt_cpmovi_b_P0S_P1 ATTRIBUTE_UNUSED = {
+  32, 32, 0xfff8300f, { { F (F_IVC2_8U0) }, { F (F_IVC2_5U8) }, { F (F_IVC2_5U13) }, { F (F_IVC2_2U18) }, { F (F_IVC2_8U20) }, { F (F_IVC2_4U28) }, { 0 } }
+};
+
 static const CGEN_IFMT ifmt_cpfmulia1s0u_b_P1 ATTRIBUTE_UNUSED = {
   32, 32, 0xf801ff, { { F (F_IVC2_8S0) }, { F (F_IVC2_5U8) }, { F (F_IVC2_5U13) }, { F (F_IVC2_5U18) }, { F (F_IVC2_5U23) }, { F (F_IVC2_4U28) }, { 0 } }
 };
@@ -1951,16 +1955,16 @@ static const CGEN_OPCODE mep_cgen_insn_opcode_table[MAX_INSNS] =
     { { MNEM, ' ', OP (RM), ',', OP (CRNX64), 0 } },
     & ifmt_cmov_crn_rm, { 0xf007f001 }
   },
-/* cmovc $ccrn,$rm */
+/* cmovc $ivc2c3ccrn,$rm */
   {
     { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (CCRN), ',', OP (RM), 0 } },
+    { { MNEM, ' ', OP (IVC2C3CCRN), ',', OP (RM), 0 } },
     & ifmt_cmovc_ccrn_rm, { 0xf007f002 }
   },
-/* cmovc $rm,$ccrn */
+/* cmovc $rm,$ivc2c3ccrn */
   {
     { 0, 0, 0, 0 },
-    { { MNEM, ' ', OP (RM), ',', OP (CCRN), 0 } },
+    { { MNEM, ' ', OP (RM), ',', OP (IVC2C3CCRN), 0 } },
     & ifmt_cmovc_ccrn_rm, { 0xf007f003 }
   },
 /* cmovh $crnx64,$rm */
@@ -5287,6 +5291,12 @@ static const CGEN_OPCODE mep_cgen_insn_opcode_table[MAX_INSNS] =
     { { MNEM, 0 } },
     & ifmt_c0nop_P0_P0S, { 0x0 }
   },
+/* cpmovi.b $crqp,$simm8p20 */
+  {
+    { 0, 0, 0, 0 },
+    { { MNEM, ' ', OP (CRQP), ',', OP (SIMM8P20), 0 } },
+    & ifmt_cpmovi_b_P0S_P1, { 0xb00000 }
+  },
 /* cpadda1u.b $crqp,$crpp */
   {
     { 0, 0, 0, 0 },
index f83d84f..0704c30 100644 (file)
@@ -296,39 +296,39 @@ typedef enum cgen_insn_type {
  , MEP_INSN_CPSLAI3_H_P0_P1, MEP_INSN_CPSLAI3_W_P0_P1, MEP_INSN_CPCLIPIU3_W_P0_P1, MEP_INSN_CPCLIPI3_W_P0_P1
  , MEP_INSN_CDCLIPIU3_P0_P1, MEP_INSN_CDCLIPI3_P0_P1, MEP_INSN_CPMOVI_H_P0_P1, MEP_INSN_CPMOVIU_W_P0_P1
  , MEP_INSN_CPMOVI_W_P0_P1, MEP_INSN_CDMOVIU_P0_P1, MEP_INSN_CDMOVI_P0_P1, MEP_INSN_C1NOP_P1
- , MEP_INSN_CPADDA1U_B_P1, MEP_INSN_CPADDA1_B_P1, MEP_INSN_CPADDUA1_H_P1, MEP_INSN_CPADDLA1_H_P1
- , MEP_INSN_CPADDACA1U_B_P1, MEP_INSN_CPADDACA1_B_P1, MEP_INSN_CPADDACUA1_H_P1, MEP_INSN_CPADDACLA1_H_P1
- , MEP_INSN_CPSUBA1U_B_P1, MEP_INSN_CPSUBA1_B_P1, MEP_INSN_CPSUBUA1_H_P1, MEP_INSN_CPSUBLA1_H_P1
- , MEP_INSN_CPSUBACA1U_B_P1, MEP_INSN_CPSUBACA1_B_P1, MEP_INSN_CPSUBACUA1_H_P1, MEP_INSN_CPSUBACLA1_H_P1
- , MEP_INSN_CPABSA1U_B_P1, MEP_INSN_CPABSA1_B_P1, MEP_INSN_CPABSUA1_H_P1, MEP_INSN_CPABSLA1_H_P1
- , MEP_INSN_CPSADA1U_B_P1, MEP_INSN_CPSADA1_B_P1, MEP_INSN_CPSADUA1_H_P1, MEP_INSN_CPSADLA1_H_P1
- , MEP_INSN_CPSETA1_H_P1, MEP_INSN_CPSETUA1_W_P1, MEP_INSN_CPSETLA1_W_P1, MEP_INSN_CPMOVA1_B_P1
- , MEP_INSN_CPMOVUA1_H_P1, MEP_INSN_CPMOVLA1_H_P1, MEP_INSN_CPMOVUUA1_W_P1, MEP_INSN_CPMOVULA1_W_P1
- , MEP_INSN_CPMOVLUA1_W_P1, MEP_INSN_CPMOVLLA1_W_P1, MEP_INSN_CPPACKA1U_B_P1, MEP_INSN_CPPACKA1_B_P1
- , MEP_INSN_CPPACKUA1_H_P1, MEP_INSN_CPPACKLA1_H_P1, MEP_INSN_CPPACKUA1_W_P1, MEP_INSN_CPPACKLA1_W_P1
- , MEP_INSN_CPMOVHUA1_W_P1, MEP_INSN_CPMOVHLA1_W_P1, MEP_INSN_CPACSUMA1_P1, MEP_INSN_CPACCPA1_P1
- , MEP_INSN_CPACSWP_P1, MEP_INSN_CPSRLA1_P1, MEP_INSN_CPSRAA1_P1, MEP_INSN_CPSLLA1_P1
- , MEP_INSN_CPSRLIA1_1_P1, MEP_INSN_CPSRAIA1_1_P1, MEP_INSN_CPSLLIA1_1_P1, MEP_INSN_CPFMULIA1S0U_B_P1
- , MEP_INSN_CPFMULIA1S0_B_P1, MEP_INSN_CPFMULIUA1S0_H_P1, MEP_INSN_CPFMULILA1S0_H_P1, MEP_INSN_CPFMADIA1S0U_B_P1
- , MEP_INSN_CPFMADIA1S0_B_P1, MEP_INSN_CPFMADIUA1S0_H_P1, MEP_INSN_CPFMADILA1S0_H_P1, MEP_INSN_CPFMULIA1S1U_B_P1
- , MEP_INSN_CPFMULIA1S1_B_P1, MEP_INSN_CPFMULIUA1S1_H_P1, MEP_INSN_CPFMULILA1S1_H_P1, MEP_INSN_CPFMADIA1S1U_B_P1
- , MEP_INSN_CPFMADIA1S1_B_P1, MEP_INSN_CPFMADIUA1S1_H_P1, MEP_INSN_CPFMADILA1S1_H_P1, MEP_INSN_CPAMULIA1U_B_P1
- , MEP_INSN_CPAMULIA1_B_P1, MEP_INSN_CPAMULIUA1_H_P1, MEP_INSN_CPAMULILA1_H_P1, MEP_INSN_CPAMADIA1U_B_P1
- , MEP_INSN_CPAMADIA1_B_P1, MEP_INSN_CPAMADIUA1_H_P1, MEP_INSN_CPAMADILA1_H_P1, MEP_INSN_CPFMULIA1U_B_P1
- , MEP_INSN_CPFMULIA1_B_P1, MEP_INSN_CPFMULIUA1_H_P1, MEP_INSN_CPFMULILA1_H_P1, MEP_INSN_CPFMADIA1U_B_P1
- , MEP_INSN_CPFMADIA1_B_P1, MEP_INSN_CPFMADIUA1_H_P1, MEP_INSN_CPFMADILA1_H_P1, MEP_INSN_CPSSQA1U_B_P1
- , MEP_INSN_CPSSQA1_B_P1, MEP_INSN_CPSSDA1U_B_P1, MEP_INSN_CPSSDA1_B_P1, MEP_INSN_CPMULA1U_B_P1
- , MEP_INSN_CPMULA1_B_P1, MEP_INSN_CPMULUA1_H_P1, MEP_INSN_CPMULLA1_H_P1, MEP_INSN_CPMULUA1U_W_P1
- , MEP_INSN_CPMULLA1U_W_P1, MEP_INSN_CPMULUA1_W_P1, MEP_INSN_CPMULLA1_W_P1, MEP_INSN_CPMADA1U_B_P1
- , MEP_INSN_CPMADA1_B_P1, MEP_INSN_CPMADUA1_H_P1, MEP_INSN_CPMADLA1_H_P1, MEP_INSN_CPMADUA1U_W_P1
- , MEP_INSN_CPMADLA1U_W_P1, MEP_INSN_CPMADUA1_W_P1, MEP_INSN_CPMADLA1_W_P1, MEP_INSN_CPMSBUA1_H_P1
- , MEP_INSN_CPMSBLA1_H_P1, MEP_INSN_CPMSBUA1U_W_P1, MEP_INSN_CPMSBLA1U_W_P1, MEP_INSN_CPMSBUA1_W_P1
- , MEP_INSN_CPMSBLA1_W_P1, MEP_INSN_CPSMADUA1_H_P1, MEP_INSN_CPSMADLA1_H_P1, MEP_INSN_CPSMADUA1_W_P1
- , MEP_INSN_CPSMADLA1_W_P1, MEP_INSN_CPSMSBUA1_H_P1, MEP_INSN_CPSMSBLA1_H_P1, MEP_INSN_CPSMSBUA1_W_P1
- , MEP_INSN_CPSMSBLA1_W_P1, MEP_INSN_CPMULSLUA1_H_P1, MEP_INSN_CPMULSLLA1_H_P1, MEP_INSN_CPMULSLUA1_W_P1
- , MEP_INSN_CPMULSLLA1_W_P1, MEP_INSN_CPSMADSLUA1_H_P1, MEP_INSN_CPSMADSLLA1_H_P1, MEP_INSN_CPSMADSLUA1_W_P1
- , MEP_INSN_CPSMADSLLA1_W_P1, MEP_INSN_CPSMSBSLUA1_H_P1, MEP_INSN_CPSMSBSLLA1_H_P1, MEP_INSN_CPSMSBSLUA1_W_P1
- , MEP_INSN_CPSMSBSLLA1_W_P1
+ , MEP_INSN_CPMOVI_B_P0S_P1, MEP_INSN_CPADDA1U_B_P1, MEP_INSN_CPADDA1_B_P1, MEP_INSN_CPADDUA1_H_P1
+ , MEP_INSN_CPADDLA1_H_P1, MEP_INSN_CPADDACA1U_B_P1, MEP_INSN_CPADDACA1_B_P1, MEP_INSN_CPADDACUA1_H_P1
+ , MEP_INSN_CPADDACLA1_H_P1, MEP_INSN_CPSUBA1U_B_P1, MEP_INSN_CPSUBA1_B_P1, MEP_INSN_CPSUBUA1_H_P1
+ , MEP_INSN_CPSUBLA1_H_P1, MEP_INSN_CPSUBACA1U_B_P1, MEP_INSN_CPSUBACA1_B_P1, MEP_INSN_CPSUBACUA1_H_P1
+ , MEP_INSN_CPSUBACLA1_H_P1, MEP_INSN_CPABSA1U_B_P1, MEP_INSN_CPABSA1_B_P1, MEP_INSN_CPABSUA1_H_P1
+ , MEP_INSN_CPABSLA1_H_P1, MEP_INSN_CPSADA1U_B_P1, MEP_INSN_CPSADA1_B_P1, MEP_INSN_CPSADUA1_H_P1
+ , MEP_INSN_CPSADLA1_H_P1, MEP_INSN_CPSETA1_H_P1, MEP_INSN_CPSETUA1_W_P1, MEP_INSN_CPSETLA1_W_P1
+ , MEP_INSN_CPMOVA1_B_P1, MEP_INSN_CPMOVUA1_H_P1, MEP_INSN_CPMOVLA1_H_P1, MEP_INSN_CPMOVUUA1_W_P1
+ , MEP_INSN_CPMOVULA1_W_P1, MEP_INSN_CPMOVLUA1_W_P1, MEP_INSN_CPMOVLLA1_W_P1, MEP_INSN_CPPACKA1U_B_P1
+ , MEP_INSN_CPPACKA1_B_P1, MEP_INSN_CPPACKUA1_H_P1, MEP_INSN_CPPACKLA1_H_P1, MEP_INSN_CPPACKUA1_W_P1
+ , MEP_INSN_CPPACKLA1_W_P1, MEP_INSN_CPMOVHUA1_W_P1, MEP_INSN_CPMOVHLA1_W_P1, MEP_INSN_CPACSUMA1_P1
+ , MEP_INSN_CPACCPA1_P1, MEP_INSN_CPACSWP_P1, MEP_INSN_CPSRLA1_P1, MEP_INSN_CPSRAA1_P1
+ , MEP_INSN_CPSLLA1_P1, MEP_INSN_CPSRLIA1_1_P1, MEP_INSN_CPSRAIA1_1_P1, MEP_INSN_CPSLLIA1_1_P1
+ , MEP_INSN_CPFMULIA1S0U_B_P1, MEP_INSN_CPFMULIA1S0_B_P1, MEP_INSN_CPFMULIUA1S0_H_P1, MEP_INSN_CPFMULILA1S0_H_P1
+ , MEP_INSN_CPFMADIA1S0U_B_P1, MEP_INSN_CPFMADIA1S0_B_P1, MEP_INSN_CPFMADIUA1S0_H_P1, MEP_INSN_CPFMADILA1S0_H_P1
+ , MEP_INSN_CPFMULIA1S1U_B_P1, MEP_INSN_CPFMULIA1S1_B_P1, MEP_INSN_CPFMULIUA1S1_H_P1, MEP_INSN_CPFMULILA1S1_H_P1
+ , MEP_INSN_CPFMADIA1S1U_B_P1, MEP_INSN_CPFMADIA1S1_B_P1, MEP_INSN_CPFMADIUA1S1_H_P1, MEP_INSN_CPFMADILA1S1_H_P1
+ , MEP_INSN_CPAMULIA1U_B_P1, MEP_INSN_CPAMULIA1_B_P1, MEP_INSN_CPAMULIUA1_H_P1, MEP_INSN_CPAMULILA1_H_P1
+ , MEP_INSN_CPAMADIA1U_B_P1, MEP_INSN_CPAMADIA1_B_P1, MEP_INSN_CPAMADIUA1_H_P1, MEP_INSN_CPAMADILA1_H_P1
+ , MEP_INSN_CPFMULIA1U_B_P1, MEP_INSN_CPFMULIA1_B_P1, MEP_INSN_CPFMULIUA1_H_P1, MEP_INSN_CPFMULILA1_H_P1
+ , MEP_INSN_CPFMADIA1U_B_P1, MEP_INSN_CPFMADIA1_B_P1, MEP_INSN_CPFMADIUA1_H_P1, MEP_INSN_CPFMADILA1_H_P1
+ , MEP_INSN_CPSSQA1U_B_P1, MEP_INSN_CPSSQA1_B_P1, MEP_INSN_CPSSDA1U_B_P1, MEP_INSN_CPSSDA1_B_P1
+ , MEP_INSN_CPMULA1U_B_P1, MEP_INSN_CPMULA1_B_P1, MEP_INSN_CPMULUA1_H_P1, MEP_INSN_CPMULLA1_H_P1
+ , MEP_INSN_CPMULUA1U_W_P1, MEP_INSN_CPMULLA1U_W_P1, MEP_INSN_CPMULUA1_W_P1, MEP_INSN_CPMULLA1_W_P1
+ , MEP_INSN_CPMADA1U_B_P1, MEP_INSN_CPMADA1_B_P1, MEP_INSN_CPMADUA1_H_P1, MEP_INSN_CPMADLA1_H_P1
+ , MEP_INSN_CPMADUA1U_W_P1, MEP_INSN_CPMADLA1U_W_P1, MEP_INSN_CPMADUA1_W_P1, MEP_INSN_CPMADLA1_W_P1
+ , MEP_INSN_CPMSBUA1_H_P1, MEP_INSN_CPMSBLA1_H_P1, MEP_INSN_CPMSBUA1U_W_P1, MEP_INSN_CPMSBLA1U_W_P1
+ , MEP_INSN_CPMSBUA1_W_P1, MEP_INSN_CPMSBLA1_W_P1, MEP_INSN_CPSMADUA1_H_P1, MEP_INSN_CPSMADLA1_H_P1
+ , MEP_INSN_CPSMADUA1_W_P1, MEP_INSN_CPSMADLA1_W_P1, MEP_INSN_CPSMSBUA1_H_P1, MEP_INSN_CPSMSBLA1_H_P1
+ , MEP_INSN_CPSMSBUA1_W_P1, MEP_INSN_CPSMSBLA1_W_P1, MEP_INSN_CPMULSLUA1_H_P1, MEP_INSN_CPMULSLLA1_H_P1
+ , MEP_INSN_CPMULSLUA1_W_P1, MEP_INSN_CPMULSLLA1_W_P1, MEP_INSN_CPSMADSLUA1_H_P1, MEP_INSN_CPSMADSLLA1_H_P1
+ , MEP_INSN_CPSMADSLUA1_W_P1, MEP_INSN_CPSMADSLLA1_W_P1, MEP_INSN_CPSMSBSLUA1_H_P1, MEP_INSN_CPSMSBSLLA1_H_P1
+ , MEP_INSN_CPSMSBSLUA1_W_P1, MEP_INSN_CPSMSBSLLA1_W_P1
 } CGEN_INSN_TYPE;
 
 /* Index of `invalid' insn place holder.  */
index 2844490..1957eb6 100644 (file)
@@ -1,3 +1,16 @@
+2009-05-22  DJ Delorie  <dj@redhat.com>
+
+       * mep-cop1-16-decode.cxx: Regenerate.
+       * mep-cop1-16-decode.h: Regenerate.
+       * mep-cop1-16-model.cxx: Regenerate.
+       * mep-cop1-16-model.h: Regenerate.
+       * mep-cop1-16-sem.cxx: Regenerate.
+       * mep-cop1-64-decode.cxx: Regenerate.
+       * mep-cop1-64-decode.h: Regenerate.
+       * mep-cop1-64-model.cxx: Regenerate.
+       * mep-cop1-64-model.h: Regenerate.
+       * mep-cop1-64-sem.cxx: Regenerate.
+
 2009-05-18  Kevin Buettner  <kevinb@redhat.com>
 
        * mep.cxx (mep_cpu::reset): Call `h_regs_flush_write_queue'.
index 2f14fe5..0b1bd09 100644 (file)
@@ -20,7 +20,7 @@ using namespace mep_ext1; // FIXME: namespace organization still wip
 
 // The instruction descriptor array. 
 
-mepcop1_16_idesc mepcop1_16_idesc::idesc_table[MEPCOP1_16_INSN_CPFACLA0S1_H_P0S + 1] =
+mepcop1_16_idesc mepcop1_16_idesc::idesc_table[MEPCOP1_16_INSN_CPMOVI_B_P0S_P1 + 1] =
 {
   { mepcop1_16_sem_x_invalid, "X_INVALID", MEPCOP1_16_INSN_X_INVALID, { 0|(1<<CGEN_INSN_VIRTUAL), (1<<MACH_BASE), { 1, "\x20" }, 0, CONFIG_NONE, (1<<SLOTS_CORE) } },
   { mepcop1_16_sem_c0nop_P0_P0S, "C0NOP_P0_P0S", MEPCOP1_16_INSN_C0NOP_P0_P0S, { 0|(1<<CGEN_INSN_OPTIONAL_CP_INSN), (1<<MACH_BASE), { 1, "\x28" }, 0, CONFIG_NONE, (1<<SLOTS_P0)|(1<<SLOTS_P0S) } },
@@ -157,6 +157,7 @@ mepcop1_16_idesc mepcop1_16_idesc::idesc_table[MEPCOP1_16_INSN_CPFACLA0S1_H_P0S
   { mepcop1_16_sem_cpfaca0s1_b_P0S, "CPFACA0S1_B_P0S", MEPCOP1_16_INSN_CPFACA0S1_B_P0S, { 0|(1<<CGEN_INSN_OPTIONAL_CP_INSN), (1<<MACH_BASE), { 1, "\x20" }, 0, CONFIG_NONE, (1<<SLOTS_P0S) } },
   { mepcop1_16_sem_cpfacua0s1_h_P0S, "CPFACUA0S1_H_P0S", MEPCOP1_16_INSN_CPFACUA0S1_H_P0S, { 0|(1<<CGEN_INSN_OPTIONAL_CP_INSN), (1<<MACH_BASE), { 1, "\x20" }, 0, CONFIG_NONE, (1<<SLOTS_P0S) } },
   { mepcop1_16_sem_cpfacla0s1_h_P0S, "CPFACLA0S1_H_P0S", MEPCOP1_16_INSN_CPFACLA0S1_H_P0S, { 0|(1<<CGEN_INSN_OPTIONAL_CP_INSN), (1<<MACH_BASE), { 1, "\x20" }, 0, CONFIG_NONE, (1<<SLOTS_P0S) } },
+  { mepcop1_16_sem_cpmovi_b_P0S_P1, "CPMOVI_B_P0S_P1", MEPCOP1_16_INSN_CPMOVI_B_P0S_P1, { 0|(1<<CGEN_INSN_OPTIONAL_CP_INSN), (1<<MACH_BASE), { 1, "\x24" }, 0, CONFIG_NONE, (1<<SLOTS_P0S)|(1<<SLOTS_P1) } },
 
 };
 
@@ -194,6 +195,8 @@ static void
 mepcop1_16_extract_sfmt_cpcmpeqz_b_P0S_P1 (mepcop1_16_scache* abuf, mep_ext1_cpu* current_cpu, PCADDR pc, mepcop1_16_insn_word base_insn, mepcop1_16_insn_word entire_insn);
 static void
 mepcop1_16_extract_sfmt_cpsrlia0_P0S (mepcop1_16_scache* abuf, mep_ext1_cpu* current_cpu, PCADDR pc, mepcop1_16_insn_word base_insn, mepcop1_16_insn_word entire_insn);
+static void
+mepcop1_16_extract_sfmt_cpmovi_b_P0S_P1 (mepcop1_16_scache* abuf, mep_ext1_cpu* current_cpu, PCADDR pc, mepcop1_16_insn_word base_insn, mepcop1_16_insn_word entire_insn);
 
 // Fetch & decode instruction
 void
@@ -206,7 +209,7 @@ mepcop1_16_scache::decode (mep_ext1_cpu* current_cpu, PCADDR pc, mepcop1_16_insn
     mepcop1_16_insn_word insn = base_insn;
 
     {
-      unsigned int val = (((insn >> 13) & (31 << 6)) | ((insn >> 4) & (63 << 0)));
+      unsigned int val = (((insn >> 13) & (31 << 6)) | ((insn >> 7) & (1 << 5)) | ((insn >> 4) & (31 << 0)));
       switch (val)
       {
       case 0 :
@@ -1017,78 +1020,7 @@ mepcop1_16_scache::decode (mep_ext1_cpu* current_cpu, PCADDR pc, mepcop1_16_insn
         if ((entire_insn & 0xfff8000f) == 0x680000)
           { itype = MEPCOP1_16_INSN_CPFSFTBS1_P0S_P1; mepcop1_16_extract_sfmt_cpadd3_b_P0S_P1 (this, current_cpu, pc, base_insn, entire_insn); goto done; }
         itype = MEPCOP1_16_INSN_X_INVALID; mepcop1_16_extract_sfmt_empty (this, current_cpu, pc, base_insn, entire_insn); goto done;
-      case 1024 :
-        {
-          unsigned int val = (((insn >> 10) & (15 << 0)));
-          switch (val)
-          {
-          case 0 :
-            if ((entire_insn & 0xfff83e0f) == 0x800000)
-              { itype = MEPCOP1_16_INSN_CPMOV_P0S_P1; mepcop1_16_extract_sfmt_cpmov_P0S_P1 (this, current_cpu, pc, base_insn, entire_insn); goto done; }
-            itype = MEPCOP1_16_INSN_X_INVALID; mepcop1_16_extract_sfmt_empty (this, current_cpu, pc, base_insn, entire_insn); goto done;
-          case 1 :
-            if ((entire_insn & 0xfff83e0f) == 0x800400)
-              { itype = MEPCOP1_16_INSN_CPABSZ_H_P0S_P1; mepcop1_16_extract_sfmt_cpmov_P0S_P1 (this, current_cpu, pc, base_insn, entire_insn); goto done; }
-            itype = MEPCOP1_16_INSN_X_INVALID; mepcop1_16_extract_sfmt_empty (this, current_cpu, pc, base_insn, entire_insn); goto done;
-          case 2 :
-            if ((entire_insn & 0xfff83e0f) == 0x800800)
-              { itype = MEPCOP1_16_INSN_CPLDZ_H_P0S_P1; mepcop1_16_extract_sfmt_cpmov_P0S_P1 (this, current_cpu, pc, base_insn, entire_insn); goto done; }
-            itype = MEPCOP1_16_INSN_X_INVALID; mepcop1_16_extract_sfmt_empty (this, current_cpu, pc, base_insn, entire_insn); goto done;
-          case 3 :
-            if ((entire_insn & 0xfff83e0f) == 0x800c00)
-              { itype = MEPCOP1_16_INSN_CPNORM_H_P0S_P1; mepcop1_16_extract_sfmt_cpmov_P0S_P1 (this, current_cpu, pc, base_insn, entire_insn); goto done; }
-            itype = MEPCOP1_16_INSN_X_INVALID; mepcop1_16_extract_sfmt_empty (this, current_cpu, pc, base_insn, entire_insn); goto done;
-          case 4 :
-            if ((entire_insn & 0xfff83e0f) == 0x801000)
-              { itype = MEPCOP1_16_INSN_CPHADDU_B_P0S_P1; mepcop1_16_extract_sfmt_cpmov_P0S_P1 (this, current_cpu, pc, base_insn, entire_insn); goto done; }
-            itype = MEPCOP1_16_INSN_X_INVALID; mepcop1_16_extract_sfmt_empty (this, current_cpu, pc, base_insn, entire_insn); goto done;
-          case 5 :
-            if ((entire_insn & 0xfff83e0f) == 0x801400)
-              { itype = MEPCOP1_16_INSN_CPHADD_H_P0S_P1; mepcop1_16_extract_sfmt_cpmov_P0S_P1 (this, current_cpu, pc, base_insn, entire_insn); goto done; }
-            itype = MEPCOP1_16_INSN_X_INVALID; mepcop1_16_extract_sfmt_empty (this, current_cpu, pc, base_insn, entire_insn); goto done;
-          case 6 :
-            if ((entire_insn & 0xfff83fff) == 0x801800)
-              { itype = MEPCOP1_16_INSN_CPCCADD_B_P0S_P1; mepcop1_16_extract_sfmt_cpccadd_b_P0S_P1 (this, current_cpu, pc, base_insn, entire_insn); goto done; }
-            itype = MEPCOP1_16_INSN_X_INVALID; mepcop1_16_extract_sfmt_empty (this, current_cpu, pc, base_insn, entire_insn); goto done;
-          case 7 :
-            if ((entire_insn & 0xfff83e0f) == 0x801c00)
-              { itype = MEPCOP1_16_INSN_CPBCAST_H_P0S_P1; mepcop1_16_extract_sfmt_cpmov_P0S_P1 (this, current_cpu, pc, base_insn, entire_insn); goto done; }
-            itype = MEPCOP1_16_INSN_X_INVALID; mepcop1_16_extract_sfmt_empty (this, current_cpu, pc, base_insn, entire_insn); goto done;
-          case 8 :
-            if ((entire_insn & 0xfff83e0f) == 0x802000)
-              { itype = MEPCOP1_16_INSN_CPEXTUU_B_P0S_P1; mepcop1_16_extract_sfmt_cpmov_P0S_P1 (this, current_cpu, pc, base_insn, entire_insn); goto done; }
-            itype = MEPCOP1_16_INSN_X_INVALID; mepcop1_16_extract_sfmt_empty (this, current_cpu, pc, base_insn, entire_insn); goto done;
-          case 9 :
-            if ((entire_insn & 0xfff83e0f) == 0x802400)
-              { itype = MEPCOP1_16_INSN_CPEXTUU_H_P0S_P1; mepcop1_16_extract_sfmt_cpmov_P0S_P1 (this, current_cpu, pc, base_insn, entire_insn); goto done; }
-            itype = MEPCOP1_16_INSN_X_INVALID; mepcop1_16_extract_sfmt_empty (this, current_cpu, pc, base_insn, entire_insn); goto done;
-          case 10 :
-            if ((entire_insn & 0xfff83e0f) == 0x802800)
-              { itype = MEPCOP1_16_INSN_CPEXTLU_B_P0S_P1; mepcop1_16_extract_sfmt_cpmov_P0S_P1 (this, current_cpu, pc, base_insn, entire_insn); goto done; }
-            itype = MEPCOP1_16_INSN_X_INVALID; mepcop1_16_extract_sfmt_empty (this, current_cpu, pc, base_insn, entire_insn); goto done;
-          case 11 :
-            if ((entire_insn & 0xfff83e0f) == 0x802c00)
-              { itype = MEPCOP1_16_INSN_CPEXTLU_H_P0S_P1; mepcop1_16_extract_sfmt_cpmov_P0S_P1 (this, current_cpu, pc, base_insn, entire_insn); goto done; }
-            itype = MEPCOP1_16_INSN_X_INVALID; mepcop1_16_extract_sfmt_empty (this, current_cpu, pc, base_insn, entire_insn); goto done;
-          case 12 :
-            if ((entire_insn & 0xfff83e0f) == 0x803000)
-              { itype = MEPCOP1_16_INSN_CPCASTUB_H_P0S_P1; mepcop1_16_extract_sfmt_cpmov_P0S_P1 (this, current_cpu, pc, base_insn, entire_insn); goto done; }
-            itype = MEPCOP1_16_INSN_X_INVALID; mepcop1_16_extract_sfmt_empty (this, current_cpu, pc, base_insn, entire_insn); goto done;
-          case 13 :
-            if ((entire_insn & 0xfff83e0f) == 0x803400)
-              { itype = MEPCOP1_16_INSN_CDCASTUW_P0S_P1; mepcop1_16_extract_sfmt_cpmov_P0S_P1 (this, current_cpu, pc, base_insn, entire_insn); goto done; }
-            itype = MEPCOP1_16_INSN_X_INVALID; mepcop1_16_extract_sfmt_empty (this, current_cpu, pc, base_insn, entire_insn); goto done;
-          case 14 :
-            if ((entire_insn & 0xfff83e0f) == 0x803800)
-              { itype = MEPCOP1_16_INSN_CPCASTUB_W_P0S_P1; mepcop1_16_extract_sfmt_cpmov_P0S_P1 (this, current_cpu, pc, base_insn, entire_insn); goto done; }
-            itype = MEPCOP1_16_INSN_X_INVALID; mepcop1_16_extract_sfmt_empty (this, current_cpu, pc, base_insn, entire_insn); goto done;
-          case 15 :
-            if ((entire_insn & 0xfff83e0f) == 0x803c00)
-              { itype = MEPCOP1_16_INSN_CPCASTUH_W_P0S_P1; mepcop1_16_extract_sfmt_cpmov_P0S_P1 (this, current_cpu, pc, base_insn, entire_insn); goto done; }
-            itype = MEPCOP1_16_INSN_X_INVALID; mepcop1_16_extract_sfmt_empty (this, current_cpu, pc, base_insn, entire_insn); goto done;
-          default : itype = MEPCOP1_16_INSN_X_INVALID; mepcop1_16_extract_sfmt_empty (this, current_cpu, pc, base_insn, entire_insn); goto done;
-          }
-        }
+      case 1024 : /* fall through */
       case 1025 : /* fall through */
       case 1026 : /* fall through */
       case 1027 : /* fall through */
@@ -1121,7 +1053,7 @@ mepcop1_16_scache::decode (mep_ext1_cpu* current_cpu, PCADDR pc, mepcop1_16_insn
       case 1054 : /* fall through */
       case 1055 :
         {
-          unsigned int val = (((insn >> 10) & (15 << 0)));
+          unsigned int val = (((insn >> 10) & (1 << 3)) | ((insn >> 9) & (7 << 0)));
           switch (val)
           {
           case 0 :
@@ -1129,65 +1061,140 @@ mepcop1_16_scache::decode (mep_ext1_cpu* current_cpu, PCADDR pc, mepcop1_16_insn
               { itype = MEPCOP1_16_INSN_CPMOV_P0S_P1; mepcop1_16_extract_sfmt_cpmov_P0S_P1 (this, current_cpu, pc, base_insn, entire_insn); goto done; }
             itype = MEPCOP1_16_INSN_X_INVALID; mepcop1_16_extract_sfmt_empty (this, current_cpu, pc, base_insn, entire_insn); goto done;
           case 1 :
-            if ((entire_insn & 0xfff83e0f) == 0x800400)
-              { itype = MEPCOP1_16_INSN_CPABSZ_H_P0S_P1; mepcop1_16_extract_sfmt_cpmov_P0S_P1 (this, current_cpu, pc, base_insn, entire_insn); goto done; }
+            if ((entire_insn & 0xfff83e0f) == 0x800200)
+              { itype = MEPCOP1_16_INSN_CPABSZ_B_P0S_P1; mepcop1_16_extract_sfmt_cpmov_P0S_P1 (this, current_cpu, pc, base_insn, entire_insn); goto done; }
             itype = MEPCOP1_16_INSN_X_INVALID; mepcop1_16_extract_sfmt_empty (this, current_cpu, pc, base_insn, entire_insn); goto done;
           case 2 :
-            if ((entire_insn & 0xfff83e0f) == 0x800800)
-              { itype = MEPCOP1_16_INSN_CPLDZ_H_P0S_P1; mepcop1_16_extract_sfmt_cpmov_P0S_P1 (this, current_cpu, pc, base_insn, entire_insn); goto done; }
+            if ((entire_insn & 0xfff83e0f) == 0x800400)
+              { itype = MEPCOP1_16_INSN_CPABSZ_H_P0S_P1; mepcop1_16_extract_sfmt_cpmov_P0S_P1 (this, current_cpu, pc, base_insn, entire_insn); goto done; }
             itype = MEPCOP1_16_INSN_X_INVALID; mepcop1_16_extract_sfmt_empty (this, current_cpu, pc, base_insn, entire_insn); goto done;
           case 3 :
-            if ((entire_insn & 0xfff83e0f) == 0x800c00)
-              { itype = MEPCOP1_16_INSN_CPNORM_H_P0S_P1; mepcop1_16_extract_sfmt_cpmov_P0S_P1 (this, current_cpu, pc, base_insn, entire_insn); goto done; }
+            if ((entire_insn & 0xfff83e0f) == 0x800600)
+              { itype = MEPCOP1_16_INSN_CPABSZ_W_P0S_P1; mepcop1_16_extract_sfmt_cpmov_P0S_P1 (this, current_cpu, pc, base_insn, entire_insn); goto done; }
             itype = MEPCOP1_16_INSN_X_INVALID; mepcop1_16_extract_sfmt_empty (this, current_cpu, pc, base_insn, entire_insn); goto done;
           case 4 :
-            if ((entire_insn & 0xfff83e0f) == 0x801000)
-              { itype = MEPCOP1_16_INSN_CPHADDU_B_P0S_P1; mepcop1_16_extract_sfmt_cpmov_P0S_P1 (this, current_cpu, pc, base_insn, entire_insn); goto done; }
+            if ((entire_insn & 0xfff83e0f) == 0x800800)
+              { itype = MEPCOP1_16_INSN_CPLDZ_H_P0S_P1; mepcop1_16_extract_sfmt_cpmov_P0S_P1 (this, current_cpu, pc, base_insn, entire_insn); goto done; }
             itype = MEPCOP1_16_INSN_X_INVALID; mepcop1_16_extract_sfmt_empty (this, current_cpu, pc, base_insn, entire_insn); goto done;
           case 5 :
-            if ((entire_insn & 0xfff83e0f) == 0x801400)
-              { itype = MEPCOP1_16_INSN_CPHADD_H_P0S_P1; mepcop1_16_extract_sfmt_cpmov_P0S_P1 (this, current_cpu, pc, base_insn, entire_insn); goto done; }
+            if ((entire_insn & 0xfff83e0f) == 0x800a00)
+              { itype = MEPCOP1_16_INSN_CPLDZ_W_P0S_P1; mepcop1_16_extract_sfmt_cpmov_P0S_P1 (this, current_cpu, pc, base_insn, entire_insn); goto done; }
+            itype = MEPCOP1_16_INSN_X_INVALID; mepcop1_16_extract_sfmt_empty (this, current_cpu, pc, base_insn, entire_insn); goto done;
+          case 6 :
+            if ((entire_insn & 0xfff83e0f) == 0x800c00)
+              { itype = MEPCOP1_16_INSN_CPNORM_H_P0S_P1; mepcop1_16_extract_sfmt_cpmov_P0S_P1 (this, current_cpu, pc, base_insn, entire_insn); goto done; }
             itype = MEPCOP1_16_INSN_X_INVALID; mepcop1_16_extract_sfmt_empty (this, current_cpu, pc, base_insn, entire_insn); goto done;
           case 7 :
-            if ((entire_insn & 0xfff83e0f) == 0x801c00)
-              { itype = MEPCOP1_16_INSN_CPBCAST_H_P0S_P1; mepcop1_16_extract_sfmt_cpmov_P0S_P1 (this, current_cpu, pc, base_insn, entire_insn); goto done; }
+            if ((entire_insn & 0xfff83e0f) == 0x800e00)
+              { itype = MEPCOP1_16_INSN_CPNORM_W_P0S_P1; mepcop1_16_extract_sfmt_cpmov_P0S_P1 (this, current_cpu, pc, base_insn, entire_insn); goto done; }
             itype = MEPCOP1_16_INSN_X_INVALID; mepcop1_16_extract_sfmt_empty (this, current_cpu, pc, base_insn, entire_insn); goto done;
           case 8 :
             if ((entire_insn & 0xfff83e0f) == 0x802000)
               { itype = MEPCOP1_16_INSN_CPEXTUU_B_P0S_P1; mepcop1_16_extract_sfmt_cpmov_P0S_P1 (this, current_cpu, pc, base_insn, entire_insn); goto done; }
             itype = MEPCOP1_16_INSN_X_INVALID; mepcop1_16_extract_sfmt_empty (this, current_cpu, pc, base_insn, entire_insn); goto done;
           case 9 :
+            if ((entire_insn & 0xfff83e0f) == 0x802200)
+              { itype = MEPCOP1_16_INSN_CPEXTU_B_P0S_P1; mepcop1_16_extract_sfmt_cpmov_P0S_P1 (this, current_cpu, pc, base_insn, entire_insn); goto done; }
+            itype = MEPCOP1_16_INSN_X_INVALID; mepcop1_16_extract_sfmt_empty (this, current_cpu, pc, base_insn, entire_insn); goto done;
+          case 10 :
             if ((entire_insn & 0xfff83e0f) == 0x802400)
               { itype = MEPCOP1_16_INSN_CPEXTUU_H_P0S_P1; mepcop1_16_extract_sfmt_cpmov_P0S_P1 (this, current_cpu, pc, base_insn, entire_insn); goto done; }
             itype = MEPCOP1_16_INSN_X_INVALID; mepcop1_16_extract_sfmt_empty (this, current_cpu, pc, base_insn, entire_insn); goto done;
-          case 10 :
+          case 11 :
+            if ((entire_insn & 0xfff83e0f) == 0x802600)
+              { itype = MEPCOP1_16_INSN_CPEXTU_H_P0S_P1; mepcop1_16_extract_sfmt_cpmov_P0S_P1 (this, current_cpu, pc, base_insn, entire_insn); goto done; }
+            itype = MEPCOP1_16_INSN_X_INVALID; mepcop1_16_extract_sfmt_empty (this, current_cpu, pc, base_insn, entire_insn); goto done;
+          case 12 :
             if ((entire_insn & 0xfff83e0f) == 0x802800)
               { itype = MEPCOP1_16_INSN_CPEXTLU_B_P0S_P1; mepcop1_16_extract_sfmt_cpmov_P0S_P1 (this, current_cpu, pc, base_insn, entire_insn); goto done; }
             itype = MEPCOP1_16_INSN_X_INVALID; mepcop1_16_extract_sfmt_empty (this, current_cpu, pc, base_insn, entire_insn); goto done;
-          case 11 :
+          case 13 :
+            if ((entire_insn & 0xfff83e0f) == 0x802a00)
+              { itype = MEPCOP1_16_INSN_CPEXTL_B_P0S_P1; mepcop1_16_extract_sfmt_cpmov_P0S_P1 (this, current_cpu, pc, base_insn, entire_insn); goto done; }
+            itype = MEPCOP1_16_INSN_X_INVALID; mepcop1_16_extract_sfmt_empty (this, current_cpu, pc, base_insn, entire_insn); goto done;
+          case 14 :
             if ((entire_insn & 0xfff83e0f) == 0x802c00)
               { itype = MEPCOP1_16_INSN_CPEXTLU_H_P0S_P1; mepcop1_16_extract_sfmt_cpmov_P0S_P1 (this, current_cpu, pc, base_insn, entire_insn); goto done; }
             itype = MEPCOP1_16_INSN_X_INVALID; mepcop1_16_extract_sfmt_empty (this, current_cpu, pc, base_insn, entire_insn); goto done;
-          case 12 :
+          case 15 :
+            if ((entire_insn & 0xfff83e0f) == 0x802e00)
+              { itype = MEPCOP1_16_INSN_CPEXTL_H_P0S_P1; mepcop1_16_extract_sfmt_cpmov_P0S_P1 (this, current_cpu, pc, base_insn, entire_insn); goto done; }
+            itype = MEPCOP1_16_INSN_X_INVALID; mepcop1_16_extract_sfmt_empty (this, current_cpu, pc, base_insn, entire_insn); goto done;
+          default : itype = MEPCOP1_16_INSN_X_INVALID; mepcop1_16_extract_sfmt_empty (this, current_cpu, pc, base_insn, entire_insn); goto done;
+          }
+        }
+      case 1056 :
+        {
+          unsigned int val = (((insn >> 10) & (1 << 3)) | ((insn >> 9) & (7 << 0)));
+          switch (val)
+          {
+          case 0 :
+            if ((entire_insn & 0xfff83e0f) == 0x801000)
+              { itype = MEPCOP1_16_INSN_CPHADDU_B_P0S_P1; mepcop1_16_extract_sfmt_cpmov_P0S_P1 (this, current_cpu, pc, base_insn, entire_insn); goto done; }
+            itype = MEPCOP1_16_INSN_X_INVALID; mepcop1_16_extract_sfmt_empty (this, current_cpu, pc, base_insn, entire_insn); goto done;
+          case 1 :
+            if ((entire_insn & 0xfff83e0f) == 0x801200)
+              { itype = MEPCOP1_16_INSN_CPHADD_B_P0S_P1; mepcop1_16_extract_sfmt_cpmov_P0S_P1 (this, current_cpu, pc, base_insn, entire_insn); goto done; }
+            itype = MEPCOP1_16_INSN_X_INVALID; mepcop1_16_extract_sfmt_empty (this, current_cpu, pc, base_insn, entire_insn); goto done;
+          case 2 :
+            if ((entire_insn & 0xfff83e0f) == 0x801400)
+              { itype = MEPCOP1_16_INSN_CPHADD_H_P0S_P1; mepcop1_16_extract_sfmt_cpmov_P0S_P1 (this, current_cpu, pc, base_insn, entire_insn); goto done; }
+            itype = MEPCOP1_16_INSN_X_INVALID; mepcop1_16_extract_sfmt_empty (this, current_cpu, pc, base_insn, entire_insn); goto done;
+          case 3 :
+            if ((entire_insn & 0xfff83e0f) == 0x801600)
+              { itype = MEPCOP1_16_INSN_CPHADD_W_P0S_P1; mepcop1_16_extract_sfmt_cpmov_P0S_P1 (this, current_cpu, pc, base_insn, entire_insn); goto done; }
+            itype = MEPCOP1_16_INSN_X_INVALID; mepcop1_16_extract_sfmt_empty (this, current_cpu, pc, base_insn, entire_insn); goto done;
+          case 4 :
+            if ((entire_insn & 0xfff83fff) == 0x801800)
+              { itype = MEPCOP1_16_INSN_CPCCADD_B_P0S_P1; mepcop1_16_extract_sfmt_cpccadd_b_P0S_P1 (this, current_cpu, pc, base_insn, entire_insn); goto done; }
+            itype = MEPCOP1_16_INSN_X_INVALID; mepcop1_16_extract_sfmt_empty (this, current_cpu, pc, base_insn, entire_insn); goto done;
+          case 5 :
+            if ((entire_insn & 0xfff83e0f) == 0x801a00)
+              { itype = MEPCOP1_16_INSN_CPBCAST_B_P0S_P1; mepcop1_16_extract_sfmt_cpmov_P0S_P1 (this, current_cpu, pc, base_insn, entire_insn); goto done; }
+            itype = MEPCOP1_16_INSN_X_INVALID; mepcop1_16_extract_sfmt_empty (this, current_cpu, pc, base_insn, entire_insn); goto done;
+          case 6 :
+            if ((entire_insn & 0xfff83e0f) == 0x801c00)
+              { itype = MEPCOP1_16_INSN_CPBCAST_H_P0S_P1; mepcop1_16_extract_sfmt_cpmov_P0S_P1 (this, current_cpu, pc, base_insn, entire_insn); goto done; }
+            itype = MEPCOP1_16_INSN_X_INVALID; mepcop1_16_extract_sfmt_empty (this, current_cpu, pc, base_insn, entire_insn); goto done;
+          case 7 :
+            if ((entire_insn & 0xfff83e0f) == 0x801e00)
+              { itype = MEPCOP1_16_INSN_CPBCAST_W_P0S_P1; mepcop1_16_extract_sfmt_cpmov_P0S_P1 (this, current_cpu, pc, base_insn, entire_insn); goto done; }
+            itype = MEPCOP1_16_INSN_X_INVALID; mepcop1_16_extract_sfmt_empty (this, current_cpu, pc, base_insn, entire_insn); goto done;
+          case 8 :
             if ((entire_insn & 0xfff83e0f) == 0x803000)
               { itype = MEPCOP1_16_INSN_CPCASTUB_H_P0S_P1; mepcop1_16_extract_sfmt_cpmov_P0S_P1 (this, current_cpu, pc, base_insn, entire_insn); goto done; }
             itype = MEPCOP1_16_INSN_X_INVALID; mepcop1_16_extract_sfmt_empty (this, current_cpu, pc, base_insn, entire_insn); goto done;
-          case 13 :
+          case 9 :
+            if ((entire_insn & 0xfff83e0f) == 0x803200)
+              { itype = MEPCOP1_16_INSN_CPCASTB_H_P0S_P1; mepcop1_16_extract_sfmt_cpmov_P0S_P1 (this, current_cpu, pc, base_insn, entire_insn); goto done; }
+            itype = MEPCOP1_16_INSN_X_INVALID; mepcop1_16_extract_sfmt_empty (this, current_cpu, pc, base_insn, entire_insn); goto done;
+          case 10 :
             if ((entire_insn & 0xfff83e0f) == 0x803400)
               { itype = MEPCOP1_16_INSN_CDCASTUW_P0S_P1; mepcop1_16_extract_sfmt_cpmov_P0S_P1 (this, current_cpu, pc, base_insn, entire_insn); goto done; }
             itype = MEPCOP1_16_INSN_X_INVALID; mepcop1_16_extract_sfmt_empty (this, current_cpu, pc, base_insn, entire_insn); goto done;
-          case 14 :
+          case 11 :
+            if ((entire_insn & 0xfff83e0f) == 0x803600)
+              { itype = MEPCOP1_16_INSN_CDCASTW_P0S_P1; mepcop1_16_extract_sfmt_cpmov_P0S_P1 (this, current_cpu, pc, base_insn, entire_insn); goto done; }
+            itype = MEPCOP1_16_INSN_X_INVALID; mepcop1_16_extract_sfmt_empty (this, current_cpu, pc, base_insn, entire_insn); goto done;
+          case 12 :
             if ((entire_insn & 0xfff83e0f) == 0x803800)
               { itype = MEPCOP1_16_INSN_CPCASTUB_W_P0S_P1; mepcop1_16_extract_sfmt_cpmov_P0S_P1 (this, current_cpu, pc, base_insn, entire_insn); goto done; }
             itype = MEPCOP1_16_INSN_X_INVALID; mepcop1_16_extract_sfmt_empty (this, current_cpu, pc, base_insn, entire_insn); goto done;
-          case 15 :
+          case 13 :
+            if ((entire_insn & 0xfff83e0f) == 0x803a00)
+              { itype = MEPCOP1_16_INSN_CPCASTB_W_P0S_P1; mepcop1_16_extract_sfmt_cpmov_P0S_P1 (this, current_cpu, pc, base_insn, entire_insn); goto done; }
+            itype = MEPCOP1_16_INSN_X_INVALID; mepcop1_16_extract_sfmt_empty (this, current_cpu, pc, base_insn, entire_insn); goto done;
+          case 14 :
             if ((entire_insn & 0xfff83e0f) == 0x803c00)
               { itype = MEPCOP1_16_INSN_CPCASTUH_W_P0S_P1; mepcop1_16_extract_sfmt_cpmov_P0S_P1 (this, current_cpu, pc, base_insn, entire_insn); goto done; }
             itype = MEPCOP1_16_INSN_X_INVALID; mepcop1_16_extract_sfmt_empty (this, current_cpu, pc, base_insn, entire_insn); goto done;
+          case 15 :
+            if ((entire_insn & 0xfff83e0f) == 0x803e00)
+              { itype = MEPCOP1_16_INSN_CPCASTH_W_P0S_P1; mepcop1_16_extract_sfmt_cpmov_P0S_P1 (this, current_cpu, pc, base_insn, entire_insn); goto done; }
+            itype = MEPCOP1_16_INSN_X_INVALID; mepcop1_16_extract_sfmt_empty (this, current_cpu, pc, base_insn, entire_insn); goto done;
           default : itype = MEPCOP1_16_INSN_X_INVALID; mepcop1_16_extract_sfmt_empty (this, current_cpu, pc, base_insn, entire_insn); goto done;
           }
         }
-      case 1056 : /* fall through */
       case 1057 : /* fall through */
       case 1058 : /* fall through */
       case 1059 : /* fall through */
@@ -1220,69 +1227,65 @@ mepcop1_16_scache::decode (mep_ext1_cpu* current_cpu, PCADDR pc, mepcop1_16_insn
       case 1086 : /* fall through */
       case 1087 :
         {
-          unsigned int val = (((insn >> 10) & (15 << 0)));
+          unsigned int val = (((insn >> 10) & (1 << 3)) | ((insn >> 9) & (7 << 0)));
           switch (val)
           {
           case 0 :
-            if ((entire_insn & 0xfff83e0f) == 0x800200)
-              { itype = MEPCOP1_16_INSN_CPABSZ_B_P0S_P1; mepcop1_16_extract_sfmt_cpmov_P0S_P1 (this, current_cpu, pc, base_insn, entire_insn); goto done; }
+            if ((entire_insn & 0xfff83e0f) == 0x801000)
+              { itype = MEPCOP1_16_INSN_CPHADDU_B_P0S_P1; mepcop1_16_extract_sfmt_cpmov_P0S_P1 (this, current_cpu, pc, base_insn, entire_insn); goto done; }
             itype = MEPCOP1_16_INSN_X_INVALID; mepcop1_16_extract_sfmt_empty (this, current_cpu, pc, base_insn, entire_insn); goto done;
           case 1 :
-            if ((entire_insn & 0xfff83e0f) == 0x800600)
-              { itype = MEPCOP1_16_INSN_CPABSZ_W_P0S_P1; mepcop1_16_extract_sfmt_cpmov_P0S_P1 (this, current_cpu, pc, base_insn, entire_insn); goto done; }
+            if ((entire_insn & 0xfff83e0f) == 0x801200)
+              { itype = MEPCOP1_16_INSN_CPHADD_B_P0S_P1; mepcop1_16_extract_sfmt_cpmov_P0S_P1 (this, current_cpu, pc, base_insn, entire_insn); goto done; }
             itype = MEPCOP1_16_INSN_X_INVALID; mepcop1_16_extract_sfmt_empty (this, current_cpu, pc, base_insn, entire_insn); goto done;
           case 2 :
-            if ((entire_insn & 0xfff83e0f) == 0x800a00)
-              { itype = MEPCOP1_16_INSN_CPLDZ_W_P0S_P1; mepcop1_16_extract_sfmt_cpmov_P0S_P1 (this, current_cpu, pc, base_insn, entire_insn); goto done; }
+            if ((entire_insn & 0xfff83e0f) == 0x801400)
+              { itype = MEPCOP1_16_INSN_CPHADD_H_P0S_P1; mepcop1_16_extract_sfmt_cpmov_P0S_P1 (this, current_cpu, pc, base_insn, entire_insn); goto done; }
             itype = MEPCOP1_16_INSN_X_INVALID; mepcop1_16_extract_sfmt_empty (this, current_cpu, pc, base_insn, entire_insn); goto done;
           case 3 :
-            if ((entire_insn & 0xfff83e0f) == 0x800e00)
-              { itype = MEPCOP1_16_INSN_CPNORM_W_P0S_P1; mepcop1_16_extract_sfmt_cpmov_P0S_P1 (this, current_cpu, pc, base_insn, entire_insn); goto done; }
-            itype = MEPCOP1_16_INSN_X_INVALID; mepcop1_16_extract_sfmt_empty (this, current_cpu, pc, base_insn, entire_insn); goto done;
-          case 4 :
-            if ((entire_insn & 0xfff83e0f) == 0x801200)
-              { itype = MEPCOP1_16_INSN_CPHADD_B_P0S_P1; mepcop1_16_extract_sfmt_cpmov_P0S_P1 (this, current_cpu, pc, base_insn, entire_insn); goto done; }
-            itype = MEPCOP1_16_INSN_X_INVALID; mepcop1_16_extract_sfmt_empty (this, current_cpu, pc, base_insn, entire_insn); goto done;
-          case 5 :
             if ((entire_insn & 0xfff83e0f) == 0x801600)
               { itype = MEPCOP1_16_INSN_CPHADD_W_P0S_P1; mepcop1_16_extract_sfmt_cpmov_P0S_P1 (this, current_cpu, pc, base_insn, entire_insn); goto done; }
             itype = MEPCOP1_16_INSN_X_INVALID; mepcop1_16_extract_sfmt_empty (this, current_cpu, pc, base_insn, entire_insn); goto done;
-          case 6 :
+          case 5 :
             if ((entire_insn & 0xfff83e0f) == 0x801a00)
               { itype = MEPCOP1_16_INSN_CPBCAST_B_P0S_P1; mepcop1_16_extract_sfmt_cpmov_P0S_P1 (this, current_cpu, pc, base_insn, entire_insn); goto done; }
             itype = MEPCOP1_16_INSN_X_INVALID; mepcop1_16_extract_sfmt_empty (this, current_cpu, pc, base_insn, entire_insn); goto done;
+          case 6 :
+            if ((entire_insn & 0xfff83e0f) == 0x801c00)
+              { itype = MEPCOP1_16_INSN_CPBCAST_H_P0S_P1; mepcop1_16_extract_sfmt_cpmov_P0S_P1 (this, current_cpu, pc, base_insn, entire_insn); goto done; }
+            itype = MEPCOP1_16_INSN_X_INVALID; mepcop1_16_extract_sfmt_empty (this, current_cpu, pc, base_insn, entire_insn); goto done;
           case 7 :
             if ((entire_insn & 0xfff83e0f) == 0x801e00)
               { itype = MEPCOP1_16_INSN_CPBCAST_W_P0S_P1; mepcop1_16_extract_sfmt_cpmov_P0S_P1 (this, current_cpu, pc, base_insn, entire_insn); goto done; }
             itype = MEPCOP1_16_INSN_X_INVALID; mepcop1_16_extract_sfmt_empty (this, current_cpu, pc, base_insn, entire_insn); goto done;
           case 8 :
-            if ((entire_insn & 0xfff83e0f) == 0x802200)
-              { itype = MEPCOP1_16_INSN_CPEXTU_B_P0S_P1; mepcop1_16_extract_sfmt_cpmov_P0S_P1 (this, current_cpu, pc, base_insn, entire_insn); goto done; }
+            if ((entire_insn & 0xfff83e0f) == 0x803000)
+              { itype = MEPCOP1_16_INSN_CPCASTUB_H_P0S_P1; mepcop1_16_extract_sfmt_cpmov_P0S_P1 (this, current_cpu, pc, base_insn, entire_insn); goto done; }
             itype = MEPCOP1_16_INSN_X_INVALID; mepcop1_16_extract_sfmt_empty (this, current_cpu, pc, base_insn, entire_insn); goto done;
           case 9 :
-            if ((entire_insn & 0xfff83e0f) == 0x802600)
-              { itype = MEPCOP1_16_INSN_CPEXTU_H_P0S_P1; mepcop1_16_extract_sfmt_cpmov_P0S_P1 (this, current_cpu, pc, base_insn, entire_insn); goto done; }
+            if ((entire_insn & 0xfff83e0f) == 0x803200)
+              { itype = MEPCOP1_16_INSN_CPCASTB_H_P0S_P1; mepcop1_16_extract_sfmt_cpmov_P0S_P1 (this, current_cpu, pc, base_insn, entire_insn); goto done; }
             itype = MEPCOP1_16_INSN_X_INVALID; mepcop1_16_extract_sfmt_empty (this, current_cpu, pc, base_insn, entire_insn); goto done;
           case 10 :
-            if ((entire_insn & 0xfff83e0f) == 0x802a00)
-              { itype = MEPCOP1_16_INSN_CPEXTL_B_P0S_P1; mepcop1_16_extract_sfmt_cpmov_P0S_P1 (this, current_cpu, pc, base_insn, entire_insn); goto done; }
+            if ((entire_insn & 0xfff83e0f) == 0x803400)
+              { itype = MEPCOP1_16_INSN_CDCASTUW_P0S_P1; mepcop1_16_extract_sfmt_cpmov_P0S_P1 (this, current_cpu, pc, base_insn, entire_insn); goto done; }
             itype = MEPCOP1_16_INSN_X_INVALID; mepcop1_16_extract_sfmt_empty (this, current_cpu, pc, base_insn, entire_insn); goto done;
           case 11 :
-            if ((entire_insn & 0xfff83e0f) == 0x802e00)
-              { itype = MEPCOP1_16_INSN_CPEXTL_H_P0S_P1; mepcop1_16_extract_sfmt_cpmov_P0S_P1 (this, current_cpu, pc, base_insn, entire_insn); goto done; }
+            if ((entire_insn & 0xfff83e0f) == 0x803600)
+              { itype = MEPCOP1_16_INSN_CDCASTW_P0S_P1; mepcop1_16_extract_sfmt_cpmov_P0S_P1 (this, current_cpu, pc, base_insn, entire_insn); goto done; }
             itype = MEPCOP1_16_INSN_X_INVALID; mepcop1_16_extract_sfmt_empty (this, current_cpu, pc, base_insn, entire_insn); goto done;
           case 12 :
-            if ((entire_insn & 0xfff83e0f) == 0x803200)
-              { itype = MEPCOP1_16_INSN_CPCASTB_H_P0S_P1; mepcop1_16_extract_sfmt_cpmov_P0S_P1 (this, current_cpu, pc, base_insn, entire_insn); goto done; }
+            if ((entire_insn & 0xfff83e0f) == 0x803800)
+              { itype = MEPCOP1_16_INSN_CPCASTUB_W_P0S_P1; mepcop1_16_extract_sfmt_cpmov_P0S_P1 (this, current_cpu, pc, base_insn, entire_insn); goto done; }
             itype = MEPCOP1_16_INSN_X_INVALID; mepcop1_16_extract_sfmt_empty (this, current_cpu, pc, base_insn, entire_insn); goto done;
           case 13 :
-            if ((entire_insn & 0xfff83e0f) == 0x803600)
-              { itype = MEPCOP1_16_INSN_CDCASTW_P0S_P1; mepcop1_16_extract_sfmt_cpmov_P0S_P1 (this, current_cpu, pc, base_insn, entire_insn); goto done; }
-            itype = MEPCOP1_16_INSN_X_INVALID; mepcop1_16_extract_sfmt_empty (this, current_cpu, pc, base_insn, entire_insn); goto done;
-          case 14 :
             if ((entire_insn & 0xfff83e0f) == 0x803a00)
               { itype = MEPCOP1_16_INSN_CPCASTB_W_P0S_P1; mepcop1_16_extract_sfmt_cpmov_P0S_P1 (this, current_cpu, pc, base_insn, entire_insn); goto done; }
             itype = MEPCOP1_16_INSN_X_INVALID; mepcop1_16_extract_sfmt_empty (this, current_cpu, pc, base_insn, entire_insn); goto done;
+          case 14 :
+            if ((entire_insn & 0xfff83e0f) == 0x803c00)
+              { itype = MEPCOP1_16_INSN_CPCASTUH_W_P0S_P1; mepcop1_16_extract_sfmt_cpmov_P0S_P1 (this, current_cpu, pc, base_insn, entire_insn); goto done; }
+            itype = MEPCOP1_16_INSN_X_INVALID; mepcop1_16_extract_sfmt_empty (this, current_cpu, pc, base_insn, entire_insn); goto done;
           case 15 :
             if ((entire_insn & 0xfff83e0f) == 0x803e00)
               { itype = MEPCOP1_16_INSN_CPCASTH_W_P0S_P1; mepcop1_16_extract_sfmt_cpmov_P0S_P1 (this, current_cpu, pc, base_insn, entire_insn); goto done; }
@@ -1292,7 +1295,7 @@ mepcop1_16_scache::decode (mep_ext1_cpu* current_cpu, PCADDR pc, mepcop1_16_insn
         }
       case 1088 :
         {
-          unsigned int val = (((insn >> 13) & (1 << 0)));
+          unsigned int val = (((insn >> 12) & (1 << 1)) | ((insn >> 9) & (1 << 0)));
           switch (val)
           {
           case 0 :
@@ -1300,9 +1303,17 @@ mepcop1_16_scache::decode (mep_ext1_cpu* current_cpu, PCADDR pc, mepcop1_16_insn
               { itype = MEPCOP1_16_INSN_CPMOVFRCSAR0_P0S_P1; mepcop1_16_extract_sfmt_cpmovfrcsar0_P0S_P1 (this, current_cpu, pc, base_insn, entire_insn); goto done; }
             itype = MEPCOP1_16_INSN_X_INVALID; mepcop1_16_extract_sfmt_empty (this, current_cpu, pc, base_insn, entire_insn); goto done;
           case 1 :
+            if ((entire_insn & 0xfffffe0f) == 0x880200)
+              { itype = MEPCOP1_16_INSN_CPMOVFRCC_P0S_P1; mepcop1_16_extract_sfmt_cpmovfrcsar0_P0S_P1 (this, current_cpu, pc, base_insn, entire_insn); goto done; }
+            itype = MEPCOP1_16_INSN_X_INVALID; mepcop1_16_extract_sfmt_empty (this, current_cpu, pc, base_insn, entire_insn); goto done;
+          case 2 :
             if ((entire_insn & 0xfff83fff) == 0x882000)
               { itype = MEPCOP1_16_INSN_CPMOVTOCSAR0_P0S_P1; mepcop1_16_extract_sfmt_cpmovtocsar0_P0S_P1 (this, current_cpu, pc, base_insn, entire_insn); goto done; }
             itype = MEPCOP1_16_INSN_X_INVALID; mepcop1_16_extract_sfmt_empty (this, current_cpu, pc, base_insn, entire_insn); goto done;
+          case 3 :
+            if ((entire_insn & 0xfff83fff) == 0x882200)
+              { itype = MEPCOP1_16_INSN_CPMOVTOCC_P0S_P1; mepcop1_16_extract_sfmt_cpmovtocsar0_P0S_P1 (this, current_cpu, pc, base_insn, entire_insn); goto done; }
+            itype = MEPCOP1_16_INSN_X_INVALID; mepcop1_16_extract_sfmt_empty (this, current_cpu, pc, base_insn, entire_insn); goto done;
           default : itype = MEPCOP1_16_INSN_X_INVALID; mepcop1_16_extract_sfmt_empty (this, current_cpu, pc, base_insn, entire_insn); goto done;
           }
         }
@@ -1337,27 +1348,31 @@ mepcop1_16_scache::decode (mep_ext1_cpu* current_cpu, PCADDR pc, mepcop1_16_insn
       case 1117 : /* fall through */
       case 1118 : /* fall through */
       case 1119 :
-        if ((entire_insn & 0xfffffe0f) == 0x880000)
-          { itype = MEPCOP1_16_INSN_CPMOVFRCSAR0_P0S_P1; mepcop1_16_extract_sfmt_cpmovfrcsar0_P0S_P1 (this, current_cpu, pc, base_insn, entire_insn); goto done; }
-        itype = MEPCOP1_16_INSN_X_INVALID; mepcop1_16_extract_sfmt_empty (this, current_cpu, pc, base_insn, entire_insn); goto done;
-      case 1120 :
         {
-          unsigned int val = (((insn >> 10) & (15 << 0)));
+          unsigned int val = (((insn >> 9) & (1 << 0)));
           switch (val)
           {
           case 0 :
+            if ((entire_insn & 0xfffffe0f) == 0x880000)
+              { itype = MEPCOP1_16_INSN_CPMOVFRCSAR0_P0S_P1; mepcop1_16_extract_sfmt_cpmovfrcsar0_P0S_P1 (this, current_cpu, pc, base_insn, entire_insn); goto done; }
+            itype = MEPCOP1_16_INSN_X_INVALID; mepcop1_16_extract_sfmt_empty (this, current_cpu, pc, base_insn, entire_insn); goto done;
+          case 1 :
             if ((entire_insn & 0xfffffe0f) == 0x880200)
               { itype = MEPCOP1_16_INSN_CPMOVFRCC_P0S_P1; mepcop1_16_extract_sfmt_cpmovfrcsar0_P0S_P1 (this, current_cpu, pc, base_insn, entire_insn); goto done; }
             itype = MEPCOP1_16_INSN_X_INVALID; mepcop1_16_extract_sfmt_empty (this, current_cpu, pc, base_insn, entire_insn); goto done;
-          case 7 :
+          default : itype = MEPCOP1_16_INSN_X_INVALID; mepcop1_16_extract_sfmt_empty (this, current_cpu, pc, base_insn, entire_insn); goto done;
+          }
+        }
+      case 1120 :
+        {
+          unsigned int val = (((insn >> 13) & (1 << 0)));
+          switch (val)
+          {
+          case 0 :
             if ((entire_insn & 0xfffffe0f) == 0x881e00)
               { itype = MEPCOP1_16_INSN_CPMOVFRCSAR1_P0S_P1; mepcop1_16_extract_sfmt_cpmovfrcsar0_P0S_P1 (this, current_cpu, pc, base_insn, entire_insn); goto done; }
             itype = MEPCOP1_16_INSN_X_INVALID; mepcop1_16_extract_sfmt_empty (this, current_cpu, pc, base_insn, entire_insn); goto done;
-          case 8 :
-            if ((entire_insn & 0xfff83fff) == 0x882200)
-              { itype = MEPCOP1_16_INSN_CPMOVTOCC_P0S_P1; mepcop1_16_extract_sfmt_cpmovtocsar0_P0S_P1 (this, current_cpu, pc, base_insn, entire_insn); goto done; }
-            itype = MEPCOP1_16_INSN_X_INVALID; mepcop1_16_extract_sfmt_empty (this, current_cpu, pc, base_insn, entire_insn); goto done;
-          case 15 :
+          case 1 :
             if ((entire_insn & 0xfff83fff) == 0x883e00)
               { itype = MEPCOP1_16_INSN_CPMOVTOCSAR1_P0S_P1; mepcop1_16_extract_sfmt_cpmovtocsar0_P0S_P1 (this, current_cpu, pc, base_insn, entire_insn); goto done; }
             itype = MEPCOP1_16_INSN_X_INVALID; mepcop1_16_extract_sfmt_empty (this, current_cpu, pc, base_insn, entire_insn); goto done;
@@ -1395,21 +1410,9 @@ mepcop1_16_scache::decode (mep_ext1_cpu* current_cpu, PCADDR pc, mepcop1_16_insn
       case 1149 : /* fall through */
       case 1150 : /* fall through */
       case 1151 :
-        {
-          unsigned int val = (((insn >> 10) & (7 << 0)));
-          switch (val)
-          {
-          case 0 :
-            if ((entire_insn & 0xfffffe0f) == 0x880200)
-              { itype = MEPCOP1_16_INSN_CPMOVFRCC_P0S_P1; mepcop1_16_extract_sfmt_cpmovfrcsar0_P0S_P1 (this, current_cpu, pc, base_insn, entire_insn); goto done; }
-            itype = MEPCOP1_16_INSN_X_INVALID; mepcop1_16_extract_sfmt_empty (this, current_cpu, pc, base_insn, entire_insn); goto done;
-          case 7 :
-            if ((entire_insn & 0xfffffe0f) == 0x881e00)
-              { itype = MEPCOP1_16_INSN_CPMOVFRCSAR1_P0S_P1; mepcop1_16_extract_sfmt_cpmovfrcsar0_P0S_P1 (this, current_cpu, pc, base_insn, entire_insn); goto done; }
-            itype = MEPCOP1_16_INSN_X_INVALID; mepcop1_16_extract_sfmt_empty (this, current_cpu, pc, base_insn, entire_insn); goto done;
-          default : itype = MEPCOP1_16_INSN_X_INVALID; mepcop1_16_extract_sfmt_empty (this, current_cpu, pc, base_insn, entire_insn); goto done;
-          }
-        }
+        if ((entire_insn & 0xfffffe0f) == 0x881e00)
+          { itype = MEPCOP1_16_INSN_CPMOVFRCSAR1_P0S_P1; mepcop1_16_extract_sfmt_cpmovfrcsar0_P0S_P1 (this, current_cpu, pc, base_insn, entire_insn); goto done; }
+        itype = MEPCOP1_16_INSN_X_INVALID; mepcop1_16_extract_sfmt_empty (this, current_cpu, pc, base_insn, entire_insn); goto done;
       case 1152 : /* fall through */
       case 1184 :
         if ((entire_insn & 0xfff801ff) == 0x900000)
@@ -1495,6 +1498,41 @@ mepcop1_16_scache::decode (mep_ext1_cpu* current_cpu, PCADDR pc, mepcop1_16_insn
         if ((entire_insn & 0xfff801ff) == 0x9001d0)
           { itype = MEPCOP1_16_INSN_CPCMPGE_W_P0S_P1; mepcop1_16_extract_sfmt_cpcmpeqz_b_P0S_P1 (this, current_cpu, pc, base_insn, entire_insn); goto done; }
         itype = MEPCOP1_16_INSN_X_INVALID; mepcop1_16_extract_sfmt_empty (this, current_cpu, pc, base_insn, entire_insn); goto done;
+      case 1408 : /* fall through */
+      case 1409 : /* fall through */
+      case 1410 : /* fall through */
+      case 1411 : /* fall through */
+      case 1412 : /* fall through */
+      case 1413 : /* fall through */
+      case 1414 : /* fall through */
+      case 1415 : /* fall through */
+      case 1416 : /* fall through */
+      case 1417 : /* fall through */
+      case 1418 : /* fall through */
+      case 1419 : /* fall through */
+      case 1420 : /* fall through */
+      case 1421 : /* fall through */
+      case 1422 : /* fall through */
+      case 1423 : /* fall through */
+      case 1424 : /* fall through */
+      case 1425 : /* fall through */
+      case 1426 : /* fall through */
+      case 1427 : /* fall through */
+      case 1428 : /* fall through */
+      case 1429 : /* fall through */
+      case 1430 : /* fall through */
+      case 1431 : /* fall through */
+      case 1432 : /* fall through */
+      case 1433 : /* fall through */
+      case 1434 : /* fall through */
+      case 1435 : /* fall through */
+      case 1436 : /* fall through */
+      case 1437 : /* fall through */
+      case 1438 : /* fall through */
+      case 1439 :
+        if ((entire_insn & 0xfff8300f) == 0xb00000)
+          { itype = MEPCOP1_16_INSN_CPMOVI_B_P0S_P1; mepcop1_16_extract_sfmt_cpmovi_b_P0S_P1 (this, current_cpu, pc, base_insn, entire_insn); goto done; }
+        itype = MEPCOP1_16_INSN_X_INVALID; mepcop1_16_extract_sfmt_empty (this, current_cpu, pc, base_insn, entire_insn); goto done;
       case 1536 : /* fall through */
       case 1568 :
         if ((entire_insn & 0xfff801ff) == 0xc00000)
@@ -1632,56 +1670,44 @@ mepcop1_16_scache::decode (mep_ext1_cpu* current_cpu, PCADDR pc, mepcop1_16_insn
         itype = MEPCOP1_16_INSN_X_INVALID; mepcop1_16_extract_sfmt_empty (this, current_cpu, pc, base_insn, entire_insn); goto done;
       case 1600 :
         {
-          unsigned int val = (((insn >> 10) & (15 << 0)));
+          unsigned int val = (((insn >> 10) & (1 << 3)) | ((insn >> 9) & (7 << 0)));
           switch (val)
           {
           case 1 :
-            if ((entire_insn & 0xfffffe0f) == 0xc80400)
-              { itype = MEPCOP1_16_INSN_CPMOVUA0_H_P0S; mepcop1_16_extract_sfmt_cpmovfrcsar0_P0S_P1 (this, current_cpu, pc, base_insn, entire_insn); goto done; }
+            if ((entire_insn & 0xfffffe0f) == 0xc80200)
+              { itype = MEPCOP1_16_INSN_CPMOVA0_B_P0S; mepcop1_16_extract_sfmt_cpmovfrcsar0_P0S_P1 (this, current_cpu, pc, base_insn, entire_insn); goto done; }
             itype = MEPCOP1_16_INSN_X_INVALID; mepcop1_16_extract_sfmt_empty (this, current_cpu, pc, base_insn, entire_insn); goto done;
           case 2 :
-            if ((entire_insn & 0xfffffe0f) == 0xc80800)
-              { itype = MEPCOP1_16_INSN_CPMOVUUA0_W_P0S; mepcop1_16_extract_sfmt_cpmovfrcsar0_P0S_P1 (this, current_cpu, pc, base_insn, entire_insn); goto done; }
+            if ((entire_insn & 0xfffffe0f) == 0xc80400)
+              { itype = MEPCOP1_16_INSN_CPMOVUA0_H_P0S; mepcop1_16_extract_sfmt_cpmovfrcsar0_P0S_P1 (this, current_cpu, pc, base_insn, entire_insn); goto done; }
             itype = MEPCOP1_16_INSN_X_INVALID; mepcop1_16_extract_sfmt_empty (this, current_cpu, pc, base_insn, entire_insn); goto done;
           case 3 :
-            if ((entire_insn & 0xfffffe0f) == 0xc80c00)
-              { itype = MEPCOP1_16_INSN_CPMOVLUA0_W_P0S; mepcop1_16_extract_sfmt_cpmovfrcsar0_P0S_P1 (this, current_cpu, pc, base_insn, entire_insn); goto done; }
+            if ((entire_insn & 0xfffffe0f) == 0xc80600)
+              { itype = MEPCOP1_16_INSN_CPMOVLA0_H_P0S; mepcop1_16_extract_sfmt_cpmovfrcsar0_P0S_P1 (this, current_cpu, pc, base_insn, entire_insn); goto done; }
             itype = MEPCOP1_16_INSN_X_INVALID; mepcop1_16_extract_sfmt_empty (this, current_cpu, pc, base_insn, entire_insn); goto done;
           case 4 :
-            if ((entire_insn & 0xfffffe0f) == 0xc81000)
-              { itype = MEPCOP1_16_INSN_CPPACKA0U_B_P0S; mepcop1_16_extract_sfmt_cpmovfrcsar0_P0S_P1 (this, current_cpu, pc, base_insn, entire_insn); goto done; }
+            if ((entire_insn & 0xfffffe0f) == 0xc80800)
+              { itype = MEPCOP1_16_INSN_CPMOVUUA0_W_P0S; mepcop1_16_extract_sfmt_cpmovfrcsar0_P0S_P1 (this, current_cpu, pc, base_insn, entire_insn); goto done; }
             itype = MEPCOP1_16_INSN_X_INVALID; mepcop1_16_extract_sfmt_empty (this, current_cpu, pc, base_insn, entire_insn); goto done;
           case 5 :
-            if ((entire_insn & 0xfffffe0f) == 0xc81400)
-              { itype = MEPCOP1_16_INSN_CPPACKUA0_H_P0S; mepcop1_16_extract_sfmt_cpmovfrcsar0_P0S_P1 (this, current_cpu, pc, base_insn, entire_insn); goto done; }
+            if ((entire_insn & 0xfffffe0f) == 0xc80a00)
+              { itype = MEPCOP1_16_INSN_CPMOVULA0_W_P0S; mepcop1_16_extract_sfmt_cpmovfrcsar0_P0S_P1 (this, current_cpu, pc, base_insn, entire_insn); goto done; }
             itype = MEPCOP1_16_INSN_X_INVALID; mepcop1_16_extract_sfmt_empty (this, current_cpu, pc, base_insn, entire_insn); goto done;
           case 6 :
-            if ((entire_insn & 0xfffffe0f) == 0xc81800)
-              { itype = MEPCOP1_16_INSN_CPPACKUA0_W_P0S; mepcop1_16_extract_sfmt_cpmovfrcsar0_P0S_P1 (this, current_cpu, pc, base_insn, entire_insn); goto done; }
+            if ((entire_insn & 0xfffffe0f) == 0xc80c00)
+              { itype = MEPCOP1_16_INSN_CPMOVLUA0_W_P0S; mepcop1_16_extract_sfmt_cpmovfrcsar0_P0S_P1 (this, current_cpu, pc, base_insn, entire_insn); goto done; }
             itype = MEPCOP1_16_INSN_X_INVALID; mepcop1_16_extract_sfmt_empty (this, current_cpu, pc, base_insn, entire_insn); goto done;
           case 7 :
-            if ((entire_insn & 0xfffffe0f) == 0xc81c00)
-              { itype = MEPCOP1_16_INSN_CPMOVHUA0_W_P0S; mepcop1_16_extract_sfmt_cpmovfrcsar0_P0S_P1 (this, current_cpu, pc, base_insn, entire_insn); goto done; }
+            if ((entire_insn & 0xfffffe0f) == 0xc80e00)
+              { itype = MEPCOP1_16_INSN_CPMOVLLA0_W_P0S; mepcop1_16_extract_sfmt_cpmovfrcsar0_P0S_P1 (this, current_cpu, pc, base_insn, entire_insn); goto done; }
             itype = MEPCOP1_16_INSN_X_INVALID; mepcop1_16_extract_sfmt_empty (this, current_cpu, pc, base_insn, entire_insn); goto done;
           case 8 :
             if ((entire_insn & 0xffffffff) == 0xc82000)
               { itype = MEPCOP1_16_INSN_CPACSUMA0_P0S; mepcop1_16_extract_sfmt_c0nop_P0_P0S (this, current_cpu, pc, base_insn, entire_insn); goto done; }
             itype = MEPCOP1_16_INSN_X_INVALID; mepcop1_16_extract_sfmt_empty (this, current_cpu, pc, base_insn, entire_insn); goto done;
-          case 12 :
-            if ((entire_insn & 0xfff83fff) == 0xc83000)
-              { itype = MEPCOP1_16_INSN_CPSRLA0_P0S; mepcop1_16_extract_sfmt_cpmovtocsar0_P0S_P1 (this, current_cpu, pc, base_insn, entire_insn); goto done; }
-            itype = MEPCOP1_16_INSN_X_INVALID; mepcop1_16_extract_sfmt_empty (this, current_cpu, pc, base_insn, entire_insn); goto done;
-          case 13 :
-            if ((entire_insn & 0xfff83fff) == 0xc83400)
-              { itype = MEPCOP1_16_INSN_CPSLLA0_P0S; mepcop1_16_extract_sfmt_cpmovtocsar0_P0S_P1 (this, current_cpu, pc, base_insn, entire_insn); goto done; }
-            itype = MEPCOP1_16_INSN_X_INVALID; mepcop1_16_extract_sfmt_empty (this, current_cpu, pc, base_insn, entire_insn); goto done;
-          case 14 :
-            if ((entire_insn & 0xfffffe0f) == 0xc83800)
-              { itype = MEPCOP1_16_INSN_CPSRLIA0_P0S; mepcop1_16_extract_sfmt_cpsrlia0_P0S (this, current_cpu, pc, base_insn, entire_insn); goto done; }
-            itype = MEPCOP1_16_INSN_X_INVALID; mepcop1_16_extract_sfmt_empty (this, current_cpu, pc, base_insn, entire_insn); goto done;
-          case 15 :
-            if ((entire_insn & 0xfffffe0f) == 0xc83c00)
-              { itype = MEPCOP1_16_INSN_CPSLLIA0_P0S; mepcop1_16_extract_sfmt_cpsrlia0_P0S (this, current_cpu, pc, base_insn, entire_insn); goto done; }
+          case 9 :
+            if ((entire_insn & 0xffffffff) == 0xc82200)
+              { itype = MEPCOP1_16_INSN_CPACCPA0_P0S; mepcop1_16_extract_sfmt_c0nop_P0_P0S (this, current_cpu, pc, base_insn, entire_insn); goto done; }
             itype = MEPCOP1_16_INSN_X_INVALID; mepcop1_16_extract_sfmt_empty (this, current_cpu, pc, base_insn, entire_insn); goto done;
           default : itype = MEPCOP1_16_INSN_X_INVALID; mepcop1_16_extract_sfmt_empty (this, current_cpu, pc, base_insn, entire_insn); goto done;
           }
@@ -1718,97 +1744,101 @@ mepcop1_16_scache::decode (mep_ext1_cpu* current_cpu, PCADDR pc, mepcop1_16_insn
       case 1630 : /* fall through */
       case 1631 :
         {
-          unsigned int val = (((insn >> 10) & (15 << 0)));
+          unsigned int val = (((insn >> 9) & (7 << 0)));
           switch (val)
           {
           case 1 :
-            if ((entire_insn & 0xfffffe0f) == 0xc80400)
-              { itype = MEPCOP1_16_INSN_CPMOVUA0_H_P0S; mepcop1_16_extract_sfmt_cpmovfrcsar0_P0S_P1 (this, current_cpu, pc, base_insn, entire_insn); goto done; }
+            if ((entire_insn & 0xfffffe0f) == 0xc80200)
+              { itype = MEPCOP1_16_INSN_CPMOVA0_B_P0S; mepcop1_16_extract_sfmt_cpmovfrcsar0_P0S_P1 (this, current_cpu, pc, base_insn, entire_insn); goto done; }
             itype = MEPCOP1_16_INSN_X_INVALID; mepcop1_16_extract_sfmt_empty (this, current_cpu, pc, base_insn, entire_insn); goto done;
           case 2 :
-            if ((entire_insn & 0xfffffe0f) == 0xc80800)
-              { itype = MEPCOP1_16_INSN_CPMOVUUA0_W_P0S; mepcop1_16_extract_sfmt_cpmovfrcsar0_P0S_P1 (this, current_cpu, pc, base_insn, entire_insn); goto done; }
+            if ((entire_insn & 0xfffffe0f) == 0xc80400)
+              { itype = MEPCOP1_16_INSN_CPMOVUA0_H_P0S; mepcop1_16_extract_sfmt_cpmovfrcsar0_P0S_P1 (this, current_cpu, pc, base_insn, entire_insn); goto done; }
             itype = MEPCOP1_16_INSN_X_INVALID; mepcop1_16_extract_sfmt_empty (this, current_cpu, pc, base_insn, entire_insn); goto done;
           case 3 :
-            if ((entire_insn & 0xfffffe0f) == 0xc80c00)
-              { itype = MEPCOP1_16_INSN_CPMOVLUA0_W_P0S; mepcop1_16_extract_sfmt_cpmovfrcsar0_P0S_P1 (this, current_cpu, pc, base_insn, entire_insn); goto done; }
+            if ((entire_insn & 0xfffffe0f) == 0xc80600)
+              { itype = MEPCOP1_16_INSN_CPMOVLA0_H_P0S; mepcop1_16_extract_sfmt_cpmovfrcsar0_P0S_P1 (this, current_cpu, pc, base_insn, entire_insn); goto done; }
             itype = MEPCOP1_16_INSN_X_INVALID; mepcop1_16_extract_sfmt_empty (this, current_cpu, pc, base_insn, entire_insn); goto done;
           case 4 :
-            if ((entire_insn & 0xfffffe0f) == 0xc81000)
-              { itype = MEPCOP1_16_INSN_CPPACKA0U_B_P0S; mepcop1_16_extract_sfmt_cpmovfrcsar0_P0S_P1 (this, current_cpu, pc, base_insn, entire_insn); goto done; }
+            if ((entire_insn & 0xfffffe0f) == 0xc80800)
+              { itype = MEPCOP1_16_INSN_CPMOVUUA0_W_P0S; mepcop1_16_extract_sfmt_cpmovfrcsar0_P0S_P1 (this, current_cpu, pc, base_insn, entire_insn); goto done; }
             itype = MEPCOP1_16_INSN_X_INVALID; mepcop1_16_extract_sfmt_empty (this, current_cpu, pc, base_insn, entire_insn); goto done;
           case 5 :
-            if ((entire_insn & 0xfffffe0f) == 0xc81400)
-              { itype = MEPCOP1_16_INSN_CPPACKUA0_H_P0S; mepcop1_16_extract_sfmt_cpmovfrcsar0_P0S_P1 (this, current_cpu, pc, base_insn, entire_insn); goto done; }
+            if ((entire_insn & 0xfffffe0f) == 0xc80a00)
+              { itype = MEPCOP1_16_INSN_CPMOVULA0_W_P0S; mepcop1_16_extract_sfmt_cpmovfrcsar0_P0S_P1 (this, current_cpu, pc, base_insn, entire_insn); goto done; }
             itype = MEPCOP1_16_INSN_X_INVALID; mepcop1_16_extract_sfmt_empty (this, current_cpu, pc, base_insn, entire_insn); goto done;
           case 6 :
-            if ((entire_insn & 0xfffffe0f) == 0xc81800)
-              { itype = MEPCOP1_16_INSN_CPPACKUA0_W_P0S; mepcop1_16_extract_sfmt_cpmovfrcsar0_P0S_P1 (this, current_cpu, pc, base_insn, entire_insn); goto done; }
+            if ((entire_insn & 0xfffffe0f) == 0xc80c00)
+              { itype = MEPCOP1_16_INSN_CPMOVLUA0_W_P0S; mepcop1_16_extract_sfmt_cpmovfrcsar0_P0S_P1 (this, current_cpu, pc, base_insn, entire_insn); goto done; }
             itype = MEPCOP1_16_INSN_X_INVALID; mepcop1_16_extract_sfmt_empty (this, current_cpu, pc, base_insn, entire_insn); goto done;
           case 7 :
-            if ((entire_insn & 0xfffffe0f) == 0xc81c00)
-              { itype = MEPCOP1_16_INSN_CPMOVHUA0_W_P0S; mepcop1_16_extract_sfmt_cpmovfrcsar0_P0S_P1 (this, current_cpu, pc, base_insn, entire_insn); goto done; }
-            itype = MEPCOP1_16_INSN_X_INVALID; mepcop1_16_extract_sfmt_empty (this, current_cpu, pc, base_insn, entire_insn); goto done;
-          case 14 :
-            if ((entire_insn & 0xfffffe0f) == 0xc83800)
-              { itype = MEPCOP1_16_INSN_CPSRLIA0_P0S; mepcop1_16_extract_sfmt_cpsrlia0_P0S (this, current_cpu, pc, base_insn, entire_insn); goto done; }
-            itype = MEPCOP1_16_INSN_X_INVALID; mepcop1_16_extract_sfmt_empty (this, current_cpu, pc, base_insn, entire_insn); goto done;
-          case 15 :
-            if ((entire_insn & 0xfffffe0f) == 0xc83c00)
-              { itype = MEPCOP1_16_INSN_CPSLLIA0_P0S; mepcop1_16_extract_sfmt_cpsrlia0_P0S (this, current_cpu, pc, base_insn, entire_insn); goto done; }
+            if ((entire_insn & 0xfffffe0f) == 0xc80e00)
+              { itype = MEPCOP1_16_INSN_CPMOVLLA0_W_P0S; mepcop1_16_extract_sfmt_cpmovfrcsar0_P0S_P1 (this, current_cpu, pc, base_insn, entire_insn); goto done; }
             itype = MEPCOP1_16_INSN_X_INVALID; mepcop1_16_extract_sfmt_empty (this, current_cpu, pc, base_insn, entire_insn); goto done;
           default : itype = MEPCOP1_16_INSN_X_INVALID; mepcop1_16_extract_sfmt_empty (this, current_cpu, pc, base_insn, entire_insn); goto done;
           }
         }
       case 1632 :
         {
-          unsigned int val = (((insn >> 10) & (15 << 0)));
+          unsigned int val = (((insn >> 10) & (1 << 3)) | ((insn >> 9) & (7 << 0)));
           switch (val)
           {
           case 0 :
-            if ((entire_insn & 0xfffffe0f) == 0xc80200)
-              { itype = MEPCOP1_16_INSN_CPMOVA0_B_P0S; mepcop1_16_extract_sfmt_cpmovfrcsar0_P0S_P1 (this, current_cpu, pc, base_insn, entire_insn); goto done; }
+            if ((entire_insn & 0xfffffe0f) == 0xc81000)
+              { itype = MEPCOP1_16_INSN_CPPACKA0U_B_P0S; mepcop1_16_extract_sfmt_cpmovfrcsar0_P0S_P1 (this, current_cpu, pc, base_insn, entire_insn); goto done; }
             itype = MEPCOP1_16_INSN_X_INVALID; mepcop1_16_extract_sfmt_empty (this, current_cpu, pc, base_insn, entire_insn); goto done;
           case 1 :
-            if ((entire_insn & 0xfffffe0f) == 0xc80600)
-              { itype = MEPCOP1_16_INSN_CPMOVLA0_H_P0S; mepcop1_16_extract_sfmt_cpmovfrcsar0_P0S_P1 (this, current_cpu, pc, base_insn, entire_insn); goto done; }
+            if ((entire_insn & 0xfffffe0f) == 0xc81200)
+              { itype = MEPCOP1_16_INSN_CPPACKA0_B_P0S; mepcop1_16_extract_sfmt_cpmovfrcsar0_P0S_P1 (this, current_cpu, pc, base_insn, entire_insn); goto done; }
             itype = MEPCOP1_16_INSN_X_INVALID; mepcop1_16_extract_sfmt_empty (this, current_cpu, pc, base_insn, entire_insn); goto done;
           case 2 :
-            if ((entire_insn & 0xfffffe0f) == 0xc80a00)
-              { itype = MEPCOP1_16_INSN_CPMOVULA0_W_P0S; mepcop1_16_extract_sfmt_cpmovfrcsar0_P0S_P1 (this, current_cpu, pc, base_insn, entire_insn); goto done; }
+            if ((entire_insn & 0xfffffe0f) == 0xc81400)
+              { itype = MEPCOP1_16_INSN_CPPACKUA0_H_P0S; mepcop1_16_extract_sfmt_cpmovfrcsar0_P0S_P1 (this, current_cpu, pc, base_insn, entire_insn); goto done; }
             itype = MEPCOP1_16_INSN_X_INVALID; mepcop1_16_extract_sfmt_empty (this, current_cpu, pc, base_insn, entire_insn); goto done;
           case 3 :
-            if ((entire_insn & 0xfffffe0f) == 0xc80e00)
-              { itype = MEPCOP1_16_INSN_CPMOVLLA0_W_P0S; mepcop1_16_extract_sfmt_cpmovfrcsar0_P0S_P1 (this, current_cpu, pc, base_insn, entire_insn); goto done; }
+            if ((entire_insn & 0xfffffe0f) == 0xc81600)
+              { itype = MEPCOP1_16_INSN_CPPACKLA0_H_P0S; mepcop1_16_extract_sfmt_cpmovfrcsar0_P0S_P1 (this, current_cpu, pc, base_insn, entire_insn); goto done; }
             itype = MEPCOP1_16_INSN_X_INVALID; mepcop1_16_extract_sfmt_empty (this, current_cpu, pc, base_insn, entire_insn); goto done;
           case 4 :
-            if ((entire_insn & 0xfffffe0f) == 0xc81200)
-              { itype = MEPCOP1_16_INSN_CPPACKA0_B_P0S; mepcop1_16_extract_sfmt_cpmovfrcsar0_P0S_P1 (this, current_cpu, pc, base_insn, entire_insn); goto done; }
+            if ((entire_insn & 0xfffffe0f) == 0xc81800)
+              { itype = MEPCOP1_16_INSN_CPPACKUA0_W_P0S; mepcop1_16_extract_sfmt_cpmovfrcsar0_P0S_P1 (this, current_cpu, pc, base_insn, entire_insn); goto done; }
             itype = MEPCOP1_16_INSN_X_INVALID; mepcop1_16_extract_sfmt_empty (this, current_cpu, pc, base_insn, entire_insn); goto done;
           case 5 :
-            if ((entire_insn & 0xfffffe0f) == 0xc81600)
-              { itype = MEPCOP1_16_INSN_CPPACKLA0_H_P0S; mepcop1_16_extract_sfmt_cpmovfrcsar0_P0S_P1 (this, current_cpu, pc, base_insn, entire_insn); goto done; }
-            itype = MEPCOP1_16_INSN_X_INVALID; mepcop1_16_extract_sfmt_empty (this, current_cpu, pc, base_insn, entire_insn); goto done;
-          case 6 :
             if ((entire_insn & 0xfffffe0f) == 0xc81a00)
               { itype = MEPCOP1_16_INSN_CPPACKLA0_W_P0S; mepcop1_16_extract_sfmt_cpmovfrcsar0_P0S_P1 (this, current_cpu, pc, base_insn, entire_insn); goto done; }
             itype = MEPCOP1_16_INSN_X_INVALID; mepcop1_16_extract_sfmt_empty (this, current_cpu, pc, base_insn, entire_insn); goto done;
+          case 6 :
+            if ((entire_insn & 0xfffffe0f) == 0xc81c00)
+              { itype = MEPCOP1_16_INSN_CPMOVHUA0_W_P0S; mepcop1_16_extract_sfmt_cpmovfrcsar0_P0S_P1 (this, current_cpu, pc, base_insn, entire_insn); goto done; }
+            itype = MEPCOP1_16_INSN_X_INVALID; mepcop1_16_extract_sfmt_empty (this, current_cpu, pc, base_insn, entire_insn); goto done;
           case 7 :
             if ((entire_insn & 0xfffffe0f) == 0xc81e00)
               { itype = MEPCOP1_16_INSN_CPMOVHLA0_W_P0S; mepcop1_16_extract_sfmt_cpmovfrcsar0_P0S_P1 (this, current_cpu, pc, base_insn, entire_insn); goto done; }
             itype = MEPCOP1_16_INSN_X_INVALID; mepcop1_16_extract_sfmt_empty (this, current_cpu, pc, base_insn, entire_insn); goto done;
           case 8 :
-            if ((entire_insn & 0xffffffff) == 0xc82200)
-              { itype = MEPCOP1_16_INSN_CPACCPA0_P0S; mepcop1_16_extract_sfmt_c0nop_P0_P0S (this, current_cpu, pc, base_insn, entire_insn); goto done; }
+            if ((entire_insn & 0xfff83fff) == 0xc83000)
+              { itype = MEPCOP1_16_INSN_CPSRLA0_P0S; mepcop1_16_extract_sfmt_cpmovtocsar0_P0S_P1 (this, current_cpu, pc, base_insn, entire_insn); goto done; }
             itype = MEPCOP1_16_INSN_X_INVALID; mepcop1_16_extract_sfmt_empty (this, current_cpu, pc, base_insn, entire_insn); goto done;
-          case 12 :
+          case 9 :
             if ((entire_insn & 0xfff83fff) == 0xc83200)
               { itype = MEPCOP1_16_INSN_CPSRAA0_P0S; mepcop1_16_extract_sfmt_cpmovtocsar0_P0S_P1 (this, current_cpu, pc, base_insn, entire_insn); goto done; }
             itype = MEPCOP1_16_INSN_X_INVALID; mepcop1_16_extract_sfmt_empty (this, current_cpu, pc, base_insn, entire_insn); goto done;
-          case 14 :
+          case 10 :
+            if ((entire_insn & 0xfff83fff) == 0xc83400)
+              { itype = MEPCOP1_16_INSN_CPSLLA0_P0S; mepcop1_16_extract_sfmt_cpmovtocsar0_P0S_P1 (this, current_cpu, pc, base_insn, entire_insn); goto done; }
+            itype = MEPCOP1_16_INSN_X_INVALID; mepcop1_16_extract_sfmt_empty (this, current_cpu, pc, base_insn, entire_insn); goto done;
+          case 12 :
+            if ((entire_insn & 0xfffffe0f) == 0xc83800)
+              { itype = MEPCOP1_16_INSN_CPSRLIA0_P0S; mepcop1_16_extract_sfmt_cpsrlia0_P0S (this, current_cpu, pc, base_insn, entire_insn); goto done; }
+            itype = MEPCOP1_16_INSN_X_INVALID; mepcop1_16_extract_sfmt_empty (this, current_cpu, pc, base_insn, entire_insn); goto done;
+          case 13 :
             if ((entire_insn & 0xfffffe0f) == 0xc83a00)
               { itype = MEPCOP1_16_INSN_CPSRAIA0_P0S; mepcop1_16_extract_sfmt_cpsrlia0_P0S (this, current_cpu, pc, base_insn, entire_insn); goto done; }
             itype = MEPCOP1_16_INSN_X_INVALID; mepcop1_16_extract_sfmt_empty (this, current_cpu, pc, base_insn, entire_insn); goto done;
+          case 14 :
+            if ((entire_insn & 0xfffffe0f) == 0xc83c00)
+              { itype = MEPCOP1_16_INSN_CPSLLIA0_P0S; mepcop1_16_extract_sfmt_cpsrlia0_P0S (this, current_cpu, pc, base_insn, entire_insn); goto done; }
+            itype = MEPCOP1_16_INSN_X_INVALID; mepcop1_16_extract_sfmt_empty (this, current_cpu, pc, base_insn, entire_insn); goto done;
           default : itype = MEPCOP1_16_INSN_X_INVALID; mepcop1_16_extract_sfmt_empty (this, current_cpu, pc, base_insn, entire_insn); goto done;
           }
         }
@@ -1844,45 +1874,53 @@ mepcop1_16_scache::decode (mep_ext1_cpu* current_cpu, PCADDR pc, mepcop1_16_insn
       case 1662 : /* fall through */
       case 1663 :
         {
-          unsigned int val = (((insn >> 10) & (15 << 0)));
+          unsigned int val = (((insn >> 10) & (1 << 3)) | ((insn >> 9) & (7 << 0)));
           switch (val)
           {
           case 0 :
-            if ((entire_insn & 0xfffffe0f) == 0xc80200)
-              { itype = MEPCOP1_16_INSN_CPMOVA0_B_P0S; mepcop1_16_extract_sfmt_cpmovfrcsar0_P0S_P1 (this, current_cpu, pc, base_insn, entire_insn); goto done; }
+            if ((entire_insn & 0xfffffe0f) == 0xc81000)
+              { itype = MEPCOP1_16_INSN_CPPACKA0U_B_P0S; mepcop1_16_extract_sfmt_cpmovfrcsar0_P0S_P1 (this, current_cpu, pc, base_insn, entire_insn); goto done; }
             itype = MEPCOP1_16_INSN_X_INVALID; mepcop1_16_extract_sfmt_empty (this, current_cpu, pc, base_insn, entire_insn); goto done;
           case 1 :
-            if ((entire_insn & 0xfffffe0f) == 0xc80600)
-              { itype = MEPCOP1_16_INSN_CPMOVLA0_H_P0S; mepcop1_16_extract_sfmt_cpmovfrcsar0_P0S_P1 (this, current_cpu, pc, base_insn, entire_insn); goto done; }
+            if ((entire_insn & 0xfffffe0f) == 0xc81200)
+              { itype = MEPCOP1_16_INSN_CPPACKA0_B_P0S; mepcop1_16_extract_sfmt_cpmovfrcsar0_P0S_P1 (this, current_cpu, pc, base_insn, entire_insn); goto done; }
             itype = MEPCOP1_16_INSN_X_INVALID; mepcop1_16_extract_sfmt_empty (this, current_cpu, pc, base_insn, entire_insn); goto done;
           case 2 :
-            if ((entire_insn & 0xfffffe0f) == 0xc80a00)
-              { itype = MEPCOP1_16_INSN_CPMOVULA0_W_P0S; mepcop1_16_extract_sfmt_cpmovfrcsar0_P0S_P1 (this, current_cpu, pc, base_insn, entire_insn); goto done; }
+            if ((entire_insn & 0xfffffe0f) == 0xc81400)
+              { itype = MEPCOP1_16_INSN_CPPACKUA0_H_P0S; mepcop1_16_extract_sfmt_cpmovfrcsar0_P0S_P1 (this, current_cpu, pc, base_insn, entire_insn); goto done; }
             itype = MEPCOP1_16_INSN_X_INVALID; mepcop1_16_extract_sfmt_empty (this, current_cpu, pc, base_insn, entire_insn); goto done;
           case 3 :
-            if ((entire_insn & 0xfffffe0f) == 0xc80e00)
-              { itype = MEPCOP1_16_INSN_CPMOVLLA0_W_P0S; mepcop1_16_extract_sfmt_cpmovfrcsar0_P0S_P1 (this, current_cpu, pc, base_insn, entire_insn); goto done; }
+            if ((entire_insn & 0xfffffe0f) == 0xc81600)
+              { itype = MEPCOP1_16_INSN_CPPACKLA0_H_P0S; mepcop1_16_extract_sfmt_cpmovfrcsar0_P0S_P1 (this, current_cpu, pc, base_insn, entire_insn); goto done; }
             itype = MEPCOP1_16_INSN_X_INVALID; mepcop1_16_extract_sfmt_empty (this, current_cpu, pc, base_insn, entire_insn); goto done;
           case 4 :
-            if ((entire_insn & 0xfffffe0f) == 0xc81200)
-              { itype = MEPCOP1_16_INSN_CPPACKA0_B_P0S; mepcop1_16_extract_sfmt_cpmovfrcsar0_P0S_P1 (this, current_cpu, pc, base_insn, entire_insn); goto done; }
+            if ((entire_insn & 0xfffffe0f) == 0xc81800)
+              { itype = MEPCOP1_16_INSN_CPPACKUA0_W_P0S; mepcop1_16_extract_sfmt_cpmovfrcsar0_P0S_P1 (this, current_cpu, pc, base_insn, entire_insn); goto done; }
             itype = MEPCOP1_16_INSN_X_INVALID; mepcop1_16_extract_sfmt_empty (this, current_cpu, pc, base_insn, entire_insn); goto done;
           case 5 :
-            if ((entire_insn & 0xfffffe0f) == 0xc81600)
-              { itype = MEPCOP1_16_INSN_CPPACKLA0_H_P0S; mepcop1_16_extract_sfmt_cpmovfrcsar0_P0S_P1 (this, current_cpu, pc, base_insn, entire_insn); goto done; }
-            itype = MEPCOP1_16_INSN_X_INVALID; mepcop1_16_extract_sfmt_empty (this, current_cpu, pc, base_insn, entire_insn); goto done;
-          case 6 :
             if ((entire_insn & 0xfffffe0f) == 0xc81a00)
               { itype = MEPCOP1_16_INSN_CPPACKLA0_W_P0S; mepcop1_16_extract_sfmt_cpmovfrcsar0_P0S_P1 (this, current_cpu, pc, base_insn, entire_insn); goto done; }
             itype = MEPCOP1_16_INSN_X_INVALID; mepcop1_16_extract_sfmt_empty (this, current_cpu, pc, base_insn, entire_insn); goto done;
+          case 6 :
+            if ((entire_insn & 0xfffffe0f) == 0xc81c00)
+              { itype = MEPCOP1_16_INSN_CPMOVHUA0_W_P0S; mepcop1_16_extract_sfmt_cpmovfrcsar0_P0S_P1 (this, current_cpu, pc, base_insn, entire_insn); goto done; }
+            itype = MEPCOP1_16_INSN_X_INVALID; mepcop1_16_extract_sfmt_empty (this, current_cpu, pc, base_insn, entire_insn); goto done;
           case 7 :
             if ((entire_insn & 0xfffffe0f) == 0xc81e00)
               { itype = MEPCOP1_16_INSN_CPMOVHLA0_W_P0S; mepcop1_16_extract_sfmt_cpmovfrcsar0_P0S_P1 (this, current_cpu, pc, base_insn, entire_insn); goto done; }
             itype = MEPCOP1_16_INSN_X_INVALID; mepcop1_16_extract_sfmt_empty (this, current_cpu, pc, base_insn, entire_insn); goto done;
-          case 14 :
+          case 12 :
+            if ((entire_insn & 0xfffffe0f) == 0xc83800)
+              { itype = MEPCOP1_16_INSN_CPSRLIA0_P0S; mepcop1_16_extract_sfmt_cpsrlia0_P0S (this, current_cpu, pc, base_insn, entire_insn); goto done; }
+            itype = MEPCOP1_16_INSN_X_INVALID; mepcop1_16_extract_sfmt_empty (this, current_cpu, pc, base_insn, entire_insn); goto done;
+          case 13 :
             if ((entire_insn & 0xfffffe0f) == 0xc83a00)
               { itype = MEPCOP1_16_INSN_CPSRAIA0_P0S; mepcop1_16_extract_sfmt_cpsrlia0_P0S (this, current_cpu, pc, base_insn, entire_insn); goto done; }
             itype = MEPCOP1_16_INSN_X_INVALID; mepcop1_16_extract_sfmt_empty (this, current_cpu, pc, base_insn, entire_insn); goto done;
+          case 14 :
+            if ((entire_insn & 0xfffffe0f) == 0xc83c00)
+              { itype = MEPCOP1_16_INSN_CPSLLIA0_P0S; mepcop1_16_extract_sfmt_cpsrlia0_P0S (this, current_cpu, pc, base_insn, entire_insn); goto done; }
+            itype = MEPCOP1_16_INSN_X_INVALID; mepcop1_16_extract_sfmt_empty (this, current_cpu, pc, base_insn, entire_insn); goto done;
           default : itype = MEPCOP1_16_INSN_X_INVALID; mepcop1_16_extract_sfmt_empty (this, current_cpu, pc, base_insn, entire_insn); goto done;
           }
         }
@@ -2085,7 +2123,7 @@ mepcop1_16_extract_sfmt_cpmov_P0S_P1 (mepcop1_16_scache* abuf, mep_ext1_cpu* cur
 void
 mepcop1_16_extract_sfmt_cpccadd_b_P0S_P1 (mepcop1_16_scache* abuf, mep_ext1_cpu* current_cpu, PCADDR pc, mepcop1_16_insn_word base_insn, mepcop1_16_insn_word entire_insn){
     mepcop1_16_insn_word insn = entire_insn;
-#define FLD(f) abuf->fields.sfmt_cpadd3_b_P0S_P1.f
+#define FLD(f) abuf->fields.sfmt_cpmovi_b_P0S_P1.f
     UINT f_ivc2_5u13;
 
     f_ivc2_5u13 = EXTRACT_MSB0_UINT (insn, 32, 13, 5);
@@ -2135,7 +2173,7 @@ mepcop1_16_extract_sfmt_cpmovfrcsar0_P0S_P1 (mepcop1_16_scache* abuf, mep_ext1_c
 void
 mepcop1_16_extract_sfmt_cpmovtocsar0_P0S_P1 (mepcop1_16_scache* abuf, mep_ext1_cpu* current_cpu, PCADDR pc, mepcop1_16_insn_word base_insn, mepcop1_16_insn_word entire_insn){
     mepcop1_16_insn_word insn = entire_insn;
-#define FLD(f) abuf->fields.sfmt_cpadd3_b_P0S_P1.f
+#define FLD(f) abuf->fields.sfmt_cpmovi_b_P0S_P1.f
     UINT f_ivc2_5u13;
 
     f_ivc2_5u13 = EXTRACT_MSB0_UINT (insn, 32, 13, 5);
@@ -2211,3 +2249,32 @@ mepcop1_16_extract_sfmt_cpsrlia0_P0S (mepcop1_16_scache* abuf, mep_ext1_cpu* cur
 #undef FLD
 }
 
+void
+mepcop1_16_extract_sfmt_cpmovi_b_P0S_P1 (mepcop1_16_scache* abuf, mep_ext1_cpu* current_cpu, PCADDR pc, mepcop1_16_insn_word base_insn, mepcop1_16_insn_word entire_insn){
+    mepcop1_16_insn_word insn = entire_insn;
+#define FLD(f) abuf->fields.sfmt_cpmovi_b_P0S_P1.f
+    UINT f_ivc2_5u13;
+    INT f_ivc2_8s20;
+
+    f_ivc2_5u13 = EXTRACT_MSB0_UINT (insn, 32, 13, 5);
+    f_ivc2_8s20 = EXTRACT_MSB0_INT (insn, 32, 20, 8);
+
+  /* Record the fields for the semantic handler.  */
+  FLD (f_ivc2_8s20) = f_ivc2_8s20;
+  FLD (f_ivc2_5u13) = f_ivc2_5u13;
+  if (UNLIKELY(current_cpu->trace_extract_p))
+    {
+      current_cpu->trace_stream 
+        << "0x" << hex << pc << dec << " (sfmt_cpmovi_b_P0S_P1)\t"
+        << " f_ivc2_8s20:0x" << hex << f_ivc2_8s20 << dec
+        << " f_ivc2_5u13:0x" << hex << f_ivc2_5u13 << dec
+        << endl;
+    }
+
+  /* Record the fields for profiling.  */
+  if (UNLIKELY (current_cpu->trace_counter_p || current_cpu->final_insn_count_p))
+    {
+    }
+#undef FLD
+}
+
index 9f65cbc..67cf1cc 100644 (file)
@@ -54,7 +54,7 @@ typedef enum mepcop1_16_insn_type {
  , MEPCOP1_16_INSN_CPFSFTBA0S0_B_P0S, MEPCOP1_16_INSN_CPFSFTBUA0S0_H_P0S, MEPCOP1_16_INSN_CPFSFTBLA0S0_H_P0S, MEPCOP1_16_INSN_CPFACA0S0U_B_P0S
  , MEPCOP1_16_INSN_CPFACA0S0_B_P0S, MEPCOP1_16_INSN_CPFACUA0S0_H_P0S, MEPCOP1_16_INSN_CPFACLA0S0_H_P0S, MEPCOP1_16_INSN_CPFSFTBA0S1U_B_P0S
  , MEPCOP1_16_INSN_CPFSFTBA0S1_B_P0S, MEPCOP1_16_INSN_CPFSFTBUA0S1_H_P0S, MEPCOP1_16_INSN_CPFSFTBLA0S1_H_P0S, MEPCOP1_16_INSN_CPFACA0S1U_B_P0S
- , MEPCOP1_16_INSN_CPFACA0S1_B_P0S, MEPCOP1_16_INSN_CPFACUA0S1_H_P0S, MEPCOP1_16_INSN_CPFACLA0S1_H_P0S
+ , MEPCOP1_16_INSN_CPFACA0S1_B_P0S, MEPCOP1_16_INSN_CPFACUA0S1_H_P0S, MEPCOP1_16_INSN_CPFACLA0S1_H_P0S, MEPCOP1_16_INSN_CPMOVI_B_P0S_P1
 } MEPCOP1_16_INSN_TYPE;
 
 
@@ -88,6 +88,10 @@ union mepcop1_16_sem_fields {
     int empty;
   } fmt_empty;
   struct { /*  */
+    INT f_ivc2_8s20;
+    UINT f_ivc2_5u13;
+  } sfmt_cpmovi_b_P0S_P1;
+  struct { /*  */
     UINT f_ivc2_5u13;
     UINT f_ivc2_5u18;
     UINT f_ivc2_5u23;
@@ -276,5 +280,6 @@ extern mepcop1_16_sem_fn mepcop1_16_sem_cpfaca0s1u_b_P0S;
 extern mepcop1_16_sem_fn mepcop1_16_sem_cpfaca0s1_b_P0S;
 extern mepcop1_16_sem_fn mepcop1_16_sem_cpfacua0s1_h_P0S;
 extern mepcop1_16_sem_fn mepcop1_16_sem_cpfacla0s1_h_P0S;
+extern mepcop1_16_sem_fn mepcop1_16_sem_cpmovi_b_P0S_P1;
 
 #endif /* MEPCOP1_16_DECODE_H */
index 36df94a..9336606 100644 (file)
@@ -780,7 +780,7 @@ mepcop1_16_mep_model::model_cphadd_w_P0S_P1_after (mep_ext1_cpu *current_cpu, me
 UINT
 mepcop1_16_mep_model::model_cpccadd_b_P0S_P1_before (mep_ext1_cpu *current_cpu, mepcop1_16_scache *sem)
 {
-#define FLD(f) abuf->fields.sfmt_cpadd3_b_P0S_P1.f
+#define FLD(f) abuf->fields.sfmt_cpmovi_b_P0S_P1.f
   const mepcop1_16_scache* abuf = sem;
   const mepcop1_16_idesc* idesc = abuf->idesc;
   int cycles = 0;
@@ -794,7 +794,7 @@ mepcop1_16_mep_model::model_cpccadd_b_P0S_P1_before (mep_ext1_cpu *current_cpu,
 UINT
 mepcop1_16_mep_model::model_cpccadd_b_P0S_P1_after (mep_ext1_cpu *current_cpu, mepcop1_16_scache *sem)
 {
-#define FLD(f) abuf->fields.sfmt_cpadd3_b_P0S_P1.f
+#define FLD(f) abuf->fields.sfmt_cpmovi_b_P0S_P1.f
   const mepcop1_16_scache* abuf = sem;
   const mepcop1_16_idesc* idesc = abuf->idesc;
   int cycles = 0;
@@ -1470,7 +1470,7 @@ mepcop1_16_mep_model::model_cpmovfrcc_P0S_P1_after (mep_ext1_cpu *current_cpu, m
 UINT
 mepcop1_16_mep_model::model_cpmovtocsar0_P0S_P1_before (mep_ext1_cpu *current_cpu, mepcop1_16_scache *sem)
 {
-#define FLD(f) abuf->fields.sfmt_cpadd3_b_P0S_P1.f
+#define FLD(f) abuf->fields.sfmt_cpmovi_b_P0S_P1.f
   const mepcop1_16_scache* abuf = sem;
   const mepcop1_16_idesc* idesc = abuf->idesc;
   int cycles = 0;
@@ -1484,7 +1484,7 @@ mepcop1_16_mep_model::model_cpmovtocsar0_P0S_P1_before (mep_ext1_cpu *current_cp
 UINT
 mepcop1_16_mep_model::model_cpmovtocsar0_P0S_P1_after (mep_ext1_cpu *current_cpu, mepcop1_16_scache *sem)
 {
-#define FLD(f) abuf->fields.sfmt_cpadd3_b_P0S_P1.f
+#define FLD(f) abuf->fields.sfmt_cpmovi_b_P0S_P1.f
   const mepcop1_16_scache* abuf = sem;
   const mepcop1_16_idesc* idesc = abuf->idesc;
   int cycles = 0;
@@ -1500,7 +1500,7 @@ mepcop1_16_mep_model::model_cpmovtocsar0_P0S_P1_after (mep_ext1_cpu *current_cpu
 UINT
 mepcop1_16_mep_model::model_cpmovtocsar1_P0S_P1_before (mep_ext1_cpu *current_cpu, mepcop1_16_scache *sem)
 {
-#define FLD(f) abuf->fields.sfmt_cpadd3_b_P0S_P1.f
+#define FLD(f) abuf->fields.sfmt_cpmovi_b_P0S_P1.f
   const mepcop1_16_scache* abuf = sem;
   const mepcop1_16_idesc* idesc = abuf->idesc;
   int cycles = 0;
@@ -1514,7 +1514,7 @@ mepcop1_16_mep_model::model_cpmovtocsar1_P0S_P1_before (mep_ext1_cpu *current_cp
 UINT
 mepcop1_16_mep_model::model_cpmovtocsar1_P0S_P1_after (mep_ext1_cpu *current_cpu, mepcop1_16_scache *sem)
 {
-#define FLD(f) abuf->fields.sfmt_cpadd3_b_P0S_P1.f
+#define FLD(f) abuf->fields.sfmt_cpmovi_b_P0S_P1.f
   const mepcop1_16_scache* abuf = sem;
   const mepcop1_16_idesc* idesc = abuf->idesc;
   int cycles = 0;
@@ -1530,7 +1530,7 @@ mepcop1_16_mep_model::model_cpmovtocsar1_P0S_P1_after (mep_ext1_cpu *current_cpu
 UINT
 mepcop1_16_mep_model::model_cpmovtocc_P0S_P1_before (mep_ext1_cpu *current_cpu, mepcop1_16_scache *sem)
 {
-#define FLD(f) abuf->fields.sfmt_cpadd3_b_P0S_P1.f
+#define FLD(f) abuf->fields.sfmt_cpmovi_b_P0S_P1.f
   const mepcop1_16_scache* abuf = sem;
   const mepcop1_16_idesc* idesc = abuf->idesc;
   int cycles = 0;
@@ -1544,7 +1544,7 @@ mepcop1_16_mep_model::model_cpmovtocc_P0S_P1_before (mep_ext1_cpu *current_cpu,
 UINT
 mepcop1_16_mep_model::model_cpmovtocc_P0S_P1_after (mep_ext1_cpu *current_cpu, mepcop1_16_scache *sem)
 {
-#define FLD(f) abuf->fields.sfmt_cpadd3_b_P0S_P1.f
+#define FLD(f) abuf->fields.sfmt_cpmovi_b_P0S_P1.f
   const mepcop1_16_scache* abuf = sem;
   const mepcop1_16_idesc* idesc = abuf->idesc;
   int cycles = 0;
@@ -3390,7 +3390,7 @@ mepcop1_16_mep_model::model_cpaccpa0_P0S_after (mep_ext1_cpu *current_cpu, mepco
 UINT
 mepcop1_16_mep_model::model_cpsrla0_P0S_before (mep_ext1_cpu *current_cpu, mepcop1_16_scache *sem)
 {
-#define FLD(f) abuf->fields.sfmt_cpadd3_b_P0S_P1.f
+#define FLD(f) abuf->fields.sfmt_cpmovi_b_P0S_P1.f
   const mepcop1_16_scache* abuf = sem;
   const mepcop1_16_idesc* idesc = abuf->idesc;
   int cycles = 0;
@@ -3404,7 +3404,7 @@ mepcop1_16_mep_model::model_cpsrla0_P0S_before (mep_ext1_cpu *current_cpu, mepco
 UINT
 mepcop1_16_mep_model::model_cpsrla0_P0S_after (mep_ext1_cpu *current_cpu, mepcop1_16_scache *sem)
 {
-#define FLD(f) abuf->fields.sfmt_cpadd3_b_P0S_P1.f
+#define FLD(f) abuf->fields.sfmt_cpmovi_b_P0S_P1.f
   const mepcop1_16_scache* abuf = sem;
   const mepcop1_16_idesc* idesc = abuf->idesc;
   int cycles = 0;
@@ -3420,7 +3420,7 @@ mepcop1_16_mep_model::model_cpsrla0_P0S_after (mep_ext1_cpu *current_cpu, mepcop
 UINT
 mepcop1_16_mep_model::model_cpsraa0_P0S_before (mep_ext1_cpu *current_cpu, mepcop1_16_scache *sem)
 {
-#define FLD(f) abuf->fields.sfmt_cpadd3_b_P0S_P1.f
+#define FLD(f) abuf->fields.sfmt_cpmovi_b_P0S_P1.f
   const mepcop1_16_scache* abuf = sem;
   const mepcop1_16_idesc* idesc = abuf->idesc;
   int cycles = 0;
@@ -3434,7 +3434,7 @@ mepcop1_16_mep_model::model_cpsraa0_P0S_before (mep_ext1_cpu *current_cpu, mepco
 UINT
 mepcop1_16_mep_model::model_cpsraa0_P0S_after (mep_ext1_cpu *current_cpu, mepcop1_16_scache *sem)
 {
-#define FLD(f) abuf->fields.sfmt_cpadd3_b_P0S_P1.f
+#define FLD(f) abuf->fields.sfmt_cpmovi_b_P0S_P1.f
   const mepcop1_16_scache* abuf = sem;
   const mepcop1_16_idesc* idesc = abuf->idesc;
   int cycles = 0;
@@ -3450,7 +3450,7 @@ mepcop1_16_mep_model::model_cpsraa0_P0S_after (mep_ext1_cpu *current_cpu, mepcop
 UINT
 mepcop1_16_mep_model::model_cpslla0_P0S_before (mep_ext1_cpu *current_cpu, mepcop1_16_scache *sem)
 {
-#define FLD(f) abuf->fields.sfmt_cpadd3_b_P0S_P1.f
+#define FLD(f) abuf->fields.sfmt_cpmovi_b_P0S_P1.f
   const mepcop1_16_scache* abuf = sem;
   const mepcop1_16_idesc* idesc = abuf->idesc;
   int cycles = 0;
@@ -3464,7 +3464,7 @@ mepcop1_16_mep_model::model_cpslla0_P0S_before (mep_ext1_cpu *current_cpu, mepco
 UINT
 mepcop1_16_mep_model::model_cpslla0_P0S_after (mep_ext1_cpu *current_cpu, mepcop1_16_scache *sem)
 {
-#define FLD(f) abuf->fields.sfmt_cpadd3_b_P0S_P1.f
+#define FLD(f) abuf->fields.sfmt_cpmovi_b_P0S_P1.f
   const mepcop1_16_scache* abuf = sem;
   const mepcop1_16_idesc* idesc = abuf->idesc;
   int cycles = 0;
@@ -4047,6 +4047,36 @@ mepcop1_16_mep_model::model_cpfacla0s1_h_P0S_after (mep_ext1_cpu *current_cpu, m
 #undef FLD
 }
 
+UINT
+mepcop1_16_mep_model::model_cpmovi_b_P0S_P1_before (mep_ext1_cpu *current_cpu, mepcop1_16_scache *sem)
+{
+#define FLD(f) abuf->fields.sfmt_cpmovi_b_P0S_P1.f
+  const mepcop1_16_scache* abuf = sem;
+  const mepcop1_16_idesc* idesc = abuf->idesc;
+  int cycles = 0;
+  {
+    cycles += model_u_exec_before (current_cpu, idesc, 0);
+  }
+  return cycles;
+#undef FLD
+}
+
+UINT
+mepcop1_16_mep_model::model_cpmovi_b_P0S_P1_after (mep_ext1_cpu *current_cpu, mepcop1_16_scache *sem)
+{
+#define FLD(f) abuf->fields.sfmt_cpmovi_b_P0S_P1.f
+  const mepcop1_16_scache* abuf = sem;
+  const mepcop1_16_idesc* idesc = abuf->idesc;
+  int cycles = 0;
+  {
+    int referenced = 0;
+    unsigned long long insn_referenced = abuf->written;
+    cycles += model_u_exec_after (current_cpu, idesc, 0, referenced);
+  }
+  return cycles;
+#undef FLD
+}
+
 /* We assume UNIT_NONE == 0 because the tables don't always terminate
    entries with it.  */
 
@@ -4188,5 +4218,6 @@ const mepcop1_16_mep_model::insn_timing mepcop1_16_mep_model::timing[] = {
   { MEPCOP1_16_INSN_CPFACA0S1_B_P0S, & mepcop1_16_mep_model::model_cpfaca0s1_b_P0S_before, & mepcop1_16_mep_model::model_cpfaca0s1_b_P0S_after, { { mepcop1_16_mep_model::UNIT_U_EXEC, 1, 1 } } },
   { MEPCOP1_16_INSN_CPFACUA0S1_H_P0S, & mepcop1_16_mep_model::model_cpfacua0s1_h_P0S_before, & mepcop1_16_mep_model::model_cpfacua0s1_h_P0S_after, { { mepcop1_16_mep_model::UNIT_U_EXEC, 1, 1 } } },
   { MEPCOP1_16_INSN_CPFACLA0S1_H_P0S, & mepcop1_16_mep_model::model_cpfacla0s1_h_P0S_before, & mepcop1_16_mep_model::model_cpfacla0s1_h_P0S_after, { { mepcop1_16_mep_model::UNIT_U_EXEC, 1, 1 } } },
+  { MEPCOP1_16_INSN_CPMOVI_B_P0S_P1, & mepcop1_16_mep_model::model_cpmovi_b_P0S_P1_before, & mepcop1_16_mep_model::model_cpmovi_b_P0S_P1_after, { { mepcop1_16_mep_model::UNIT_U_EXEC, 1, 1 } } },
 };
 
index 2d340d7..e715911 100644 (file)
@@ -403,6 +403,8 @@ protected:
   UINT model_cpfacua0s1_h_P0S_after (mep_ext1_cpu *current_cpu, mepcop1_16_scache *sem);
   UINT model_cpfacla0s1_h_P0S_before (mep_ext1_cpu *current_cpu, mepcop1_16_scache *sem);
   UINT model_cpfacla0s1_h_P0S_after (mep_ext1_cpu *current_cpu, mepcop1_16_scache *sem);
+  UINT model_cpmovi_b_P0S_P1_before (mep_ext1_cpu *current_cpu, mepcop1_16_scache *sem);
+  UINT model_cpmovi_b_P0S_P1_after (mep_ext1_cpu *current_cpu, mepcop1_16_scache *sem);
 
   /* Enum declaration for unit types.  */
 typedef enum unit_number {
index 67e0e36..431b2fc 100644 (file)
@@ -717,7 +717,7 @@ current_cpu->check_option_cp (pc);
 sem_status
 mepcop1_16_sem_cpccadd_b_P0S_P1 (mep_ext1_cpu* current_cpu, mepcop1_16_scache* sem)
 {
-#define FLD(f) abuf->fields.sfmt_cpadd3_b_P0S_P1.f
+#define FLD(f) abuf->fields.sfmt_cpmovi_b_P0S_P1.f
   sem_status status = SEM_STATUS_NORMAL;
   mepcop1_16_scache* abuf = sem;
   unsigned long long written = 0;
@@ -1333,7 +1333,7 @@ current_cpu->check_option_cp (pc);
 sem_status
 mepcop1_16_sem_cpmovtocsar0_P0S_P1 (mep_ext1_cpu* current_cpu, mepcop1_16_scache* sem)
 {
-#define FLD(f) abuf->fields.sfmt_cpadd3_b_P0S_P1.f
+#define FLD(f) abuf->fields.sfmt_cpmovi_b_P0S_P1.f
   sem_status status = SEM_STATUS_NORMAL;
   mepcop1_16_scache* abuf = sem;
   unsigned long long written = 0;
@@ -1355,7 +1355,7 @@ current_cpu->ivc2_cpmovtocsar0 (pc, current_cpu->hardware.h_cr64[FLD (f_ivc2_5u1
 sem_status
 mepcop1_16_sem_cpmovtocsar1_P0S_P1 (mep_ext1_cpu* current_cpu, mepcop1_16_scache* sem)
 {
-#define FLD(f) abuf->fields.sfmt_cpadd3_b_P0S_P1.f
+#define FLD(f) abuf->fields.sfmt_cpmovi_b_P0S_P1.f
   sem_status status = SEM_STATUS_NORMAL;
   mepcop1_16_scache* abuf = sem;
   unsigned long long written = 0;
@@ -1377,7 +1377,7 @@ current_cpu->ivc2_cpmovtocsar1 (pc, current_cpu->hardware.h_cr64[FLD (f_ivc2_5u1
 sem_status
 mepcop1_16_sem_cpmovtocc_P0S_P1 (mep_ext1_cpu* current_cpu, mepcop1_16_scache* sem)
 {
-#define FLD(f) abuf->fields.sfmt_cpadd3_b_P0S_P1.f
+#define FLD(f) abuf->fields.sfmt_cpmovi_b_P0S_P1.f
   sem_status status = SEM_STATUS_NORMAL;
   mepcop1_16_scache* abuf = sem;
   unsigned long long written = 0;
@@ -2816,7 +2816,7 @@ current_cpu->ivc2_cpaccpa0 (pc);
 sem_status
 mepcop1_16_sem_cpsrla0_P0S (mep_ext1_cpu* current_cpu, mepcop1_16_scache* sem)
 {
-#define FLD(f) abuf->fields.sfmt_cpadd3_b_P0S_P1.f
+#define FLD(f) abuf->fields.sfmt_cpmovi_b_P0S_P1.f
   sem_status status = SEM_STATUS_NORMAL;
   mepcop1_16_scache* abuf = sem;
   unsigned long long written = 0;
@@ -2838,7 +2838,7 @@ current_cpu->ivc2_cpsrla0 (pc, current_cpu->hardware.h_cr64[FLD (f_ivc2_5u13)]);
 sem_status
 mepcop1_16_sem_cpsraa0_P0S (mep_ext1_cpu* current_cpu, mepcop1_16_scache* sem)
 {
-#define FLD(f) abuf->fields.sfmt_cpadd3_b_P0S_P1.f
+#define FLD(f) abuf->fields.sfmt_cpmovi_b_P0S_P1.f
   sem_status status = SEM_STATUS_NORMAL;
   mepcop1_16_scache* abuf = sem;
   unsigned long long written = 0;
@@ -2860,7 +2860,7 @@ current_cpu->ivc2_cpsraa0 (pc, current_cpu->hardware.h_cr64[FLD (f_ivc2_5u13)]);
 sem_status
 mepcop1_16_sem_cpslla0_P0S (mep_ext1_cpu* current_cpu, mepcop1_16_scache* sem)
 {
-#define FLD(f) abuf->fields.sfmt_cpadd3_b_P0S_P1.f
+#define FLD(f) abuf->fields.sfmt_cpmovi_b_P0S_P1.f
   sem_status status = SEM_STATUS_NORMAL;
   mepcop1_16_scache* abuf = sem;
   unsigned long long written = 0;
@@ -3295,3 +3295,30 @@ current_cpu->ivc2_cpfacla0s1_h (pc, current_cpu->hardware.h_cr64[FLD (f_ivc2_5u1
 #undef FLD
 }
 
+// ********** cpmovi_b_P0S_P1: cpmovi.b $crqp,$simm8p20
+
+sem_status
+mepcop1_16_sem_cpmovi_b_P0S_P1 (mep_ext1_cpu* current_cpu, mepcop1_16_scache* sem)
+{
+#define FLD(f) abuf->fields.sfmt_cpmovi_b_P0S_P1.f
+  sem_status status = SEM_STATUS_NORMAL;
+  mepcop1_16_scache* abuf = sem;
+  unsigned long long written = 0;
+  PCADDR pc = abuf->addr;
+  PCADDR npc = pc + 4;
+
+{
+current_cpu->check_option_cp (pc);
+  {
+    DI opval = current_cpu->ivc2_cpmovi_b (pc, FLD (f_ivc2_8s20));
+    if (UNLIKELY(current_cpu->trace_result_p))
+      current_cpu->trace_stream << "cr64" << '[' << FLD (f_ivc2_5u13) << ']' << ":=0x" << hex << opval << dec << "  ";
+    current_cpu->h_cr64_set (FLD (f_ivc2_5u13), opval);
+  }
+}
+
+  current_cpu->done_insn (npc, status);
+  return status;
+#undef FLD
+}
+
index 3fb5884..81a57c6 100644 (file)
@@ -215,6 +215,7 @@ mepcop1_64_idesc mepcop1_64_idesc::idesc_table[MEPCOP1_64_INSN_CPSMSBSLLA1_W_P1
   { mepcop1_64_sem_cdmoviu_P0_P1, "CDMOVIU_P0_P1", MEPCOP1_64_INSN_CDMOVIU_P0_P1, { 0|(1<<CGEN_INSN_OPTIONAL_CP_INSN), (1<<MACH_BASE), { 1, "\xc" }, 0, CONFIG_NONE, (1<<SLOTS_P0)|(1<<SLOTS_P1) } },
   { mepcop1_64_sem_cdmovi_P0_P1, "CDMOVI_P0_P1", MEPCOP1_64_INSN_CDMOVI_P0_P1, { 0|(1<<CGEN_INSN_OPTIONAL_CP_INSN), (1<<MACH_BASE), { 1, "\xc" }, 0, CONFIG_NONE, (1<<SLOTS_P0)|(1<<SLOTS_P1) } },
   { mepcop1_64_sem_c1nop_P1, "C1NOP_P1", MEPCOP1_64_INSN_C1NOP_P1, { 0|(1<<CGEN_INSN_OPTIONAL_CP_INSN), (1<<MACH_BASE), { 1, "\x4" }, 0, CONFIG_NONE, (1<<SLOTS_P1) } },
+  { mepcop1_64_sem_cpmovi_b_P0S_P1, "CPMOVI_B_P0S_P1", MEPCOP1_64_INSN_CPMOVI_B_P0S_P1, { 0|(1<<CGEN_INSN_OPTIONAL_CP_INSN), (1<<MACH_BASE), { 1, "\x24" }, 0, CONFIG_NONE, (1<<SLOTS_P0S)|(1<<SLOTS_P1) } },
   { mepcop1_64_sem_cpadda1u_b_P1, "CPADDA1U_B_P1", MEPCOP1_64_INSN_CPADDA1U_B_P1, { 0|(1<<CGEN_INSN_OPTIONAL_CP_INSN), (1<<MACH_BASE), { 1, "\x4" }, 0, CONFIG_NONE, (1<<SLOTS_P1) } },
   { mepcop1_64_sem_cpadda1_b_P1, "CPADDA1_B_P1", MEPCOP1_64_INSN_CPADDA1_B_P1, { 0|(1<<CGEN_INSN_OPTIONAL_CP_INSN), (1<<MACH_BASE), { 1, "\x4" }, 0, CONFIG_NONE, (1<<SLOTS_P1) } },
   { mepcop1_64_sem_cpaddua1_h_P1, "CPADDUA1_H_P1", MEPCOP1_64_INSN_CPADDUA1_H_P1, { 0|(1<<CGEN_INSN_OPTIONAL_CP_INSN), (1<<MACH_BASE), { 1, "\x4" }, 0, CONFIG_NONE, (1<<SLOTS_P1) } },
@@ -394,6 +395,8 @@ mepcop1_64_extract_sfmt_cpmoviu_w_P0_P1 (mepcop1_64_scache* abuf, mep_ext1_cpu*
 static void
 mepcop1_64_extract_sfmt_c1nop_P1 (mepcop1_64_scache* abuf, mep_ext1_cpu* current_cpu, PCADDR pc, mepcop1_64_insn_word base_insn, mepcop1_64_insn_word entire_insn);
 static void
+mepcop1_64_extract_sfmt_cpmovi_b_P0S_P1 (mepcop1_64_scache* abuf, mep_ext1_cpu* current_cpu, PCADDR pc, mepcop1_64_insn_word base_insn, mepcop1_64_insn_word entire_insn);
+static void
 mepcop1_64_extract_sfmt_cpsrlia1_1_p1 (mepcop1_64_scache* abuf, mep_ext1_cpu* current_cpu, PCADDR pc, mepcop1_64_insn_word base_insn, mepcop1_64_insn_word entire_insn);
 static void
 mepcop1_64_extract_sfmt_cpfmulia1s0u_b_P1 (mepcop1_64_scache* abuf, mep_ext1_cpu* current_cpu, PCADDR pc, mepcop1_64_insn_word base_insn, mepcop1_64_insn_word entire_insn);
@@ -1222,14 +1225,19 @@ mepcop1_64_scache::decode (mep_ext1_cpu* current_cpu, PCADDR pc, mepcop1_64_insn
       case 26 : /* fall through */
       case 27 :
         {
-          unsigned int val = (((insn >> 23) & (1 << 0)));
+          unsigned int val = (((insn >> 22) & (1 << 1)) | ((insn >> 12) & (1 << 0)));
           switch (val)
           {
-          case 0 :
+          case 0 : /* fall through */
+          case 1 :
             if ((entire_insn & 0xfff8000f) == 0x300000)
               { itype = MEPCOP1_64_INSN_CPUNPACKU_H_P0S_P1; mepcop1_64_extract_sfmt_cpadd3_b_P0S_P1 (this, current_cpu, pc, base_insn, entire_insn); goto done; }
             itype = MEPCOP1_64_INSN_X_INVALID; mepcop1_64_extract_sfmt_empty (this, current_cpu, pc, base_insn, entire_insn); goto done;
-          case 1 :
+          case 2 :
+            if ((entire_insn & 0xfff8300f) == 0xb00000)
+              { itype = MEPCOP1_64_INSN_CPMOVI_B_P0S_P1; mepcop1_64_extract_sfmt_cpmovi_b_P0S_P1 (this, current_cpu, pc, base_insn, entire_insn); goto done; }
+            itype = MEPCOP1_64_INSN_X_INVALID; mepcop1_64_extract_sfmt_empty (this, current_cpu, pc, base_insn, entire_insn); goto done;
+          case 3 :
             if ((entire_insn & 0xf8300f) == 0xb01000)
               { itype = MEPCOP1_64_INSN_CPMOVI_H_P0_P1; mepcop1_64_extract_sfmt_cpmovi_h_P0_P1 (this, current_cpu, pc, base_insn, entire_insn); goto done; }
             itype = MEPCOP1_64_INSN_X_INVALID; mepcop1_64_extract_sfmt_empty (this, current_cpu, pc, base_insn, entire_insn); goto done;
@@ -3956,7 +3964,7 @@ mepcop1_64_extract_sfmt_cpmov_P0S_P1 (mepcop1_64_scache* abuf, mep_ext1_cpu* cur
 void
 mepcop1_64_extract_sfmt_cpccadd_b_P0S_P1 (mepcop1_64_scache* abuf, mep_ext1_cpu* current_cpu, PCADDR pc, mepcop1_64_insn_word base_insn, mepcop1_64_insn_word entire_insn){
     mepcop1_64_insn_word insn = entire_insn;
-#define FLD(f) abuf->fields.sfmt_cpmoviu_w_P0_P1.f
+#define FLD(f) abuf->fields.sfmt_cpmovi_b_P0S_P1.f
     UINT f_ivc2_5u13;
 
     f_ivc2_5u13 = EXTRACT_MSB0_UINT (insn, 32, 13, 5);
@@ -4006,7 +4014,7 @@ mepcop1_64_extract_sfmt_cpmovfrcsar0_P0S_P1 (mepcop1_64_scache* abuf, mep_ext1_c
 void
 mepcop1_64_extract_sfmt_cpmovtocsar0_P0S_P1 (mepcop1_64_scache* abuf, mep_ext1_cpu* current_cpu, PCADDR pc, mepcop1_64_insn_word base_insn, mepcop1_64_insn_word entire_insn){
     mepcop1_64_insn_word insn = entire_insn;
-#define FLD(f) abuf->fields.sfmt_cpmoviu_w_P0_P1.f
+#define FLD(f) abuf->fields.sfmt_cpmovi_b_P0S_P1.f
     UINT f_ivc2_5u13;
 
     f_ivc2_5u13 = EXTRACT_MSB0_UINT (insn, 32, 13, 5);
@@ -4318,6 +4326,35 @@ mepcop1_64_extract_sfmt_c1nop_P1 (mepcop1_64_scache* abuf, mep_ext1_cpu* current
 }
 
 void
+mepcop1_64_extract_sfmt_cpmovi_b_P0S_P1 (mepcop1_64_scache* abuf, mep_ext1_cpu* current_cpu, PCADDR pc, mepcop1_64_insn_word base_insn, mepcop1_64_insn_word entire_insn){
+    mepcop1_64_insn_word insn = entire_insn;
+#define FLD(f) abuf->fields.sfmt_cpmovi_b_P0S_P1.f
+    UINT f_ivc2_5u13;
+    INT f_ivc2_8s20;
+
+    f_ivc2_5u13 = EXTRACT_MSB0_UINT (insn, 32, 13, 5);
+    f_ivc2_8s20 = EXTRACT_MSB0_INT (insn, 32, 20, 8);
+
+  /* Record the fields for the semantic handler.  */
+  FLD (f_ivc2_8s20) = f_ivc2_8s20;
+  FLD (f_ivc2_5u13) = f_ivc2_5u13;
+  if (UNLIKELY(current_cpu->trace_extract_p))
+    {
+      current_cpu->trace_stream 
+        << "0x" << hex << pc << dec << " (sfmt_cpmovi_b_P0S_P1)\t"
+        << " f_ivc2_8s20:0x" << hex << f_ivc2_8s20 << dec
+        << " f_ivc2_5u13:0x" << hex << f_ivc2_5u13 << dec
+        << endl;
+    }
+
+  /* Record the fields for profiling.  */
+  if (UNLIKELY (current_cpu->trace_counter_p || current_cpu->final_insn_count_p))
+    {
+    }
+#undef FLD
+}
+
+void
 mepcop1_64_extract_sfmt_cpsrlia1_1_p1 (mepcop1_64_scache* abuf, mep_ext1_cpu* current_cpu, PCADDR pc, mepcop1_64_insn_word base_insn, mepcop1_64_insn_word entire_insn){
     mepcop1_64_insn_word insn = entire_insn;
 #define FLD(f) abuf->fields.sfmt_cdsrli3_P0_P1.f
index 2927dc5..e31f0b7 100644 (file)
@@ -69,39 +69,39 @@ typedef enum mepcop1_64_insn_type {
  , MEPCOP1_64_INSN_CDSLLI3_P0_P1, MEPCOP1_64_INSN_CPSLAI3_H_P0_P1, MEPCOP1_64_INSN_CPSLAI3_W_P0_P1, MEPCOP1_64_INSN_CPCLIPIU3_W_P0_P1
  , MEPCOP1_64_INSN_CPCLIPI3_W_P0_P1, MEPCOP1_64_INSN_CDCLIPIU3_P0_P1, MEPCOP1_64_INSN_CDCLIPI3_P0_P1, MEPCOP1_64_INSN_CPMOVI_H_P0_P1
  , MEPCOP1_64_INSN_CPMOVIU_W_P0_P1, MEPCOP1_64_INSN_CPMOVI_W_P0_P1, MEPCOP1_64_INSN_CDMOVIU_P0_P1, MEPCOP1_64_INSN_CDMOVI_P0_P1
- , MEPCOP1_64_INSN_C1NOP_P1, MEPCOP1_64_INSN_CPADDA1U_B_P1, MEPCOP1_64_INSN_CPADDA1_B_P1, MEPCOP1_64_INSN_CPADDUA1_H_P1
- , MEPCOP1_64_INSN_CPADDLA1_H_P1, MEPCOP1_64_INSN_CPADDACA1U_B_P1, MEPCOP1_64_INSN_CPADDACA1_B_P1, MEPCOP1_64_INSN_CPADDACUA1_H_P1
- , MEPCOP1_64_INSN_CPADDACLA1_H_P1, MEPCOP1_64_INSN_CPSUBA1U_B_P1, MEPCOP1_64_INSN_CPSUBA1_B_P1, MEPCOP1_64_INSN_CPSUBUA1_H_P1
- , MEPCOP1_64_INSN_CPSUBLA1_H_P1, MEPCOP1_64_INSN_CPSUBACA1U_B_P1, MEPCOP1_64_INSN_CPSUBACA1_B_P1, MEPCOP1_64_INSN_CPSUBACUA1_H_P1
- , MEPCOP1_64_INSN_CPSUBACLA1_H_P1, MEPCOP1_64_INSN_CPABSA1U_B_P1, MEPCOP1_64_INSN_CPABSA1_B_P1, MEPCOP1_64_INSN_CPABSUA1_H_P1
- , MEPCOP1_64_INSN_CPABSLA1_H_P1, MEPCOP1_64_INSN_CPSADA1U_B_P1, MEPCOP1_64_INSN_CPSADA1_B_P1, MEPCOP1_64_INSN_CPSADUA1_H_P1
- , MEPCOP1_64_INSN_CPSADLA1_H_P1, MEPCOP1_64_INSN_CPSETA1_H_P1, MEPCOP1_64_INSN_CPSETUA1_W_P1, MEPCOP1_64_INSN_CPSETLA1_W_P1
- , MEPCOP1_64_INSN_CPMOVA1_B_P1, MEPCOP1_64_INSN_CPMOVUA1_H_P1, MEPCOP1_64_INSN_CPMOVLA1_H_P1, MEPCOP1_64_INSN_CPMOVUUA1_W_P1
- , MEPCOP1_64_INSN_CPMOVULA1_W_P1, MEPCOP1_64_INSN_CPMOVLUA1_W_P1, MEPCOP1_64_INSN_CPMOVLLA1_W_P1, MEPCOP1_64_INSN_CPPACKA1U_B_P1
- , MEPCOP1_64_INSN_CPPACKA1_B_P1, MEPCOP1_64_INSN_CPPACKUA1_H_P1, MEPCOP1_64_INSN_CPPACKLA1_H_P1, MEPCOP1_64_INSN_CPPACKUA1_W_P1
- , MEPCOP1_64_INSN_CPPACKLA1_W_P1, MEPCOP1_64_INSN_CPMOVHUA1_W_P1, MEPCOP1_64_INSN_CPMOVHLA1_W_P1, MEPCOP1_64_INSN_CPACSUMA1_P1
- , MEPCOP1_64_INSN_CPACCPA1_P1, MEPCOP1_64_INSN_CPACSWP_P1, MEPCOP1_64_INSN_CPSRLA1_P1, MEPCOP1_64_INSN_CPSRAA1_P1
- , MEPCOP1_64_INSN_CPSLLA1_P1, MEPCOP1_64_INSN_CPSRLIA1_1_P1, MEPCOP1_64_INSN_CPSRAIA1_1_P1, MEPCOP1_64_INSN_CPSLLIA1_1_P1
- , MEPCOP1_64_INSN_CPFMULIA1S0U_B_P1, MEPCOP1_64_INSN_CPFMULIA1S0_B_P1, MEPCOP1_64_INSN_CPFMULIUA1S0_H_P1, MEPCOP1_64_INSN_CPFMULILA1S0_H_P1
- , MEPCOP1_64_INSN_CPFMADIA1S0U_B_P1, MEPCOP1_64_INSN_CPFMADIA1S0_B_P1, MEPCOP1_64_INSN_CPFMADIUA1S0_H_P1, MEPCOP1_64_INSN_CPFMADILA1S0_H_P1
- , MEPCOP1_64_INSN_CPFMULIA1S1U_B_P1, MEPCOP1_64_INSN_CPFMULIA1S1_B_P1, MEPCOP1_64_INSN_CPFMULIUA1S1_H_P1, MEPCOP1_64_INSN_CPFMULILA1S1_H_P1
- , MEPCOP1_64_INSN_CPFMADIA1S1U_B_P1, MEPCOP1_64_INSN_CPFMADIA1S1_B_P1, MEPCOP1_64_INSN_CPFMADIUA1S1_H_P1, MEPCOP1_64_INSN_CPFMADILA1S1_H_P1
- , MEPCOP1_64_INSN_CPAMULIA1U_B_P1, MEPCOP1_64_INSN_CPAMULIA1_B_P1, MEPCOP1_64_INSN_CPAMULIUA1_H_P1, MEPCOP1_64_INSN_CPAMULILA1_H_P1
- , MEPCOP1_64_INSN_CPAMADIA1U_B_P1, MEPCOP1_64_INSN_CPAMADIA1_B_P1, MEPCOP1_64_INSN_CPAMADIUA1_H_P1, MEPCOP1_64_INSN_CPAMADILA1_H_P1
- , MEPCOP1_64_INSN_CPFMULIA1U_B_P1, MEPCOP1_64_INSN_CPFMULIA1_B_P1, MEPCOP1_64_INSN_CPFMULIUA1_H_P1, MEPCOP1_64_INSN_CPFMULILA1_H_P1
- , MEPCOP1_64_INSN_CPFMADIA1U_B_P1, MEPCOP1_64_INSN_CPFMADIA1_B_P1, MEPCOP1_64_INSN_CPFMADIUA1_H_P1, MEPCOP1_64_INSN_CPFMADILA1_H_P1
- , MEPCOP1_64_INSN_CPSSQA1U_B_P1, MEPCOP1_64_INSN_CPSSQA1_B_P1, MEPCOP1_64_INSN_CPSSDA1U_B_P1, MEPCOP1_64_INSN_CPSSDA1_B_P1
- , MEPCOP1_64_INSN_CPMULA1U_B_P1, MEPCOP1_64_INSN_CPMULA1_B_P1, MEPCOP1_64_INSN_CPMULUA1_H_P1, MEPCOP1_64_INSN_CPMULLA1_H_P1
- , MEPCOP1_64_INSN_CPMULUA1U_W_P1, MEPCOP1_64_INSN_CPMULLA1U_W_P1, MEPCOP1_64_INSN_CPMULUA1_W_P1, MEPCOP1_64_INSN_CPMULLA1_W_P1
- , MEPCOP1_64_INSN_CPMADA1U_B_P1, MEPCOP1_64_INSN_CPMADA1_B_P1, MEPCOP1_64_INSN_CPMADUA1_H_P1, MEPCOP1_64_INSN_CPMADLA1_H_P1
- , MEPCOP1_64_INSN_CPMADUA1U_W_P1, MEPCOP1_64_INSN_CPMADLA1U_W_P1, MEPCOP1_64_INSN_CPMADUA1_W_P1, MEPCOP1_64_INSN_CPMADLA1_W_P1
- , MEPCOP1_64_INSN_CPMSBUA1_H_P1, MEPCOP1_64_INSN_CPMSBLA1_H_P1, MEPCOP1_64_INSN_CPMSBUA1U_W_P1, MEPCOP1_64_INSN_CPMSBLA1U_W_P1
- , MEPCOP1_64_INSN_CPMSBUA1_W_P1, MEPCOP1_64_INSN_CPMSBLA1_W_P1, MEPCOP1_64_INSN_CPSMADUA1_H_P1, MEPCOP1_64_INSN_CPSMADLA1_H_P1
- , MEPCOP1_64_INSN_CPSMADUA1_W_P1, MEPCOP1_64_INSN_CPSMADLA1_W_P1, MEPCOP1_64_INSN_CPSMSBUA1_H_P1, MEPCOP1_64_INSN_CPSMSBLA1_H_P1
- , MEPCOP1_64_INSN_CPSMSBUA1_W_P1, MEPCOP1_64_INSN_CPSMSBLA1_W_P1, MEPCOP1_64_INSN_CPMULSLUA1_H_P1, MEPCOP1_64_INSN_CPMULSLLA1_H_P1
- , MEPCOP1_64_INSN_CPMULSLUA1_W_P1, MEPCOP1_64_INSN_CPMULSLLA1_W_P1, MEPCOP1_64_INSN_CPSMADSLUA1_H_P1, MEPCOP1_64_INSN_CPSMADSLLA1_H_P1
- , MEPCOP1_64_INSN_CPSMADSLUA1_W_P1, MEPCOP1_64_INSN_CPSMADSLLA1_W_P1, MEPCOP1_64_INSN_CPSMSBSLUA1_H_P1, MEPCOP1_64_INSN_CPSMSBSLLA1_H_P1
- , MEPCOP1_64_INSN_CPSMSBSLUA1_W_P1, MEPCOP1_64_INSN_CPSMSBSLLA1_W_P1
+ , MEPCOP1_64_INSN_C1NOP_P1, MEPCOP1_64_INSN_CPMOVI_B_P0S_P1, MEPCOP1_64_INSN_CPADDA1U_B_P1, MEPCOP1_64_INSN_CPADDA1_B_P1
+ , MEPCOP1_64_INSN_CPADDUA1_H_P1, MEPCOP1_64_INSN_CPADDLA1_H_P1, MEPCOP1_64_INSN_CPADDACA1U_B_P1, MEPCOP1_64_INSN_CPADDACA1_B_P1
+ , MEPCOP1_64_INSN_CPADDACUA1_H_P1, MEPCOP1_64_INSN_CPADDACLA1_H_P1, MEPCOP1_64_INSN_CPSUBA1U_B_P1, MEPCOP1_64_INSN_CPSUBA1_B_P1
+ , MEPCOP1_64_INSN_CPSUBUA1_H_P1, MEPCOP1_64_INSN_CPSUBLA1_H_P1, MEPCOP1_64_INSN_CPSUBACA1U_B_P1, MEPCOP1_64_INSN_CPSUBACA1_B_P1
+ , MEPCOP1_64_INSN_CPSUBACUA1_H_P1, MEPCOP1_64_INSN_CPSUBACLA1_H_P1, MEPCOP1_64_INSN_CPABSA1U_B_P1, MEPCOP1_64_INSN_CPABSA1_B_P1
+ , MEPCOP1_64_INSN_CPABSUA1_H_P1, MEPCOP1_64_INSN_CPABSLA1_H_P1, MEPCOP1_64_INSN_CPSADA1U_B_P1, MEPCOP1_64_INSN_CPSADA1_B_P1
+ , MEPCOP1_64_INSN_CPSADUA1_H_P1, MEPCOP1_64_INSN_CPSADLA1_H_P1, MEPCOP1_64_INSN_CPSETA1_H_P1, MEPCOP1_64_INSN_CPSETUA1_W_P1
+ , MEPCOP1_64_INSN_CPSETLA1_W_P1, MEPCOP1_64_INSN_CPMOVA1_B_P1, MEPCOP1_64_INSN_CPMOVUA1_H_P1, MEPCOP1_64_INSN_CPMOVLA1_H_P1
+ , MEPCOP1_64_INSN_CPMOVUUA1_W_P1, MEPCOP1_64_INSN_CPMOVULA1_W_P1, MEPCOP1_64_INSN_CPMOVLUA1_W_P1, MEPCOP1_64_INSN_CPMOVLLA1_W_P1
+ , MEPCOP1_64_INSN_CPPACKA1U_B_P1, MEPCOP1_64_INSN_CPPACKA1_B_P1, MEPCOP1_64_INSN_CPPACKUA1_H_P1, MEPCOP1_64_INSN_CPPACKLA1_H_P1
+ , MEPCOP1_64_INSN_CPPACKUA1_W_P1, MEPCOP1_64_INSN_CPPACKLA1_W_P1, MEPCOP1_64_INSN_CPMOVHUA1_W_P1, MEPCOP1_64_INSN_CPMOVHLA1_W_P1
+ , MEPCOP1_64_INSN_CPACSUMA1_P1, MEPCOP1_64_INSN_CPACCPA1_P1, MEPCOP1_64_INSN_CPACSWP_P1, MEPCOP1_64_INSN_CPSRLA1_P1
+ , MEPCOP1_64_INSN_CPSRAA1_P1, MEPCOP1_64_INSN_CPSLLA1_P1, MEPCOP1_64_INSN_CPSRLIA1_1_P1, MEPCOP1_64_INSN_CPSRAIA1_1_P1
+ , MEPCOP1_64_INSN_CPSLLIA1_1_P1, MEPCOP1_64_INSN_CPFMULIA1S0U_B_P1, MEPCOP1_64_INSN_CPFMULIA1S0_B_P1, MEPCOP1_64_INSN_CPFMULIUA1S0_H_P1
+ , MEPCOP1_64_INSN_CPFMULILA1S0_H_P1, MEPCOP1_64_INSN_CPFMADIA1S0U_B_P1, MEPCOP1_64_INSN_CPFMADIA1S0_B_P1, MEPCOP1_64_INSN_CPFMADIUA1S0_H_P1
+ , MEPCOP1_64_INSN_CPFMADILA1S0_H_P1, MEPCOP1_64_INSN_CPFMULIA1S1U_B_P1, MEPCOP1_64_INSN_CPFMULIA1S1_B_P1, MEPCOP1_64_INSN_CPFMULIUA1S1_H_P1
+ , MEPCOP1_64_INSN_CPFMULILA1S1_H_P1, MEPCOP1_64_INSN_CPFMADIA1S1U_B_P1, MEPCOP1_64_INSN_CPFMADIA1S1_B_P1, MEPCOP1_64_INSN_CPFMADIUA1S1_H_P1
+ , MEPCOP1_64_INSN_CPFMADILA1S1_H_P1, MEPCOP1_64_INSN_CPAMULIA1U_B_P1, MEPCOP1_64_INSN_CPAMULIA1_B_P1, MEPCOP1_64_INSN_CPAMULIUA1_H_P1
+ , MEPCOP1_64_INSN_CPAMULILA1_H_P1, MEPCOP1_64_INSN_CPAMADIA1U_B_P1, MEPCOP1_64_INSN_CPAMADIA1_B_P1, MEPCOP1_64_INSN_CPAMADIUA1_H_P1
+ , MEPCOP1_64_INSN_CPAMADILA1_H_P1, MEPCOP1_64_INSN_CPFMULIA1U_B_P1, MEPCOP1_64_INSN_CPFMULIA1_B_P1, MEPCOP1_64_INSN_CPFMULIUA1_H_P1
+ , MEPCOP1_64_INSN_CPFMULILA1_H_P1, MEPCOP1_64_INSN_CPFMADIA1U_B_P1, MEPCOP1_64_INSN_CPFMADIA1_B_P1, MEPCOP1_64_INSN_CPFMADIUA1_H_P1
+ , MEPCOP1_64_INSN_CPFMADILA1_H_P1, MEPCOP1_64_INSN_CPSSQA1U_B_P1, MEPCOP1_64_INSN_CPSSQA1_B_P1, MEPCOP1_64_INSN_CPSSDA1U_B_P1
+ , MEPCOP1_64_INSN_CPSSDA1_B_P1, MEPCOP1_64_INSN_CPMULA1U_B_P1, MEPCOP1_64_INSN_CPMULA1_B_P1, MEPCOP1_64_INSN_CPMULUA1_H_P1
+ , MEPCOP1_64_INSN_CPMULLA1_H_P1, MEPCOP1_64_INSN_CPMULUA1U_W_P1, MEPCOP1_64_INSN_CPMULLA1U_W_P1, MEPCOP1_64_INSN_CPMULUA1_W_P1
+ , MEPCOP1_64_INSN_CPMULLA1_W_P1, MEPCOP1_64_INSN_CPMADA1U_B_P1, MEPCOP1_64_INSN_CPMADA1_B_P1, MEPCOP1_64_INSN_CPMADUA1_H_P1
+ , MEPCOP1_64_INSN_CPMADLA1_H_P1, MEPCOP1_64_INSN_CPMADUA1U_W_P1, MEPCOP1_64_INSN_CPMADLA1U_W_P1, MEPCOP1_64_INSN_CPMADUA1_W_P1
+ , MEPCOP1_64_INSN_CPMADLA1_W_P1, MEPCOP1_64_INSN_CPMSBUA1_H_P1, MEPCOP1_64_INSN_CPMSBLA1_H_P1, MEPCOP1_64_INSN_CPMSBUA1U_W_P1
+ , MEPCOP1_64_INSN_CPMSBLA1U_W_P1, MEPCOP1_64_INSN_CPMSBUA1_W_P1, MEPCOP1_64_INSN_CPMSBLA1_W_P1, MEPCOP1_64_INSN_CPSMADUA1_H_P1
+ , MEPCOP1_64_INSN_CPSMADLA1_H_P1, MEPCOP1_64_INSN_CPSMADUA1_W_P1, MEPCOP1_64_INSN_CPSMADLA1_W_P1, MEPCOP1_64_INSN_CPSMSBUA1_H_P1
+ , MEPCOP1_64_INSN_CPSMSBLA1_H_P1, MEPCOP1_64_INSN_CPSMSBUA1_W_P1, MEPCOP1_64_INSN_CPSMSBLA1_W_P1, MEPCOP1_64_INSN_CPMULSLUA1_H_P1
+ , MEPCOP1_64_INSN_CPMULSLLA1_H_P1, MEPCOP1_64_INSN_CPMULSLUA1_W_P1, MEPCOP1_64_INSN_CPMULSLLA1_W_P1, MEPCOP1_64_INSN_CPSMADSLUA1_H_P1
+ , MEPCOP1_64_INSN_CPSMADSLLA1_H_P1, MEPCOP1_64_INSN_CPSMADSLUA1_W_P1, MEPCOP1_64_INSN_CPSMADSLLA1_W_P1, MEPCOP1_64_INSN_CPSMSBSLUA1_H_P1
+ , MEPCOP1_64_INSN_CPSMSBSLLA1_H_P1, MEPCOP1_64_INSN_CPSMSBSLUA1_W_P1, MEPCOP1_64_INSN_CPSMSBSLLA1_W_P1
 } MEPCOP1_64_INSN_TYPE;
 
 
@@ -135,6 +135,10 @@ union mepcop1_64_sem_fields {
     int empty;
   } fmt_empty;
   struct { /*  */
+    INT f_ivc2_8s20;
+    UINT f_ivc2_5u13;
+  } sfmt_cpmovi_b_P0S_P1;
+  struct { /*  */
     UINT f_ivc2_5u13;
     UINT f_ivc2_imm16p0;
   } sfmt_cpmoviu_w_P0_P1;
@@ -411,6 +415,7 @@ extern mepcop1_64_sem_fn mepcop1_64_sem_cpmovi_w_P0_P1;
 extern mepcop1_64_sem_fn mepcop1_64_sem_cdmoviu_P0_P1;
 extern mepcop1_64_sem_fn mepcop1_64_sem_cdmovi_P0_P1;
 extern mepcop1_64_sem_fn mepcop1_64_sem_c1nop_P1;
+extern mepcop1_64_sem_fn mepcop1_64_sem_cpmovi_b_P0S_P1;
 extern mepcop1_64_sem_fn mepcop1_64_sem_cpadda1u_b_P1;
 extern mepcop1_64_sem_fn mepcop1_64_sem_cpadda1_b_P1;
 extern mepcop1_64_sem_fn mepcop1_64_sem_cpaddua1_h_P1;
index 7c82af3..f72297c 100644 (file)
@@ -750,7 +750,7 @@ mepcop1_64_mep_model::model_cphadd_w_P0S_P1_after (mep_ext1_cpu *current_cpu, me
 UINT
 mepcop1_64_mep_model::model_cpccadd_b_P0S_P1_before (mep_ext1_cpu *current_cpu, mepcop1_64_scache *sem)
 {
-#define FLD(f) abuf->fields.sfmt_cpmoviu_w_P0_P1.f
+#define FLD(f) abuf->fields.sfmt_cpmovi_b_P0S_P1.f
   const mepcop1_64_scache* abuf = sem;
   const mepcop1_64_idesc* idesc = abuf->idesc;
   int cycles = 0;
@@ -764,7 +764,7 @@ mepcop1_64_mep_model::model_cpccadd_b_P0S_P1_before (mep_ext1_cpu *current_cpu,
 UINT
 mepcop1_64_mep_model::model_cpccadd_b_P0S_P1_after (mep_ext1_cpu *current_cpu, mepcop1_64_scache *sem)
 {
-#define FLD(f) abuf->fields.sfmt_cpmoviu_w_P0_P1.f
+#define FLD(f) abuf->fields.sfmt_cpmovi_b_P0S_P1.f
   const mepcop1_64_scache* abuf = sem;
   const mepcop1_64_idesc* idesc = abuf->idesc;
   int cycles = 0;
@@ -1440,7 +1440,7 @@ mepcop1_64_mep_model::model_cpmovfrcc_P0S_P1_after (mep_ext1_cpu *current_cpu, m
 UINT
 mepcop1_64_mep_model::model_cpmovtocsar0_P0S_P1_before (mep_ext1_cpu *current_cpu, mepcop1_64_scache *sem)
 {
-#define FLD(f) abuf->fields.sfmt_cpmoviu_w_P0_P1.f
+#define FLD(f) abuf->fields.sfmt_cpmovi_b_P0S_P1.f
   const mepcop1_64_scache* abuf = sem;
   const mepcop1_64_idesc* idesc = abuf->idesc;
   int cycles = 0;
@@ -1454,7 +1454,7 @@ mepcop1_64_mep_model::model_cpmovtocsar0_P0S_P1_before (mep_ext1_cpu *current_cp
 UINT
 mepcop1_64_mep_model::model_cpmovtocsar0_P0S_P1_after (mep_ext1_cpu *current_cpu, mepcop1_64_scache *sem)
 {
-#define FLD(f) abuf->fields.sfmt_cpmoviu_w_P0_P1.f
+#define FLD(f) abuf->fields.sfmt_cpmovi_b_P0S_P1.f
   const mepcop1_64_scache* abuf = sem;
   const mepcop1_64_idesc* idesc = abuf->idesc;
   int cycles = 0;
@@ -1470,7 +1470,7 @@ mepcop1_64_mep_model::model_cpmovtocsar0_P0S_P1_after (mep_ext1_cpu *current_cpu
 UINT
 mepcop1_64_mep_model::model_cpmovtocsar1_P0S_P1_before (mep_ext1_cpu *current_cpu, mepcop1_64_scache *sem)
 {
-#define FLD(f) abuf->fields.sfmt_cpmoviu_w_P0_P1.f
+#define FLD(f) abuf->fields.sfmt_cpmovi_b_P0S_P1.f
   const mepcop1_64_scache* abuf = sem;
   const mepcop1_64_idesc* idesc = abuf->idesc;
   int cycles = 0;
@@ -1484,7 +1484,7 @@ mepcop1_64_mep_model::model_cpmovtocsar1_P0S_P1_before (mep_ext1_cpu *current_cp
 UINT
 mepcop1_64_mep_model::model_cpmovtocsar1_P0S_P1_after (mep_ext1_cpu *current_cpu, mepcop1_64_scache *sem)
 {
-#define FLD(f) abuf->fields.sfmt_cpmoviu_w_P0_P1.f
+#define FLD(f) abuf->fields.sfmt_cpmovi_b_P0S_P1.f
   const mepcop1_64_scache* abuf = sem;
   const mepcop1_64_idesc* idesc = abuf->idesc;
   int cycles = 0;
@@ -1500,7 +1500,7 @@ mepcop1_64_mep_model::model_cpmovtocsar1_P0S_P1_after (mep_ext1_cpu *current_cpu
 UINT
 mepcop1_64_mep_model::model_cpmovtocc_P0S_P1_before (mep_ext1_cpu *current_cpu, mepcop1_64_scache *sem)
 {
-#define FLD(f) abuf->fields.sfmt_cpmoviu_w_P0_P1.f
+#define FLD(f) abuf->fields.sfmt_cpmovi_b_P0S_P1.f
   const mepcop1_64_scache* abuf = sem;
   const mepcop1_64_idesc* idesc = abuf->idesc;
   int cycles = 0;
@@ -1514,7 +1514,7 @@ mepcop1_64_mep_model::model_cpmovtocc_P0S_P1_before (mep_ext1_cpu *current_cpu,
 UINT
 mepcop1_64_mep_model::model_cpmovtocc_P0S_P1_after (mep_ext1_cpu *current_cpu, mepcop1_64_scache *sem)
 {
-#define FLD(f) abuf->fields.sfmt_cpmoviu_w_P0_P1.f
+#define FLD(f) abuf->fields.sfmt_cpmovi_b_P0S_P1.f
   const mepcop1_64_scache* abuf = sem;
   const mepcop1_64_idesc* idesc = abuf->idesc;
   int cycles = 0;
@@ -5788,6 +5788,36 @@ mepcop1_64_mep_model::model_c1nop_P1_after (mep_ext1_cpu *current_cpu, mepcop1_6
 }
 
 UINT
+mepcop1_64_mep_model::model_cpmovi_b_P0S_P1_before (mep_ext1_cpu *current_cpu, mepcop1_64_scache *sem)
+{
+#define FLD(f) abuf->fields.sfmt_cpmovi_b_P0S_P1.f
+  const mepcop1_64_scache* abuf = sem;
+  const mepcop1_64_idesc* idesc = abuf->idesc;
+  int cycles = 0;
+  {
+    cycles += model_u_exec_before (current_cpu, idesc, 0);
+  }
+  return cycles;
+#undef FLD
+}
+
+UINT
+mepcop1_64_mep_model::model_cpmovi_b_P0S_P1_after (mep_ext1_cpu *current_cpu, mepcop1_64_scache *sem)
+{
+#define FLD(f) abuf->fields.sfmt_cpmovi_b_P0S_P1.f
+  const mepcop1_64_scache* abuf = sem;
+  const mepcop1_64_idesc* idesc = abuf->idesc;
+  int cycles = 0;
+  {
+    int referenced = 0;
+    unsigned long long insn_referenced = abuf->written;
+    cycles += model_u_exec_after (current_cpu, idesc, 0, referenced);
+  }
+  return cycles;
+#undef FLD
+}
+
+UINT
 mepcop1_64_mep_model::model_cpadda1u_b_P1_before (mep_ext1_cpu *current_cpu, mepcop1_64_scache *sem)
 {
 #define FLD(f) abuf->fields.sfmt_cpfmulia1u_b_P1.f
@@ -7140,7 +7170,7 @@ mepcop1_64_mep_model::model_cpacswp_P1_after (mep_ext1_cpu *current_cpu, mepcop1
 UINT
 mepcop1_64_mep_model::model_cpsrla1_P1_before (mep_ext1_cpu *current_cpu, mepcop1_64_scache *sem)
 {
-#define FLD(f) abuf->fields.sfmt_cpmoviu_w_P0_P1.f
+#define FLD(f) abuf->fields.sfmt_cpmovi_b_P0S_P1.f
   const mepcop1_64_scache* abuf = sem;
   const mepcop1_64_idesc* idesc = abuf->idesc;
   int cycles = 0;
@@ -7154,7 +7184,7 @@ mepcop1_64_mep_model::model_cpsrla1_P1_before (mep_ext1_cpu *current_cpu, mepcop
 UINT
 mepcop1_64_mep_model::model_cpsrla1_P1_after (mep_ext1_cpu *current_cpu, mepcop1_64_scache *sem)
 {
-#define FLD(f) abuf->fields.sfmt_cpmoviu_w_P0_P1.f
+#define FLD(f) abuf->fields.sfmt_cpmovi_b_P0S_P1.f
   const mepcop1_64_scache* abuf = sem;
   const mepcop1_64_idesc* idesc = abuf->idesc;
   int cycles = 0;
@@ -7170,7 +7200,7 @@ mepcop1_64_mep_model::model_cpsrla1_P1_after (mep_ext1_cpu *current_cpu, mepcop1
 UINT
 mepcop1_64_mep_model::model_cpsraa1_P1_before (mep_ext1_cpu *current_cpu, mepcop1_64_scache *sem)
 {
-#define FLD(f) abuf->fields.sfmt_cpmoviu_w_P0_P1.f
+#define FLD(f) abuf->fields.sfmt_cpmovi_b_P0S_P1.f
   const mepcop1_64_scache* abuf = sem;
   const mepcop1_64_idesc* idesc = abuf->idesc;
   int cycles = 0;
@@ -7184,7 +7214,7 @@ mepcop1_64_mep_model::model_cpsraa1_P1_before (mep_ext1_cpu *current_cpu, mepcop
 UINT
 mepcop1_64_mep_model::model_cpsraa1_P1_after (mep_ext1_cpu *current_cpu, mepcop1_64_scache *sem)
 {
-#define FLD(f) abuf->fields.sfmt_cpmoviu_w_P0_P1.f
+#define FLD(f) abuf->fields.sfmt_cpmovi_b_P0S_P1.f
   const mepcop1_64_scache* abuf = sem;
   const mepcop1_64_idesc* idesc = abuf->idesc;
   int cycles = 0;
@@ -7200,7 +7230,7 @@ mepcop1_64_mep_model::model_cpsraa1_P1_after (mep_ext1_cpu *current_cpu, mepcop1
 UINT
 mepcop1_64_mep_model::model_cpslla1_P1_before (mep_ext1_cpu *current_cpu, mepcop1_64_scache *sem)
 {
-#define FLD(f) abuf->fields.sfmt_cpmoviu_w_P0_P1.f
+#define FLD(f) abuf->fields.sfmt_cpmovi_b_P0S_P1.f
   const mepcop1_64_scache* abuf = sem;
   const mepcop1_64_idesc* idesc = abuf->idesc;
   int cycles = 0;
@@ -7214,7 +7244,7 @@ mepcop1_64_mep_model::model_cpslla1_P1_before (mep_ext1_cpu *current_cpu, mepcop
 UINT
 mepcop1_64_mep_model::model_cpslla1_P1_after (mep_ext1_cpu *current_cpu, mepcop1_64_scache *sem)
 {
-#define FLD(f) abuf->fields.sfmt_cpmoviu_w_P0_P1.f
+#define FLD(f) abuf->fields.sfmt_cpmovi_b_P0S_P1.f
   const mepcop1_64_scache* abuf = sem;
   const mepcop1_64_idesc* idesc = abuf->idesc;
   int cycles = 0;
@@ -9856,6 +9886,7 @@ const mepcop1_64_mep_model::insn_timing mepcop1_64_mep_model::timing[] = {
   { MEPCOP1_64_INSN_CDMOVIU_P0_P1, & mepcop1_64_mep_model::model_cdmoviu_P0_P1_before, & mepcop1_64_mep_model::model_cdmoviu_P0_P1_after, { { mepcop1_64_mep_model::UNIT_U_EXEC, 1, 1 } } },
   { MEPCOP1_64_INSN_CDMOVI_P0_P1, & mepcop1_64_mep_model::model_cdmovi_P0_P1_before, & mepcop1_64_mep_model::model_cdmovi_P0_P1_after, { { mepcop1_64_mep_model::UNIT_U_EXEC, 1, 1 } } },
   { MEPCOP1_64_INSN_C1NOP_P1, & mepcop1_64_mep_model::model_c1nop_P1_before, & mepcop1_64_mep_model::model_c1nop_P1_after, { { mepcop1_64_mep_model::UNIT_U_EXEC, 1, 1 } } },
+  { MEPCOP1_64_INSN_CPMOVI_B_P0S_P1, & mepcop1_64_mep_model::model_cpmovi_b_P0S_P1_before, & mepcop1_64_mep_model::model_cpmovi_b_P0S_P1_after, { { mepcop1_64_mep_model::UNIT_U_EXEC, 1, 1 } } },
   { MEPCOP1_64_INSN_CPADDA1U_B_P1, & mepcop1_64_mep_model::model_cpadda1u_b_P1_before, & mepcop1_64_mep_model::model_cpadda1u_b_P1_after, { { mepcop1_64_mep_model::UNIT_U_EXEC, 1, 1 } } },
   { MEPCOP1_64_INSN_CPADDA1_B_P1, & mepcop1_64_mep_model::model_cpadda1_b_P1_before, & mepcop1_64_mep_model::model_cpadda1_b_P1_after, { { mepcop1_64_mep_model::UNIT_U_EXEC, 1, 1 } } },
   { MEPCOP1_64_INSN_CPADDUA1_H_P1, & mepcop1_64_mep_model::model_cpaddua1_h_P1_before, & mepcop1_64_mep_model::model_cpaddua1_h_P1_after, { { mepcop1_64_mep_model::UNIT_U_EXEC, 1, 1 } } },
index 91c457b..e4fc4e4 100644 (file)
@@ -519,6 +519,8 @@ protected:
   UINT model_cdmovi_P0_P1_after (mep_ext1_cpu *current_cpu, mepcop1_64_scache *sem);
   UINT model_c1nop_P1_before (mep_ext1_cpu *current_cpu, mepcop1_64_scache *sem);
   UINT model_c1nop_P1_after (mep_ext1_cpu *current_cpu, mepcop1_64_scache *sem);
+  UINT model_cpmovi_b_P0S_P1_before (mep_ext1_cpu *current_cpu, mepcop1_64_scache *sem);
+  UINT model_cpmovi_b_P0S_P1_after (mep_ext1_cpu *current_cpu, mepcop1_64_scache *sem);
   UINT model_cpadda1u_b_P1_before (mep_ext1_cpu *current_cpu, mepcop1_64_scache *sem);
   UINT model_cpadda1u_b_P1_after (mep_ext1_cpu *current_cpu, mepcop1_64_scache *sem);
   UINT model_cpadda1_b_P1_before (mep_ext1_cpu *current_cpu, mepcop1_64_scache *sem);
index 1dce701..d583ee3 100644 (file)
@@ -695,7 +695,7 @@ current_cpu->check_option_cp (pc);
 sem_status
 mepcop1_64_sem_cpccadd_b_P0S_P1 (mep_ext1_cpu* current_cpu, mepcop1_64_scache* sem)
 {
-#define FLD(f) abuf->fields.sfmt_cpmoviu_w_P0_P1.f
+#define FLD(f) abuf->fields.sfmt_cpmovi_b_P0S_P1.f
   sem_status status = SEM_STATUS_NORMAL;
   mepcop1_64_scache* abuf = sem;
   unsigned long long written = 0;
@@ -1311,7 +1311,7 @@ current_cpu->check_option_cp (pc);
 sem_status
 mepcop1_64_sem_cpmovtocsar0_P0S_P1 (mep_ext1_cpu* current_cpu, mepcop1_64_scache* sem)
 {
-#define FLD(f) abuf->fields.sfmt_cpmoviu_w_P0_P1.f
+#define FLD(f) abuf->fields.sfmt_cpmovi_b_P0S_P1.f
   sem_status status = SEM_STATUS_NORMAL;
   mepcop1_64_scache* abuf = sem;
   unsigned long long written = 0;
@@ -1333,7 +1333,7 @@ current_cpu->ivc2_cpmovtocsar0 (pc, current_cpu->hardware.h_cr64[FLD (f_ivc2_5u1
 sem_status
 mepcop1_64_sem_cpmovtocsar1_P0S_P1 (mep_ext1_cpu* current_cpu, mepcop1_64_scache* sem)
 {
-#define FLD(f) abuf->fields.sfmt_cpmoviu_w_P0_P1.f
+#define FLD(f) abuf->fields.sfmt_cpmovi_b_P0S_P1.f
   sem_status status = SEM_STATUS_NORMAL;
   mepcop1_64_scache* abuf = sem;
   unsigned long long written = 0;
@@ -1355,7 +1355,7 @@ current_cpu->ivc2_cpmovtocsar1 (pc, current_cpu->hardware.h_cr64[FLD (f_ivc2_5u1
 sem_status
 mepcop1_64_sem_cpmovtocc_P0S_P1 (mep_ext1_cpu* current_cpu, mepcop1_64_scache* sem)
 {
-#define FLD(f) abuf->fields.sfmt_cpmoviu_w_P0_P1.f
+#define FLD(f) abuf->fields.sfmt_cpmovi_b_P0S_P1.f
   sem_status status = SEM_STATUS_NORMAL;
   mepcop1_64_scache* abuf = sem;
   unsigned long long written = 0;
@@ -4956,6 +4956,33 @@ current_cpu->ivc2_c1nop (pc);
 #undef FLD
 }
 
+// ********** cpmovi_b_P0S_P1: cpmovi.b $crqp,$simm8p20
+
+sem_status
+mepcop1_64_sem_cpmovi_b_P0S_P1 (mep_ext1_cpu* current_cpu, mepcop1_64_scache* sem)
+{
+#define FLD(f) abuf->fields.sfmt_cpmovi_b_P0S_P1.f
+  sem_status status = SEM_STATUS_NORMAL;
+  mepcop1_64_scache* abuf = sem;
+  unsigned long long written = 0;
+  PCADDR pc = abuf->addr;
+  PCADDR npc = pc + 4;
+
+{
+current_cpu->check_option_cp (pc);
+  {
+    DI opval = current_cpu->ivc2_cpmovi_b (pc, FLD (f_ivc2_8s20));
+    if (UNLIKELY(current_cpu->trace_result_p))
+      current_cpu->trace_stream << "cr64" << '[' << FLD (f_ivc2_5u13) << ']' << ":=0x" << hex << opval << dec << "  ";
+    current_cpu->h_cr64_set (FLD (f_ivc2_5u13), opval);
+  }
+}
+
+  current_cpu->done_insn (npc, status);
+  return status;
+#undef FLD
+}
+
 // ********** cpadda1u_b_P1: cpadda1u.b $crqp,$crpp
 
 sem_status
@@ -6026,7 +6053,7 @@ current_cpu->ivc2_cpacswp (pc);
 sem_status
 mepcop1_64_sem_cpsrla1_P1 (mep_ext1_cpu* current_cpu, mepcop1_64_scache* sem)
 {
-#define FLD(f) abuf->fields.sfmt_cpmoviu_w_P0_P1.f
+#define FLD(f) abuf->fields.sfmt_cpmovi_b_P0S_P1.f
   sem_status status = SEM_STATUS_NORMAL;
   mepcop1_64_scache* abuf = sem;
   unsigned long long written = 0;
@@ -6048,7 +6075,7 @@ current_cpu->ivc2_cpsrla1 (pc, current_cpu->hardware.h_cr64[FLD (f_ivc2_5u13)]);
 sem_status
 mepcop1_64_sem_cpsraa1_P1 (mep_ext1_cpu* current_cpu, mepcop1_64_scache* sem)
 {
-#define FLD(f) abuf->fields.sfmt_cpmoviu_w_P0_P1.f
+#define FLD(f) abuf->fields.sfmt_cpmovi_b_P0S_P1.f
   sem_status status = SEM_STATUS_NORMAL;
   mepcop1_64_scache* abuf = sem;
   unsigned long long written = 0;
@@ -6070,7 +6097,7 @@ current_cpu->ivc2_cpsraa1 (pc, current_cpu->hardware.h_cr64[FLD (f_ivc2_5u13)]);
 sem_status
 mepcop1_64_sem_cpslla1_P1 (mep_ext1_cpu* current_cpu, mepcop1_64_scache* sem)
 {
-#define FLD(f) abuf->fields.sfmt_cpmoviu_w_P0_P1.f
+#define FLD(f) abuf->fields.sfmt_cpmovi_b_P0S_P1.f
   sem_status status = SEM_STATUS_NORMAL;
   mepcop1_64_scache* abuf = sem;
   unsigned long long written = 0;
index 454ece9..4a8c723 100644 (file)
@@ -1,3 +1,8 @@
+2009-05-22  DJ Delorie  <dj@redhat.com>
+
+       * mepcfgtool.c (do_cgen_config_opc): Propagate endianness and VLIW
+       size to default configuration.
+
 2009-05-19  DJ Delorie  <dj@redhat.com>
 
        * mepcfgtool.c (do_extra_headers): Remove stdint.h from EXTRA_HEADERS.
index ea44c3c..d34e893 100644 (file)
@@ -4110,7 +4110,9 @@ do_cgen_config_opc ()
   fputs ("  /* Default entry: first module, with all options enabled. */\n", dst_file);
   fprintf (dst_file, "  { \"\", 0, ");
   gen_cpu_flags (default_module);
-  fprintf (dst_file, "1, 0,");
+  fprintf (dst_file, "%d, %d,",
+          mep_endian_type == MEP_ENDIAN_LITTLE ? 0 : 1,
+          default_module ? cop_vliw_bits (default_module) : 0);
   if (default_module)
     gen_isa_masks (default_module, 1);
   else