diff options
author | Korey Sewell <ksewell@umich.edu> | 2006-02-18 04:17:11 -0500 |
---|---|---|
committer | Korey Sewell <ksewell@umich.edu> | 2006-02-18 04:17:11 -0500 |
commit | 159e3345314b921f05f808ace06d62adf79f095a (patch) | |
tree | a3ab5941b3f1497c70b90bd2009747fa02ab4eb6 /arch/mips/isa/formats/branch.isa | |
parent | 6bf71f96f3ae17e49eca8b77bf1f99b2883f93f6 (diff) | |
download | gem5-159e3345314b921f05f808ace06d62adf79f095a.tar.xz |
use string name to figure out if we have a "AndLink" instruction
arch/mips/isa/operands.isa:
uq -> uw
--HG--
extra : convert_revision : eeac6dba813de8174d080a5fa9b5a396b345113a
Diffstat (limited to 'arch/mips/isa/formats/branch.isa')
-rw-r--r-- | arch/mips/isa/formats/branch.isa | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/arch/mips/isa/formats/branch.isa b/arch/mips/isa/formats/branch.isa index 75e7830d0..c003cb63d 100644 --- a/arch/mips/isa/formats/branch.isa +++ b/arch/mips/isa/formats/branch.isa @@ -213,10 +213,11 @@ def template JumpOrBranchDecode {{ }}; def format Branch(code,*flags) {{ - code = 'bool cond;\n' + code + '\n' + code = 'bool cond;\n\t' + code + '\n' - if flags == 'IsLink': - code += 'R31 = NPC + 8\n' + strlen = len(name) + if name[strlen-2:] == 'al': + code += 'R31 = NPC + 8;\n' code += '\nif (cond) NPC = NPC + disp;\n'; @@ -231,8 +232,9 @@ def format Branch(code,*flags) {{ def format BranchLikely(code,*flags) {{ code = 'bool cond;\n' + code + '\nif (cond) NPC = NPC + disp;\n'; - if flags == 'IsLink': - code += 'R31 = NPC + 8\n' + strlen = len(name) + if name[strlen-3:] == 'all': + code += 'R31 = NPC + 8;\n' iop = InstObjParams(name, Name, 'Branch', CodeBlock(code), ('IsDirectControl', 'IsCondControl','IsCondDelaySlot')) |