// Need to find standard way to not print
// this info. Maybe add bool variable to
// class?
- if (mnemonic != "syscall") {
+ if (strcmp(mnemonic, "syscall") != 0) {
if(_numDestRegs > 0){
printReg(ss, _destRegIdx[0]);
}
// Should we define a separate inst. class
// just for two insts?
- if(mnemonic == "sll" || mnemonic == "sra"){
+ if (strcmp(mnemonic, "sll") == 0 || strcmp(mnemonic, "sra") == 0) {
ccprintf(ss,", %d",SA);
}
ccprintf(ss, "%-10s ", mnemonic);
- if ( mnemonic == "jal" ) {
+ if ( strcmp(mnemonic,"jal") == 0 ) {
Addr npc = pc + 4;
ccprintf(ss,"0x%x",(npc & 0xF0000000) | disp);
} else if (_numSrcRegs == 0) {
{
//If Bit 15 is 1 then Sign Extend
int32_t temp = sextImm & 0x00008000;
- if (temp > 0 && mnemonic != "lui") {
+ if (temp > 0 && strcmp(mnemonic,"lui") != 0) {
sextImm |= 0xFFFF0000;
}
}
ss << ", ";
}
- if( mnemonic == "lui")
+ if(strcmp(mnemonic,"lui") == 0)
ccprintf(ss, "0x%x ", sextImm);
else
ss << (int) sextImm;
{
std::stringstream ss;
- if (mnemonic == "mttc0" || mnemonic == "mftc0") {
+ if (strcmp(mnemonic,"mttc0") == 0 || strcmp(mnemonic,"mftc0") == 0) {
ccprintf(ss, "%-10s r%d, r%d, %d", mnemonic, RT, RD, SEL);
- } else if (mnemonic == "mftgpr") {
+ } else if (strcmp(mnemonic,"mftgpr") == 0) {
ccprintf(ss, "%-10s r%d, r%d", mnemonic, RD, RT);
} else {
ccprintf(ss, "%-10s r%d, r%d", mnemonic, RT, RD);