1// Copyright (c) 2007 The Hewlett-Packard Development Company 2// All rights reserved. 3// 4// Redistribution and use of this software in source and binary forms, 5// with or without modification, are permitted provided that the 6// following conditions are met: 7// 8// The software must be used only for Non-Commercial Use which means any --- 63 unchanged lines hidden (view full) --- 72 Fault _fault, uint8_t _cc); 73 74 MicroFaultBase(ExtMachInst _machInst, const char * instMnem, 75 Fault _fault, uint8_t _cc); 76 77 std::string generateDisassembly(Addr pc, 78 const SymbolTable *symtab) const; 79 }; |
80 81 class MicroHalt : public X86ISA::X86MicroopBase 82 { 83 public: 84 MicroHalt(ExtMachInst _machInst, const char * instMnem, 85 bool isMicro, bool isDelayed, bool isFirst, bool isLast) : 86 X86MicroopBase(_machInst, "halt", instMnem, 87 isMicro, isDelayed, isFirst, isLast, No_OpClass) 88 { 89 } 90 91 MicroHalt(ExtMachInst _machInst, const char * instMnem) : 92 X86MicroopBase(_machInst, "halt", instMnem, 93 false, false, false, false, No_OpClass) 94 { 95 } 96 97 %(BasicExecDeclare)s 98 }; |
99}}; 100 101def template MicroFaultDeclare {{ 102 class %(class_name)s : public %(base_class)s 103 { 104 private: 105 void buildMe(); 106 public: --- 18 unchanged lines hidden (view full) --- 125 //Return the fault we were constructed with 126 return fault; 127 } else { 128 return NoFault; 129 } 130 } 131}}; 132 |
133output exec {{ 134 Fault 135 MicroHalt::execute(%(CPU_exec_context)s *xc, 136 Trace::InstRecord * traceData) const 137 { 138 xc->suspend(); 139 return NoFault; 140 } 141}}; 142 |
143output decoder {{ 144 inline MicroFaultBase::MicroFaultBase( 145 ExtMachInst machInst, const char * instMnem, 146 Fault _fault, uint8_t _cc) : 147 X86MicroopBase(machInst, "fault", instMnem, 148 false, false, false, false, No_OpClass), 149 fault(_fault), cc(_cc) 150 { --- 82 unchanged lines hidden (view full) --- 233 decoder_output = MicroFaultConstructor.subst(iop) 234 iop = InstObjParams("fault", "MicroFaultFlags", "MicroFaultBase", 235 {"code": "", 236 "cond_test": "true"}) 237 exec_output += MicroFaultExecute.subst(iop) 238 header_output += MicroFaultDeclare.subst(iop) 239 decoder_output += MicroFaultConstructor.subst(iop) 240 microopClasses["fault"] = Fault |
241 242 class Halt(X86Microop): 243 def __init__(self): 244 pass 245 246 def getAllocator(self, *microFlags): 247 return "new MicroHalt(machInst, mnemonic %(flags)s)" % \ 248 self.microFlagsText(microFlags) 249 250 microopClasses["halt"] = Halt |
251}}; |