Diff for /np2/i386c/ia32/groups.c between versions 1.1 and 1.8

version 1.1, 2003/12/08 00:55:31 version 1.8, 2011/01/15 17:17:23
Line 1 Line 1
 /*      $Id$    */  
   
 /*  /*
  * Copyright (c) 2002-2003 NONAKA Kimihiro   * Copyright (c) 2002-2003 NONAKA Kimihiro
  * All rights reserved.   * All rights reserved.
Line 12 Line 10
  * 2. Redistributions in binary form must reproduce the above copyright   * 2. Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in the   *    notice, this list of conditions and the following disclaimer in the
  *    documentation and/or other materials provided with the distribution.   *    documentation and/or other materials provided with the distribution.
  * 3. The name of the author may not be used to endorse or promote products  
  *    derived from this software without specific prior written permission.  
  *   *
  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR   * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES   * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
Line 38 Line 34
 void  void
 Grp1_EbIb(void)  Grp1_EbIb(void)
 {  {
         DWORD op;          UINT8 *out;
           UINT32 madr;
           UINT32 op, src;
         int idx;          int idx;
   
         GET_PCBYTE(op);          GET_PCBYTE(op);
         idx = (op >> 3) & 7;          idx = (op >> 3) & 7;
         if (op >= 0xc0) {          if (op >= 0xc0) {
                 CPU_WORKCLOCK(3);                  CPU_WORKCLOCK(2);
                 (*insttable_G1EbIb[idx])(reg8_b20[op]);                  out = reg8_b20[op];
                   GET_PCBYTE(src);
                   (*insttable_G1EbIb[idx])(out, src);
         } else {          } else {
                 CPU_WORKCLOCK(7);                  CPU_WORKCLOCK(7);
                 (*insttable_G1EbIb_ext[idx])(calc_ea_dst(op));                  madr = calc_ea_dst(op);
                   GET_PCBYTE(src);
                   (*insttable_G1EbIb_ext[idx])(madr, src);
         }          }
 }  }
   
 void  void
 Grp1_EwIb(void)  Grp1_EwIb(void)
 {  {
         WORD *out;          UINT16 *out;
         DWORD op, madr, src;          UINT32 madr, src;
           UINT32 op;
         int idx;          int idx;
   
         GET_PCBYTE(op);          GET_PCBYTE(op);
         idx = (op >> 3) & 7;          idx = (op >> 3) & 7;
         if (op >= 0xc0) {          if (op >= 0xc0) {
                 CPU_WORKCLOCK(3);                  CPU_WORKCLOCK(2);
                 out = reg16_b20[op];                  out = reg16_b20[op];
                 GET_PCBYTES(src);                  GET_PCBYTES(src);
                 (*insttable_G1EwIx[idx])(out, src);                  (*insttable_G1EwIx[idx])(out, src);
Line 77  Grp1_EwIb(void) Line 80  Grp1_EwIb(void)
 void  void
 Grp1_EdIb(void)  Grp1_EdIb(void)
 {  {
         DWORD *out;          UINT32 *out;
         DWORD op, madr, src;          UINT32 madr, src;
           UINT32 op;
         int idx;          int idx;
   
         GET_PCBYTE(op);          GET_PCBYTE(op);
         idx = (op >> 3) & 7;          idx = (op >> 3) & 7;
         if (op >= 0xc0) {          if (op >= 0xc0) {
                 CPU_WORKCLOCK(3);                  CPU_WORKCLOCK(2);
                 out = reg32_b20[op];                  out = reg32_b20[op];
                 GET_PCBYTESD(src);                  GET_PCBYTESD(src);
                 (*insttable_G1EdIx[idx])(out, src);                  (*insttable_G1EdIx[idx])(out, src);
Line 99  Grp1_EdIb(void) Line 103  Grp1_EdIb(void)
 void  void
 Grp1_EwIw(void)  Grp1_EwIw(void)
 {  {
         WORD *out;          UINT16 *out;
         DWORD op, madr, src;          UINT32 madr, src;
           UINT32 op;
         int idx;          int idx;
   
         GET_PCBYTE(op);          GET_PCBYTE(op);
         idx = (op >> 3) & 7;          idx = (op >> 3) & 7;
         if (op >= 0xc0) {          if (op >= 0xc0) {
                 CPU_WORKCLOCK(3);                  CPU_WORKCLOCK(2);
                 out = reg16_b20[op];                  out = reg16_b20[op];
                 GET_PCWORD(src);                  GET_PCWORD(src);
                 (*insttable_G1EwIx[idx])(out, src);                  (*insttable_G1EwIx[idx])(out, src);
Line 121  Grp1_EwIw(void) Line 126  Grp1_EwIw(void)
 void  void
 Grp1_EdId(void)  Grp1_EdId(void)
 {  {
         DWORD *out;          UINT32 *out;
         DWORD op, madr, src;          UINT32 madr, src;
           UINT32 op;
         int idx;          int idx;
   
         GET_PCBYTE(op);          GET_PCBYTE(op);
         idx = (op >> 3) & 7;          idx = (op >> 3) & 7;
         if (op >= 0xc0) {          if (op >= 0xc0) {
                 CPU_WORKCLOCK(3);                  CPU_WORKCLOCK(2);
                 out = reg32_b20[op];                  out = reg32_b20[op];
                 GET_PCDWORD(src);                  GET_PCDWORD(src);
                 (*insttable_G1EdIx[idx])(out, src);                  (*insttable_G1EdIx[idx])(out, src);
Line 145  Grp1_EdId(void) Line 151  Grp1_EdId(void)
 void  void
 Grp2_EbIb(void)  Grp2_EbIb(void)
 {  {
         BYTE *out;          UINT8 *out;
         DWORD op, madr;          UINT32 madr;
           UINT32 op;
           UINT32 cl;
         int idx;          int idx;
         BYTE cl;  
   
         GET_PCBYTE(op);          GET_PCBYTE(op);
         idx = (op >> 3) & 7;          idx = (op >> 3) & 7;
Line 170  Grp2_EbIb(void) Line 177  Grp2_EbIb(void)
 void  void
 Grp2_EwIb(void)  Grp2_EwIb(void)
 {  {
         WORD *out;          UINT16 *out;
         DWORD op, madr;          UINT32 madr;
           UINT32 op;
           UINT32 cl;
         int idx;          int idx;
         BYTE cl;  
   
         GET_PCBYTE(op);          GET_PCBYTE(op);
         idx = (op >> 3) & 7;          idx = (op >> 3) & 7;
Line 195  Grp2_EwIb(void) Line 203  Grp2_EwIb(void)
 void  void
 Grp2_EdIb(void)  Grp2_EdIb(void)
 {  {
         DWORD *out;          UINT32 *out;
         DWORD op, madr;          UINT32 madr;
           UINT32 op;
           UINT32 cl;
         int idx;          int idx;
         BYTE cl;  
   
         GET_PCBYTE(op);          GET_PCBYTE(op);
         idx = (op >> 3) & 7;          idx = (op >> 3) & 7;
Line 220  Grp2_EdIb(void) Line 229  Grp2_EdIb(void)
 void  void
 Grp2_Eb(void)  Grp2_Eb(void)
 {  {
         DWORD op;          UINT32 op;
         int idx;          int idx;
   
         GET_PCBYTE(op);          GET_PCBYTE(op);
Line 237  Grp2_Eb(void) Line 246  Grp2_Eb(void)
 void  void
 Grp2_Ew(void)  Grp2_Ew(void)
 {  {
         DWORD op;          UINT32 op;
         int idx;          int idx;
   
         GET_PCBYTE(op);          GET_PCBYTE(op);
Line 254  Grp2_Ew(void) Line 263  Grp2_Ew(void)
 void  void
 Grp2_Ed(void)  Grp2_Ed(void)
 {  {
         DWORD op;          UINT32 op;
         int idx;          int idx;
   
         GET_PCBYTE(op);          GET_PCBYTE(op);
Line 271  Grp2_Ed(void) Line 280  Grp2_Ed(void)
 void  void
 Grp2_EbCL(void)  Grp2_EbCL(void)
 {  {
         BYTE *out;          UINT8 *out;
         DWORD op, madr;          UINT32 madr;
           UINT32 op;
           UINT32 cl;
         int idx;          int idx;
         BYTE cl;  
   
         GET_PCBYTE(op);          GET_PCBYTE(op);
         idx = (op >> 3) & 7;          idx = (op >> 3) & 7;
Line 282  Grp2_EbCL(void) Line 292  Grp2_EbCL(void)
                 CPU_WORKCLOCK(5);                  CPU_WORKCLOCK(5);
                 out = reg8_b20[op];                  out = reg8_b20[op];
                 cl = CPU_CL;                  cl = CPU_CL;
                 CPU_WORKCLOCK(cl & 0x1f);                  cl &= 0x1f;
                   CPU_WORKCLOCK(cl);
                 (*insttable_G2EbCL[idx])(out, cl);                  (*insttable_G2EbCL[idx])(out, cl);
         } else {          } else {
                 CPU_WORKCLOCK(8);                  CPU_WORKCLOCK(8);
                 madr = calc_ea_dst(op);                  madr = calc_ea_dst(op);
                 cl = CPU_CL;                  cl = CPU_CL;
                 CPU_WORKCLOCK(cl & 0x1f);                  cl &= 0x1f;
                   CPU_WORKCLOCK(cl);
                 (*insttable_G2EbCL_ext[idx])(madr, cl);                  (*insttable_G2EbCL_ext[idx])(madr, cl);
         }          }
 }  }
Line 296  Grp2_EbCL(void) Line 308  Grp2_EbCL(void)
 void  void
 Grp2_EwCL(void)  Grp2_EwCL(void)
 {  {
         WORD *out;          UINT16 *out;
         DWORD op, madr;          UINT32 madr;
           UINT32 op;
           UINT32 cl;
         int idx;          int idx;
         BYTE cl;  
   
         GET_PCBYTE(op);          GET_PCBYTE(op);
         idx = (op >> 3) & 7;          idx = (op >> 3) & 7;
Line 307  Grp2_EwCL(void) Line 320  Grp2_EwCL(void)
                 CPU_WORKCLOCK(5);                  CPU_WORKCLOCK(5);
                 out = reg16_b20[op];                  out = reg16_b20[op];
                 cl = CPU_CL;                  cl = CPU_CL;
                 CPU_WORKCLOCK(cl & 0x1f);                  cl &= 0x1f;
                   CPU_WORKCLOCK(cl);
                 (*insttable_G2EwCL[idx])(out, cl);                  (*insttable_G2EwCL[idx])(out, cl);
         } else {          } else {
                 CPU_WORKCLOCK(8);                  CPU_WORKCLOCK(8);
                 madr = calc_ea_dst(op);                  madr = calc_ea_dst(op);
                 cl = CPU_CL;                  cl = CPU_CL;
                 CPU_WORKCLOCK(cl & 0x1f);                  cl &= 0x1f;
                   CPU_WORKCLOCK(cl);
                 (*insttable_G2EwCL_ext[idx])(madr, cl);                  (*insttable_G2EwCL_ext[idx])(madr, cl);
         }          }
 }  }
Line 321  Grp2_EwCL(void) Line 336  Grp2_EwCL(void)
 void  void
 Grp2_EdCL(void)  Grp2_EdCL(void)
 {  {
         DWORD *out;          UINT32 *out;
         DWORD op, madr;          UINT32 madr;
           UINT32 op;
           UINT32 cl;
         int idx;          int idx;
         BYTE  cl;  
   
         GET_PCBYTE(op);          GET_PCBYTE(op);
         idx = (op >> 3) & 7;          idx = (op >> 3) & 7;
Line 332  Grp2_EdCL(void) Line 348  Grp2_EdCL(void)
                 CPU_WORKCLOCK(5);                  CPU_WORKCLOCK(5);
                 out = reg32_b20[op];                  out = reg32_b20[op];
                 cl = CPU_CL;                  cl = CPU_CL;
                 CPU_WORKCLOCK(cl & 0x1f);                  cl &= 0x1f;
                   CPU_WORKCLOCK(cl);
                 (*insttable_G2EdCL[idx])(out, cl);                  (*insttable_G2EdCL[idx])(out, cl);
         } else {          } else {
                 CPU_WORKCLOCK(8);                  CPU_WORKCLOCK(8);
                 madr = calc_ea_dst(op);                  madr = calc_ea_dst(op);
                 cl = CPU_CL;                  cl = CPU_CL;
                 CPU_WORKCLOCK(cl & 0x1f);                  cl &= 0x1f;
                   CPU_WORKCLOCK(cl);
                 (*insttable_G2EdCL_ext[idx])(madr, cl);                  (*insttable_G2EdCL_ext[idx])(madr, cl);
         }          }
 }  }
Line 348  Grp2_EdCL(void) Line 366  Grp2_EdCL(void)
 void  void
 Grp3_Eb(void)  Grp3_Eb(void)
 {  {
           UINT32 op;
         DWORD op;  
   
         GET_PCBYTE(op);          GET_PCBYTE(op);
         (*insttable_G3Eb[(op >> 3) & 7])(op);          (*insttable_G3Eb[(op >> 3) & 7])(op);
Line 358  Grp3_Eb(void) Line 375  Grp3_Eb(void)
 void  void
 Grp3_Ew(void)  Grp3_Ew(void)
 {  {
           UINT32 op;
         DWORD op;  
   
         GET_PCBYTE(op);          GET_PCBYTE(op);
         (*insttable_G3Ew[(op >> 3) & 7])(op);          (*insttable_G3Ew[(op >> 3) & 7])(op);
Line 368  Grp3_Ew(void) Line 384  Grp3_Ew(void)
 void  void
 Grp3_Ed(void)  Grp3_Ed(void)
 {  {
           UINT32 op;
         DWORD op;  
   
         GET_PCBYTE(op);          GET_PCBYTE(op);
         (*insttable_G3Ed[(op >> 3) & 7])(op);          (*insttable_G3Ed[(op >> 3) & 7])(op);
Line 380  Grp3_Ed(void) Line 395  Grp3_Ed(void)
 void  void
 Grp4(void)  Grp4(void)
 {  {
         DWORD op;          UINT32 op;
   
         GET_PCBYTE(op);          GET_PCBYTE(op);
         (*insttable_G4[(op >> 3) & 7])(op);          (*insttable_G4[(op >> 3) & 7])(op);
Line 391  Grp4(void) Line 406  Grp4(void)
 void  void
 Grp5_Ew(void)  Grp5_Ew(void)
 {  {
         DWORD op;          UINT32 op;
   
         GET_PCBYTE(op);          GET_PCBYTE(op);
         (*insttable_G5Ew[(op >> 3) & 7])(op);          (*insttable_G5Ew[(op >> 3) & 7])(op);
Line 400  Grp5_Ew(void) Line 415  Grp5_Ew(void)
 void  void
 Grp5_Ed(void)  Grp5_Ed(void)
 {  {
         DWORD op;          UINT32 op;
   
         GET_PCBYTE(op);          GET_PCBYTE(op);
         (*insttable_G5Ed[(op >> 3) & 7])(op);          (*insttable_G5Ed[(op >> 3) & 7])(op);
Line 409  Grp5_Ed(void) Line 424  Grp5_Ed(void)
   
 /* group 6 */  /* group 6 */
 void  void
 Grp6_16(void)  Grp6(void)
 {  
         DWORD op;  
   
         GET_PCBYTE(op);  
         (*insttable_G6_16[(op >> 3) & 7])(op);  
 }  
   
 void  
 Grp6_32(void)  
 {  {
         DWORD op;          UINT32 op;
   
         GET_PCBYTE(op);          GET_PCBYTE(op);
         (*insttable_G6_32[(op >> 3) & 7])(op);          (*insttable_G6[(op >> 3) & 7])(op);
 }  }
   
   
 /* group 7 */  /* group 7 */
 void  void
 Grp7_16(void)  Grp7(void)
 {  
         DWORD op;  
   
         GET_PCBYTE(op);  
         (*insttable_G7_16[(op >> 3) & 7])(op);  
 }  
   
 void  
 Grp7_32(void)  
 {  {
         DWORD op;          UINT32 op;
   
         GET_PCBYTE(op);          GET_PCBYTE(op);
         (*insttable_G7_32[(op >> 3) & 7])(op);          (*insttable_G7[(op >> 3) & 7])(op);
 }  }
   
   
