specop.isa (5163:f08b480df4c3) specop.isa (5172:4f0e76579e7c)
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 };
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 };
80}};
81
82def template MicroFaultDeclare {{
83 class %(class_name)s : public %(base_class)s
84 {
85 private:
86 void buildMe();
87 public:

--- 18 unchanged lines hidden (view full) ---

106 //Return the fault we were constructed with
107 return fault;
108 } else {
109 return NoFault;
110 }
111 }
112}};
113
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
114output decoder {{
115 inline MicroFaultBase::MicroFaultBase(
116 ExtMachInst machInst, const char * instMnem,
117 Fault _fault, uint8_t _cc) :
118 X86MicroopBase(machInst, "fault", instMnem,
119 false, false, false, false, No_OpClass),
120 fault(_fault), cc(_cc)
121 {

--- 82 unchanged lines hidden (view full) ---

204 decoder_output = MicroFaultConstructor.subst(iop)
205 iop = InstObjParams("fault", "MicroFaultFlags", "MicroFaultBase",
206 {"code": "",
207 "cond_test": "true"})
208 exec_output += MicroFaultExecute.subst(iop)
209 header_output += MicroFaultDeclare.subst(iop)
210 decoder_output += MicroFaultConstructor.subst(iop)
211 microopClasses["fault"] = Fault
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
212}};
251}};