diff options
author | Korey Sewell <ksewell@umich.edu> | 2006-06-09 17:47:23 -0400 |
---|---|---|
committer | Korey Sewell <ksewell@umich.edu> | 2006-06-09 17:47:23 -0400 |
commit | f8df550db826c9fe29cc184fce873db6789e42ee (patch) | |
tree | 96aa51eef059ef3740c5e67459682f4256a95812 /src/arch/mips/isa/formats/unknown.isa | |
parent | caca57421b32410f6ff1356ae75684891337073f (diff) | |
parent | b94fecfa10236b51ded904a5f1a57f4a5ebe7acc (diff) | |
download | gem5-f8df550db826c9fe29cc184fce873db6789e42ee.tar.xz |
Merge zizzer:/bk/newmem
into zizzer.eecs.umich.edu:/.automount/zooks/y/ksewell/research/m5-sim/newmem-release
--HG--
extra : convert_revision : 82b83199a36059d4b402f89f7db2de299ea59c1e
Diffstat (limited to 'src/arch/mips/isa/formats/unknown.isa')
-rw-r--r-- | src/arch/mips/isa/formats/unknown.isa | 39 |
1 files changed, 21 insertions, 18 deletions
diff --git a/src/arch/mips/isa/formats/unknown.isa b/src/arch/mips/isa/formats/unknown.isa index 7c2275598..b4f834651 100644 --- a/src/arch/mips/isa/formats/unknown.isa +++ b/src/arch/mips/isa/formats/unknown.isa @@ -34,28 +34,31 @@ // output header {{ - std::string inst2string(MachInst machInst); -}}; -output decoder {{ - -std::string inst2string(MachInst machInst) -{ - string str = ""; - uint32_t mask = 0x80000000; - - for(int i=0; i < 32; i++) { - if ((machInst & mask) == 0) { - str += "0"; - } else { - str += "1"; + /** + * Static instruction class for unknown (illegal) instructions. + * These cause simulator termination if they are executed in a + * non-speculative mode. This is a leaf class. + */ + class Unknown : public MipsStaticInst + { + public: + /// Constructor + Unknown(MachInst _machInst) + : MipsStaticInst("unknown", _machInst, No_OpClass) + { + // don't call execute() (which panics) if we're on a + // speculative path + flags[IsNonSpeculative] = true; } - mask = mask >> 1; - } + %(BasicExecDeclare)s - return str; -} + std::string + generateDisassembly(Addr pc, const SymbolTable *symtab) const; + }; +}}; +output decoder {{ std::string Unknown::generateDisassembly(Addr pc, const SymbolTable *symtab) const { |