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 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 { |
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 } |
225 |
226 Fault 227 CP2Unimplemented::execute(%(CPU_exec_context)s *xc, 228 Trace::InstRecord *traceData) const 229 { |
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 } |
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 --- |