34 using namespace PowerISA;
40 bool printDest =
true;
41 bool printSrcs =
true;
42 bool printSecondSrc =
true;
45 string myMnemonic(mnemonic);
48 if (!myMnemonic.compare(
"or") && _srcRegIdx[0] == _srcRegIdx[1]) {
50 printSecondSrc =
false;
51 }
else if (!myMnemonic.compare(
"mtlr") || !myMnemonic.compare(
"cmpi")) {
53 }
else if (!myMnemonic.compare(
"mflr")) {
58 if (oeSet) myMnemonic = myMnemonic +
"o";
59 if (rcSet) myMnemonic = myMnemonic +
".";
63 if (_numDestRegs > 0 && printDest) {
64 printReg(ss, _destRegIdx[0]);
68 if (_numSrcRegs > 0 && printSrcs) {
69 if (_numDestRegs > 0 && printDest) {
72 printReg(ss, _srcRegIdx[0]);
73 if (_numSrcRegs > 1 && printSecondSrc) {
75 printReg(ss, _srcRegIdx[1]);
89 string myMnemonic(mnemonic);
92 if (!myMnemonic.compare(
"addi") && _numSrcRegs == 0) {
94 }
else if (!myMnemonic.compare(
"addis") && _numSrcRegs == 0) {
100 if (_numDestRegs > 0) {
101 printReg(ss, _destRegIdx[0]);
105 if (_numSrcRegs > 0) {
106 if (_numDestRegs > 0) {
109 printReg(ss, _srcRegIdx[0]);
113 ss <<
", " << (int32_t)
imm;
127 if (_numDestRegs > 0) {
128 printReg(ss, _destRegIdx[0]);
132 if (_numSrcRegs > 0) {
133 if (_numDestRegs > 0) {
136 printReg(ss, _srcRegIdx[0]);
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;
void ccprintf(cp::Print &print)
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.