summaryrefslogtreecommitdiff
path: root/src/arch/sparc/isa/formats
diff options
context:
space:
mode:
authorGabe Black <gblack@eecs.umich.edu>2007-01-30 00:08:42 -0500
committerGabe Black <gblack@eecs.umich.edu>2007-01-30 00:08:42 -0500
commit230fc0a0d1dc0ffe8fac620a5767207ca31abbba (patch)
treeaaf04ac2d6e9bf6c99ee72735758613ef3773874 /src/arch/sparc/isa/formats
parenta8b8962a4d1d3d57070979fa4314b7f84a4853f8 (diff)
downloadgem5-230fc0a0d1dc0ffe8fac620a5767207ca31abbba.tar.xz
Added FpUnimpl format for quad precision and other purposefully unimplemented floating point ops.
--HG-- extra : convert_revision : 356fec86c35560b20ea8eee80844602bbcec145f
Diffstat (limited to 'src/arch/sparc/isa/formats')
-rw-r--r--src/arch/sparc/isa/formats/trap.isa32
1 files changed, 31 insertions, 1 deletions
diff --git a/src/arch/sparc/isa/formats/trap.isa b/src/arch/sparc/isa/formats/trap.isa
index 9c118b227..8ac40c16f 100644
--- a/src/arch/sparc/isa/formats/trap.isa
+++ b/src/arch/sparc/isa/formats/trap.isa
@@ -1,4 +1,4 @@
-// Copyright (c) 2006 The Regents of The University of Michigan
+// Copyright (c) 2006-2007 The Regents of The University of Michigan
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
@@ -89,3 +89,33 @@ def format Trap(code, *opt_flags) {{
decode_block = BasicDecode.subst(iop)
exec_output = TrapExecute.subst(iop)
}};
+
+output header {{
+ class FpUnimpl : public SparcStaticInst
+ {
+ protected:
+ FpUnimpl(const char *mnem,
+ ExtMachInst _machInst, OpClass __opClass)
+ : SparcStaticInst(mnem, _machInst, __opClass)
+ {
+ }
+
+ std::string generateDisassembly(Addr pc,
+ const SymbolTable *symtab) const
+ {
+ return mnemonic;
+ }
+ };
+}};
+
+def format FpUnimpl(*flags) {{
+ fpunimpl_code = '''
+ Fsr = insertBits(Fsr, 16, 14, 3);
+ fault = new FpExceptionOther;
+ '''
+ iop = InstObjParams(name, Name, 'FpUnimpl', fpunimpl_code, flags)
+ header_output = BasicDeclare.subst(iop)
+ decoder_output = BasicConstructor.subst(iop)
+ decode_block = BasicDecode.subst(iop)
+ exec_output = TrapExecute.subst(iop)
+}};