1// -*- mode:c++ -*- 2 3let {{ 4def LoadStoreBase(name, Name, ea_code, memacc_code, mem_flags, inst_flags, 5 postacc_code = '', base_class = 'Memory', 6 decode_template = BasicDecode, exec_template_base = ''): 7 # Make sure flags are in lists (convert to lists if not). 8 mem_flags = makeList(mem_flags) --- 76 unchanged lines hidden (view full) --- 85 decode_template.subst(iop), 86 EACompExecute.subst(ea_iop) 87 + memAccExecTemplate.subst(memacc_iop) 88 + fullExecTemplate.subst(iop) 89 + initiateAccTemplate.subst(initiateacc_iop) 90 + completeAccTemplate.subst(completeacc_iop)) 91}}; 92 |
93output header {{ 94 std::string inst2string(MachInst machInst); 95}}; |
96 |
97output decoder {{ 98 99std::string inst2string(MachInst machInst) 100{ 101 string str = ""; 102 uint32_t mask = 0x80000000; 103 104 for(int i=0; i < 32; i++) { 105 if ((machInst & mask) == 0) { 106 str += "0"; 107 } else { 108 str += "1"; 109 } 110 111 mask = mask >> 1; 112 } 113 114 return str; 115} 116 117}}; |
118output exec {{ 119 120 using namespace MipsISA; 121 122 /// CLEAR ALL CPU INST/EXE HAZARDS 123 inline void 124 clear_exe_inst_hazards() 125 { --- 17 unchanged lines hidden (view full) --- 143#else 144 inline Fault checkFpEnableFault(%(CPU_exec_context)s *xc) 145 { 146 return NoFault; 147 } 148#endif 149 150 |
151 |
152}}; 153 154 |