diff options
author | Korey Sewell <ksewell@umich.edu> | 2006-02-16 02:51:04 -0500 |
---|---|---|
committer | Korey Sewell <ksewell@umich.edu> | 2006-02-16 02:51:04 -0500 |
commit | 7446238118bf15ce7844759ef216b138bb2b13d3 (patch) | |
tree | e8f8b424054fcd9714b6e20bf9b42508a6f3c4e3 /arch/mips/isa/formats | |
parent | e7d16b0aefec6543817762b6e5e389372a11b53c (diff) | |
download | gem5-7446238118bf15ce7844759ef216b138bb2b13d3.tar.xz |
Get ISA parser to at least include all the ISA correctly ... crashes with "None" error
arch/mips/isa/decoder.isa:
CondBranch format split up into Branch & BranchLikely formats
arch/mips/isa/formats.isa:
include util.isa
arch/mips/isa/formats/branch.isa:
erroneous 'e' at top of code
arch/mips/isa/formats/util.isa:
util.isa
--HG--
extra : convert_revision : 4fc44a05e2838749e66cd70f210e8a718b34cbf3
Diffstat (limited to 'arch/mips/isa/formats')
-rw-r--r-- | arch/mips/isa/formats/branch.isa | 2 | ||||
-rw-r--r-- | arch/mips/isa/formats/util.isa | 26 |
2 files changed, 27 insertions, 1 deletions
diff --git a/arch/mips/isa/formats/branch.isa b/arch/mips/isa/formats/branch.isa index 45980349d..c7c97c2c8 100644 --- a/arch/mips/isa/formats/branch.isa +++ b/arch/mips/isa/formats/branch.isa @@ -1,4 +1,4 @@ -e// -*- mode:c++ -*- +// -*- mode:c++ -*- //////////////////////////////////////////////////////////////////// // diff --git a/arch/mips/isa/formats/util.isa b/arch/mips/isa/formats/util.isa new file mode 100644 index 000000000..c6dae6783 --- /dev/null +++ b/arch/mips/isa/formats/util.isa @@ -0,0 +1,26 @@ +// -*- mode:c++ -*- + +let {{ +def UncondCtrlBase(name, Name, base_class, npc_expr, flags): + # Declare basic control transfer w/o link (i.e. link reg is R31) + nolink_code = 'NPC = %s;\n' % npc_expr + nolink_iop = InstObjParams(name, Name, base_class, + CodeBlock(nolink_code), flags) + header_output = BasicDeclare.subst(nolink_iop) + decoder_output = BasicConstructor.subst(nolink_iop) + exec_output = BasicExecute.subst(nolink_iop) + + # Generate declaration of '*AndLink' version, append to decls + link_code = 'Ra = NPC & ~3;\n' + nolink_code + link_iop = InstObjParams(name, Name + 'AndLink', base_class, + CodeBlock(link_code), flags) + header_output += BasicDeclare.subst(link_iop) + decoder_output += BasicConstructor.subst(link_iop) + exec_output += BasicExecute.subst(link_iop) + + # need to use link_iop for the decode template since it is expecting + # the shorter version of class_name (w/o "AndLink") + + return (header_output, decoder_output, + JumpOrBranchDecode.subst(nolink_iop), exec_output) +}}; |