unimp.isa (5268:5bfc53fe60e7) unimp.isa (8564:f81bcb16fa1b)
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

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

188 inst2string(machInst));
189 return new UnimplementedOpcodeFault;
190 }
191
192 Fault
193 CP0Unimplemented::execute(%(CPU_exec_context)s *xc,
194 Trace::InstRecord *traceData) const
195 {
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

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

188 inst2string(machInst));
189 return new UnimplementedOpcodeFault;
190 }
191
192 Fault
193 CP0Unimplemented::execute(%(CPU_exec_context)s *xc,
194 Trace::InstRecord *traceData) const
195 {
196#if FULL_SYSTEM
197 if (!isCoprocessorEnabled(xc, 0)) {
198 return new CoprocessorUnusableFault(0);
199 }
200 return new ReservedInstructionFault;
201#else
202 panic("attempt to execute unimplemented instruction '%s' "
203 "(inst 0x%08x, opcode 0x%x, binary:%s)", mnemonic, machInst, OPCODE,
204 inst2string(machInst));
205 return new UnimplementedOpcodeFault;
206#endif
196 if (FULL_SYSTEM) {
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 new UnimplementedOpcodeFault;
206 }
207 }
208
209 Fault
210 CP1Unimplemented::execute(%(CPU_exec_context)s *xc,
211 Trace::InstRecord *traceData) const
212 {
207 }
208
209 Fault
210 CP1Unimplemented::execute(%(CPU_exec_context)s *xc,
211 Trace::InstRecord *traceData) const
212 {
213#if FULL_SYSTEM
214 if (!isCoprocessorEnabled(xc, 1)) {
215 return new CoprocessorUnusableFault(1);
216 }
217 return new ReservedInstructionFault;
218#else
219 panic("attempt to execute unimplemented instruction '%s' "
220 "(inst 0x%08x, opcode 0x%x, binary:%s)", mnemonic, machInst, OPCODE,
221 inst2string(machInst));
222 return new UnimplementedOpcodeFault;
223#endif
213 if (FULL_SYSTEM) {
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 new UnimplementedOpcodeFault;
223 }
224 }
224 }
225
225 Fault
226 CP2Unimplemented::execute(%(CPU_exec_context)s *xc,
227 Trace::InstRecord *traceData) const
228 {
226 Fault
227 CP2Unimplemented::execute(%(CPU_exec_context)s *xc,
228 Trace::InstRecord *traceData) const
229 {
229#if FULL_SYSTEM
230 if (!isCoprocessorEnabled(xc, 2)) {
231 return new CoprocessorUnusableFault(2);
232 }
233 return new ReservedInstructionFault;
234#else
235 panic("attempt to execute unimplemented instruction '%s' "
236 "(inst 0x%08x, opcode 0x%x, binary:%s)", mnemonic, machInst, OPCODE,
237 inst2string(machInst));
238 return new UnimplementedOpcodeFault;
239#endif
230 if (FULL_SYSTEM) {
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 new UnimplementedOpcodeFault;
240 }
240 }
241
242 Fault
243 WarnUnimplemented::execute(%(CPU_exec_context)s *xc,
244 Trace::InstRecord *traceData) const
245 {
246 if (!warned) {
247 warn("\tinstruction '%s' unimplemented\n", mnemonic);

--- 30 unchanged lines hidden ---
241 }
242
243 Fault
244 WarnUnimplemented::execute(%(CPU_exec_context)s *xc,
245 Trace::InstRecord *traceData) const
246 {
247 if (!warned) {
248 warn("\tinstruction '%s' unimplemented\n", mnemonic);

--- 30 unchanged lines hidden ---