summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/arch/alpha/isa/mem.isa23
-rw-r--r--src/arch/mips/isa/formats/mem.isa29
-rw-r--r--src/arch/mips/isa/formats/util.isa1
-rw-r--r--src/arch/power/insts/mem.hh19
-rw-r--r--src/arch/riscv/isa/formats/amo.isa27
-rw-r--r--src/arch/riscv/isa/formats/mem.isa22
-rw-r--r--src/arch/sparc/isa/formats/mem/basicmem.isa3
-rw-r--r--src/arch/sparc/isa/formats/mem/swap.isa2
-rw-r--r--src/arch/sparc/isa/formats/mem/util.isa22
-rw-r--r--src/cpu/o3/dyn_inst.hh19
-rw-r--r--src/cpu/static_inst.hh25
11 files changed, 5 insertions, 187 deletions
diff --git a/src/arch/alpha/isa/mem.isa b/src/arch/alpha/isa/mem.isa
index 6756b7258..0c8a404f0 100644
--- a/src/arch/alpha/isa/mem.isa
+++ b/src/arch/alpha/isa/mem.isa
@@ -130,7 +130,6 @@ def template LoadStoreDeclare {{
%(class_name)s(ExtMachInst machInst);
Fault execute(ExecContext *, Trace::InstRecord *) const;
- Fault eaComp(ExecContext *, Trace::InstRecord *) const;
Fault initiateAcc(ExecContext *, Trace::InstRecord *) const;
Fault completeAcc(PacketPtr, ExecContext *, Trace::InstRecord *) const;
};
@@ -144,27 +143,6 @@ def template LoadStoreConstructor {{
}
}};
-def template EACompExecute {{
- Fault %(class_name)s::eaComp(ExecContext *xc,
- Trace::InstRecord *traceData) const
- {
- Addr EA;
- Fault fault = NoFault;
-
- %(fp_enable_check)s;
- %(op_decl)s;
- %(op_rd)s;
- %(ea_code)s;
-
- if (fault == NoFault) {
- %(op_wb)s;
- xc->setEA(EA);
- }
-
- return fault;
- }
-}};
-
def template LoadExecute {{
Fault %(class_name)s::execute(ExecContext *xc,
@@ -467,7 +445,6 @@ def LoadStoreBase(name, Name, ea_code, memacc_code, mem_flags, inst_flags,
LoadStoreConstructor.subst(iop),
decode_template.subst(iop),
fullExecTemplate.subst(iop)
- + EACompExecute.subst(iop)
+ initiateAccTemplate.subst(iop)
+ completeAccTemplate.subst(iop))
}};
diff --git a/src/arch/mips/isa/formats/mem.isa b/src/arch/mips/isa/formats/mem.isa
index 671c7643d..4e1009e9c 100644
--- a/src/arch/mips/isa/formats/mem.isa
+++ b/src/arch/mips/isa/formats/mem.isa
@@ -143,7 +143,6 @@ def template LoadStoreDeclare {{
%(class_name)s(ExtMachInst machInst);
Fault execute(ExecContext *, Trace::InstRecord *) const;
- Fault eaComp(ExecContext *, Trace::InstRecord *) const;
Fault initiateAcc(ExecContext *, Trace::InstRecord *) const;
Fault completeAcc(Packet *, ExecContext *, Trace::InstRecord *) const;
};
@@ -158,34 +157,6 @@ def template LoadStoreConstructor {{
}
}};
-
-def template EACompExecute {{
- Fault
- %(class_name)s::eaComp(ExecContext *xc, Trace::InstRecord *traceData) const
- {
- Addr EA;
- Fault fault = NoFault;
-
- if (this->isFloating()) {
- %(fp_enable_check)s;
-
- if(fault != NoFault)
- return fault;
- }
-
- %(op_decl)s;
- %(op_rd)s;
- %(ea_code)s;
-
- // NOTE: Trace Data is written using execute or completeAcc templates
- if (fault == NoFault) {
- xc->setEA(EA);
- }
-
- return fault;
- }
-}};
-
def template LoadExecute {{
Fault %(class_name)s::execute(ExecContext *xc,
Trace::InstRecord *traceData) const
diff --git a/src/arch/mips/isa/formats/util.isa b/src/arch/mips/isa/formats/util.isa
index 708338074..a79f20572 100644
--- a/src/arch/mips/isa/formats/util.isa
+++ b/src/arch/mips/isa/formats/util.isa
@@ -71,7 +71,6 @@ def LoadStoreBase(name, Name, ea_code, memacc_code, mem_flags, inst_flags,
LoadStoreConstructor.subst(iop),
decode_template.subst(iop),
fullExecTemplate.subst(iop)
- + EACompExecute.subst(iop)
+ initiateAccTemplate.subst(iop)
+ completeAccTemplate.subst(iop))
}};
diff --git a/src/arch/power/insts/mem.hh b/src/arch/power/insts/mem.hh
index a58742690..0a8dc4946 100644
--- a/src/arch/power/insts/mem.hh
+++ b/src/arch/power/insts/mem.hh
@@ -45,19 +45,11 @@ class MemOp : public PowerStaticInst
/// Memory request flags. See mem_req_base.hh.
unsigned memAccessFlags;
- /// Pointer to EAComp object.
- const StaticInstPtr eaCompPtr;
- /// Pointer to MemAcc object.
- const StaticInstPtr memAccPtr;
/// Constructor
- MemOp(const char *mnem, MachInst _machInst, OpClass __opClass,
- StaticInstPtr _eaCompPtr = nullStaticInstPtr,
- StaticInstPtr _memAccPtr = nullStaticInstPtr)
+ MemOp(const char *mnem, MachInst _machInst, OpClass __opClass)
: PowerStaticInst(mnem, _machInst, __opClass),
- memAccessFlags(0),
- eaCompPtr(_eaCompPtr),
- memAccPtr(_memAccPtr)
+ memAccessFlags(0)
{
}
@@ -75,11 +67,8 @@ class MemDispOp : public MemOp
int16_t disp;
/// Constructor
- MemDispOp(const char *mnem, MachInst _machInst, OpClass __opClass,
- StaticInstPtr _eaCompPtr = nullStaticInstPtr,
- StaticInstPtr _memAccPtr = nullStaticInstPtr)
- : MemOp(mnem, _machInst, __opClass, _eaCompPtr, _memAccPtr),
- disp(machInst.d)
+ MemDispOp(const char *mnem, MachInst _machInst, OpClass __opClass)
+ : MemOp(mnem, _machInst, __opClass), disp(machInst.d)
{
}
diff --git a/src/arch/riscv/isa/formats/amo.isa b/src/arch/riscv/isa/formats/amo.isa
index ea4e14885..e3be23749 100644
--- a/src/arch/riscv/isa/formats/amo.isa
+++ b/src/arch/riscv/isa/formats/amo.isa
@@ -52,7 +52,6 @@ def template AtomicMemOpDeclare {{
%(class_name)sLoad(ExtMachInst machInst, %(class_name)s *_p);
Fault execute(ExecContext *, Trace::InstRecord *) const;
- Fault eaComp(ExecContext *, Trace::InstRecord *) const;
Fault initiateAcc(ExecContext *, Trace::InstRecord *) const;
Fault completeAcc(PacketPtr, ExecContext *,
Trace::InstRecord *) const;
@@ -65,7 +64,6 @@ def template AtomicMemOpDeclare {{
%(class_name)sStore(ExtMachInst machInst, %(class_name)s *_p);
Fault execute(ExecContext *, Trace::InstRecord *) const;
- Fault eaComp(ExecContext *, Trace::InstRecord *) const;
Fault initiateAcc(ExecContext *, Trace::InstRecord *) const;
Fault completeAcc(PacketPtr, ExecContext *,
Trace::InstRecord *) const;
@@ -212,27 +210,6 @@ def template AtomicMemOpStoreExecute {{
}
}};
-def template AtomicMemOpEACompExecute {{
- Fault
- %(class_name)s::%(class_name)s%(op_name)s::eaComp(ExecContext *xc,
- Trace::InstRecord *traceData) const
- {
- Addr EA;
- Fault fault = NoFault;
-
- %(op_decl)s;
- %(op_rd)s;
- %(ea_code)s;
-
- if (fault == NoFault) {
- %(op_wb)s;
- xc->setEA(EA);
- }
-
- return fault;
- }
-}};
-
def template AtomicMemOpLoadInitiateAcc {{
Fault %(class_name)s::%(class_name)sLoad::initiateAcc(ExecContext *xc,
Trace::InstRecord *traceData) const
@@ -349,7 +326,6 @@ def format LoadReserved(memacc_code, postacc_code={{ }}, ea_code={{EA = Rs1;}},
decoder_output = LRSCConstructor.subst(iop)
decode_block = BasicDecode.subst(iop)
exec_output = LoadExecute.subst(iop) \
- + EACompExecute.subst(iop) \
+ LoadInitiateAcc.subst(iop) \
+ LoadCompleteAcc.subst(iop)
}};
@@ -368,7 +344,6 @@ def format StoreCond(memacc_code, postacc_code={{ }}, ea_code={{EA = Rs1;}},
decoder_output = LRSCConstructor.subst(iop)
decode_block = BasicDecode.subst(iop)
exec_output = StoreCondExecute.subst(iop) \
- + EACompExecute.subst(iop) \
+ StoreInitiateAcc.subst(iop) \
+ StoreCondCompleteAcc.subst(iop)
}};
@@ -387,7 +362,6 @@ def format AtomicMemOp(load_code, store_code, ea_code, load_flags=[],
load_inst_flags)
decoder_output += AtomicMemOpLoadConstructor.subst(load_iop)
exec_output += AtomicMemOpLoadExecute.subst(load_iop) \
- + AtomicMemOpEACompExecute.subst(load_iop) \
+ AtomicMemOpLoadInitiateAcc.subst(load_iop) \
+ AtomicMemOpLoadCompleteAcc.subst(load_iop)
@@ -397,7 +371,6 @@ def format AtomicMemOp(load_code, store_code, ea_code, load_flags=[],
store_inst_flags)
decoder_output += AtomicMemOpStoreConstructor.subst(store_iop)
exec_output += AtomicMemOpStoreExecute.subst(store_iop) \
- + AtomicMemOpEACompExecute.subst(store_iop) \
+ AtomicMemOpStoreInitiateAcc.subst(store_iop) \
+ AtomicMemOpStoreCompleteAcc.subst(store_iop)
}};
diff --git a/src/arch/riscv/isa/formats/mem.isa b/src/arch/riscv/isa/formats/mem.isa
index 11b6c4238..d4c17541a 100644
--- a/src/arch/riscv/isa/formats/mem.isa
+++ b/src/arch/riscv/isa/formats/mem.isa
@@ -44,7 +44,6 @@ def template LoadStoreDeclare {{
%(class_name)s(ExtMachInst machInst);
Fault execute(ExecContext *, Trace::InstRecord *) const;
- Fault eaComp(ExecContext *, Trace::InstRecord *) const;
Fault initiateAcc(ExecContext *, Trace::InstRecord *) const;
Fault completeAcc(PacketPtr, ExecContext *, Trace::InstRecord *) const;
};
@@ -60,26 +59,6 @@ def template LoadStoreConstructor {{
}
}};
-def template EACompExecute {{
- Fault
- %(class_name)s::eaComp(ExecContext *xc, Trace::InstRecord *traceData) const
- {
- Addr EA;
- Fault fault = NoFault;
-
- %(op_decl)s;
- %(op_rd)s;
- %(ea_code)s;
-
- if (fault == NoFault) {
- %(op_wb)s;
- xc->setEA(EA);
- }
-
- return fault;
- }
-}};
-
let {{
def LoadStoreBase(name, Name, offset_code, ea_code, memacc_code, mem_flags,
inst_flags, base_class, postacc_code='', decode_template=BasicDecode,
@@ -109,7 +88,6 @@ def LoadStoreBase(name, Name, offset_code, ea_code, memacc_code, mem_flags,
LoadStoreConstructor.subst(iop),
decode_template.subst(iop),
fullExecTemplate.subst(iop) +
- EACompExecute.subst(iop) +
initiateAccTemplate.subst(iop) +
completeAccTemplate.subst(iop))
}};
diff --git a/src/arch/sparc/isa/formats/mem/basicmem.isa b/src/arch/sparc/isa/formats/mem/basicmem.isa
index 391063cf8..bc7d033b6 100644
--- a/src/arch/sparc/isa/formats/mem/basicmem.isa
+++ b/src/arch/sparc/isa/formats/mem/basicmem.isa
@@ -46,7 +46,6 @@ def template MemDeclare {{
%(class_name)s(ExtMachInst machInst);
Fault execute(ExecContext *, Trace::InstRecord *) const;
- Fault eaComp(ExecContext *, Trace::InstRecord *) const;
Fault initiateAcc(ExecContext *, Trace::InstRecord *) const;
Fault completeAcc(PacketPtr, ExecContext *,
Trace::InstRecord *) const;
@@ -71,8 +70,6 @@ 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 c35fffd97..fcabc33e4 100644
--- a/src/arch/sparc/isa/formats/mem/swap.isa
+++ b/src/arch/sparc/isa/formats/mem/swap.isa
@@ -164,7 +164,7 @@ let {{
"EA_trunc" : TruncateEA}
exec_output = doSplitExecute(execute, name, Name, mem_flags,
["IsStoreConditional"], microParams);
- return (header_output, decoder_output, exec_output + EACompExecute.subst(iop), decode_block)
+ return (header_output, decoder_output, exec_output, decode_block)
}};
diff --git a/src/arch/sparc/isa/formats/mem/util.isa b/src/arch/sparc/isa/formats/mem/util.isa
index ad43a6810..8711cb812 100644
--- a/src/arch/sparc/isa/formats/mem/util.isa
+++ b/src/arch/sparc/isa/formats/mem/util.isa
@@ -163,28 +163,6 @@ def template StoreCompleteAcc {{
}
}};
-def template EACompExecute {{
- Fault
- %(class_name)s::eaComp(ExecContext *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;
- }
-}};
-
// Here are some code snippets which check for various fault conditions
let {{
LoadFuncs = [LoadExecute, LoadInitiateAcc, LoadCompleteAcc]
diff --git a/src/cpu/o3/dyn_inst.hh b/src/cpu/o3/dyn_inst.hh
index 0643e7e30..8a0ae1d56 100644
--- a/src/cpu/o3/dyn_inst.hh
+++ b/src/cpu/o3/dyn_inst.hh
@@ -429,25 +429,6 @@ class BaseO3DynInst : public BaseDynInst<Impl>
panic("MIPS MT not defined for O3 CPU.\n");
}
#endif
-
- public:
- /** Calculates EA part of a memory instruction. Currently unused,
- * though it may be useful in the future if we want to split
- * memory operations into EA calculation and memory access parts.
- */
- Fault calcEA()
- {
- return this->staticInst->eaCompInst()->execute(this, this->traceData);
- }
-
- /** Does the memory access part of a memory instruction. Currently unused,
- * though it may be useful in the future if we want to split
- * memory operations into EA calculation and memory access parts.
- */
- Fault memAccess()
- {
- return this->staticInst->memAccInst()->execute(this, this->traceData);
- }
};
#endif // __CPU_O3_ALPHA_DYN_INST_HH__
diff --git a/src/cpu/static_inst.hh b/src/cpu/static_inst.hh
index a58df00c7..a4077e1d0 100644
--- a/src/cpu/static_inst.hh
+++ b/src/cpu/static_inst.hh
@@ -203,28 +203,8 @@ class StaticInst : public RefCounted, public StaticInstFlags
const RegId& srcRegIdx(int i) const { return _srcRegIdx[i]; }
/// Pointer to a statically allocated "null" instruction object.
- /// Used to give eaCompInst() and memAccInst() something to return
- /// when called on non-memory instructions.
static StaticInstPtr nullStaticInstPtr;
- /**
- * Memory references only: returns "fake" instruction representing
- * the effective address part of the memory operation. Used to
- * obtain the dependence info (numSrcRegs and srcRegIdx[]) for
- * just the EA computation.
- */
- virtual const
- StaticInstPtr &eaCompInst() const { return nullStaticInstPtr; }
-
- /**
- * Memory references only: returns "fake" instruction representing
- * the memory access part of the memory operation. Used to
- * obtain the dependence info (numSrcRegs and srcRegIdx[]) for
- * just the memory access (not the EA computation).
- */
- virtual const
- StaticInstPtr &memAccInst() const { return nullStaticInstPtr; }
-
/// The binary machine instruction.
const ExtMachInst machInst;
@@ -272,11 +252,6 @@ class StaticInst : public RefCounted, public StaticInstFlags
virtual Fault execute(ExecContext *xc,
Trace::InstRecord *traceData) const = 0;
- virtual Fault eaComp(ExecContext *xc,
- Trace::InstRecord *traceData) const
- {
- panic("eaComp not defined!");
- }
virtual Fault initiateAcc(ExecContext *xc,
Trace::InstRecord *traceData) const