[gem5-dev] Change in gem5/gem5[develop]: cpu: Remove "lane" accessors from the ExecContext classes.
Gabe Black has submitted this change. ( https://gem5-review.googlesource.com/c/public/gem5/+/41897 ) Change subject: cpu: Remove "lane" accessors from the ExecContext classes. .. cpu: Remove "lane" accessors from the ExecContext classes. These are not used by instructions. If something other than instructions needs that style of access, it would use the ThreadContext, not the ExecContext. Change-Id: Ic74dcfd34f8bb0786bd2688b44d0d90714503637 Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/41897 Reviewed-by: Gabe Black Maintainer: Gabe Black Tested-by: kokoro --- M src/cpu/checker/cpu.hh M src/cpu/exec_context.hh M src/cpu/minor/exec_context.hh M src/cpu/o3/dyn_inst.hh M src/cpu/simple/exec_context.hh 5 files changed, 0 insertions(+), 316 deletions(-) Approvals: Gabe Black: Looks good to me, approved; Looks good to me, approved kokoro: Regressions pass diff --git a/src/cpu/checker/cpu.hh b/src/cpu/checker/cpu.hh index 42a38fc..0900125 100644 --- a/src/cpu/checker/cpu.hh +++ b/src/cpu/checker/cpu.hh @@ -218,79 +218,6 @@ return thread->getWritableVecReg(reg); } -/** Vector Register Lane Interfaces. */ -/** @{ */ -/** Reads source vector 8bit operand. */ -virtual ConstVecLane8 -readVec8BitLaneOperand(const StaticInst *si, int idx) const override -{ -const RegId& reg = si->destRegIdx(idx); -assert(reg.isVecReg()); -return thread->readVec8BitLaneReg(reg); -} - -/** Reads source vector 16bit operand. */ -virtual ConstVecLane16 -readVec16BitLaneOperand(const StaticInst *si, int idx) const override -{ -const RegId& reg = si->destRegIdx(idx); -assert(reg.isVecReg()); -return thread->readVec16BitLaneReg(reg); -} - -/** Reads source vector 32bit operand. */ -virtual ConstVecLane32 -readVec32BitLaneOperand(const StaticInst *si, int idx) const override -{ -const RegId& reg = si->destRegIdx(idx); -assert(reg.isVecReg()); -return thread->readVec32BitLaneReg(reg); -} - -/** Reads source vector 64bit operand. */ -virtual ConstVecLane64 -readVec64BitLaneOperand(const StaticInst *si, int idx) const override -{ -const RegId& reg = si->destRegIdx(idx); -assert(reg.isVecReg()); -return thread->readVec64BitLaneReg(reg); -} - -/** Write a lane of the destination vector operand. */ -template -void -setVecLaneOperandT(const StaticInst *si, int idx, const LD& val) -{ -const RegId& reg = si->destRegIdx(idx); -assert(reg.isVecReg()); -return thread->setVecLane(reg, val); -} -virtual void -setVecLaneOperand(const StaticInst *si, int idx, -const LaneData& val) override -{ -setVecLaneOperandT(si, idx, val); -} -virtual void -setVecLaneOperand(const StaticInst *si, int idx, -const LaneData& val) override -{ -setVecLaneOperandT(si, idx, val); -} -virtual void -setVecLaneOperand(const StaticInst *si, int idx, -const LaneData& val) override -{ -setVecLaneOperandT(si, idx, val); -} -virtual void -setVecLaneOperand(const StaticInst *si, int idx, -const LaneData& val) override -{ -setVecLaneOperandT(si, idx, val); -} -/** @} */ - TheISA::VecElem readVecElemOperand(const StaticInst *si, int idx) const override { diff --git a/src/cpu/exec_context.hh b/src/cpu/exec_context.hh index 42dafbc..3c40f31 100644 --- a/src/cpu/exec_context.hh +++ b/src/cpu/exec_context.hh @@ -117,36 +117,6 @@ const TheISA::VecRegContainer& val) = 0; /** @} */ -/** Vector Register Lane Interfaces. */ -/** @{ */ -/** Reads source vector 8bit operand. */ -virtual ConstVecLane8 readVec8BitLaneOperand( -const StaticInst *si, int idx) const = 0; - -/** Reads source vector 16bit operand. */ -virtual ConstVecLane16 readVec16BitLaneOperand( -const StaticInst *si, int idx) const = 0; - -/** Reads source vector 32bit operand. */ -virtual ConstVecLane32 readVec32BitLaneOperand( -const StaticInst *si, int idx) const = 0; - -/** Reads source vector 64bit operand. */ -virtual ConstVecLane64 readVec64BitLaneOperand( -const StaticInst *si, int idx) const = 0; - -/** Write a lane of the destination vector operand. */ -/** @{ */ -virtual void setVecLaneOperand(const StaticInst *si, int idx, -const LaneData& val) = 0; -virtual void setVecLaneOperand(const StaticInst *si, int idx, -const LaneData& val) = 0; -virtual void setVecLaneOperand(const StaticInst *si, int idx, -const LaneData& val) = 0; -virtual void setVecLaneOperand(const StaticInst *si, int idx, -const LaneData& val) = 0; -/** @} */ - /**
[gem5-dev] Change in gem5/gem5[develop]: cpu: Remove "lane" accessors from the ExecContext classes.
Gabe Black has uploaded this change for review. ( https://gem5-review.googlesource.com/c/public/gem5/+/41897 ) Change subject: cpu: Remove "lane" accessors from the ExecContext classes. .. cpu: Remove "lane" accessors from the ExecContext classes. These are not used by instructions. If something other than instructions needs that style of access, it would use the ThreadContext, not the ExecContext. Change-Id: Ic74dcfd34f8bb0786bd2688b44d0d90714503637 --- M src/cpu/checker/cpu.hh M src/cpu/exec_context.hh M src/cpu/minor/exec_context.hh M src/cpu/o3/dyn_inst.hh M src/cpu/simple/exec_context.hh 5 files changed, 0 insertions(+), 316 deletions(-) diff --git a/src/cpu/checker/cpu.hh b/src/cpu/checker/cpu.hh index 42a38fc..0900125 100644 --- a/src/cpu/checker/cpu.hh +++ b/src/cpu/checker/cpu.hh @@ -218,79 +218,6 @@ return thread->getWritableVecReg(reg); } -/** Vector Register Lane Interfaces. */ -/** @{ */ -/** Reads source vector 8bit operand. */ -virtual ConstVecLane8 -readVec8BitLaneOperand(const StaticInst *si, int idx) const override -{ -const RegId& reg = si->destRegIdx(idx); -assert(reg.isVecReg()); -return thread->readVec8BitLaneReg(reg); -} - -/** Reads source vector 16bit operand. */ -virtual ConstVecLane16 -readVec16BitLaneOperand(const StaticInst *si, int idx) const override -{ -const RegId& reg = si->destRegIdx(idx); -assert(reg.isVecReg()); -return thread->readVec16BitLaneReg(reg); -} - -/** Reads source vector 32bit operand. */ -virtual ConstVecLane32 -readVec32BitLaneOperand(const StaticInst *si, int idx) const override -{ -const RegId& reg = si->destRegIdx(idx); -assert(reg.isVecReg()); -return thread->readVec32BitLaneReg(reg); -} - -/** Reads source vector 64bit operand. */ -virtual ConstVecLane64 -readVec64BitLaneOperand(const StaticInst *si, int idx) const override -{ -const RegId& reg = si->destRegIdx(idx); -assert(reg.isVecReg()); -return thread->readVec64BitLaneReg(reg); -} - -/** Write a lane of the destination vector operand. */ -template -void -setVecLaneOperandT(const StaticInst *si, int idx, const LD& val) -{ -const RegId& reg = si->destRegIdx(idx); -assert(reg.isVecReg()); -return thread->setVecLane(reg, val); -} -virtual void -setVecLaneOperand(const StaticInst *si, int idx, -const LaneData& val) override -{ -setVecLaneOperandT(si, idx, val); -} -virtual void -setVecLaneOperand(const StaticInst *si, int idx, -const LaneData& val) override -{ -setVecLaneOperandT(si, idx, val); -} -virtual void -setVecLaneOperand(const StaticInst *si, int idx, -const LaneData& val) override -{ -setVecLaneOperandT(si, idx, val); -} -virtual void -setVecLaneOperand(const StaticInst *si, int idx, -const LaneData& val) override -{ -setVecLaneOperandT(si, idx, val); -} -/** @} */ - TheISA::VecElem readVecElemOperand(const StaticInst *si, int idx) const override { diff --git a/src/cpu/exec_context.hh b/src/cpu/exec_context.hh index 42dafbc..3c40f31 100644 --- a/src/cpu/exec_context.hh +++ b/src/cpu/exec_context.hh @@ -117,36 +117,6 @@ const TheISA::VecRegContainer& val) = 0; /** @} */ -/** Vector Register Lane Interfaces. */ -/** @{ */ -/** Reads source vector 8bit operand. */ -virtual ConstVecLane8 readVec8BitLaneOperand( -const StaticInst *si, int idx) const = 0; - -/** Reads source vector 16bit operand. */ -virtual ConstVecLane16 readVec16BitLaneOperand( -const StaticInst *si, int idx) const = 0; - -/** Reads source vector 32bit operand. */ -virtual ConstVecLane32 readVec32BitLaneOperand( -const StaticInst *si, int idx) const = 0; - -/** Reads source vector 64bit operand. */ -virtual ConstVecLane64 readVec64BitLaneOperand( -const StaticInst *si, int idx) const = 0; - -/** Write a lane of the destination vector operand. */ -/** @{ */ -virtual void setVecLaneOperand(const StaticInst *si, int idx, -const LaneData& val) = 0; -virtual void setVecLaneOperand(const StaticInst *si, int idx, -const LaneData& val) = 0; -virtual void setVecLaneOperand(const StaticInst *si, int idx, -const LaneData& val) = 0; -virtual void setVecLaneOperand(const StaticInst *si, int idx, -const LaneData& val) = 0; -/** @} */ - /** Vector Elem Interfaces. */ /** @{ */ /** Reads an element of a vector register. */ diff --git a/src/cpu/minor/exec_context.hh b/src/cpu/minor/exec_context.hh index 153fe29..58f4b4b 100644 --- a/src/cpu/minor/exec_context.hh +++