diff options
Diffstat (limited to 'src/arch/sparc/isa/formats')
-rw-r--r-- | src/arch/sparc/isa/formats/branch.isa | 5 | ||||
-rw-r--r-- | src/arch/sparc/isa/formats/mem/basicmem.isa | 6 | ||||
-rw-r--r-- | src/arch/sparc/isa/formats/mem/swap.isa | 2 | ||||
-rw-r--r-- | src/arch/sparc/isa/formats/mem/util.isa | 26 |
4 files changed, 38 insertions, 1 deletions
diff --git a/src/arch/sparc/isa/formats/branch.isa b/src/arch/sparc/isa/formats/branch.isa index bf2d9a748..014c0d486 100644 --- a/src/arch/sparc/isa/formats/branch.isa +++ b/src/arch/sparc/isa/formats/branch.isa @@ -262,6 +262,9 @@ def format Branch(code, *opt_flags) {{ let {{ def doBranch(name, Name, base, cond, code, annul_code, fail, annul_fail, opt_flags): + if "IsIndirectControl" not in opt_flags: + opt_flags += ('IsDirectControl', ) + iop = InstObjParams(name, Name, base, {"code": code, "fail": fail, @@ -289,12 +292,14 @@ let {{ return (header_output, decoder_output, exec_output, decode_block) def doCondBranch(name, Name, base, cond, code, opt_flags): + opt_flags += ('IsCondControl', ) return doBranch(name, Name, base, cond, code, code, 'NNPC = NNPC; NPC = NPC;\n', 'NNPC = NPC + 8; NPC = NPC + 4;\n', opt_flags) def doUncondBranch(name, Name, base, code, annul_code, opt_flags): + opt_flags += ('IsUncondControl', ) return doBranch(name, Name, base, "true", code, annul_code, ";", ";", opt_flags) diff --git a/src/arch/sparc/isa/formats/mem/basicmem.isa b/src/arch/sparc/isa/formats/mem/basicmem.isa index c7bb3e435..5dcb955e3 100644 --- a/src/arch/sparc/isa/formats/mem/basicmem.isa +++ b/src/arch/sparc/isa/formats/mem/basicmem.isa @@ -1,3 +1,5 @@ +// -*- mode:c++ -*- + // Copyright (c) 2006-2007 The Regents of The University of Michigan // All rights reserved. // @@ -45,6 +47,8 @@ def template MemDeclare {{ %(BasicExecDeclare)s + %(EACompDeclare)s + %(InitiateAccDeclare)s %(CompleteAccDeclare)s @@ -69,6 +73,8 @@ let {{ exec_output = doDualSplitExecute(code, postacc_code, addrCalcReg, addrCalcImm, execute, faultCode, name, name + "Imm", Name, Name + "Imm", asi, opt_flags) + exec_output += EACompExecute.subst(iop); + exec_output += EACompExecute.subst(iop_imm); return (header_output, decoder_output, exec_output, decode_block) }}; diff --git a/src/arch/sparc/isa/formats/mem/swap.isa b/src/arch/sparc/isa/formats/mem/swap.isa index 1ab82da59..99bbf3a68 100644 --- a/src/arch/sparc/isa/formats/mem/swap.isa +++ b/src/arch/sparc/isa/formats/mem/swap.isa @@ -163,7 +163,7 @@ let {{ "EA_trunc" : TruncateEA} exec_output = doSplitExecute(execute, name, Name, mem_flags, ["IsStoreConditional"], microParams); - return (header_output, decoder_output, exec_output, decode_block) + return (header_output, decoder_output, exec_output + EACompExecute.subst(iop), decode_block) }}; diff --git a/src/arch/sparc/isa/formats/mem/util.isa b/src/arch/sparc/isa/formats/mem/util.isa index ca673566b..aaa04b4bf 100644 --- a/src/arch/sparc/isa/formats/mem/util.isa +++ b/src/arch/sparc/isa/formats/mem/util.isa @@ -260,6 +260,32 @@ def template StoreCompleteAcc {{ } }}; +def template EACompExecute {{ + Fault + %(class_name)s::eaComp(%(CPU_exec_context)s *xc, + Trace::InstRecord *traceData) const + { + Addr EA; + Fault fault = NoFault; + %(op_decl)s; + %(op_rd)s; + %(ea_code)s; + %(fault_check)s; + + // NOTE: Trace Data is written using execute or completeAcc templates + if (fault == NoFault) { + %(EA_trunc)s + xc->setEA(EA); + } + + return fault; + } +}}; + +def template EACompDeclare {{ + Fault eaComp(%(CPU_exec_context)s *, Trace::InstRecord *) const; +}}; + // This delcares the initiateAcc function in memory operations def template InitiateAccDeclare {{ Fault initiateAcc(%(CPU_exec_context)s *, Trace::InstRecord *) const; |