summaryrefslogtreecommitdiff
path: root/src/arch/arm/isa
diff options
context:
space:
mode:
authorGabe Black <gblack@eecs.umich.edu>2010-06-02 12:58:03 -0500
committerGabe Black <gblack@eecs.umich.edu>2010-06-02 12:58:03 -0500
commitb6b2f8891a809eeec0409906f820e3e2dc60caa0 (patch)
tree872bd3333e02f10b780612f628aa575d01186d64 /src/arch/arm/isa
parentd082705b01d9ce648651c147636e8e9976406ab2 (diff)
downloadgem5-b6b2f8891a809eeec0409906f820e3e2dc60caa0.tar.xz
ARM: Eliminate the old style branch instructions.
Diffstat (limited to 'src/arch/arm/isa')
-rw-r--r--src/arch/arm/isa/formats/branch.isa76
1 files changed, 0 insertions, 76 deletions
diff --git a/src/arch/arm/isa/formats/branch.isa b/src/arch/arm/isa/formats/branch.isa
index 62a6e40c2..63bb11227 100644
--- a/src/arch/arm/isa/formats/branch.isa
+++ b/src/arch/arm/isa/formats/branch.isa
@@ -84,79 +84,3 @@ def format ArmBlxReg() {{
(ConditionCode)(uint32_t)machInst.condCode);
'''
}};
-
-def format Branch(code,*opt_flags) {{
-
- #Build Instruction Flags
- #Use Link & Likely Flags to Add Link/Condition Code
- inst_flags = ('IsDirectControl', )
- linking = False
- for x in opt_flags:
- if x == 'Link':
- linking = True
- code += 'LR = NPC;\n'
- else:
- inst_flags += (x, )
-
- #Take into account uncond. branch instruction
- if 'cond == 1' in code:
- inst_flags += ('IsUnCondControl', )
- else:
- inst_flags += ('IsCondControl', )
-
- icode = 'if (testPredicate(CondCodes, condCode)) {\n'
- icode += code
- icode += ' NPC = NPC + 4 + disp;\n'
- icode += '} else {\n'
- icode += ' NPC = NPC;\n'
- if linking:
- icode += ' LR = LR;\n'
- icode += '};\n'
-
- code = icode
-
- iop = InstObjParams(name, Name, 'Branch', code, inst_flags)
- header_output = BasicDeclare.subst(iop)
- decoder_output = BasicConstructor.subst(iop)
- decode_block = BasicDecode.subst(iop)
- exec_output = BasicExecute.subst(iop)
-}};
-
-def format BranchExchange(code,*opt_flags) {{
- #Build Instruction Flags
- #Use Link & Likely Flags to Add Link/Condition Code
- inst_flags = ('IsIndirectControl', )
- linking = False
- for x in opt_flags:
- if x == 'Link':
- linking = True
- code += 'LR = NPC;\n'
- else:
- inst_flags += (x, )
-
- #Take into account uncond. branch instruction
- if 'cond == 1' in code:
- inst_flags += ('IsUnCondControl', )
- else:
- inst_flags += ('IsCondControl', )
-
- #Condition code
-
- icode = 'if (testPredicate(CondCodes, condCode)) {\n'
- icode += code
- icode += ' NPC = Rm & 0xfffffffe; // Masks off bottom bit\n'
- icode += '} else {\n'
- icode += ' NPC = NPC;\n'
- if linking:
- icode += ' LR = LR;\n'
- icode += '};\n'
-
- code = icode
-
- iop = InstObjParams(name, Name, 'BranchExchange', code, inst_flags)
- header_output = BasicDeclare.subst(iop)
- decoder_output = BasicConstructor.subst(iop)
- decode_block = BasicDecode.subst(iop)
- exec_output = BasicExecute.subst(iop)
-}};
-