Line 451  Grp7_32(void) Line 448  Grp7_32(void)
 void  void
 Grp8_EwIb(void)  Grp8_EwIb(void)
 {  {
         DWORD op;          UINT32 op;
   
         GET_PCBYTE(op);          GET_PCBYTE(op);
         (*insttable_G8EwIb[(op >> 3) & 7])(op);          (*insttable_G8EwIb[(op >> 3) & 7])(op);
Line 460  Grp8_EwIb(void) Line 457  Grp8_EwIb(void)
 void  void
 Grp8_EdIb(void)  Grp8_EdIb(void)
 {  {
         DWORD op;          UINT32 op;
   
         GET_PCBYTE(op);          GET_PCBYTE(op);
         (*insttable_G8EdIb[(op >> 3) & 7])(op);          (*insttable_G8EdIb[(op >> 3) & 7])(op);
Line 471  Grp8_EdIb(void) Line 468  Grp8_EdIb(void)
 void  void
 Grp9(void)  Grp9(void)
 {  {
         DWORD op;          UINT32 op;
   
         GET_PCBYTE(op);          GET_PCBYTE(op);
         (*insttable_G9[(op >> 3) & 7])(op);          (*insttable_G9[(op >> 3) & 7])(op);

Removed from v.1.1  
changed lines
  Added in v.1.8


RetroPC.NET-CVS <cvs@retropc.net>