/* The 3-bit UIMM field in a VX form instruction. */
#define UIMM3 UIMM + 1
+#define CVM UIMM3
{ 0x7, 16, NULL, NULL, 0 },
/* The 6-bit UIM field in a X form instruction. */
#define SP PRS + 1
#define mi0 SP
+#define IT SP
{ 0x3, 19, NULL, NULL, 0 },
#define S SP + 1
| (((uint64_t)(rc)) & 1))
#define MM_MASK MM (0x3f, 0x3f, 0x1)
-/* An MM form instruction with explicit . */
+/* An MM form instruction with explicit MMM. */
#define MMXMMM(op, xop, mmm, rc) \
(OP (op) \
| ((((uint64_t)(mmm)) & 0x7) << 8) \
| (((uint64_t)(rc)) & 1))
#define MMXMMM_MASK MMXMMM (0x3f, 0x3f, 0x7, 0x1)
+/* An MM form instruction with explicit FMM. */
+#define MMXFMM(op, xop, fmm, rc) \
+ (OP (op) \
+ | ((((uint64_t)(fmm)) & 0xf) << 7) \
+ | ((((uint64_t)(xop)) & 0x3f) << 1) \
+ | (((uint64_t)(rc)) & 1))
+#define MMXFMM_MASK MMXFMM (0x3f, 0x3f, 0xf, 0x1)
+
/* The BO encodings used in extended conditional branch mnemonics. */
#define BODNZF (0x0)
#define BODNZFP (0x1)
{"facoshs.", XRC(59,686,1), X_MASK, SFFS, PPCVLE, {FRT, FRB}},
{"fatanhs", XRC(59,687,0), X_MASK, SFFS, PPCVLE, {FRT, FRB}},
{"fatanhs.", XRC(59,687,1), X_MASK, SFFS, PPCVLE, {FRT, FRB}},
-{"fminnum08s", XRC(59,716,0), X_MASK, SFFS, PPCVLE, {FRT, FRA, FRB}},
-{"fminnum08s.", XRC(59,716,1), X_MASK, SFFS, PPCVLE, {FRT, FRA, FRB}},
-{"fmin19s", XRC(59,717,0), X_MASK, SFFS, PPCVLE, {FRT, FRA, FRB}},
-{"fmin19s.", XRC(59,717,1), X_MASK, SFFS, PPCVLE, {FRT, FRA, FRB}},
-{"fminnum19s", XRC(59,718,0), X_MASK, SFFS, PPCVLE, {FRT, FRA, FRB}},
-{"fminnum19s.", XRC(59,718,1), X_MASK, SFFS, PPCVLE, {FRT, FRA, FRB}},
-{"fmincs", XRC(59,719,0), X_MASK, SFFS, PPCVLE, {FRT, FRA, FRB}},
-{"fmincs.", XRC(59,719,1), X_MASK, SFFS, PPCVLE, {FRT, FRA, FRB}},
-{"fmaxnum08s", XRC(59,748,0), X_MASK, SFFS, PPCVLE, {FRT, FRA, FRB}},
-{"fmaxnum08s.", XRC(59,748,1), X_MASK, SFFS, PPCVLE, {FRT, FRA, FRB}},
-{"fmax19s", XRC(59,749,0), X_MASK, SFFS, PPCVLE, {FRT, FRA, FRB}},
-{"fmax19s.", XRC(59,749,1), X_MASK, SFFS, PPCVLE, {FRT, FRA, FRB}},
-{"fmaxnum19s", XRC(59,750,0), X_MASK, SFFS, PPCVLE, {FRT, FRA, FRB}},
-{"fmaxnum19s.", XRC(59,750,1), X_MASK, SFFS, PPCVLE, {FRT, FRA, FRB}},
-{"fmaxcs", XRC(59,751,0), X_MASK, SFFS, PPCVLE, {FRT, FRA, FRB}},
-{"fmaxcs.", XRC(59,751,1), X_MASK, SFFS, PPCVLE, {FRT, FRA, FRB}},
{"fexp2m1s", XRC(59,780,0), X_MASK, SFFS, PPCVLE, {FRT, FRB}},
{"fexp2m1s.", XRC(59,780,1), X_MASK, SFFS, PPCVLE, {FRT, FRB}},
{"flog2p1s", XRC(59,781,0), X_MASK, SFFS, PPCVLE, {FRT, FRB}},
{"flog2p1s.", XRC(59,781,1), X_MASK, SFFS, PPCVLE, {FRT, FRB}},
-{"fminmagnum08s", XRC(59,782,0), X_MASK, SFFS, PPCVLE, {FRT, FRA, FRB}},
-{"fminmagnum08s.", XRC(59,782,1), X_MASK, SFFS, PPCVLE, {FRT, FRA, FRB}},
-{"fmaxmagnum08s", XRC(59,783,0), X_MASK, SFFS, PPCVLE, {FRT, FRA, FRB}},
-{"fmaxmagnum08s.", XRC(59,783,1), X_MASK, SFFS, PPCVLE, {FRT, FRA, FRB}},
+{"ctfprs", XRC(59,783,0), X_MASK, SFFS, PPCVLE, {FRT,RB,IT}},
+{"ctfprs.", XRC(59,783,1), X_MASK, SFFS, PPCVLE, {FRT,RB,IT}},
{"fexpm1s", XRC(59,812,0), X_MASK, SFFS, PPCVLE, {FRT, FRB}},
{"fexpm1s.", XRC(59,812,1), X_MASK, SFFS, PPCVLE, {FRT, FRB}},
{"flogp1s", XRC(59,813,0), X_MASK, SFFS, PPCVLE, {FRT, FRB}},
{"fpowns.", XRC(59,876,1), X_MASK, SFFS, PPCVLE, {FRT, FRA, RB}},
{"frootns", XRC(59,877,0), X_MASK, SFFS, PPCVLE, {FRT, FRA, RB}},
{"frootns.", XRC(59,877,1), X_MASK, SFFS, PPCVLE, {FRT, FRA, RB}},
-{"fminmag19s", XRC(59,878,0), X_MASK, SFFS, PPCVLE, {FRT, FRA, FRB}},
-{"fminmag19s.", XRC(59,878,1), X_MASK, SFFS, PPCVLE, {FRT, FRA, FRB}},
-{"fmaxmag19s", XRC(59,879,0), X_MASK, SFFS, PPCVLE, {FRT, FRA, FRB}},
-{"fmaxmag19s.", XRC(59,879,1), X_MASK, SFFS, PPCVLE, {FRT, FRA, FRB}},
{"fexp2s", XRC(59,908,0), X_MASK, SFFS, PPCVLE, {FRT, FRB}},
{"fexp2s.", XRC(59,908,1), X_MASK, SFFS, PPCVLE, {FRT, FRB}},
{"flog2s", XRC(59,909,0), X_MASK, SFFS, PPCVLE, {FRT, FRB}},
{"flog2s.", XRC(59,909,1), X_MASK, SFFS, PPCVLE, {FRT, FRB}},
-{"fminmagnum19s", XRC(59,910,0), X_MASK, SFFS, PPCVLE, {FRT, FRA, FRB}},
-{"fminmagnum19s.", XRC(59,910,1), X_MASK, SFFS, PPCVLE, {FRT, FRA, FRB}},
-{"fmaxmagnum19s", XRC(59,911,0), X_MASK, SFFS, PPCVLE, {FRT, FRA, FRB}},
-{"fmaxmagnum19s.", XRC(59,911,1), X_MASK, SFFS, PPCVLE, {FRT, FRA, FRB}},
+{"mffprs", XRC(59,910,0), X_MASK, SFFS, PPCVLE, {RT,FRB}},
+{"mffprs.", XRC(59,910,1), X_MASK, SFFS, PPCVLE, {RT,FRB}},
+{"mtfprs", X(59,911), X_MASK, SFFS, PPCVLE, {FRT,RB}},
{"fexps", XRC(59,940,0), X_MASK, SFFS, PPCVLE, {FRT, FRB}},
{"fexps.", XRC(59,940,1), X_MASK, SFFS, PPCVLE, {FRT, FRB}},
{"flogs", XRC(59,941,0), X_MASK, SFFS, PPCVLE, {FRT, FRB}},
{"fpowrs.", XRC(59,1004,1), X_MASK, SFFS, PPCVLE, {FRT, FRA, FRB}},
{"fpows", XRC(59,1005,0), X_MASK, SFFS, PPCVLE, {FRT, FRA, FRB}},
{"fpows.", XRC(59,1005,1), X_MASK, SFFS, PPCVLE, {FRT, FRA, FRB}},
-{"fminmagcs", XRC(59,1006,0), X_MASK, SFFS, PPCVLE, {FRT, FRA, FRB}},
-{"fminmagcs.", XRC(59,1006,1), X_MASK, SFFS, PPCVLE, {FRT, FRA, FRB}},
-{"fmaxmagcs", XRC(59,1007,0), X_MASK, SFFS, PPCVLE, {FRT, FRA, FRB}},
-{"fmaxmagcs.", XRC(59,1007,1), X_MASK, SFFS, PPCVLE, {FRT, FRA, FRB}},
{"xsaddsp", XX3(60,0), XX3_MASK, PPCVSX2, PPCVLE, {XT6, XA6, XB6}},
{"xsmaddasp", XX3(60,1), XX3_MASK, PPCVSX2, PPCVLE, {XT6, XA6, XB6}},
{"fctiwz.", XRC(63,15,1), XRA_MASK, PPCCOM, PPCEFS|PPCVLE, {FRT, FRB}},
{"fcirz.", XRC(63,15,1), XRA_MASK, PWR2COM, PPCVLE, {FRT, FRB}},
+{"fminnum08", MMXFMM(63,16,0,0), MMXFMM_MASK, SFFS, PPCVLE, {FRT,FRA,FRB}},
+{"fmin19", MMXFMM(63,16,1,0), MMXFMM_MASK, SFFS, PPCVLE, {FRT,FRA,FRB}},
+{"fminnum19", MMXFMM(63,16,2,0), MMXFMM_MASK, SFFS, PPCVLE, {FRT,FRA,FRB}},
+{"fminc", MMXFMM(63,16,3,0), MMXFMM_MASK, SFFS, PPCVLE, {FRT,FRA,FRB}},
+{"fminmagnum08", MMXFMM(63,16,4,0), MMXFMM_MASK, SFFS, PPCVLE, {FRT,FRA,FRB}},
+{"fminmag19", MMXFMM(63,16,5,0), MMXFMM_MASK, SFFS, PPCVLE, {FRT,FRA,FRB}},
+{"fminmagnum19", MMXFMM(63,16,6,0), MMXFMM_MASK, SFFS, PPCVLE, {FRT,FRA,FRB}},
+{"fminmagc", MMXFMM(63,16,7,0), MMXFMM_MASK, SFFS, PPCVLE, {FRT,FRA,FRB}},
+{"fmaxnum08", MMXFMM(63,16,8,0), MMXFMM_MASK, SFFS, PPCVLE, {FRT,FRA,FRB}},
+{"fmax19", MMXFMM(63,16,9,0), MMXFMM_MASK, SFFS, PPCVLE, {FRT,FRA,FRB}},
+{"fmaxnum19", MMXFMM(63,16,10,0), MMXFMM_MASK, SFFS, PPCVLE, {FRT,FRA,FRB}},
+{"fmaxc", MMXFMM(63,16,11,0), MMXFMM_MASK, SFFS, PPCVLE, {FRT,FRA,FRB}},
+{"fmaxmagnum08", MMXFMM(63,16,12,0), MMXFMM_MASK, SFFS, PPCVLE, {FRT,FRA,FRB}},
+{"fmaxmag19", MMXFMM(63,16,13,0), MMXFMM_MASK, SFFS, PPCVLE, {FRT,FRA,FRB}},
+{"fmaxmagnum19", MMXFMM(63,16,14,0), MMXFMM_MASK, SFFS, PPCVLE, {FRT,FRA,FRB}},
+{"fmaxmagc", MMXFMM(63,16,15,0), MMXFMM_MASK, SFFS, PPCVLE, {FRT,FRA,FRB}},
+{"fminmax", MM(63,16,0), MM_MASK, SFFS, PPCVLE, {FRT,FRA,FRB,FMM}},
+{"fminmax.", MM(63,16,1), MM_MASK, SFFS, PPCVLE, {FRT,FRA,FRB,FMM}},
+
{"fdiv", A(63,18,0), AFRC_MASK, PPCCOM, PPCEFS|PPCVLE, {FRT, FRA, FRB}},
{"fd", A(63,18,0), AFRC_MASK, PWRCOM, PPCVLE, {FRT, FRA, FRB}},
{"fdiv.", A(63,18,1), AFRC_MASK, PPCCOM, PPCEFS|PPCVLE, {FRT, FRA, FRB}},
{"fabs", XRC(63,264,0), XRA_MASK, COM, PPCEFS|PPCVLE, {FRT, FRB}},
{"fabs.", XRC(63,264,1), XRA_MASK, COM, PPCEFS|PPCVLE, {FRT, FRB}},
+{"cffpr", XO(63,270,0,0), XO_MASK, SFFS, PPCVLE, {RT,FRB,CVM,IT}},
+{"cffpr.", XO(63,270,0,1), XO_MASK, SFFS, PPCVLE, {RT,FRB,CVM,IT}},
+
{"dctfixq", XRC(63,290,0), X_MASK, POWER6, PPCVLE, {FRT, FRBp}},
{"dctfixq.", XRC(63,290,1), X_MASK, POWER6, PPCVLE, {FRT, FRBp}},
{"xsiexpqp", X(63,868), X_MASK, PPCVSX3, PPCVLE, {VD, VA, VB}},
+{"mffpr", XRC(63,910,0), X_MASK, SFFS, PPCVLE, {RT,FRB}},
+{"mffpr.", XRC(63,910,1), X_MASK, SFFS, PPCVLE, {RT,FRB}},
+{"mtfpr", X(63,911), X_MASK, SFFS, PPCVLE, {FRT,RB}},
+
{"fctidu", XRC(63,942,0), XRA_MASK, POWER7|PPCA2, PPCVLE, {FRT, FRB}},
{"fctidu.", XRC(63,942,1), XRA_MASK, POWER7|PPCA2, PPCVLE, {FRT, FRB}},
{"facosh.", XRC(63,686,1), X_MASK, SFFS, PPCVLE, {FRT, FRB}},
{"fatanh", XRC(63,687,0), X_MASK, SFFS, PPCVLE, {FRT, FRB}},
{"fatanh.", XRC(63,687,1), X_MASK, SFFS, PPCVLE, {FRT, FRB}},
-{"fminnum08", XRC(63,716,0), X_MASK, SFFS, PPCVLE, {FRT, FRA, FRB}},
-{"fminnum08.", XRC(63,716,1), X_MASK, SFFS, PPCVLE, {FRT, FRA, FRB}},
-{"fmin19", XRC(63,717,0), X_MASK, SFFS, PPCVLE, {FRT, FRA, FRB}},
-{"fmin19.", XRC(63,717,1), X_MASK, SFFS, PPCVLE, {FRT, FRA, FRB}},
-{"fminnum19", XRC(63,718,0), X_MASK, SFFS, PPCVLE, {FRT, FRA, FRB}},
-{"fminnum19.", XRC(63,718,1), X_MASK, SFFS, PPCVLE, {FRT, FRA, FRB}},
-{"fminc", XRC(63,719,0), X_MASK, SFFS, PPCVLE, {FRT, FRA, FRB}},
-{"fminc.", XRC(63,719,1), X_MASK, SFFS, PPCVLE, {FRT, FRA, FRB}},
-{"fmaxnum08", XRC(63,748,0), X_MASK, SFFS, PPCVLE, {FRT, FRA, FRB}},
-{"fmaxnum08.", XRC(63,748,1), X_MASK, SFFS, PPCVLE, {FRT, FRA, FRB}},
-{"fmax19", XRC(63,749,0), X_MASK, SFFS, PPCVLE, {FRT, FRA, FRB}},
-{"fmax19.", XRC(63,749,1), X_MASK, SFFS, PPCVLE, {FRT, FRA, FRB}},
-{"fmaxnum19", XRC(63,750,0), X_MASK, SFFS, PPCVLE, {FRT, FRA, FRB}},
-{"fmaxnum19.", XRC(63,750,1), X_MASK, SFFS, PPCVLE, {FRT, FRA, FRB}},
-{"fmaxc", XRC(63,751,0), X_MASK, SFFS, PPCVLE, {FRT, FRA, FRB}},
-{"fmaxc.", XRC(63,751,1), X_MASK, SFFS, PPCVLE, {FRT, FRA, FRB}},
{"fexp2m1", XRC(63,780,0), X_MASK, SFFS, PPCVLE, {FRT, FRB}},
{"fexp2m1.", XRC(63,780,1), X_MASK, SFFS, PPCVLE, {FRT, FRB}},
{"flog2p1", XRC(63,781,0), X_MASK, SFFS, PPCVLE, {FRT, FRB}},
{"flog2p1.", XRC(63,781,1), X_MASK, SFFS, PPCVLE, {FRT, FRB}},
-{"fminmagnum08", XRC(63,782,0), X_MASK, SFFS, PPCVLE, {FRT, FRA, FRB}},
-{"fminmagnum08.", XRC(63,782,1), X_MASK, SFFS, PPCVLE, {FRT, FRA, FRB}},
-{"fmaxmagnum08", XRC(63,783,0), X_MASK, SFFS, PPCVLE, {FRT, FRA, FRB}},
-{"fmaxmagnum08.", XRC(63,783,1), X_MASK, SFFS, PPCVLE, {FRT, FRA, FRB}},
+{"cffpro", XO(63,782,1,0), XO_MASK, SFFS, PPCVLE, {RT,FRB,CVM,IT}},
+{"cffpro.", XO(63,782,1,1), XO_MASK, SFFS, PPCVLE, {RT,FRB,CVM,IT}},
+{"ctfpr", XRC(63,783,0), X_MASK, SFFS, PPCVLE, {FRT,RB,IT}},
+{"ctfpr.", XRC(63,783,1), X_MASK, SFFS, PPCVLE, {FRT,RB,IT}},
{"fexpm1", XRC(63,812,0), X_MASK, SFFS, PPCVLE, {FRT, FRB}},
{"fexpm1.", XRC(63,812,1), X_MASK, SFFS, PPCVLE, {FRT, FRB}},
{"flogp1", XRC(63,813,0), X_MASK, SFFS, PPCVLE, {FRT, FRB}},
{"fpown.", XRC(63,876,1), X_MASK, SFFS, PPCVLE, {FRT, FRA, RB}},
{"frootn", XRC(63,877,0), X_MASK, SFFS, PPCVLE, {FRT, FRA, RB}},
{"frootn.", XRC(63,877,1), X_MASK, SFFS, PPCVLE, {FRT, FRA, RB}},
-{"fminmag19", XRC(63,878,0), X_MASK, SFFS, PPCVLE, {FRT, FRA, FRB}},
-{"fminmag19.", XRC(63,878,1), X_MASK, SFFS, PPCVLE, {FRT, FRA, FRB}},
-{"fmaxmag19", XRC(63,879,0), X_MASK, SFFS, PPCVLE, {FRT, FRA, FRB}},
-{"fmaxmag19.", XRC(63,879,1), X_MASK, SFFS, PPCVLE, {FRT, FRA, FRB}},
{"fexp2", XRC(63,908,0), X_MASK, SFFS, PPCVLE, {FRT, FRB}},
{"fexp2.", XRC(63,908,1), X_MASK, SFFS, PPCVLE, {FRT, FRB}},
{"flog2", XRC(63,909,0), X_MASK, SFFS, PPCVLE, {FRT, FRB}},
{"flog2.", XRC(63,909,1), X_MASK, SFFS, PPCVLE, {FRT, FRB}},
-{"fminmagnum19", XRC(63,910,0), X_MASK, SFFS, PPCVLE, {FRT, FRA, FRB}},
-{"fminmagnum19.", XRC(63,910,1), X_MASK, SFFS, PPCVLE, {FRT, FRA, FRB}},
-{"fmaxmagnum19", XRC(63,911,0), X_MASK, SFFS, PPCVLE, {FRT, FRA, FRB}},
-{"fmaxmagnum19.", XRC(63,911,1), X_MASK, SFFS, PPCVLE, {FRT, FRA, FRB}},
{"fexp", XRC(63,940,0), X_MASK, SFFS, PPCVLE, {FRT, FRB}},
{"fexp.", XRC(63,940,1), X_MASK, SFFS, PPCVLE, {FRT, FRB}},
{"flog", XRC(63,941,0), X_MASK, SFFS, PPCVLE, {FRT, FRB}},
{"fpowr.", XRC(63,1004,1), X_MASK, SFFS, PPCVLE, {FRT, FRA, FRB}},
{"fpow", XRC(63,1005,0), X_MASK, SFFS, PPCVLE, {FRT, FRA, FRB}},
{"fpow.", XRC(63,1005,1), X_MASK, SFFS, PPCVLE, {FRT, FRA, FRB}},
-{"fminmagc", XRC(63,1006,0), X_MASK, SFFS, PPCVLE, {FRT, FRA, FRB}},
-{"fminmagc.", XRC(63,1006,1), X_MASK, SFFS, PPCVLE, {FRT, FRA, FRB}},
-{"fmaxmagc", XRC(63,1007,0), X_MASK, SFFS, PPCVLE, {FRT, FRA, FRB}},
-{"fmaxmagc.", XRC(63,1007,1), X_MASK, SFFS, PPCVLE, {FRT, FRA, FRB}},
};
const unsigned int powerpc_num_opcodes = ARRAY_SIZE (powerpc_opcodes);