base.isa (2632:1bb2f91485ea) | base.isa (2686:f0d591379ac3) |
---|---|
1// -*- mode:c++ -*- 2 3//////////////////////////////////////////////////////////////////// 4// 5// Base class for MIPS instructions, and some support functions 6// 7 8//Outputs to decoder.hh --- 4 unchanged lines hidden (view full) --- 13 14 /** 15 * Base class for all MIPS static instructions. 16 */ 17 class MipsStaticInst : public StaticInst 18 { 19 protected: 20 | 1// -*- mode:c++ -*- 2 3//////////////////////////////////////////////////////////////////// 4// 5// Base class for MIPS instructions, and some support functions 6// 7 8//Outputs to decoder.hh --- 4 unchanged lines hidden (view full) --- 13 14 /** 15 * Base class for all MIPS static instructions. 16 */ 17 class MipsStaticInst : public StaticInst 18 { 19 protected: 20 |
21 /// Make MipsISA register dependence tags directly visible in 22 /// this class and derived classes. Maybe these should really 23 /// live here and not in the MipsISA namespace. 24 /*enum DependenceTags { 25 FP_Base_DepTag = MipsISA::FP_Base_DepTag, 26 Fpcr_DepTag = MipsISA::Fpcr_DepTag, 27 Uniq_DepTag = MipsISA::Uniq_DepTag, 28 IPR_Base_DepTag = MipsISA::IPR_Base_DepTag 29 };*/ 30 | |
31 // Constructor 32 MipsStaticInst(const char *mnem, MachInst _machInst, OpClass __opClass) 33 : StaticInst(mnem, _machInst, __opClass) 34 { 35 } 36 37 /// Print a register name for disassembly given the unique 38 /// dependence tag number (FP or int). --- 23 unchanged lines hidden (view full) --- 62 63 ccprintf(ss, "%-10s ", mnemonic); 64 65 if(_numDestRegs > 0){ 66 printReg(ss, _destRegIdx[0]); 67 } 68 69 if(_numSrcRegs > 0) { | 21 // Constructor 22 MipsStaticInst(const char *mnem, MachInst _machInst, OpClass __opClass) 23 : StaticInst(mnem, _machInst, __opClass) 24 { 25 } 26 27 /// Print a register name for disassembly given the unique 28 /// dependence tag number (FP or int). --- 23 unchanged lines hidden (view full) --- 52 53 ccprintf(ss, "%-10s ", mnemonic); 54 55 if(_numDestRegs > 0){ 56 printReg(ss, _destRegIdx[0]); 57 } 58 59 if(_numSrcRegs > 0) { |
70 ss << ","; | 60 ss << ", "; |
71 printReg(ss, _srcRegIdx[0]); 72 } 73 74 if(_numSrcRegs > 1) { | 61 printReg(ss, _srcRegIdx[0]); 62 } 63 64 if(_numSrcRegs > 1) { |
75 ss << ","; | 65 ss << ", "; |
76 printReg(ss, _srcRegIdx[1]); 77 } 78 79 80 if(mnemonic == "sll" || mnemonic == "sra"){ 81 ccprintf(ss,", %d",SA); 82 } 83 84 return ss.str(); 85 } 86 87}}; 88 | 66 printReg(ss, _srcRegIdx[1]); 67 } 68 69 70 if(mnemonic == "sll" || mnemonic == "sra"){ 71 ccprintf(ss,", %d",SA); 72 } 73 74 return ss.str(); 75 } 76 77}}; 78 |