diff options
Diffstat (limited to 'src/arch/arm/isa/formats/branch.isa')
-rw-r--r-- | src/arch/arm/isa/formats/branch.isa | 76 |
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) -}}; - |