summaryrefslogtreecommitdiff
path: root/includes/compiler/PCodeInfo.h
diff options
context:
space:
mode:
Diffstat (limited to 'includes/compiler/PCodeInfo.h')
-rw-r--r--includes/compiler/PCodeInfo.h885
1 files changed, 448 insertions, 437 deletions
diff --git a/includes/compiler/PCodeInfo.h b/includes/compiler/PCodeInfo.h
index 137e10a..c7cee47 100644
--- a/includes/compiler/PCodeInfo.h
+++ b/includes/compiler/PCodeInfo.h
@@ -1,22 +1,33 @@
#ifndef COMPILER_PCODEINFO_H
#define COMPILER_PCODEINFO_H
-#include "compiler/PCode.h"
+#include "compiler/common.h"
#ifdef __MWERKS__
#pragma options align=mac68k
#endif
+typedef enum {
+ PCOp_REGISTER,
+ PCOp_SYSREG,
+ PCOp_IMMEDIATE,
+ PCOp_MEMORY,
+ PCOp_LABEL,
+ PCOp_LABELDIFF,
+ PCOp_PLACEHOLDEROPERAND
+} PCOpKind;
+
typedef struct _OpcodeInfo {
const char *name;
const char *format;
unsigned char x8;
unsigned char x9;
- int flags;
- unsigned int insn;
+ UInt32 flags;
+ SInt32 insn;
} OpcodeInfo;
-/*enum {
+typedef enum Opcode {
+ PC_INVALID = -1,
PC_B = 0x0,
PC_BL = 0x1,
PC_BC = 0x2,
@@ -448,7 +459,7 @@ typedef struct _OpcodeInfo {
PC_PENTRY = 0x1AC,
PC_PEXIT = 0x1AD,
OPCODE_MAX = 0x1AE
-};*/
+} Opcode;
//#define PC_B 0x0
//#define PC_BL 0x1
//#define PC_BC 0x2
@@ -880,443 +891,443 @@ typedef struct _OpcodeInfo {
//#define PC_PENTRY 0x1AC
//#define PC_PEXIT 0x1AD
//#define OPCODE_MAX 0x1AE
-const short PC_B = 0x0;
-const short PC_BL = 0x1;
-const short PC_BC = 0x2;
-const short PC_BCLR = 0x3;
-const short PC_BCCTR = 0x4;
-const short PC_BT = 0x5;
-const short PC_BTLR = 0x6;
-const short PC_BTCTR = 0x7;
-const short PC_BF = 0x8;
-const short PC_BFLR = 0x9;
-const short PC_BFCTR = 0xA;
-const short PC_BDNZ = 0xB;
-const short PC_BDNZT = 0xC;
-const short PC_BDNZF = 0xD;
-const short PC_BDZ = 0xE;
-const short PC_BDZT = 0xF;
-const short PC_BDZF = 0x10;
-const short PC_BLR = 0x11;
-const short PC_BCTR = 0x12;
-const short PC_BCTRL = 0x13;
-const short PC_BLRL = 0x14;
-const short PC_LBZ = 0x15;
-const short PC_LBZU = 0x16;
-const short PC_LBZX = 0x17;
-const short PC_LBZUX = 0x18;
-const short PC_LHZ = 0x19;
-const short PC_LHZU = 0x1A;
-const short PC_LHZX = 0x1B;
-const short PC_LHZUX = 0x1C;
-const short PC_LHA = 0x1D;
-const short PC_LHAU = 0x1E;
-const short PC_LHAX = 0x1F;
-const short PC_LHAUX = 0x20;
-const short PC_LHBRX = 0x21;
-const short PC_LWZ = 0x22;
-const short PC_LWZU = 0x23;
-const short PC_LWZX = 0x24;
-const short PC_LWZUX = 0x25;
-const short PC_LWBRX = 0x26;
-const short PC_LMW = 0x27;
-const short PC_STB = 0x28;
-const short PC_STBU = 0x29;
-const short PC_STBX = 0x2A;
-const short PC_STBUX = 0x2B;
-const short PC_STH = 0x2C;
-const short PC_STHU = 0x2D;
-const short PC_STHX = 0x2E;
-const short PC_STHUX = 0x2F;
-const short PC_STHBRX = 0x30;
-const short PC_STW = 0x31;
-const short PC_STWU = 0x32;
-const short PC_STWX = 0x33;
-const short PC_STWUX = 0x34;
-const short PC_STWBRX = 0x35;
-const short PC_STMW = 0x36;
-const short PC_DCBF = 0x37;
-const short PC_DCBST = 0x38;
-const short PC_DCBT = 0x39;
-const short PC_DCBTST = 0x3A;
-const short PC_DCBZ = 0x3B;
-const short PC_ADD = 0x3C;
-const short PC_ADDC = 0x3D;
-const short PC_ADDE = 0x3E;
-const short PC_ADDI = 0x3F;
-const short PC_ADDIC = 0x40;
-const short PC_ADDICR = 0x41;
-const short PC_ADDIS = 0x42;
-const short PC_ADDME = 0x43;
-const short PC_ADDZE = 0x44;
-const short PC_DIVW = 0x45;
-const short PC_DIVWU = 0x46;
-const short PC_MULHW = 0x47;
-const short PC_MULHWU = 0x48;
-const short PC_MULLI = 0x49;
-const short PC_MULLW = 0x4A;
-const short PC_NEG = 0x4B;
-const short PC_SUBF = 0x4C;
-const short PC_SUBFC = 0x4D;
-const short PC_SUBFE = 0x4E;
-const short PC_SUBFIC = 0x4F;
-const short PC_SUBFME = 0x50;
-const short PC_SUBFZE = 0x51;
-const short PC_CMPI = 0x52;
-const short PC_CMP = 0x53;
-const short PC_CMPLI = 0x54;
-const short PC_CMPL = 0x55;
-const short PC_ANDI = 0x56;
-const short PC_ANDIS = 0x57;
-const short PC_ORI = 0x58;
-const short PC_ORIS = 0x59;
-const short PC_XORI = 0x5A;
-const short PC_XORIS = 0x5B;
-const short PC_AND = 0x5C;
-const short PC_OR = 0x5D;
-const short PC_XOR = 0x5E;
-const short PC_NAND = 0x5F;
-const short PC_NOR = 0x60;
-const short PC_EQV = 0x61;
-const short PC_ANDC = 0x62;
-const short PC_ORC = 0x63;
-const short PC_EXTSB = 0x64;
-const short PC_EXTSH = 0x65;
-const short PC_CNTLZW = 0x66;
-const short PC_RLWINM = 0x67;
-const short PC_RLWNM = 0x68;
-const short PC_RLWIMI = 0x69;
-const short PC_SLW = 0x6A;
-const short PC_SRW = 0x6B;
-const short PC_SRAWI = 0x6C;
-const short PC_SRAW = 0x6D;
-const short PC_CRAND = 0x6E;
-const short PC_CRANDC = 0x6F;
-const short PC_CREQV = 0x70;
-const short PC_CRNAND = 0x71;
-const short PC_CRNOR = 0x72;
-const short PC_CROR = 0x73;
-const short PC_CRORC = 0x74;
-const short PC_CRXOR = 0x75;
-const short PC_MCRF = 0x76;
-const short PC_MTXER = 0x77;
-const short PC_MTCTR = 0x78;
-const short PC_MTLR = 0x79;
-const short PC_MTCRF = 0x7A;
-const short PC_MTMSR = 0x7B;
-const short PC_MTSPR = 0x7C;
-const short PC_MFMSR = 0x7D;
-const short PC_MFSPR = 0x7E;
-const short PC_MFXER = 0x7F;
-const short PC_MFCTR = 0x80;
-const short PC_MFLR = 0x81;
-const short PC_MFCR = 0x82;
-const short PC_MFFS = 0x83;
-const short PC_MTFSF = 0x84;
-const short PC_EIEIO = 0x85;
-const short PC_ISYNC = 0x86;
-const short PC_SYNC = 0x87;
-const short PC_RFI = 0x88;
-const short PC_LI = 0x89;
-const short PC_LIS = 0x8A;
-const short PC_MR = 0x8B;
-const short PC_NOP = 0x8C;
-const short PC_NOT = 0x8D;
-const short PC_LFS = 0x8E;
-const short PC_LFSU = 0x8F;
-const short PC_LFSX = 0x90;
-const short PC_LFSUX = 0x91;
-const short PC_LFD = 0x92;
-const short PC_LFDU = 0x93;
-const short PC_LFDX = 0x94;
-const short PC_LFDUX = 0x95;
-const short PC_STFS = 0x96;
-const short PC_STFSU = 0x97;
-const short PC_STFSX = 0x98;
-const short PC_STFSUX = 0x99;
-const short PC_STFD = 0x9A;
-const short PC_STFDU = 0x9B;
-const short PC_STFDX = 0x9C;
-const short PC_STFDUX = 0x9D;
-const short PC_FMR = 0x9E;
-const short PC_FABS = 0x9F;
-const short PC_FNEG = 0xA0;
-const short PC_FNABS = 0xA1;
-const short PC_FADD = 0xA2;
-const short PC_FADDS = 0xA3;
-const short PC_FSUB = 0xA4;
-const short PC_FSUBS = 0xA5;
-const short PC_FMUL = 0xA6;
-const short PC_FMULS = 0xA7;
-const short PC_FDIV = 0xA8;
-const short PC_FDIVS = 0xA9;
-const short PC_FMADD = 0xAA;
-const short PC_FMADDS = 0xAB;
-const short PC_FMSUB = 0xAC;
-const short PC_FMSUBS = 0xAD;
-const short PC_FNMADD = 0xAE;
-const short PC_FNMADDS = 0xAF;
-const short PC_FNMSUB = 0xB0;
-const short PC_FNMSUBS = 0xB1;
-const short PC_FRES = 0xB2;
-const short PC_FRSQRTE = 0xB3;
-const short PC_FSEL = 0xB4;
-const short PC_FRSP = 0xB5;
-const short PC_FCTIW = 0xB6;
-const short PC_FCTIWZ = 0xB7;
-const short PC_FCMPU = 0xB8;
-const short PC_FCMPO = 0xB9;
-const short PC_LWARX = 0xBA;
-const short PC_LSWI = 0xBB;
-const short PC_LSWX = 0xBC;
-const short PC_STFIWX = 0xBD;
-const short PC_STSWI = 0xBE;
-const short PC_STSWX = 0xBF;
-const short PC_STWCX = 0xC0;
-const short PC_ECIWX = 0xC1;
-const short PC_ECOWX = 0xC2;
-const short PC_DCBI = 0xC3;
-const short PC_ICBI = 0xC4;
-const short PC_MCRFS = 0xC5;
-const short PC_MCRXR = 0xC6;
-const short PC_MFTB = 0xC7;
-const short PC_MFSR = 0xC8;
-const short PC_MTSR = 0xC9;
-const short PC_MFSRIN = 0xCA;
-const short PC_MTSRIN = 0xCB;
-const short PC_MTFSB0 = 0xCC;
-const short PC_MTFSB1 = 0xCD;
-const short PC_MTFSFI = 0xCE;
-const short PC_SC = 0xCF;
-const short PC_FSQRT = 0xD0;
-const short PC_FSQRTS = 0xD1;
-const short PC_TLBIA = 0xD2;
-const short PC_TLBIE = 0xD3;
-const short PC_TLBLD = 0xD4;
-const short PC_TLBLI = 0xD5;
-const short PC_TLBSYNC = 0xD6;
-const short PC_TW = 0xD7;
-const short PC_TRAP = 0xD8;
-const short PC_TWI = 0xD9;
-const short PC_OPWORD = 0xDA;
-const short PC_MFROM = 0xDB;
-const short PC_DSA = 0xDC;
-const short PC_ESA = 0xDD;
-const short PC_DCCCI = 0xDE;
-const short PC_DCREAD = 0xDF;
-const short PC_ICBT = 0xE0;
-const short PC_ICCCI = 0xE1;
-const short PC_ICREAD = 0xE2;
-const short PC_RFCI = 0xE3;
-const short PC_TLBRE = 0xE4;
-const short PC_TLBSX = 0xE5;
-const short PC_TLBWE = 0xE6;
-const short PC_WRTEE = 0xE7;
-const short PC_WRTEEI = 0xE8;
-const short PC_MFDCR = 0xE9;
-const short PC_MTDCR = 0xEA;
-const short PC_DCBA = 0xEB;
-const short PC_DSS = 0xEC;
-const short PC_DSSALL = 0xED;
-const short PC_DST = 0xEE;
-const short PC_DSTT = 0xEF;
-const short PC_DSTST = 0xF0;
-const short PC_DSTSTT = 0xF1;
-const short PC_LVEBX = 0xF2;
-const short PC_LVEHX = 0xF3;
-const short PC_LVEWX = 0xF4;
-const short PC_LVSL = 0xF5;
-const short PC_LVSR = 0xF6;
-const short PC_LVX = 0xF7;
-const short PC_LVXL = 0xF8;
-const short PC_STVEBX = 0xF9;
-const short PC_STVEHX = 0xFA;
-const short PC_STVEWX = 0xFB;
-const short PC_STVX = 0xFC;
-const short PC_STVXL = 0xFD;
-const short PC_MFVSCR = 0xFE;
-const short PC_MTVSCR = 0xFF;
-const short PC_VADDCUW = 0x100;
-const short PC_VADDFP = 0x101;
-const short PC_VADDSBS = 0x102;
-const short PC_VADDSHS = 0x103;
-const short PC_VADDSWS = 0x104;
-const short PC_VADDUBM = 0x105;
-const short PC_VADDUBS = 0x106;
-const short PC_VADDUHM = 0x107;
-const short PC_VADDUHS = 0x108;
-const short PC_VADDUWM = 0x109;
-const short PC_VADDUWS = 0x10A;
-const short PC_VAND = 0x10B;
-const short PC_VANDC = 0x10C;
-const short PC_VAVGSB = 0x10D;
-const short PC_VAVGSH = 0x10E;
-const short PC_VAVGSW = 0x10F;
-const short PC_VAVGUB = 0x110;
-const short PC_VAVGUH = 0x111;
-const short PC_VAVGUW = 0x112;
-const short PC_VCFSX = 0x113;
-const short PC_VCFUX = 0x114;
-const short PC_VCMPBFP = 0x115;
-const short PC_VCMPEQFP = 0x116;
-const short PC_VCMPEQUB = 0x117;
-const short PC_VCMPEQUH = 0x118;
-const short PC_VCMPEQUW = 0x119;
-const short PC_VCMPGEFP = 0x11A;
-const short PC_VCMPGTFP = 0x11B;
-const short PC_VCMPGTSB = 0x11C;
-const short PC_VCMPGTSH = 0x11D;
-const short PC_VCMPGTSW = 0x11E;
-const short PC_VCMPGTUB = 0x11F;
-const short PC_VCMPGTUH = 0x120;
-const short PC_VCMPGTUW = 0x121;
-const short PC_VCTSXS = 0x122;
-const short PC_VCTUXS = 0x123;
-const short PC_VEXPTEFP = 0x124;
-const short PC_VLOGEFP = 0x125;
-const short PC_VMAXFP = 0x126;
-const short PC_VMAXSB = 0x127;
-const short PC_VMAXSH = 0x128;
-const short PC_VMAXSW = 0x129;
-const short PC_VMAXUB = 0x12A;
-const short PC_VMAXUH = 0x12B;
-const short PC_VMAXUW = 0x12C;
-const short PC_VMINFP = 0x12D;
-const short PC_VMINSB = 0x12E;
-const short PC_VMINSH = 0x12F;
-const short PC_VMINSW = 0x130;
-const short PC_VMINUB = 0x131;
-const short PC_VMINUH = 0x132;
-const short PC_VMINUW = 0x133;
-const short PC_VMRGHB = 0x134;
-const short PC_VMRGHH = 0x135;
-const short PC_VMRGHW = 0x136;
-const short PC_VMRGLB = 0x137;
-const short PC_VMRGLH = 0x138;
-const short PC_VMRGLW = 0x139;
-const short PC_VMULESB = 0x13A;
-const short PC_VMULESH = 0x13B;
-const short PC_VMULEUB = 0x13C;
-const short PC_VMULEUH = 0x13D;
-const short PC_VMULOSB = 0x13E;
-const short PC_VMULOSH = 0x13F;
-const short PC_VMULOUB = 0x140;
-const short PC_VMULOUH = 0x141;
-const short PC_VNOR = 0x142;
-const short PC_VOR = 0x143;
-const short PC_VPKPX = 0x144;
-const short PC_VPKSHSS = 0x145;
-const short PC_VPKSHUS = 0x146;
-const short PC_VPKSWSS = 0x147;
-const short PC_VPKSWUS = 0x148;
-const short PC_VPKUHUM = 0x149;
-const short PC_VPKUHUS = 0x14A;
-const short PC_VPKUWUM = 0x14B;
-const short PC_VPKUWUS = 0x14C;
-const short PC_VREFP = 0x14D;
-const short PC_VRFIM = 0x14E;
-const short PC_VRFIN = 0x14F;
-const short PC_VRFIP = 0x150;
-const short PC_VRFIZ = 0x151;
-const short PC_VRLB = 0x152;
-const short PC_VRLH = 0x153;
-const short PC_VRLW = 0x154;
-const short PC_VRSQRTEFP = 0x155;
-const short PC_VSL = 0x156;
-const short PC_VSLB = 0x157;
-const short PC_VSLH = 0x158;
-const short PC_VSLO = 0x159;
-const short PC_VSLW = 0x15A;
-const short PC_VSPLTB = 0x15B;
-const short PC_VSPLTH = 0x15C;
-const short PC_VSPLTW = 0x15D;
-const short PC_VSPLTISB = 0x15E;
-const short PC_VSPLTISH = 0x15F;
-const short PC_VSPLTISW = 0x160;
-const short PC_VSR = 0x161;
-const short PC_VSRAB = 0x162;
-const short PC_VSRAH = 0x163;
-const short PC_VSRAW = 0x164;
-const short PC_VSRB = 0x165;
-const short PC_VSRH = 0x166;
-const short PC_VSRO = 0x167;
-const short PC_VSRW = 0x168;
-const short PC_VSUBCUW = 0x169;
-const short PC_VSUBFP = 0x16A;
-const short PC_VSUBSBS = 0x16B;
-const short PC_VSUBSHS = 0x16C;
-const short PC_VSUBSWS = 0x16D;
-const short PC_VSUBUBM = 0x16E;
-const short PC_VSUBUBS = 0x16F;
-const short PC_VSUBUHM = 0x170;
-const short PC_VSUBUHS = 0x171;
-const short PC_VSUBUWM = 0x172;
-const short PC_VSUBUWS = 0x173;
-const short PC_VSUMSWS = 0x174;
-const short PC_VSUM2SWS = 0x175;
-const short PC_VSUM4SBS = 0x176;
-const short PC_VSUM4SHS = 0x177;
-const short PC_VSUM4UBS = 0x178;
-const short PC_VUPKHPX = 0x179;
-const short PC_VUPKHSB = 0x17A;
-const short PC_VUPKHSH = 0x17B;
-const short PC_VUPKLPX = 0x17C;
-const short PC_VUPKLSB = 0x17D;
-const short PC_VUPKLSH = 0x17E;
-const short PC_VXOR = 0x17F;
-const short PC_VMADDFP = 0x180;
-const short PC_VMHADDSHS = 0x181;
-const short PC_VMHRADDSHS = 0x182;
-const short PC_VMLADDUHM = 0x183;
-const short PC_VMSUMMBM = 0x184;
-const short PC_VMSUMSHM = 0x185;
-const short PC_VMSUMSHS = 0x186;
-const short PC_VMSUMUBM = 0x187;
-const short PC_VMSUMUHM = 0x188;
-const short PC_VMSUMUHS = 0x189;
-const short PC_VNMSUBFP = 0x18A;
-const short PC_VPERM = 0x18B;
-const short PC_VSEL = 0x18C;
-const short PC_VSLDOI = 0x18D;
-const short PC_VMR = 0x18E;
-const short PC_VMRP = 0x18F;
-const short PC_SLE = 0x190;
-const short PC_SLEQ = 0x191;
-const short PC_SLIQ = 0x192;
-const short PC_SLLIQ = 0x193;
-const short PC_SLLQ = 0x194;
-const short PC_SLQ = 0x195;
-const short PC_SRAIQ = 0x196;
-const short PC_SRAQ = 0x197;
-const short PC_SRE = 0x198;
-const short PC_SREA = 0x199;
-const short PC_SREQ = 0x19A;
-const short PC_SRIQ = 0x19B;
-const short PC_SRLIQ = 0x19C;
-const short PC_SRLQ = 0x19D;
-const short PC_SRQ = 0x19E;
-const short PC_MASKG = 0x19F;
-const short PC_MASKIR = 0x1A0;
-const short PC_LSCBX = 0x1A1;
-const short PC_DIV = 0x1A2;
-const short PC_DIVS = 0x1A3;
-const short PC_DOZ = 0x1A4;
-const short PC_MUL = 0x1A5;
-const short PC_NABS = 0x1A6;
-const short PC_ABS = 0x1A7;
-const short PC_CLCS = 0x1A8;
-const short PC_DOZI = 0x1A9;
-const short PC_RLMI = 0x1AA;
-const short PC_RRIB = 0x1AB;
-const short PC_PENTRY = 0x1AC;
-const short PC_PEXIT = 0x1AD;
-const short OPCODE_MAX = 0x1AE;
+//const short PC_B = 0x0;
+//const short PC_BL = 0x1;
+//const short PC_BC = 0x2;
+//const short PC_BCLR = 0x3;
+//const short PC_BCCTR = 0x4;
+//const short PC_BT = 0x5;
+//const short PC_BTLR = 0x6;
+//const short PC_BTCTR = 0x7;
+//const short PC_BF = 0x8;
+//const short PC_BFLR = 0x9;
+//const short PC_BFCTR = 0xA;
+//const short PC_BDNZ = 0xB;
+//const short PC_BDNZT = 0xC;
+//const short PC_BDNZF = 0xD;
+//const short PC_BDZ = 0xE;
+//const short PC_BDZT = 0xF;
+//const short PC_BDZF = 0x10;
+//const short PC_BLR = 0x11;
+//const short PC_BCTR = 0x12;
+//const short PC_BCTRL = 0x13;
+//const short PC_BLRL = 0x14;
+//const short PC_LBZ = 0x15;
+//const short PC_LBZU = 0x16;
+//const short PC_LBZX = 0x17;
+//const short PC_LBZUX = 0x18;
+//const short PC_LHZ = 0x19;
+//const short PC_LHZU = 0x1A;
+//const short PC_LHZX = 0x1B;
+//const short PC_LHZUX = 0x1C;
+//const short PC_LHA = 0x1D;
+//const short PC_LHAU = 0x1E;
+//const short PC_LHAX = 0x1F;
+//const short PC_LHAUX = 0x20;
+//const short PC_LHBRX = 0x21;
+//const short PC_LWZ = 0x22;
+//const short PC_LWZU = 0x23;
+//const short PC_LWZX = 0x24;
+//const short PC_LWZUX = 0x25;
+//const short PC_LWBRX = 0x26;
+//const short PC_LMW = 0x27;
+//const short PC_STB = 0x28;
+//const short PC_STBU = 0x29;
+//const short PC_STBX = 0x2A;
+//const short PC_STBUX = 0x2B;
+//const short PC_STH = 0x2C;
+//const short PC_STHU = 0x2D;
+//const short PC_STHX = 0x2E;
+//const short PC_STHUX = 0x2F;
+//const short PC_STHBRX = 0x30;
+//const short PC_STW = 0x31;
+//const short PC_STWU = 0x32;
+//const short PC_STWX = 0x33;
+//const short PC_STWUX = 0x34;
+//const short PC_STWBRX = 0x35;
+//const short PC_STMW = 0x36;
+//const short PC_DCBF = 0x37;
+//const short PC_DCBST = 0x38;
+//const short PC_DCBT = 0x39;
+//const short PC_DCBTST = 0x3A;
+//const short PC_DCBZ = 0x3B;
+//const short PC_ADD = 0x3C;
+//const short PC_ADDC = 0x3D;
+//const short PC_ADDE = 0x3E;
+//const short PC_ADDI = 0x3F;
+//const short PC_ADDIC = 0x40;
+//const short PC_ADDICR = 0x41;
+//const short PC_ADDIS = 0x42;
+//const short PC_ADDME = 0x43;
+//const short PC_ADDZE = 0x44;
+//const short PC_DIVW = 0x45;
+//const short PC_DIVWU = 0x46;
+//const short PC_MULHW = 0x47;
+//const short PC_MULHWU = 0x48;
+//const short PC_MULLI = 0x49;
+//const short PC_MULLW = 0x4A;
+//const short PC_NEG = 0x4B;
+//const short PC_SUBF = 0x4C;
+//const short PC_SUBFC = 0x4D;
+//const short PC_SUBFE = 0x4E;
+//const short PC_SUBFIC = 0x4F;
+//const short PC_SUBFME = 0x50;
+//const short PC_SUBFZE = 0x51;
+//const short PC_CMPI = 0x52;
+//const short PC_CMP = 0x53;
+//const short PC_CMPLI = 0x54;
+//const short PC_CMPL = 0x55;
+//const short PC_ANDI = 0x56;
+//const short PC_ANDIS = 0x57;
+//const short PC_ORI = 0x58;
+//const short PC_ORIS = 0x59;
+//const short PC_XORI = 0x5A;
+//const short PC_XORIS = 0x5B;
+//const short PC_AND = 0x5C;
+//const short PC_OR = 0x5D;
+//const short PC_XOR = 0x5E;
+//const short PC_NAND = 0x5F;
+//const short PC_NOR = 0x60;
+//const short PC_EQV = 0x61;
+//const short PC_ANDC = 0x62;
+//const short PC_ORC = 0x63;
+//const short PC_EXTSB = 0x64;
+//const short PC_EXTSH = 0x65;
+//const short PC_CNTLZW = 0x66;
+//const short PC_RLWINM = 0x67;
+//const short PC_RLWNM = 0x68;
+//const short PC_RLWIMI = 0x69;
+//const short PC_SLW = 0x6A;
+//const short PC_SRW = 0x6B;
+//const short PC_SRAWI = 0x6C;
+//const short PC_SRAW = 0x6D;
+//const short PC_CRAND = 0x6E;
+//const short PC_CRANDC = 0x6F;
+//const short PC_CREQV = 0x70;
+//const short PC_CRNAND = 0x71;
+//const short PC_CRNOR = 0x72;
+//const short PC_CROR = 0x73;
+//const short PC_CRORC = 0x74;
+//const short PC_CRXOR = 0x75;
+//const short PC_MCRF = 0x76;
+//const short PC_MTXER = 0x77;
+//const short PC_MTCTR = 0x78;
+//const short PC_MTLR = 0x79;
+//const short PC_MTCRF = 0x7A;
+//const short PC_MTMSR = 0x7B;
+//const short PC_MTSPR = 0x7C;
+//const short PC_MFMSR = 0x7D;
+//const short PC_MFSPR = 0x7E;
+//const short PC_MFXER = 0x7F;
+//const short PC_MFCTR = 0x80;
+//const short PC_MFLR = 0x81;
+//const short PC_MFCR = 0x82;
+//const short PC_MFFS = 0x83;
+//const short PC_MTFSF = 0x84;
+//const short PC_EIEIO = 0x85;
+//const short PC_ISYNC = 0x86;
+//const short PC_SYNC = 0x87;
+//const short PC_RFI = 0x88;
+//const short PC_LI = 0x89;
+//const short PC_LIS = 0x8A;
+//const short PC_MR = 0x8B;
+//const short PC_NOP = 0x8C;
+//const short PC_NOT = 0x8D;
+//const short PC_LFS = 0x8E;
+//const short PC_LFSU = 0x8F;
+//const short PC_LFSX = 0x90;
+//const short PC_LFSUX = 0x91;
+//const short PC_LFD = 0x92;
+//const short PC_LFDU = 0x93;
+//const short PC_LFDX = 0x94;
+//const short PC_LFDUX = 0x95;
+//const short PC_STFS = 0x96;
+//const short PC_STFSU = 0x97;
+//const short PC_STFSX = 0x98;
+//const short PC_STFSUX = 0x99;
+//const short PC_STFD = 0x9A;
+//const short PC_STFDU = 0x9B;
+//const short PC_STFDX = 0x9C;
+//const short PC_STFDUX = 0x9D;
+//const short PC_FMR = 0x9E;
+//const short PC_FABS = 0x9F;
+//const short PC_FNEG = 0xA0;
+//const short PC_FNABS = 0xA1;
+//const short PC_FADD = 0xA2;
+//const short PC_FADDS = 0xA3;
+//const short PC_FSUB = 0xA4;
+//const short PC_FSUBS = 0xA5;
+//const short PC_FMUL = 0xA6;
+//const short PC_FMULS = 0xA7;
+//const short PC_FDIV = 0xA8;
+//const short PC_FDIVS = 0xA9;
+//const short PC_FMADD = 0xAA;
+//const short PC_FMADDS = 0xAB;
+//const short PC_FMSUB = 0xAC;
+//const short PC_FMSUBS = 0xAD;
+//const short PC_FNMADD = 0xAE;
+//const short PC_FNMADDS = 0xAF;
+//const short PC_FNMSUB = 0xB0;
+//const short PC_FNMSUBS = 0xB1;
+//const short PC_FRES = 0xB2;
+//const short PC_FRSQRTE = 0xB3;
+//const short PC_FSEL = 0xB4;
+//const short PC_FRSP = 0xB5;
+//const short PC_FCTIW = 0xB6;
+//const short PC_FCTIWZ = 0xB7;
+//const short PC_FCMPU = 0xB8;
+//const short PC_FCMPO = 0xB9;
+//const short PC_LWARX = 0xBA;
+//const short PC_LSWI = 0xBB;
+//const short PC_LSWX = 0xBC;
+//const short PC_STFIWX = 0xBD;
+//const short PC_STSWI = 0xBE;
+//const short PC_STSWX = 0xBF;
+//const short PC_STWCX = 0xC0;
+//const short PC_ECIWX = 0xC1;
+//const short PC_ECOWX = 0xC2;
+//const short PC_DCBI = 0xC3;
+//const short PC_ICBI = 0xC4;
+//const short PC_MCRFS = 0xC5;
+//const short PC_MCRXR = 0xC6;
+//const short PC_MFTB = 0xC7;
+//const short PC_MFSR = 0xC8;
+//const short PC_MTSR = 0xC9;
+//const short PC_MFSRIN = 0xCA;
+//const short PC_MTSRIN = 0xCB;
+//const short PC_MTFSB0 = 0xCC;
+//const short PC_MTFSB1 = 0xCD;
+//const short PC_MTFSFI = 0xCE;
+//const short PC_SC = 0xCF;
+//const short PC_FSQRT = 0xD0;
+//const short PC_FSQRTS = 0xD1;
+//const short PC_TLBIA = 0xD2;
+//const short PC_TLBIE = 0xD3;
+//const short PC_TLBLD = 0xD4;
+//const short PC_TLBLI = 0xD5;
+//const short PC_TLBSYNC = 0xD6;
+//const short PC_TW = 0xD7;
+//const short PC_TRAP = 0xD8;
+//const short PC_TWI = 0xD9;
+//const short PC_OPWORD = 0xDA;
+//const short PC_MFROM = 0xDB;
+//const short PC_DSA = 0xDC;
+//const short PC_ESA = 0xDD;
+//const short PC_DCCCI = 0xDE;
+//const short PC_DCREAD = 0xDF;
+//const short PC_ICBT = 0xE0;
+//const short PC_ICCCI = 0xE1;
+//const short PC_ICREAD = 0xE2;
+//const short PC_RFCI = 0xE3;
+//const short PC_TLBRE = 0xE4;
+//const short PC_TLBSX = 0xE5;
+//const short PC_TLBWE = 0xE6;
+//const short PC_WRTEE = 0xE7;
+//const short PC_WRTEEI = 0xE8;
+//const short PC_MFDCR = 0xE9;
+//const short PC_MTDCR = 0xEA;
+//const short PC_DCBA = 0xEB;
+//const short PC_DSS = 0xEC;
+//const short PC_DSSALL = 0xED;
+//const short PC_DST = 0xEE;
+//const short PC_DSTT = 0xEF;
+//const short PC_DSTST = 0xF0;
+//const short PC_DSTSTT = 0xF1;
+//const short PC_LVEBX = 0xF2;
+//const short PC_LVEHX = 0xF3;
+//const short PC_LVEWX = 0xF4;
+//const short PC_LVSL = 0xF5;
+//const short PC_LVSR = 0xF6;
+//const short PC_LVX = 0xF7;
+//const short PC_LVXL = 0xF8;
+//const short PC_STVEBX = 0xF9;
+//const short PC_STVEHX = 0xFA;
+//const short PC_STVEWX = 0xFB;
+//const short PC_STVX = 0xFC;
+//const short PC_STVXL = 0xFD;
+//const short PC_MFVSCR = 0xFE;
+//const short PC_MTVSCR = 0xFF;
+//const short PC_VADDCUW = 0x100;
+//const short PC_VADDFP = 0x101;
+//const short PC_VADDSBS = 0x102;
+//const short PC_VADDSHS = 0x103;
+//const short PC_VADDSWS = 0x104;
+//const short PC_VADDUBM = 0x105;
+//const short PC_VADDUBS = 0x106;
+//const short PC_VADDUHM = 0x107;
+//const short PC_VADDUHS = 0x108;
+//const short PC_VADDUWM = 0x109;
+//const short PC_VADDUWS = 0x10A;
+//const short PC_VAND = 0x10B;
+//const short PC_VANDC = 0x10C;
+//const short PC_VAVGSB = 0x10D;
+//const short PC_VAVGSH = 0x10E;
+//const short PC_VAVGSW = 0x10F;
+//const short PC_VAVGUB = 0x110;
+//const short PC_VAVGUH = 0x111;
+//const short PC_VAVGUW = 0x112;
+//const short PC_VCFSX = 0x113;
+//const short PC_VCFUX = 0x114;
+//const short PC_VCMPBFP = 0x115;
+//const short PC_VCMPEQFP = 0x116;
+//const short PC_VCMPEQUB = 0x117;
+//const short PC_VCMPEQUH = 0x118;
+//const short PC_VCMPEQUW = 0x119;
+//const short PC_VCMPGEFP = 0x11A;
+//const short PC_VCMPGTFP = 0x11B;
+//const short PC_VCMPGTSB = 0x11C;
+//const short PC_VCMPGTSH = 0x11D;
+//const short PC_VCMPGTSW = 0x11E;
+//const short PC_VCMPGTUB = 0x11F;
+//const short PC_VCMPGTUH = 0x120;
+//const short PC_VCMPGTUW = 0x121;
+//const short PC_VCTSXS = 0x122;
+//const short PC_VCTUXS = 0x123;
+//const short PC_VEXPTEFP = 0x124;
+//const short PC_VLOGEFP = 0x125;
+//const short PC_VMAXFP = 0x126;
+//const short PC_VMAXSB = 0x127;
+//const short PC_VMAXSH = 0x128;
+//const short PC_VMAXSW = 0x129;
+//const short PC_VMAXUB = 0x12A;
+//const short PC_VMAXUH = 0x12B;
+//const short PC_VMAXUW = 0x12C;
+//const short PC_VMINFP = 0x12D;
+//const short PC_VMINSB = 0x12E;
+//const short PC_VMINSH = 0x12F;
+//const short PC_VMINSW = 0x130;
+//const short PC_VMINUB = 0x131;
+//const short PC_VMINUH = 0x132;
+//const short PC_VMINUW = 0x133;
+//const short PC_VMRGHB = 0x134;
+//const short PC_VMRGHH = 0x135;
+//const short PC_VMRGHW = 0x136;
+//const short PC_VMRGLB = 0x137;
+//const short PC_VMRGLH = 0x138;
+//const short PC_VMRGLW = 0x139;
+//const short PC_VMULESB = 0x13A;
+//const short PC_VMULESH = 0x13B;
+//const short PC_VMULEUB = 0x13C;
+//const short PC_VMULEUH = 0x13D;
+//const short PC_VMULOSB = 0x13E;
+//const short PC_VMULOSH = 0x13F;
+//const short PC_VMULOUB = 0x140;
+//const short PC_VMULOUH = 0x141;
+//const short PC_VNOR = 0x142;
+//const short PC_VOR = 0x143;
+//const short PC_VPKPX = 0x144;
+//const short PC_VPKSHSS = 0x145;
+//const short PC_VPKSHUS = 0x146;
+//const short PC_VPKSWSS = 0x147;
+//const short PC_VPKSWUS = 0x148;
+//const short PC_VPKUHUM = 0x149;
+//const short PC_VPKUHUS = 0x14A;
+//const short PC_VPKUWUM = 0x14B;
+//const short PC_VPKUWUS = 0x14C;
+//const short PC_VREFP = 0x14D;
+//const short PC_VRFIM = 0x14E;
+//const short PC_VRFIN = 0x14F;
+//const short PC_VRFIP = 0x150;
+//const short PC_VRFIZ = 0x151;
+//const short PC_VRLB = 0x152;
+//const short PC_VRLH = 0x153;
+//const short PC_VRLW = 0x154;
+//const short PC_VRSQRTEFP = 0x155;
+//const short PC_VSL = 0x156;
+//const short PC_VSLB = 0x157;
+//const short PC_VSLH = 0x158;
+//const short PC_VSLO = 0x159;
+//const short PC_VSLW = 0x15A;
+//const short PC_VSPLTB = 0x15B;
+//const short PC_VSPLTH = 0x15C;
+//const short PC_VSPLTW = 0x15D;
+//const short PC_VSPLTISB = 0x15E;
+//const short PC_VSPLTISH = 0x15F;
+//const short PC_VSPLTISW = 0x160;
+//const short PC_VSR = 0x161;
+//const short PC_VSRAB = 0x162;
+//const short PC_VSRAH = 0x163;
+//const short PC_VSRAW = 0x164;
+//const short PC_VSRB = 0x165;
+//const short PC_VSRH = 0x166;
+//const short PC_VSRO = 0x167;
+//const short PC_VSRW = 0x168;
+//const short PC_VSUBCUW = 0x169;
+//const short PC_VSUBFP = 0x16A;
+//const short PC_VSUBSBS = 0x16B;
+//const short PC_VSUBSHS = 0x16C;
+//const short PC_VSUBSWS = 0x16D;
+//const short PC_VSUBUBM = 0x16E;
+//const short PC_VSUBUBS = 0x16F;
+//const short PC_VSUBUHM = 0x170;
+//const short PC_VSUBUHS = 0x171;
+//const short PC_VSUBUWM = 0x172;
+//const short PC_VSUBUWS = 0x173;
+//const short PC_VSUMSWS = 0x174;
+//const short PC_VSUM2SWS = 0x175;
+//const short PC_VSUM4SBS = 0x176;
+//const short PC_VSUM4SHS = 0x177;
+//const short PC_VSUM4UBS = 0x178;
+//const short PC_VUPKHPX = 0x179;
+//const short PC_VUPKHSB = 0x17A;
+//const short PC_VUPKHSH = 0x17B;
+//const short PC_VUPKLPX = 0x17C;
+//const short PC_VUPKLSB = 0x17D;
+//const short PC_VUPKLSH = 0x17E;
+//const short PC_VXOR = 0x17F;
+//const short PC_VMADDFP = 0x180;
+//const short PC_VMHADDSHS = 0x181;
+//const short PC_VMHRADDSHS = 0x182;
+//const short PC_VMLADDUHM = 0x183;
+//const short PC_VMSUMMBM = 0x184;
+//const short PC_VMSUMSHM = 0x185;
+//const short PC_VMSUMSHS = 0x186;
+//const short PC_VMSUMUBM = 0x187;
+//const short PC_VMSUMUHM = 0x188;
+//const short PC_VMSUMUHS = 0x189;
+//const short PC_VNMSUBFP = 0x18A;
+//const short PC_VPERM = 0x18B;
+//const short PC_VSEL = 0x18C;
+//const short PC_VSLDOI = 0x18D;
+//const short PC_VMR = 0x18E;
+//const short PC_VMRP = 0x18F;
+//const short PC_SLE = 0x190;
+//const short PC_SLEQ = 0x191;
+//const short PC_SLIQ = 0x192;
+//const short PC_SLLIQ = 0x193;
+//const short PC_SLLQ = 0x194;
+//const short PC_SLQ = 0x195;
+//const short PC_SRAIQ = 0x196;
+//const short PC_SRAQ = 0x197;
+//const short PC_SRE = 0x198;
+//const short PC_SREA = 0x199;
+//const short PC_SREQ = 0x19A;
+//const short PC_SRIQ = 0x19B;
+//const short PC_SRLIQ = 0x19C;
+//const short PC_SRLQ = 0x19D;
+//const short PC_SRQ = 0x19E;
+//const short PC_MASKG = 0x19F;
+//const short PC_MASKIR = 0x1A0;
+//const short PC_LSCBX = 0x1A1;
+//const short PC_DIV = 0x1A2;
+//const short PC_DIVS = 0x1A3;
+//const short PC_DOZ = 0x1A4;
+//const short PC_MUL = 0x1A5;
+//const short PC_NABS = 0x1A6;
+//const short PC_ABS = 0x1A7;
+//const short PC_CLCS = 0x1A8;
+//const short PC_DOZI = 0x1A9;
+//const short PC_RLMI = 0x1AA;
+//const short PC_RRIB = 0x1AB;
+//const short PC_PENTRY = 0x1AC;
+//const short PC_PEXIT = 0x1AD;
+//const short OPCODE_MAX = 0x1AE;
extern OpcodeInfo opcodeinfo[OPCODE_MAX];
extern void pcode_get_hi_lo(int bits, char typechar, SInt32 *hi, SInt32 *lo);
extern int pcode_check_imm_bits(SInt32 value, int bits, char typechar);
-extern int pcode_const_from_format(const char *format, int *pResult);
+extern int pcode_const_from_format(const char *format, SInt32 *pResult);
extern PCode *vformatpcode(short opcode, va_list argList);
extern int expectandformatoperand(PCodeArg *operand, PCOpKind expectedKind, char a3, int bitCount, char *buf);
extern int formatoperand(PCodeArg *operand, char *buf);