summaryrefslogtreecommitdiff
path: root/arch/mips/isa/formats
diff options
context:
space:
mode:
authorKorey Sewell <ksewell@umich.edu>2006-02-08 16:24:04 -0500
committerKorey Sewell <ksewell@umich.edu>2006-02-08 16:24:04 -0500
commitb6d21b7a34dd98b20694c62ba7facb031ce2feca (patch)
tree622a720967451922ab03356cad8f96e69b196366 /arch/mips/isa/formats
parentb203d7bd33fd4552c556cf3cea7007d717d04375 (diff)
downloadgem5-b6d21b7a34dd98b20694c62ba7facb031ce2feca.tar.xz
Code for more "BasicOp" instructions ... formats for all instructions in place ... Edits to Branch Format
arch/mips/isa/decoder.isa: Code for di,ei,seb,seh,clz,and clo .... Every instruction has a format now (of course these are initial formats are still subject to change!) arch/mips/isa/formats/branch.isa: Format Branch in MIPS similar to Alpha Format --HG-- extra : convert_revision : 2118a1d9668610b1e9f1dea66d878b7b36c1ac7e
Diffstat (limited to 'arch/mips/isa/formats')
-rw-r--r--arch/mips/isa/formats/branch.isa18
1 files changed, 9 insertions, 9 deletions
diff --git a/arch/mips/isa/formats/branch.isa b/arch/mips/isa/formats/branch.isa
index 5327f30e8..a565eb71b 100644
--- a/arch/mips/isa/formats/branch.isa
+++ b/arch/mips/isa/formats/branch.isa
@@ -54,13 +54,13 @@ def template BranchExecute {{
}
}};
-// Primary format for integer operate instructions:
-def format Branch(code, *opt_flags) {{
- orig_code = code
- cblk = CodeBlock(code)
- iop = InstObjParams(name, Name, 'MipsStaticInst', cblk, opt_flags)
- header_output = BasicDeclare.subst(iop)
- decoder_output = BasicConstructor.subst(iop)
- decode_block = BasicDecodeWithMnemonic.subst(iop)
- exec_output = BranchExecute.subst(iop)
+def format CondBranch(code) {{
+ code = 'bool cond;\n' + code + '\nif (cond) NPC = NPC + disp;\n';
+ iop = InstObjParams(name, Name, 'Branch', CodeBlock(code),
+ ('IsDirectControl', 'IsCondControl'))
+ header_output = BasicDeclare.subst(iop)
+ decoder_output = BasicConstructor.subst(iop)
+ decode_block = BasicDecode.subst(iop)
+ exec_output = BasicExecute.subst(iop)
}};
+