unimp.isa (8738:66bf413b0d5b) unimp.isa (10196:be0e1724eb39)
1// -*- mode:c++ -*-
2
3// Copyright (c) 2007 MIPS Technologies, Inc.
4// All rights reserved.
5//
6// Redistribution and use in source and binary forms, with or without
7// modification, are permitted provided that the following conditions are
8// met: redistributions of source code must retain the above copyright

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

175 const SymbolTable *symtab) const
176 {
177 return csprintf("%-10s (unimplemented)", mnemonic);
178 }
179}};
180
181output exec {{
182 Fault
1// -*- mode:c++ -*-
2
3// Copyright (c) 2007 MIPS Technologies, Inc.
4// All rights reserved.
5//
6// Redistribution and use in source and binary forms, with or without
7// modification, are permitted provided that the following conditions are
8// met: redistributions of source code must retain the above copyright

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

175 const SymbolTable *symtab) const
176 {
177 return csprintf("%-10s (unimplemented)", mnemonic);
178 }
179}};
180
181output exec {{
182 Fault
183 FailUnimplemented::execute(%(CPU_exec_context)s *xc,
183 FailUnimplemented::execute(CPU_EXEC_CONTEXT *xc,
184 Trace::InstRecord *traceData) const
185 {
186 panic("attempt to execute unimplemented instruction '%s' "
187 "(inst 0x%08x, opcode 0x%x, binary:%s)", mnemonic, machInst, OPCODE,
188 inst2string(machInst));
189 return NoFault;
190 }
191
192 Fault
184 Trace::InstRecord *traceData) const
185 {
186 panic("attempt to execute unimplemented instruction '%s' "
187 "(inst 0x%08x, opcode 0x%x, binary:%s)", mnemonic, machInst, OPCODE,
188 inst2string(machInst));
189 return NoFault;
190 }
191
192 Fault
193 CP0Unimplemented::execute(%(CPU_exec_context)s *xc,
193 CP0Unimplemented::execute(CPU_EXEC_CONTEXT *xc,
194 Trace::InstRecord *traceData) const
195 {
196 if (FullSystem) {
197 if (!isCoprocessorEnabled(xc, 0))
198 return new CoprocessorUnusableFault(0);
199 else
200 return new ReservedInstructionFault;
201 } else {
202 panic("attempt to execute unimplemented instruction '%s' "
203 "(inst %#08x, opcode %#x, binary:%s)",
204 mnemonic, machInst, OPCODE, inst2string(machInst));
205 return NoFault;
206 }
207 }
208
209 Fault
194 Trace::InstRecord *traceData) const
195 {
196 if (FullSystem) {
197 if (!isCoprocessorEnabled(xc, 0))
198 return new CoprocessorUnusableFault(0);
199 else
200 return new ReservedInstructionFault;
201 } else {
202 panic("attempt to execute unimplemented instruction '%s' "
203 "(inst %#08x, opcode %#x, binary:%s)",
204 mnemonic, machInst, OPCODE, inst2string(machInst));
205 return NoFault;
206 }
207 }
208
209 Fault
210 CP1Unimplemented::execute(%(CPU_exec_context)s *xc,
210 CP1Unimplemented::execute(CPU_EXEC_CONTEXT *xc,
211 Trace::InstRecord *traceData) const
212 {
213 if (FullSystem) {
214 if (!isCoprocessorEnabled(xc, 1))
215 return new CoprocessorUnusableFault(1);
216 else
217 return new ReservedInstructionFault;
218 } else {
219 panic("attempt to execute unimplemented instruction '%s' "
220 "(inst %#08x, opcode %#x, binary:%s)",
221 mnemonic, machInst, OPCODE, inst2string(machInst));
222 return NoFault;
223 }
224 }
225
226 Fault
211 Trace::InstRecord *traceData) const
212 {
213 if (FullSystem) {
214 if (!isCoprocessorEnabled(xc, 1))
215 return new CoprocessorUnusableFault(1);
216 else
217 return new ReservedInstructionFault;
218 } else {
219 panic("attempt to execute unimplemented instruction '%s' "
220 "(inst %#08x, opcode %#x, binary:%s)",
221 mnemonic, machInst, OPCODE, inst2string(machInst));
222 return NoFault;
223 }
224 }
225
226 Fault
227 CP2Unimplemented::execute(%(CPU_exec_context)s *xc,
227 CP2Unimplemented::execute(CPU_EXEC_CONTEXT *xc,
228 Trace::InstRecord *traceData) const
229 {
230 if (FullSystem) {
231 if (!isCoprocessorEnabled(xc, 2))
232 return new CoprocessorUnusableFault(2);
233 else
234 return new ReservedInstructionFault;
235 } else {
236 panic("attempt to execute unimplemented instruction '%s' "
237 "(inst %#08x, opcode %#x, binary:%s)",
238 mnemonic, machInst, OPCODE, inst2string(machInst));
239 return NoFault;
240 }
241 }
242
243 Fault
228 Trace::InstRecord *traceData) const
229 {
230 if (FullSystem) {
231 if (!isCoprocessorEnabled(xc, 2))
232 return new CoprocessorUnusableFault(2);
233 else
234 return new ReservedInstructionFault;
235 } else {
236 panic("attempt to execute unimplemented instruction '%s' "
237 "(inst %#08x, opcode %#x, binary:%s)",
238 mnemonic, machInst, OPCODE, inst2string(machInst));
239 return NoFault;
240 }
241 }
242
243 Fault
244 WarnUnimplemented::execute(%(CPU_exec_context)s *xc,
244 WarnUnimplemented::execute(CPU_EXEC_CONTEXT *xc,
245 Trace::InstRecord *traceData) const
246 {
247 if (!warned) {
248 warn("\tinstruction '%s' unimplemented\n", mnemonic);
249 warned = true;
250 }
251
252 return NoFault;

--- 26 unchanged lines hidden ---
245 Trace::InstRecord *traceData) const
246 {
247 if (!warned) {
248 warn("\tinstruction '%s' unimplemented\n", mnemonic);
249 warned = true;
250 }
251
252 return NoFault;

--- 26 unchanged lines hidden ---