summaryrefslogtreecommitdiff
path: root/src/arch/mips/isa/formats/unimp.isa
diff options
context:
space:
mode:
authorGabe Black <gblack@eecs.umich.edu>2011-09-19 06:14:02 -0700
committerGabe Black <gblack@eecs.umich.edu>2011-09-19 06:14:02 -0700
commitf21ae529fb56592a7557a6583e68d8aae0d64adc (patch)
tree5bca6c6c615faea84c67c8dcb089c3b46f219597 /src/arch/mips/isa/formats/unimp.isa
parent4ad36a4684c554bce2c9e3780f51c58195fe8205 (diff)
downloadgem5-f21ae529fb56592a7557a6583e68d8aae0d64adc.tar.xz
MIPS: Get rid of #if style config checks in the ISA description.
Diffstat (limited to 'src/arch/mips/isa/formats/unimp.isa')
-rw-r--r--src/arch/mips/isa/formats/unimp.isa67
1 files changed, 34 insertions, 33 deletions
diff --git a/src/arch/mips/isa/formats/unimp.isa b/src/arch/mips/isa/formats/unimp.isa
index 2cee38a4b..e599510a4 100644
--- a/src/arch/mips/isa/formats/unimp.isa
+++ b/src/arch/mips/isa/formats/unimp.isa
@@ -193,50 +193,51 @@ output exec {{
CP0Unimplemented::execute(%(CPU_exec_context)s *xc,
Trace::InstRecord *traceData) const
{
-#if FULL_SYSTEM
- if (!isCoprocessorEnabled(xc, 0)) {
- return new CoprocessorUnusableFault(0);
- }
- return new ReservedInstructionFault;
-#else
- panic("attempt to execute unimplemented instruction '%s' "
- "(inst 0x%08x, opcode 0x%x, binary:%s)", mnemonic, machInst, OPCODE,
- inst2string(machInst));
- return new UnimplementedOpcodeFault;
-#endif
+ if (FULL_SYSTEM) {
+ if (!isCoprocessorEnabled(xc, 0))
+ return new CoprocessorUnusableFault(0);
+ else
+ return new ReservedInstructionFault;
+ } else {
+ panic("attempt to execute unimplemented instruction '%s' "
+ "(inst %#08x, opcode %#x, binary:%s)",
+ mnemonic, machInst, OPCODE, inst2string(machInst));
+ return new UnimplementedOpcodeFault;
+ }
}
Fault
CP1Unimplemented::execute(%(CPU_exec_context)s *xc,
Trace::InstRecord *traceData) const
{
-#if FULL_SYSTEM
- if (!isCoprocessorEnabled(xc, 1)) {
- return new CoprocessorUnusableFault(1);
- }
- return new ReservedInstructionFault;
-#else
- panic("attempt to execute unimplemented instruction '%s' "
- "(inst 0x%08x, opcode 0x%x, binary:%s)", mnemonic, machInst, OPCODE,
- inst2string(machInst));
- return new UnimplementedOpcodeFault;
-#endif
+ if (FULL_SYSTEM) {
+ if (!isCoprocessorEnabled(xc, 1))
+ return new CoprocessorUnusableFault(1);
+ else
+ return new ReservedInstructionFault;
+ } else {
+ panic("attempt to execute unimplemented instruction '%s' "
+ "(inst %#08x, opcode %#x, binary:%s)",
+ mnemonic, machInst, OPCODE, inst2string(machInst));
+ return new UnimplementedOpcodeFault;
+ }
}
+
Fault
CP2Unimplemented::execute(%(CPU_exec_context)s *xc,
Trace::InstRecord *traceData) const
{
-#if FULL_SYSTEM
- if (!isCoprocessorEnabled(xc, 2)) {
- return new CoprocessorUnusableFault(2);
- }
- return new ReservedInstructionFault;
-#else
- panic("attempt to execute unimplemented instruction '%s' "
- "(inst 0x%08x, opcode 0x%x, binary:%s)", mnemonic, machInst, OPCODE,
- inst2string(machInst));
- return new UnimplementedOpcodeFault;
-#endif
+ if (FULL_SYSTEM) {
+ if (!isCoprocessorEnabled(xc, 2))
+ return new CoprocessorUnusableFault(2);
+ else
+ return new ReservedInstructionFault;
+ } else {
+ panic("attempt to execute unimplemented instruction '%s' "
+ "(inst %#08x, opcode %#x, binary:%s)",
+ mnemonic, machInst, OPCODE, inst2string(machInst));
+ return new UnimplementedOpcodeFault;
+ }
}
Fault