Previous 199869 Revisions Next

r33927 Tuesday 16th December, 2014 at 13:38:59 UTC by David Haywood
more (nw)
[src/emu/cpu/arcompact]arcompactdasm_ops.c

trunk/src/emu/cpu/arcompact/arcompactdasm_ops.c
r242438r242439
839839   }
840840   else if (p == 1)
841841   {
842      output  += sprintf( output, "<04_2f illegal p=01>");
842      int U = (op & 0x00000fc0) >> 6; op &= ~0x00000fc0;
843
844      output  += sprintf( output, "U(0x%02x) ", U);
843845   }
844846   else if (p == 2)
845847   {
r242438r242439
949951int arcompact_handle05_29_dasm(DASM_OPS_32)  { return arcompact_handle04_helper_dasm(DASM_PARAMS, "SUBSDW", 0,0); }
950952
951953
952//int arcompact_handle05_2f_dasm(DASM_OPS_32)  { print("SOP (another table) (%08x)", op); return 4;}
953954
954int arcompact_handle05_2f_00_dasm(DASM_OPS_32)  { print("SWAP (%08x)", op); return 4;}
955int arcompact_handle05_2f_01_dasm(DASM_OPS_32)  { print("NORM (%08x)", op); return 4;}
956int arcompact_handle05_2f_02_dasm(DASM_OPS_32)  { print("SAT16 (%08x)", op); return 4;}
957int arcompact_handle05_2f_03_dasm(DASM_OPS_32)  { print("RND16 (%08x)", op); return 4;}
958int arcompact_handle05_2f_04_dasm(DASM_OPS_32)  { print("ABSSW (%08x)", op); return 4;}
959int arcompact_handle05_2f_05_dasm(DASM_OPS_32)  { print("ABSS (%08x)", op); return 4;}
960int arcompact_handle05_2f_06_dasm(DASM_OPS_32)  { print("NEGSW (%08x)", op); return 4;}
961int arcompact_handle05_2f_07_dasm(DASM_OPS_32)  { print("NEGS (%08x)", op); return 4;}
962int arcompact_handle05_2f_08_dasm(DASM_OPS_32)  { print("NORMW (%08x)", op); return 4;}
963//int arcompact_handle05_2f_3f_dasm(DASM_OPS_32)  { print("ZOPs (another table) (%08x)", op); return 4;}
955int arcompact_handle05_2f_0x_helper_dasm(DASM_OPS_32, const char* optext)
956{
957   //           
958   // 0010 1bbb pp10 1111 FBBB CCCC CCII IIII when pp == 0x00
959   // or
960   // 0010 1bbb pp10 1111 FBBB UUUU UUII IIII when pp == 0x01
961   // otherwise invalid
964962
963   int size = 4;
965964
965   int p = (op & 0x00c00000) >> 22; op &= ~0x00c00000;
966   int b = (op & 0x07000000) >> 24; op &= ~0x07000000;
967   int B = (op & 0x00007000) >> 12; op &= ~0x00007000;
968   int breg = b | (B << 3);
969   int F = (op & 0x00008000) >> 15;op &= ~0x00008000;
966970
971   output  += sprintf( output, "%s", optext);
972   output  += sprintf( output, "%s", flagbit[F]);
973//   output  += sprintf( output, " p(%d)", p);
974   
975   
976   output += sprintf(output, " %s, ", regnames[breg]);
977
978   if (p == 0)
979   {
980      int C = (op & 0x00000fc0) >> 6; op &= ~0x00000fc0;
981
982      if (C == LIMM_REG)
983      {
984         UINT32 limm;
985         GET_LIMM_32;
986         size = 8;   
987         output  += sprintf( output, "(%08x) ", limm );
988
989      }
990      else
991      {
992         output  += sprintf( output, "C(%s) ", regnames[C]);
993      }
994   }
995   else if (p == 1)
996   {
997      int U = (op & 0x00000fc0) >> 6; op &= ~0x00000fc0;
998
999      output  += sprintf( output, "U(0x%02x) ", U);
1000   }
1001   else if (p == 2)
1002   {
1003      output  += sprintf( output, "<05_2f illegal p=10>");
1004   }
1005   else if (p == 3)
1006   {
1007      output  += sprintf( output, "<05_2f illegal p=11>");
1008   }
1009
1010   return size;
1011}
1012
1013
1014int arcompact_handle05_2f_00_dasm(DASM_OPS_32)  { return arcompact_handle05_2f_0x_helper_dasm(DASM_PARAMS, "SWAP");  }
1015int arcompact_handle05_2f_01_dasm(DASM_OPS_32)  { return arcompact_handle05_2f_0x_helper_dasm(DASM_PARAMS, "NORM");  }
1016int arcompact_handle05_2f_02_dasm(DASM_OPS_32)  { return arcompact_handle05_2f_0x_helper_dasm(DASM_PARAMS, "SAT16"); }
1017int arcompact_handle05_2f_03_dasm(DASM_OPS_32)  { return arcompact_handle05_2f_0x_helper_dasm(DASM_PARAMS, "RND16"); }
1018int arcompact_handle05_2f_04_dasm(DASM_OPS_32)  { return arcompact_handle05_2f_0x_helper_dasm(DASM_PARAMS, "ABSSW"); }
1019int arcompact_handle05_2f_05_dasm(DASM_OPS_32)  { return arcompact_handle05_2f_0x_helper_dasm(DASM_PARAMS, "ABSS");  }
1020int arcompact_handle05_2f_06_dasm(DASM_OPS_32)  { return arcompact_handle05_2f_0x_helper_dasm(DASM_PARAMS, "NEGSW"); }
1021int arcompact_handle05_2f_07_dasm(DASM_OPS_32)  { return arcompact_handle05_2f_0x_helper_dasm(DASM_PARAMS, "NEGS");  }
1022int arcompact_handle05_2f_08_dasm(DASM_OPS_32)  { return arcompact_handle05_2f_0x_helper_dasm(DASM_PARAMS, "NORMW"); }
1023
1024
9671025int arcompact_handle06_dasm(DASM_OPS_32)
9681026{
9691027   print("op a,b,c (06 ARC ext) (%08x)", op );


Previous 199869 Revisions Next


© 1997-2024 The MAME Team