ppc: update core

This commit is contained in:
Nguyen Anh Quynh 2014-02-19 17:01:44 +08:00
parent 43a9a9d36f
commit 8b915ed765
6 changed files with 805 additions and 824 deletions

View File

@ -134,10 +134,10 @@ static void printInstruction(MCInst *MI, SStream *O, MCRegisterInfo *MRI)
1226217U, // BCLR
1357289U, // BCLRL
155725U, // BCLalways
5697U, // BCTR
5697U, // BCTR8
5659U, // BCTRL
5659U, // BCTRL8
5703U, // BCTR
5703U, // BCTR8
5665U, // BCTRL
5665U, // BCTRL8
159972U, // BDNZ
159972U, // BDNZ8
165245U, // BDNZA
@ -147,9 +147,9 @@ static void printInstruction(MCInst *MI, SStream *O, MCRegisterInfo *MRI)
165226U, // BDNZLA
163950U, // BDNZLAm
163865U, // BDNZLAp
5690U, // BDNZLR
5690U, // BDNZLR8
5651U, // BDNZLRL
5696U, // BDNZLR
5696U, // BDNZLR8
5657U, // BDNZLRL
4422U, // BDNZLRLm
4390U, // BDNZLRLp
4438U, // BDNZLRm
@ -167,9 +167,9 @@ static void printInstruction(MCInst *MI, SStream *O, MCRegisterInfo *MRI)
165219U, // BDZLA
163942U, // BDZLAm
163857U, // BDZLAp
5684U, // BDZLR
5684U, // BDZLR8
5644U, // BDZLRL
5690U, // BDZLR
5690U, // BDZLR8
5650U, // BDZLRL
4414U, // BDZLRLm
4382U, // BDZLRLp
4431U, // BDZLRm
@ -187,8 +187,8 @@ static void printInstruction(MCInst *MI, SStream *O, MCRegisterInfo *MRI)
165208U, // BLA
165208U, // BLA8
1475928U, // BLA8_NOP
5680U, // BLR
5639U, // BLRL
5686U, // BLR
5645U, // BLRL
1610623186U, // CLRLSLDI
1610621433U, // CLRLSLDIo
2147494212U, // CLRLSLWI
@ -238,7 +238,7 @@ static void printInstruction(MCInst *MI, SStream *O, MCRegisterInfo *MRI)
9196U, // DIVWUo
9301U, // DIVWo
68870U, // DSS
5632U, // DSSALL
5638U, // DSSALL
77242U, // DST
77242U, // DST64
77255U, // DSTST
@ -254,7 +254,7 @@ static void printInstruction(MCInst *MI, SStream *O, MCRegisterInfo *MRI)
4647U, // EH_SjLj_SetJmp32
4827U, // EH_SjLj_SetJmp64
155649U, // EH_SjLj_Setup
5665U, // EIEIO
5671U, // EIEIO
11872U, // EQV
11872U, // EQV8
9211U, // EQV8o
@ -419,7 +419,7 @@ static void printInstruction(MCInst *MI, SStream *O, MCRegisterInfo *MRI)
5482U, // LDgotTprelL
4613U, // LDgotTprelL32
1585417U, // LDinto_toc
5625U, // LDtoc
5631U, // LDtoc
5578U, // LDtocCPT
5430U, // LDtocJTI
5440U, // LDtocL
@ -495,6 +495,7 @@ static void printInstruction(MCInst *MI, SStream *O, MCRegisterInfo *MRI)
1846199U, // MFVRSAVE
1846199U, // MFVRSAVEv
142187U, // MFVSCR
5625U, // MSYNC
67119052U, // MTCRF
67119052U, // MTCRF8
142311U, // MTCTR
@ -538,7 +539,7 @@ static void printInstruction(MCInst *MI, SStream *O, MCRegisterInfo *MRI)
67119067U, // NEG8
67117506U, // NEG8o
67117506U, // NEGo
5676U, // NOP
5682U, // NOP
4446U, // NOP_GT_PWR6
4458U, // NOP_GT_PWR7
11156U, // NOR
@ -702,8 +703,8 @@ static void printInstruction(MCInst *MI, SStream *O, MCRegisterInfo *MRI)
157064U, // TAILB8
165194U, // TAILBA
165194U, // TAILBA8
5697U, // TAILBCTR
5697U, // TAILBCTR8
5703U, // TAILBCTR
5703U, // TAILBCTR8
67405115U, // TCRETURNai
67405022U, // TCRETURNai8
67397304U, // TCRETURNdi
@ -715,7 +716,7 @@ static void printInstruction(MCInst *MI, SStream *O, MCRegisterInfo *MRI)
2066287U, // TLBIE
141730U, // TLBIEL
5611U, // TLBSYNC
5671U, // TRAP
5677U, // TRAP
85746U, // TW
536955269U, // TWI
67118344U, // UPDATE_VRSAVE
@ -1383,6 +1384,7 @@ static void printInstruction(MCInst *MI, SStream *O, MCRegisterInfo *MRI)
0U, // MFVRSAVE
0U, // MFVRSAVEv
0U, // MFVSCR
0U, // MSYNC
0U, // MTCRF
0U, // MTCRF8
0U, // MTCTR
@ -1792,7 +1794,7 @@ static void printInstruction(MCInst *MI, SStream *O, MCRegisterInfo *MRI)
0U
};
const char AsmStrs[] = {
static char AsmStrs[] = {
/* 0 */ '#', 'E', 'H', '_', 'S', 'j', 'L', 'j', '_', 'S', 'e', 't', 'u', 'p', 9, 0,
/* 16 */ 'b', 'd', 'z', 'l', 'a', '+', 32, 0,
/* 24 */ 'b', 'd', 'n', 'z', 'l', 'a', '+', 32, 0,
@ -2437,26 +2439,27 @@ static void printInstruction(MCInst *MI, SStream *O, MCRegisterInfo *MRI)
/* 5608 */ 'b', 0,
/* 5610 */ 't', 'l', 'b', 's', 'y', 'n', 'c', 0,
/* 5618 */ 'i', 's', 'y', 'n', 'c', 0,
/* 5624 */ '#', 'L', 'D', 't', 'o', 'c', 0,
/* 5631 */ 'd', 's', 's', 'a', 'l', 'l', 0,
/* 5638 */ 'b', 'l', 'r', 'l', 0,
/* 5643 */ 'b', 'd', 'z', 'l', 'r', 'l', 0,
/* 5650 */ 'b', 'd', 'n', 'z', 'l', 'r', 'l', 0,
/* 5658 */ 'b', 'c', 't', 'r', 'l', 0,
/* 5664 */ 'e', 'i', 'e', 'i', 'o', 0,
/* 5670 */ 't', 'r', 'a', 'p', 0,
/* 5675 */ 'n', 'o', 'p', 0,
/* 5679 */ 'b', 'l', 'r', 0,
/* 5683 */ 'b', 'd', 'z', 'l', 'r', 0,
/* 5689 */ 'b', 'd', 'n', 'z', 'l', 'r', 0,
/* 5696 */ 'b', 'c', 't', 'r', 0,
/* 5624 */ 'm', 's', 'y', 'n', 'c', 0,
/* 5630 */ '#', 'L', 'D', 't', 'o', 'c', 0,
/* 5637 */ 'd', 's', 's', 'a', 'l', 'l', 0,
/* 5644 */ 'b', 'l', 'r', 'l', 0,
/* 5649 */ 'b', 'd', 'z', 'l', 'r', 'l', 0,
/* 5656 */ 'b', 'd', 'n', 'z', 'l', 'r', 'l', 0,
/* 5664 */ 'b', 'c', 't', 'r', 'l', 0,
/* 5670 */ 'e', 'i', 'e', 'i', 'o', 0,
/* 5676 */ 't', 'r', 'a', 'p', 0,
/* 5681 */ 'n', 'o', 'p', 0,
/* 5685 */ 'b', 'l', 'r', 0,
/* 5689 */ 'b', 'd', 'z', 'l', 'r', 0,
/* 5695 */ 'b', 'd', 'n', 'z', 'l', 'r', 0,
/* 5702 */ 'b', 'c', 't', 'r', 0,
};
// Emit the opcode for the instruction.
uint64_t Bits1 = OpInfo[MCInst_getOpcode(MI)];
uint64_t Bits2 = OpInfo2[MCInst_getOpcode(MI)];
uint64_t Bits = (Bits2 << 32) | Bits1;
//assert(Bits != 0 && "Cannot print this instruction.");
// assert(Bits != 0 && "Cannot print this instruction.");
SStream_concat(O, "%s", AsmStrs+(Bits & 8191)-1);
@ -2505,9 +2508,9 @@ static void printInstruction(MCInst *MI, SStream *O, MCRegisterInfo *MRI)
case 9:
// DST, DST64, DSTST, DSTST64, DSTSTT, DSTSTT64, DSTT, DSTT64
printOperand(MI, 2, O);
SStream_concat(O, ", ");
SStream_concat(O, "%s", ", ");
printOperand(MI, 3, O);
SStream_concat(O, ", ");
SStream_concat(O, "%s", ", ");
printU5ImmOperand(MI, 1, O);
return;
break;
@ -2518,7 +2521,7 @@ static void printInstruction(MCInst *MI, SStream *O, MCRegisterInfo *MRI)
case 11:
// MTOCRF, MTOCRF8
printcrbitm(MI, 0, O);
SStream_concat(O, ", ");
SStream_concat(O, "%s", ", ");
printOperand(MI, 1, O);
return;
break;
@ -2535,7 +2538,7 @@ static void printInstruction(MCInst *MI, SStream *O, MCRegisterInfo *MRI)
default: // unreachable.
case 0:
// ADD4, ADD4TLS, ADD4o, ADD8, ADD8TLS, ADD8TLS_, ADD8o, ADDC, ADDC8, ADD...
SStream_concat(O, ", ");
SStream_concat(O, "%s", ", ");
break;
case 1:
// ADJCALLSTACKDOWN, B, BA, BCLalways, BDNZ, BDNZ8, BDNZA, BDNZAm, BDNZAp...
@ -2543,108 +2546,109 @@ static void printInstruction(MCInst *MI, SStream *O, MCRegisterInfo *MRI)
break;
case 2:
// ADJCALLSTACKUP, ATOMIC_CMP_SWAP_I16, ATOMIC_CMP_SWAP_I32, TCRETURNai, ...
SStream_concat(O, " ");
SStream_concat(O, "%s", " ");
break;
case 3:
// BCC
printPredicateOperand(MI, 0, O, "pm");
SStream_concat(O, " ");
SStream_concat(O, "%s", " ");
printPredicateOperand(MI, 0, O, "reg");
SStream_concat(O, ", ");
SStream_concat(O, "%s", ", ");
printBranchOperand(MI, 2, O);
return;
break;
case 4:
// BCCA
SStream_concat(O, "a");
SStream_concat(O, "%s", "a");
printPredicateOperand(MI, 0, O, "pm");
SStream_concat(O, " ");
SStream_concat(O, "%s", " ");
printPredicateOperand(MI, 0, O, "reg");
SStream_concat(O, ", ");
SStream_concat(O, "%s", ", ");
printAbsBranchOperand(MI, 2, O);
return;
break;
case 5:
// BCCL
SStream_concat(O, "l");
SStream_concat(O, "%s", "l");
printPredicateOperand(MI, 0, O, "pm");
SStream_concat(O, " ");
SStream_concat(O, "%s", " ");
printPredicateOperand(MI, 0, O, "reg");
SStream_concat(O, ", ");
SStream_concat(O, "%s", ", ");
printBranchOperand(MI, 2, O);
return;
break;
case 6:
// BCCLA
SStream_concat(O, "la");
SStream_concat(O, "%s", "la");
printPredicateOperand(MI, 0, O, "pm");
SStream_concat(O, " ");
SStream_concat(O, "%s", " ");
printPredicateOperand(MI, 0, O, "reg");
SStream_concat(O, ", ");
SStream_concat(O, "%s", ", ");
printAbsBranchOperand(MI, 2, O);
return;
break;
case 7:
// BCCTR, BCCTR8
SStream_concat(O, "ctr");
SStream_concat(O, "%s", "ctr");
printPredicateOperand(MI, 0, O, "pm");
SStream_concat(O, " ");
SStream_concat(O, "%s", " ");
printPredicateOperand(MI, 0, O, "reg");
return;
break;
case 8:
// BCCTRL, BCCTRL8
SStream_concat(O, "ctrl");
SStream_concat(O, "%s", "ctrl");
printPredicateOperand(MI, 0, O, "pm");
SStream_concat(O, " ");
SStream_concat(O, "%s", " ");
printPredicateOperand(MI, 0, O, "reg");
return;
break;
case 9:
// BCLR
SStream_concat(O, "lr");
SStream_concat(O, "%s", "lr");
printPredicateOperand(MI, 0, O, "pm");
SStream_concat(O, " ");
SStream_concat(O, "%s", " ");
printPredicateOperand(MI, 0, O, "reg");
return;
break;
case 10:
// BCLRL
SStream_concat(O, "lrl");
SStream_concat(O, "%s", "lrl");
printPredicateOperand(MI, 0, O, "pm");
SStream_concat(O, " ");
SStream_concat(O, "%s", " ");
printPredicateOperand(MI, 0, O, "reg");
return;
break;
case 11:
// BL8_NOP, BL8_NOP_TLS, BLA8_NOP
SStream_concat(O, "\n\tnop");
SStream_concat(O, "%s", "\n\tnop");
return;
break;
case 12:
// LDinto_toc
SStream_concat(O, ")");
SStream_concat(O, "%s", ")");
set_mem_access(MI, false);
return;
break;
case 13:
// MFTB8
SStream_concat(O, ", 268");
SStream_concat(O, "%s", ", 268");
return;
break;
case 14:
// MFVRSAVE, MFVRSAVEv
SStream_concat(O, ", 256");
SStream_concat(O, "%s", ", 256");
return;
break;
case 15:
// TLBIE
SStream_concat(O, ",");
SStream_concat(O, "%s", ",");
printOperand(MI, 0, O);
return;
break;
case 16:
// V_SETALLONES, V_SETALLONESB, V_SETALLONESH
SStream_concat(O, ", -1");
SStream_concat(O, "%s", ", -1");
return;
break;
}
@ -2670,18 +2674,18 @@ static void printInstruction(MCInst *MI, SStream *O, MCRegisterInfo *MRI)
case 3:
// CRSET, CRUNSET, V_SET0, V_SET0B, V_SET0H
printOperand(MI, 0, O);
SStream_concat(O, ", ");
SStream_concat(O, "%s", ", ");
printOperand(MI, 0, O);
return;
break;
case 4:
// LA
printS16ImmOperand(MI, 2, O);
set_mem_access(MI, true);
SStream_concat(O, "(");
SStream_concat(O, "%s", "(");
set_mem_access(MI, true);
printOperand(MI, 1, O);
SStream_concat(O, ")");
set_mem_access(MI, false);
SStream_concat(O, "%s", ")");
set_mem_access(MI, false);
return;
break;
case 5:
@ -2712,7 +2716,7 @@ static void printInstruction(MCInst *MI, SStream *O, MCRegisterInfo *MRI)
case 10:
// RLDIMI, RLDIMIo, RLWIMI, RLWIMIo, VCFSX, VCFUX, VCTSXS, VCTUXS, VSPLTB...
printOperand(MI, 2, O);
SStream_concat(O, ", ");
SStream_concat(O, "%s", ", ");
break;
case 11:
// VSPLTISB, VSPLTISH, VSPLTISW
@ -2728,7 +2732,7 @@ static void printInstruction(MCInst *MI, SStream *O, MCRegisterInfo *MRI)
default: // unreachable.
case 0:
// ADD4, ADD4TLS, ADD4o, ADD8, ADD8TLS, ADD8TLS_, ADD8o, ADDC, ADDC8, ADD...
SStream_concat(O, ", ");
SStream_concat(O, "%s", ", ");
break;
case 1:
// ADDME, ADDME8, ADDME8o, ADDMEo, ADDZE, ADDZE8, ADDZE8o, ADDZEo, CNTLZD...
@ -2736,25 +2740,25 @@ static void printInstruction(MCInst *MI, SStream *O, MCRegisterInfo *MRI)
break;
case 2:
// ATOMIC_CMP_SWAP_I16, ATOMIC_CMP_SWAP_I32
SStream_concat(O, " ");
SStream_concat(O, "%s", " ");
printOperand(MI, 3, O);
SStream_concat(O, " ");
SStream_concat(O, "%s", " ");
printOperand(MI, 4, O);
return;
break;
case 3:
// RLDIMI, RLDIMIo
printU6ImmOperand(MI, 3, O);
SStream_concat(O, ", ");
SStream_concat(O, "%s", ", ");
printU6ImmOperand(MI, 4, O);
return;
break;
case 4:
// RLWIMI, RLWIMIo
printU5ImmOperand(MI, 3, O);
SStream_concat(O, ", ");
SStream_concat(O, "%s", ", ");
printU5ImmOperand(MI, 4, O);
SStream_concat(O, ", ");
SStream_concat(O, "%s", ", ");
printU5ImmOperand(MI, 5, O);
return;
break;
@ -2765,7 +2769,7 @@ static void printInstruction(MCInst *MI, SStream *O, MCRegisterInfo *MRI)
break;
case 6:
// VCFSX_0, VCFUX_0, VCTSXS_0, VCTUXS_0
SStream_concat(O, ", 0");
SStream_concat(O, "%s", ", 0");
return;
break;
}
@ -2814,7 +2818,7 @@ static void printInstruction(MCInst *MI, SStream *O, MCRegisterInfo *MRI)
//printf("Frag-5: %"PRIu64"\n", (Bits >> 32) & 1);
if ((Bits >> 32) & 1) {
// CLRLSLDI, CLRLSLDIo, CLRLSLWI, CLRLSLWIo, EXTLDI, EXTLDIo, EXTLWI, EXT...
SStream_concat(O, ", ");
SStream_concat(O, "%s", ", ");
} else {
// ADD4, ADD4TLS, ADD4o, ADD8, ADD8TLS, ADD8TLS_, ADD8o, ADDC, ADDC8, ADD...
return;
@ -2846,7 +2850,7 @@ static void printInstruction(MCInst *MI, SStream *O, MCRegisterInfo *MRI)
//printf("Frag-7: %"PRIu64"\n", (Bits >> 35) & 1);
if ((Bits >> 35) & 1) {
// RLWINM, RLWINM8, RLWINM8o, RLWINMo, RLWNM, RLWNMo
SStream_concat(O, ", ");
SStream_concat(O, "%s", ", ");
printU5ImmOperand(MI, 4, O);
return;
} else {

File diff suppressed because it is too large Load Diff

View File

@ -492,413 +492,414 @@ enum {
PPC_MFVRSAVE = 475,
PPC_MFVRSAVEv = 476,
PPC_MFVSCR = 477,
PPC_MTCRF = 478,
PPC_MTCRF8 = 479,
PPC_MTCTR = 480,
PPC_MTCTR8 = 481,
PPC_MTCTR8loop = 482,
PPC_MTCTRloop = 483,
PPC_MTFSB0 = 484,
PPC_MTFSB1 = 485,
PPC_MTFSF = 486,
PPC_MTLR = 487,
PPC_MTLR8 = 488,
PPC_MTMSR = 489,
PPC_MTMSRD = 490,
PPC_MTOCRF = 491,
PPC_MTOCRF8 = 492,
PPC_MTSPR = 493,
PPC_MTVRSAVE = 494,
PPC_MTVRSAVEv = 495,
PPC_MTVSCR = 496,
PPC_MULHD = 497,
PPC_MULHDU = 498,
PPC_MULHDUo = 499,
PPC_MULHDo = 500,
PPC_MULHW = 501,
PPC_MULHWU = 502,
PPC_MULHWUo = 503,
PPC_MULHWo = 504,
PPC_MULLD = 505,
PPC_MULLDo = 506,
PPC_MULLI = 507,
PPC_MULLI8 = 508,
PPC_MULLW = 509,
PPC_MULLWo = 510,
PPC_MovePCtoLR = 511,
PPC_MovePCtoLR8 = 512,
PPC_NAND = 513,
PPC_NAND8 = 514,
PPC_NAND8o = 515,
PPC_NANDo = 516,
PPC_NEG = 517,
PPC_NEG8 = 518,
PPC_NEG8o = 519,
PPC_NEGo = 520,
PPC_NOP = 521,
PPC_NOP_GT_PWR6 = 522,
PPC_NOP_GT_PWR7 = 523,
PPC_NOR = 524,
PPC_NOR8 = 525,
PPC_NOR8o = 526,
PPC_NORo = 527,
PPC_OR = 528,
PPC_OR8 = 529,
PPC_OR8o = 530,
PPC_ORC = 531,
PPC_ORC8 = 532,
PPC_ORC8o = 533,
PPC_ORCo = 534,
PPC_ORI = 535,
PPC_ORI8 = 536,
PPC_ORIS = 537,
PPC_ORIS8 = 538,
PPC_ORo = 539,
PPC_POPCNTD = 540,
PPC_POPCNTW = 541,
PPC_PPC32GOT = 542,
PPC_RESTORE_CR = 543,
PPC_RESTORE_VRSAVE = 544,
PPC_RLDCL = 545,
PPC_RLDCLo = 546,
PPC_RLDCR = 547,
PPC_RLDCRo = 548,
PPC_RLDIC = 549,
PPC_RLDICL = 550,
PPC_RLDICL_32_64 = 551,
PPC_RLDICLo = 552,
PPC_RLDICR = 553,
PPC_RLDICRo = 554,
PPC_RLDICo = 555,
PPC_RLDIMI = 556,
PPC_RLDIMIo = 557,
PPC_RLWIMI = 558,
PPC_RLWIMIo = 559,
PPC_RLWINM = 560,
PPC_RLWINM8 = 561,
PPC_RLWINM8o = 562,
PPC_RLWINMo = 563,
PPC_RLWNM = 564,
PPC_RLWNMo = 565,
PPC_ROTRDI = 566,
PPC_ROTRDIo = 567,
PPC_ROTRWI = 568,
PPC_ROTRWIo = 569,
PPC_SC = 570,
PPC_SELECT_CC_F4 = 571,
PPC_SELECT_CC_F8 = 572,
PPC_SELECT_CC_I4 = 573,
PPC_SELECT_CC_I8 = 574,
PPC_SELECT_CC_VRRC = 575,
PPC_SLBIA = 576,
PPC_SLBIE = 577,
PPC_SLBMFEE = 578,
PPC_SLBMTE = 579,
PPC_SLD = 580,
PPC_SLDI = 581,
PPC_SLDIo = 582,
PPC_SLDo = 583,
PPC_SLW = 584,
PPC_SLWI = 585,
PPC_SLWIo = 586,
PPC_SLWo = 587,
PPC_SPILL_CR = 588,
PPC_SPILL_VRSAVE = 589,
PPC_SRAD = 590,
PPC_SRADI = 591,
PPC_SRADIo = 592,
PPC_SRADo = 593,
PPC_SRAW = 594,
PPC_SRAWI = 595,
PPC_SRAWIo = 596,
PPC_SRAWo = 597,
PPC_SRD = 598,
PPC_SRDI = 599,
PPC_SRDIo = 600,
PPC_SRDo = 601,
PPC_SRW = 602,
PPC_SRWI = 603,
PPC_SRWIo = 604,
PPC_SRWo = 605,
PPC_STB = 606,
PPC_STB8 = 607,
PPC_STBU = 608,
PPC_STBU8 = 609,
PPC_STBUX = 610,
PPC_STBUX8 = 611,
PPC_STBX = 612,
PPC_STBX8 = 613,
PPC_STD = 614,
PPC_STDBRX = 615,
PPC_STDCX = 616,
PPC_STDU = 617,
PPC_STDUX = 618,
PPC_STDX = 619,
PPC_STFD = 620,
PPC_STFDU = 621,
PPC_STFDUX = 622,
PPC_STFDX = 623,
PPC_STFIWX = 624,
PPC_STFS = 625,
PPC_STFSU = 626,
PPC_STFSUX = 627,
PPC_STFSX = 628,
PPC_STH = 629,
PPC_STH8 = 630,
PPC_STHBRX = 631,
PPC_STHU = 632,
PPC_STHU8 = 633,
PPC_STHUX = 634,
PPC_STHUX8 = 635,
PPC_STHX = 636,
PPC_STHX8 = 637,
PPC_STMW = 638,
PPC_STVEBX = 639,
PPC_STVEHX = 640,
PPC_STVEWX = 641,
PPC_STVX = 642,
PPC_STVXL = 643,
PPC_STW = 644,
PPC_STW8 = 645,
PPC_STWBRX = 646,
PPC_STWCX = 647,
PPC_STWU = 648,
PPC_STWU8 = 649,
PPC_STWUX = 650,
PPC_STWUX8 = 651,
PPC_STWX = 652,
PPC_STWX8 = 653,
PPC_SUBF = 654,
PPC_SUBF8 = 655,
PPC_SUBF8o = 656,
PPC_SUBFC = 657,
PPC_SUBFC8 = 658,
PPC_SUBFC8o = 659,
PPC_SUBFCo = 660,
PPC_SUBFE = 661,
PPC_SUBFE8 = 662,
PPC_SUBFE8o = 663,
PPC_SUBFEo = 664,
PPC_SUBFIC = 665,
PPC_SUBFIC8 = 666,
PPC_SUBFME = 667,
PPC_SUBFME8 = 668,
PPC_SUBFME8o = 669,
PPC_SUBFMEo = 670,
PPC_SUBFZE = 671,
PPC_SUBFZE8 = 672,
PPC_SUBFZE8o = 673,
PPC_SUBFZEo = 674,
PPC_SUBFo = 675,
PPC_SUBI = 676,
PPC_SUBIC = 677,
PPC_SUBICo = 678,
PPC_SUBIS = 679,
PPC_SYNC = 680,
PPC_TAILB = 681,
PPC_TAILB8 = 682,
PPC_TAILBA = 683,
PPC_TAILBA8 = 684,
PPC_TAILBCTR = 685,
PPC_TAILBCTR8 = 686,
PPC_TCRETURNai = 687,
PPC_TCRETURNai8 = 688,
PPC_TCRETURNdi = 689,
PPC_TCRETURNdi8 = 690,
PPC_TCRETURNri = 691,
PPC_TCRETURNri8 = 692,
PPC_TD = 693,
PPC_TDI = 694,
PPC_TLBIE = 695,
PPC_TLBIEL = 696,
PPC_TLBSYNC = 697,
PPC_TRAP = 698,
PPC_TW = 699,
PPC_TWI = 700,
PPC_UPDATE_VRSAVE = 701,
PPC_VADDCUW = 702,
PPC_VADDFP = 703,
PPC_VADDSBS = 704,
PPC_VADDSHS = 705,
PPC_VADDSWS = 706,
PPC_VADDUBM = 707,
PPC_VADDUBS = 708,
PPC_VADDUHM = 709,
PPC_VADDUHS = 710,
PPC_VADDUWM = 711,
PPC_VADDUWS = 712,
PPC_VAND = 713,
PPC_VANDC = 714,
PPC_VAVGSB = 715,
PPC_VAVGSH = 716,
PPC_VAVGSW = 717,
PPC_VAVGUB = 718,
PPC_VAVGUH = 719,
PPC_VAVGUW = 720,
PPC_VCFSX = 721,
PPC_VCFSX_0 = 722,
PPC_VCFUX = 723,
PPC_VCFUX_0 = 724,
PPC_VCMPBFP = 725,
PPC_VCMPBFPo = 726,
PPC_VCMPEQFP = 727,
PPC_VCMPEQFPo = 728,
PPC_VCMPEQUB = 729,
PPC_VCMPEQUBo = 730,
PPC_VCMPEQUH = 731,
PPC_VCMPEQUHo = 732,
PPC_VCMPEQUW = 733,
PPC_VCMPEQUWo = 734,
PPC_VCMPGEFP = 735,
PPC_VCMPGEFPo = 736,
PPC_VCMPGTFP = 737,
PPC_VCMPGTFPo = 738,
PPC_VCMPGTSB = 739,
PPC_VCMPGTSBo = 740,
PPC_VCMPGTSH = 741,
PPC_VCMPGTSHo = 742,
PPC_VCMPGTSW = 743,
PPC_VCMPGTSWo = 744,
PPC_VCMPGTUB = 745,
PPC_VCMPGTUBo = 746,
PPC_VCMPGTUH = 747,
PPC_VCMPGTUHo = 748,
PPC_VCMPGTUW = 749,
PPC_VCMPGTUWo = 750,
PPC_VCTSXS = 751,
PPC_VCTSXS_0 = 752,
PPC_VCTUXS = 753,
PPC_VCTUXS_0 = 754,
PPC_VEXPTEFP = 755,
PPC_VLOGEFP = 756,
PPC_VMADDFP = 757,
PPC_VMAXFP = 758,
PPC_VMAXSB = 759,
PPC_VMAXSH = 760,
PPC_VMAXSW = 761,
PPC_VMAXUB = 762,
PPC_VMAXUH = 763,
PPC_VMAXUW = 764,
PPC_VMHADDSHS = 765,
PPC_VMHRADDSHS = 766,
PPC_VMINFP = 767,
PPC_VMINSB = 768,
PPC_VMINSH = 769,
PPC_VMINSW = 770,
PPC_VMINUB = 771,
PPC_VMINUH = 772,
PPC_VMINUW = 773,
PPC_VMLADDUHM = 774,
PPC_VMRGHB = 775,
PPC_VMRGHH = 776,
PPC_VMRGHW = 777,
PPC_VMRGLB = 778,
PPC_VMRGLH = 779,
PPC_VMRGLW = 780,
PPC_VMSUMMBM = 781,
PPC_VMSUMSHM = 782,
PPC_VMSUMSHS = 783,
PPC_VMSUMUBM = 784,
PPC_VMSUMUHM = 785,
PPC_VMSUMUHS = 786,
PPC_VMULESB = 787,
PPC_VMULESH = 788,
PPC_VMULEUB = 789,
PPC_VMULEUH = 790,
PPC_VMULOSB = 791,
PPC_VMULOSH = 792,
PPC_VMULOUB = 793,
PPC_VMULOUH = 794,
PPC_VNMSUBFP = 795,
PPC_VNOR = 796,
PPC_VOR = 797,
PPC_VPERM = 798,
PPC_VPKPX = 799,
PPC_VPKSHSS = 800,
PPC_VPKSHUS = 801,
PPC_VPKSWSS = 802,
PPC_VPKSWUS = 803,
PPC_VPKUHUM = 804,
PPC_VPKUHUS = 805,
PPC_VPKUWUM = 806,
PPC_VPKUWUS = 807,
PPC_VREFP = 808,
PPC_VRFIM = 809,
PPC_VRFIN = 810,
PPC_VRFIP = 811,
PPC_VRFIZ = 812,
PPC_VRLB = 813,
PPC_VRLH = 814,
PPC_VRLW = 815,
PPC_VRSQRTEFP = 816,
PPC_VSEL = 817,
PPC_VSL = 818,
PPC_VSLB = 819,
PPC_VSLDOI = 820,
PPC_VSLH = 821,
PPC_VSLO = 822,
PPC_VSLW = 823,
PPC_VSPLTB = 824,
PPC_VSPLTH = 825,
PPC_VSPLTISB = 826,
PPC_VSPLTISH = 827,
PPC_VSPLTISW = 828,
PPC_VSPLTW = 829,
PPC_VSR = 830,
PPC_VSRAB = 831,
PPC_VSRAH = 832,
PPC_VSRAW = 833,
PPC_VSRB = 834,
PPC_VSRH = 835,
PPC_VSRO = 836,
PPC_VSRW = 837,
PPC_VSUBCUW = 838,
PPC_VSUBFP = 839,
PPC_VSUBSBS = 840,
PPC_VSUBSHS = 841,
PPC_VSUBSWS = 842,
PPC_VSUBUBM = 843,
PPC_VSUBUBS = 844,
PPC_VSUBUHM = 845,
PPC_VSUBUHS = 846,
PPC_VSUBUWM = 847,
PPC_VSUBUWS = 848,
PPC_VSUM2SWS = 849,
PPC_VSUM4SBS = 850,
PPC_VSUM4SHS = 851,
PPC_VSUM4UBS = 852,
PPC_VSUMSWS = 853,
PPC_VUPKHPX = 854,
PPC_VUPKHSB = 855,
PPC_VUPKHSH = 856,
PPC_VUPKLPX = 857,
PPC_VUPKLSB = 858,
PPC_VUPKLSH = 859,
PPC_VXOR = 860,
PPC_V_SET0 = 861,
PPC_V_SET0B = 862,
PPC_V_SET0H = 863,
PPC_V_SETALLONES = 864,
PPC_V_SETALLONESB = 865,
PPC_V_SETALLONESH = 866,
PPC_WAIT = 867,
PPC_XOR = 868,
PPC_XOR8 = 869,
PPC_XOR8o = 870,
PPC_XORI = 871,
PPC_XORI8 = 872,
PPC_XORIS = 873,
PPC_XORIS8 = 874,
PPC_XORo = 875,
PPC_gBC = 876,
PPC_gBCA = 877,
PPC_gBCCTR = 878,
PPC_gBCCTRL = 879,
PPC_gBCL = 880,
PPC_gBCLA = 881,
PPC_gBCLR = 882,
PPC_gBCLRL = 883,
PPC_INSTRUCTION_LIST_END = 884
PPC_MSYNC = 478,
PPC_MTCRF = 479,
PPC_MTCRF8 = 480,
PPC_MTCTR = 481,
PPC_MTCTR8 = 482,
PPC_MTCTR8loop = 483,
PPC_MTCTRloop = 484,
PPC_MTFSB0 = 485,
PPC_MTFSB1 = 486,
PPC_MTFSF = 487,
PPC_MTLR = 488,
PPC_MTLR8 = 489,
PPC_MTMSR = 490,
PPC_MTMSRD = 491,
PPC_MTOCRF = 492,
PPC_MTOCRF8 = 493,
PPC_MTSPR = 494,
PPC_MTVRSAVE = 495,
PPC_MTVRSAVEv = 496,
PPC_MTVSCR = 497,
PPC_MULHD = 498,
PPC_MULHDU = 499,
PPC_MULHDUo = 500,
PPC_MULHDo = 501,
PPC_MULHW = 502,
PPC_MULHWU = 503,
PPC_MULHWUo = 504,
PPC_MULHWo = 505,
PPC_MULLD = 506,
PPC_MULLDo = 507,
PPC_MULLI = 508,
PPC_MULLI8 = 509,
PPC_MULLW = 510,
PPC_MULLWo = 511,
PPC_MovePCtoLR = 512,
PPC_MovePCtoLR8 = 513,
PPC_NAND = 514,
PPC_NAND8 = 515,
PPC_NAND8o = 516,
PPC_NANDo = 517,
PPC_NEG = 518,
PPC_NEG8 = 519,
PPC_NEG8o = 520,
PPC_NEGo = 521,
PPC_NOP = 522,
PPC_NOP_GT_PWR6 = 523,
PPC_NOP_GT_PWR7 = 524,
PPC_NOR = 525,
PPC_NOR8 = 526,
PPC_NOR8o = 527,
PPC_NORo = 528,
PPC_OR = 529,
PPC_OR8 = 530,
PPC_OR8o = 531,
PPC_ORC = 532,
PPC_ORC8 = 533,
PPC_ORC8o = 534,
PPC_ORCo = 535,
PPC_ORI = 536,
PPC_ORI8 = 537,
PPC_ORIS = 538,
PPC_ORIS8 = 539,
PPC_ORo = 540,
PPC_POPCNTD = 541,
PPC_POPCNTW = 542,
PPC_PPC32GOT = 543,
PPC_RESTORE_CR = 544,
PPC_RESTORE_VRSAVE = 545,
PPC_RLDCL = 546,
PPC_RLDCLo = 547,
PPC_RLDCR = 548,
PPC_RLDCRo = 549,
PPC_RLDIC = 550,
PPC_RLDICL = 551,
PPC_RLDICL_32_64 = 552,
PPC_RLDICLo = 553,
PPC_RLDICR = 554,
PPC_RLDICRo = 555,
PPC_RLDICo = 556,
PPC_RLDIMI = 557,
PPC_RLDIMIo = 558,
PPC_RLWIMI = 559,
PPC_RLWIMIo = 560,
PPC_RLWINM = 561,
PPC_RLWINM8 = 562,
PPC_RLWINM8o = 563,
PPC_RLWINMo = 564,
PPC_RLWNM = 565,
PPC_RLWNMo = 566,
PPC_ROTRDI = 567,
PPC_ROTRDIo = 568,
PPC_ROTRWI = 569,
PPC_ROTRWIo = 570,
PPC_SC = 571,
PPC_SELECT_CC_F4 = 572,
PPC_SELECT_CC_F8 = 573,
PPC_SELECT_CC_I4 = 574,
PPC_SELECT_CC_I8 = 575,
PPC_SELECT_CC_VRRC = 576,
PPC_SLBIA = 577,
PPC_SLBIE = 578,
PPC_SLBMFEE = 579,
PPC_SLBMTE = 580,
PPC_SLD = 581,
PPC_SLDI = 582,
PPC_SLDIo = 583,
PPC_SLDo = 584,
PPC_SLW = 585,
PPC_SLWI = 586,
PPC_SLWIo = 587,
PPC_SLWo = 588,
PPC_SPILL_CR = 589,
PPC_SPILL_VRSAVE = 590,
PPC_SRAD = 591,
PPC_SRADI = 592,
PPC_SRADIo = 593,
PPC_SRADo = 594,
PPC_SRAW = 595,
PPC_SRAWI = 596,
PPC_SRAWIo = 597,
PPC_SRAWo = 598,
PPC_SRD = 599,
PPC_SRDI = 600,
PPC_SRDIo = 601,
PPC_SRDo = 602,
PPC_SRW = 603,
PPC_SRWI = 604,
PPC_SRWIo = 605,
PPC_SRWo = 606,
PPC_STB = 607,
PPC_STB8 = 608,
PPC_STBU = 609,
PPC_STBU8 = 610,
PPC_STBUX = 611,
PPC_STBUX8 = 612,
PPC_STBX = 613,
PPC_STBX8 = 614,
PPC_STD = 615,
PPC_STDBRX = 616,
PPC_STDCX = 617,
PPC_STDU = 618,
PPC_STDUX = 619,
PPC_STDX = 620,
PPC_STFD = 621,
PPC_STFDU = 622,
PPC_STFDUX = 623,
PPC_STFDX = 624,
PPC_STFIWX = 625,
PPC_STFS = 626,
PPC_STFSU = 627,
PPC_STFSUX = 628,
PPC_STFSX = 629,
PPC_STH = 630,
PPC_STH8 = 631,
PPC_STHBRX = 632,
PPC_STHU = 633,
PPC_STHU8 = 634,
PPC_STHUX = 635,
PPC_STHUX8 = 636,
PPC_STHX = 637,
PPC_STHX8 = 638,
PPC_STMW = 639,
PPC_STVEBX = 640,
PPC_STVEHX = 641,
PPC_STVEWX = 642,
PPC_STVX = 643,
PPC_STVXL = 644,
PPC_STW = 645,
PPC_STW8 = 646,
PPC_STWBRX = 647,
PPC_STWCX = 648,
PPC_STWU = 649,
PPC_STWU8 = 650,
PPC_STWUX = 651,
PPC_STWUX8 = 652,
PPC_STWX = 653,
PPC_STWX8 = 654,
PPC_SUBF = 655,
PPC_SUBF8 = 656,
PPC_SUBF8o = 657,
PPC_SUBFC = 658,
PPC_SUBFC8 = 659,
PPC_SUBFC8o = 660,
PPC_SUBFCo = 661,
PPC_SUBFE = 662,
PPC_SUBFE8 = 663,
PPC_SUBFE8o = 664,
PPC_SUBFEo = 665,
PPC_SUBFIC = 666,
PPC_SUBFIC8 = 667,
PPC_SUBFME = 668,
PPC_SUBFME8 = 669,
PPC_SUBFME8o = 670,
PPC_SUBFMEo = 671,
PPC_SUBFZE = 672,
PPC_SUBFZE8 = 673,
PPC_SUBFZE8o = 674,
PPC_SUBFZEo = 675,
PPC_SUBFo = 676,
PPC_SUBI = 677,
PPC_SUBIC = 678,
PPC_SUBICo = 679,
PPC_SUBIS = 680,
PPC_SYNC = 681,
PPC_TAILB = 682,
PPC_TAILB8 = 683,
PPC_TAILBA = 684,
PPC_TAILBA8 = 685,
PPC_TAILBCTR = 686,
PPC_TAILBCTR8 = 687,
PPC_TCRETURNai = 688,
PPC_TCRETURNai8 = 689,
PPC_TCRETURNdi = 690,
PPC_TCRETURNdi8 = 691,
PPC_TCRETURNri = 692,
PPC_TCRETURNri8 = 693,
PPC_TD = 694,
PPC_TDI = 695,
PPC_TLBIE = 696,
PPC_TLBIEL = 697,
PPC_TLBSYNC = 698,
PPC_TRAP = 699,
PPC_TW = 700,
PPC_TWI = 701,
PPC_UPDATE_VRSAVE = 702,
PPC_VADDCUW = 703,
PPC_VADDFP = 704,
PPC_VADDSBS = 705,
PPC_VADDSHS = 706,
PPC_VADDSWS = 707,
PPC_VADDUBM = 708,
PPC_VADDUBS = 709,
PPC_VADDUHM = 710,
PPC_VADDUHS = 711,
PPC_VADDUWM = 712,
PPC_VADDUWS = 713,
PPC_VAND = 714,
PPC_VANDC = 715,
PPC_VAVGSB = 716,
PPC_VAVGSH = 717,
PPC_VAVGSW = 718,
PPC_VAVGUB = 719,
PPC_VAVGUH = 720,
PPC_VAVGUW = 721,
PPC_VCFSX = 722,
PPC_VCFSX_0 = 723,
PPC_VCFUX = 724,
PPC_VCFUX_0 = 725,
PPC_VCMPBFP = 726,
PPC_VCMPBFPo = 727,
PPC_VCMPEQFP = 728,
PPC_VCMPEQFPo = 729,
PPC_VCMPEQUB = 730,
PPC_VCMPEQUBo = 731,
PPC_VCMPEQUH = 732,
PPC_VCMPEQUHo = 733,
PPC_VCMPEQUW = 734,
PPC_VCMPEQUWo = 735,
PPC_VCMPGEFP = 736,
PPC_VCMPGEFPo = 737,
PPC_VCMPGTFP = 738,
PPC_VCMPGTFPo = 739,
PPC_VCMPGTSB = 740,
PPC_VCMPGTSBo = 741,
PPC_VCMPGTSH = 742,
PPC_VCMPGTSHo = 743,
PPC_VCMPGTSW = 744,
PPC_VCMPGTSWo = 745,
PPC_VCMPGTUB = 746,
PPC_VCMPGTUBo = 747,
PPC_VCMPGTUH = 748,
PPC_VCMPGTUHo = 749,
PPC_VCMPGTUW = 750,
PPC_VCMPGTUWo = 751,
PPC_VCTSXS = 752,
PPC_VCTSXS_0 = 753,
PPC_VCTUXS = 754,
PPC_VCTUXS_0 = 755,
PPC_VEXPTEFP = 756,
PPC_VLOGEFP = 757,
PPC_VMADDFP = 758,
PPC_VMAXFP = 759,
PPC_VMAXSB = 760,
PPC_VMAXSH = 761,
PPC_VMAXSW = 762,
PPC_VMAXUB = 763,
PPC_VMAXUH = 764,
PPC_VMAXUW = 765,
PPC_VMHADDSHS = 766,
PPC_VMHRADDSHS = 767,
PPC_VMINFP = 768,
PPC_VMINSB = 769,
PPC_VMINSH = 770,
PPC_VMINSW = 771,
PPC_VMINUB = 772,
PPC_VMINUH = 773,
PPC_VMINUW = 774,
PPC_VMLADDUHM = 775,
PPC_VMRGHB = 776,
PPC_VMRGHH = 777,
PPC_VMRGHW = 778,
PPC_VMRGLB = 779,
PPC_VMRGLH = 780,
PPC_VMRGLW = 781,
PPC_VMSUMMBM = 782,
PPC_VMSUMSHM = 783,
PPC_VMSUMSHS = 784,
PPC_VMSUMUBM = 785,
PPC_VMSUMUHM = 786,
PPC_VMSUMUHS = 787,
PPC_VMULESB = 788,
PPC_VMULESH = 789,
PPC_VMULEUB = 790,
PPC_VMULEUH = 791,
PPC_VMULOSB = 792,
PPC_VMULOSH = 793,
PPC_VMULOUB = 794,
PPC_VMULOUH = 795,
PPC_VNMSUBFP = 796,
PPC_VNOR = 797,
PPC_VOR = 798,
PPC_VPERM = 799,
PPC_VPKPX = 800,
PPC_VPKSHSS = 801,
PPC_VPKSHUS = 802,
PPC_VPKSWSS = 803,
PPC_VPKSWUS = 804,
PPC_VPKUHUM = 805,
PPC_VPKUHUS = 806,
PPC_VPKUWUM = 807,
PPC_VPKUWUS = 808,
PPC_VREFP = 809,
PPC_VRFIM = 810,
PPC_VRFIN = 811,
PPC_VRFIP = 812,
PPC_VRFIZ = 813,
PPC_VRLB = 814,
PPC_VRLH = 815,
PPC_VRLW = 816,
PPC_VRSQRTEFP = 817,
PPC_VSEL = 818,
PPC_VSL = 819,
PPC_VSLB = 820,
PPC_VSLDOI = 821,
PPC_VSLH = 822,
PPC_VSLO = 823,
PPC_VSLW = 824,
PPC_VSPLTB = 825,
PPC_VSPLTH = 826,
PPC_VSPLTISB = 827,
PPC_VSPLTISH = 828,
PPC_VSPLTISW = 829,
PPC_VSPLTW = 830,
PPC_VSR = 831,
PPC_VSRAB = 832,
PPC_VSRAH = 833,
PPC_VSRAW = 834,
PPC_VSRB = 835,
PPC_VSRH = 836,
PPC_VSRO = 837,
PPC_VSRW = 838,
PPC_VSUBCUW = 839,
PPC_VSUBFP = 840,
PPC_VSUBSBS = 841,
PPC_VSUBSHS = 842,
PPC_VSUBSWS = 843,
PPC_VSUBUBM = 844,
PPC_VSUBUBS = 845,
PPC_VSUBUHM = 846,
PPC_VSUBUHS = 847,
PPC_VSUBUWM = 848,
PPC_VSUBUWS = 849,
PPC_VSUM2SWS = 850,
PPC_VSUM4SBS = 851,
PPC_VSUM4SHS = 852,
PPC_VSUM4UBS = 853,
PPC_VSUMSWS = 854,
PPC_VUPKHPX = 855,
PPC_VUPKHSB = 856,
PPC_VUPKHSH = 857,
PPC_VUPKLPX = 858,
PPC_VUPKLSB = 859,
PPC_VUPKLSH = 860,
PPC_VXOR = 861,
PPC_V_SET0 = 862,
PPC_V_SET0B = 863,
PPC_V_SET0H = 864,
PPC_V_SETALLONES = 865,
PPC_V_SETALLONESB = 866,
PPC_V_SETALLONESH = 867,
PPC_WAIT = 868,
PPC_XOR = 869,
PPC_XOR8 = 870,
PPC_XOR8o = 871,
PPC_XORI = 872,
PPC_XORI8 = 873,
PPC_XORIS = 874,
PPC_XORIS8 = 875,
PPC_XORo = 876,
PPC_gBC = 877,
PPC_gBCA = 878,
PPC_gBCCTR = 879,
PPC_gBCCTRL = 880,
PPC_gBCL = 881,
PPC_gBCLA = 882,
PPC_gBCLR = 883,
PPC_gBCLRL = 884,
PPC_INSTRUCTION_LIST_END = 885
};
#endif // GET_INSTRINFO_ENUM

View File

@ -12,6 +12,7 @@
#ifdef GET_REGINFO_ENUM
#undef GET_REGINFO_ENUM
enum {
PPC_NoRegister,
PPC_BP = 1,

View File

@ -387,6 +387,8 @@ static insn_map insns[] = {
{ PPC_FMADDS, PPC_INS_FMADDS, { PPC_REG_RM, 0 }, { 0 }, { 0 }, 0, 0 },
{ PPC_FMADDSo, PPC_INS_FMADDS, { PPC_REG_RM, 0 }, { PPC_REG_CR1, 0 }, { 0 }, 0, 0 },
{ PPC_FMADDo, PPC_INS_FMADD, { PPC_REG_RM, 0 }, { PPC_REG_CR1, 0 }, { 0 }, 0, 0 },
{ PPC_FMR, PPC_INS_FMR, { 0 }, { 0 }, { 0 }, 0, 0 },
{ PPC_FMRo, PPC_INS_FMR, { 0 }, { PPC_REG_CR1, 0 }, { 0 }, 0, 0 },
{ PPC_FMSUB, PPC_INS_FMSUB, { PPC_REG_RM, 0 }, { 0 }, { 0 }, 0, 0 },
{ PPC_FMSUBS, PPC_INS_FMSUBS, { PPC_REG_RM, 0 }, { 0 }, { 0 }, 0, 0 },
{ PPC_FMSUBSo, PPC_INS_FMSUBS, { PPC_REG_RM, 0 }, { PPC_REG_CR1, 0 }, { 0 }, 0, 0 },
@ -541,6 +543,7 @@ static insn_map insns[] = {
{ PPC_MFVRSAVE, PPC_INS_MFSPR, { 0 }, { 0 }, { 0 }, 0, 0 },
{ PPC_MFVRSAVEv, PPC_INS_MFSPR, { 0 }, { 0 }, { 0 }, 0, 0 },
{ PPC_MFVSCR, PPC_INS_MFVSCR, { 0 }, { 0 }, { PPC_GRP_ALTIVEC, 0 }, 0, 0 },
{ PPC_MSYNC, PPC_INS_MSYNC, { 0 }, { 0 }, { PPC_GRP_BOOKE, 0 }, 0, 0 },
{ PPC_MTCRF, PPC_INS_MTCRF, { 0 }, { 0 }, { 0 }, 0, 0 },
{ PPC_MTCRF8, PPC_INS_MTCRF, { 0 }, { 0 }, { 0 }, 0, 0 },
{ PPC_MTCTR, PPC_INS_MTCTR, { 0 }, { PPC_REG_CTR, 0 }, { 0 }, 0, 0 },
@ -715,7 +718,7 @@ static insn_map insns[] = {
{ PPC_SUBFZE8o, PPC_INS_SUBFZE, { PPC_REG_CARRY, 0 }, { PPC_REG_CARRY, PPC_REG_CR0, 0 }, { 0 }, 0, 0 },
{ PPC_SUBFZEo, PPC_INS_SUBFZE, { PPC_REG_CARRY, 0 }, { PPC_REG_CARRY, PPC_REG_CR0, 0 }, { 0 }, 0, 0 },
{ PPC_SUBFo, PPC_INS_SUBF, { 0 }, { PPC_REG_CR0, 0 }, { 0 }, 0, 0 },
{ PPC_SYNC, PPC_INS_SYNC, { 0 }, { 0 }, { 0 }, 0, 0 },
{ PPC_SYNC, PPC_INS_SYNC, { 0 }, { 0 }, { PPC_GRP_NOTBOOKE, 0 }, 0, 0 },
{ PPC_TAILB, PPC_INS_B, { PPC_REG_RM, 0 }, { 0 }, { 0 }, 1, 0 },
{ PPC_TAILB8, PPC_INS_B, { PPC_REG_RM, 0 }, { 0 }, { 0 }, 1, 0 },
{ PPC_TAILBA, PPC_INS_BA, { PPC_REG_RM, 0 }, { 0 }, { 0 }, 1, 0 },
@ -914,45 +917,11 @@ static insn_map insns[] = {
{ PPC_gBCLRL, PPC_INS_BCLRL, { PPC_REG_CTR, PPC_REG_LR, PPC_REG_RM, 0 }, { PPC_REG_LR, PPC_REG_CTR, 0 }, { 0 }, 0, 0 },
};
static insn_map alias_insns[] = {
{ 0, 0, { 0 }, { 0 }, { 0 }, 0, 0 },
};
// given internal insn id, return public instruction info
void PPC_get_insn_id(cs_struct *h, cs_insn *insn, unsigned int id)
{
int i;
// consider alias insn first
for (i = 0; i < ARR_SIZE(alias_insns); i++) {
if (alias_insns[i].id == id) {
insn->id = alias_insns[i].mapid;
if (h->detail) {
cs_struct handle;
handle.detail = h->detail;
memcpy(insn->detail->regs_read, alias_insns[i].regs_use, sizeof(alias_insns[i].regs_use));
insn->detail->regs_read_count = (uint8_t)count_positive(alias_insns[i].regs_use);
memcpy(insn->detail->regs_write, alias_insns[i].regs_mod, sizeof(alias_insns[i].regs_mod));
insn->detail->regs_write_count = (uint8_t)count_positive(alias_insns[i].regs_mod);
memcpy(insn->detail->groups, alias_insns[i].groups, sizeof(alias_insns[i].groups));
insn->detail->groups_count = (uint8_t)count_positive(alias_insns[i].groups);
if (alias_insns[i].branch || alias_insns[i].indirect_branch) {
// this insn also belongs to JUMP group. add JUMP group
insn->detail->groups[insn->detail->groups_count] = PPC_GRP_JUMP;
insn->detail->groups_count++;
}
insn->detail->ppc.update_cr0 = cs_reg_write((csh)&handle, insn, PPC_REG_CR0);
return;
}
}
}
i = insn_find(insns, ARR_SIZE(insns), id, &h->insn_cache);
if (i != 0) {
insn->id = insns[i].mapid;
@ -1077,6 +1046,7 @@ static name_map insn_name_maps[] = {
{ PPC_INS_FDIVS, "fdivs" },
{ PPC_INS_FMADD, "fmadd" },
{ PPC_INS_FMADDS, "fmadds" },
{ PPC_INS_FMR, "fmr" },
{ PPC_INS_FMSUB, "fmsub" },
{ PPC_INS_FMSUBS, "fmsubs" },
{ PPC_INS_FMUL, "fmul" },
@ -1163,6 +1133,7 @@ static name_map insn_name_maps[] = {
{ PPC_INS_MFSPR, "mfspr" },
{ PPC_INS_MFTB, "mftb" },
{ PPC_INS_MFVSCR, "mfvscr" },
{ PPC_INS_MSYNC, "msync" },
{ PPC_INS_MTCRF, "mtcrf" },
{ PPC_INS_MTCTR, "mtctr" },
{ PPC_INS_MTFSB0, "mtfsb0" },

View File

@ -335,6 +335,7 @@ typedef enum ppc_insn {
PPC_INS_FDIVS,
PPC_INS_FMADD,
PPC_INS_FMADDS,
PPC_INS_FMR,
PPC_INS_FMSUB,
PPC_INS_FMSUBS,
PPC_INS_FMUL,
@ -421,6 +422,7 @@ typedef enum ppc_insn {
PPC_INS_MFSPR,
PPC_INS_MFTB,
PPC_INS_MFVSCR,
PPC_INS_MSYNC,
PPC_INS_MTCRF,
PPC_INS_MTCTR,
PPC_INS_MTFSB0,
@ -686,6 +688,8 @@ typedef enum ppc_insn_group {
PPC_GRP_ALTIVEC,
PPC_GRP_MODE32,
PPC_GRP_MODE64,
PPC_GRP_BOOKE,
PPC_GRP_NOTBOOKE,
PPC_GRP_JUMP, // all jump instructions (conditional+direct+indirect jumps)