38 bool printDest =
true;
39 bool printSrcs =
true;
40 bool printSecondSrc =
true;
43 string myMnemonic(mnemonic);
46 if (!myMnemonic.compare(
"or") && _srcRegIdx[0] == _srcRegIdx[1]) {
48 printSecondSrc =
false;
49 }
else if (!myMnemonic.compare(
"mtlr") || !myMnemonic.compare(
"cmpi")) {
51 }
else if (!myMnemonic.compare(
"mflr")) {
56 if (oeSet) myMnemonic = myMnemonic +
"o";
57 if (rcSet) myMnemonic = myMnemonic +
".";
61 if (_numDestRegs > 0 && printDest) {
62 printReg(
ss, _destRegIdx[0]);
66 if (_numSrcRegs > 0 && printSrcs) {
67 if (_numDestRegs > 0 && printDest) {
70 printReg(
ss, _srcRegIdx[0]);
71 if (_numSrcRegs > 1 && printSecondSrc) {
73 printReg(
ss, _srcRegIdx[1]);
87 string myMnemonic(mnemonic);
90 if (!myMnemonic.compare(
"addi") && _numSrcRegs == 0) {
92 }
else if (!myMnemonic.compare(
"addis") && _numSrcRegs == 0) {
98 if (_numDestRegs > 0) {
99 printReg(
ss, _destRegIdx[0]);
103 if (_numSrcRegs > 0) {
104 if (_numDestRegs > 0) {
107 printReg(
ss, _srcRegIdx[0]);
111 ss <<
", " << (int32_t)
imm;
118 IntShiftOp::generateDisassembly(
126 if (_numDestRegs > 0) {
127 printReg(
ss, _destRegIdx[0]);
131 if (_numSrcRegs > 0) {
132 if (_numDestRegs > 0) {
135 printReg(
ss, _srcRegIdx[0]);
146 IntRotateOp::generateDisassembly(
154 if (_numDestRegs > 0) {
155 printReg(
ss, _destRegIdx[0]);
159 if (_numSrcRegs > 0) {
160 if (_numDestRegs > 0) {
163 printReg(
ss, _srcRegIdx[0]);
167 ss <<
", " <<
sh <<
", " <<
mb <<
", " <<
me;