Gabe Black has submitted this change and it was merged. ( https://gem5-review.googlesource.com/7122 )

Change subject: cpu, power: Get rid of the remnants of the EA computation insts.
......................................................................

cpu, power: Get rid of the remnants of the EA computation insts.

Get rid of some remnants of a system which was intended to separate
address computation into its own instruction object.

Change-Id: I23f9ffd70fcb89a8ea5bbb934507fb00da9a0b7f
Reviewed-on: https://gem5-review.googlesource.com/7122
Reviewed-by: Jason Lowe-Power <[email protected]>
Maintainer: Gabe Black <[email protected]>
---
M src/arch/power/isa/formats/mem.isa
M src/cpu/base_dyn_inst.hh
M src/cpu/checker/cpu.hh
M src/cpu/exec_context.hh
M src/cpu/minor/dyn_inst.hh
M src/cpu/minor/exec_context.hh
M src/cpu/simple/exec_context.hh
7 files changed, 2 insertions(+), 74 deletions(-)

Approvals:
  Jason Lowe-Power: Looks good to me, approved
  Gabe Black: Looks good to me, approved



diff --git a/src/arch/power/isa/formats/mem.isa b/src/arch/power/isa/formats/mem.isa
index 8f89bc2..719cb39 100644
--- a/src/arch/power/isa/formats/mem.isa
+++ b/src/arch/power/isa/formats/mem.isa
@@ -98,7 +98,6 @@

         if (fault == NoFault) {
fault = initiateMemRead(xc, traceData, EA, Mem, memAccessFlags);
-            xc->setEA(EA);
         }

         return fault;
@@ -117,7 +116,7 @@
         %(op_decl)s;
         %(op_rd)s;

-        EA = xc->getEA();
+        EA = pkt->req->getVaddr();

         getMem(pkt, Mem, traceData);

diff --git a/src/cpu/base_dyn_inst.hh b/src/cpu/base_dyn_inst.hh
index d7d32e6..127b062 100644
--- a/src/cpu/base_dyn_inst.hh
+++ b/src/cpu/base_dyn_inst.hh
@@ -132,10 +132,6 @@
         RecordResult,
         Predicate,
         PredTaken,
-        /** Whether or not the effective address calculation is completed.
-         *  @todo: Consider if this is necessary or not.
-         */
-        EACalcDone,
         IsStrictlyOrdered,
         ReqMade,
         MemOpDone,
@@ -245,12 +241,6 @@
     // Need a copy of main request pointer to verify on writes.
     RequestPtr reqToVerify;

-  private:
-    /** Instruction effective address.
-     *  @todo: Consider if this is necessary or not.
-     */
-    Addr instEffAddr;
-
   protected:
     /** Flattened register index of the destination registers of this
      *  instruction.
@@ -859,15 +849,6 @@
     ThreadContext *tcBase() { return thread->getTC(); }

   public:
-    /** Sets the effective address. */
-    void setEA(Addr ea) { instEffAddr = ea; instFlags[EACalcDone] = true; }
-
-    /** Returns the effective address. */
-    Addr getEA() const { return instEffAddr; }
-
- /** Returns whether or not the eff. addr. calculation has been completed. */
-    bool doneEACalc() { return instFlags[EACalcDone]; }
-
/** Returns whether or not the eff. addr. source registers are ready. */
     bool eaSrcsReady();

diff --git a/src/cpu/checker/cpu.hh b/src/cpu/checker/cpu.hh
index b1a4574..f79aa08 100644
--- a/src/cpu/checker/cpu.hh
+++ b/src/cpu/checker/cpu.hh
@@ -181,13 +181,6 @@
     void serialize(CheckpointOut &cp) const override;
     void unserialize(CheckpointIn &cp) override;

-    // These functions are only used in CPU models that split
-    // effective address computation from the actual memory access.
-    void setEA(Addr EA) override
-    { panic("CheckerCPU::setEA() not implemented\n"); }
-    Addr getEA() const  override
-    { panic("CheckerCPU::getEA() not implemented\n"); }
-
     // The register accessor methods provide the index of the
     // instruction's operand (e.g., 0 or 1), not the architectural
     // register index, to simplify the implementation of register
diff --git a/src/cpu/exec_context.hh b/src/cpu/exec_context.hh
index e7f5d37..59d7414 100644
--- a/src/cpu/exec_context.hh
+++ b/src/cpu/exec_context.hh
@@ -223,19 +223,6 @@
      * @name Memory Interface
      */
     /**
-     * Record the effective address of the instruction.
-     *
-     * @note Only valid for memory ops.
-     */
-    virtual void setEA(Addr EA) = 0;
-    /**
-     * Get the effective address of the instruction.
-     *
-     * @note Only valid for memory ops.
-     */
-    virtual Addr getEA() const = 0;
-
-    /**
      * Perform an atomic memory read operation.  Must be overridden
      * for exec contexts that support atomic memory mode.  Not pure
      * virtual since exec contexts that only support timing memory
diff --git a/src/cpu/minor/dyn_inst.hh b/src/cpu/minor/dyn_inst.hh
index 79c9ca4..b2decb3 100644
--- a/src/cpu/minor/dyn_inst.hh
+++ b/src/cpu/minor/dyn_inst.hh
@@ -221,9 +221,6 @@
      *  up */
     RegId flatDestRegIdx[TheISA::MaxInstDestRegs];

-    /** Effective address as set by ExecContext::setEA */
-    Addr ea;
-
   public:
     MinorDynInst(InstId id_ = InstId(), Fault fault_ = NoFault) :
         staticInst(NULL), id(id_), traceData(NULL),
@@ -232,8 +229,7 @@
         fuIndex(0), inLSQ(false), inStoreBuffer(false),
         canEarlyIssue(false),
         instToWaitFor(0), extraCommitDelay(Cycles(0)),
-        extraCommitDelayExpr(NULL), minimumCommitCycle(Cycles(0)),
-        ea(0)
+        extraCommitDelayExpr(NULL), minimumCommitCycle(Cycles(0))
     { }

   public:
diff --git a/src/cpu/minor/exec_context.hh b/src/cpu/minor/exec_context.hh
index 4b3a02f..6ac0df5 100644
--- a/src/cpu/minor/exec_context.hh
+++ b/src/cpu/minor/exec_context.hh
@@ -424,20 +424,8 @@
         thread.getDTBPtr()->demapPage(vaddr, asn);
     }

-    /* ALPHA/POWER: Effective address storage */
-    void setEA(Addr ea) override
-    {
-        inst->ea = ea;
-    }
-
     BaseCPU *getCpuPtr() { return &cpu; }

-    /* POWER: Effective address storage */
-    Addr getEA() const override
-    {
-        return inst->ea;
-    }
-
     /* MIPS: other thread register reading/writing */
     uint64_t
     readRegOtherThread(const RegId& reg, ThreadID tid = InvalidThreadID)
diff --git a/src/cpu/simple/exec_context.hh b/src/cpu/simple/exec_context.hh
index 6d51e5e..13c44ac 100644
--- a/src/cpu/simple/exec_context.hh
+++ b/src/cpu/simple/exec_context.hh
@@ -413,22 +413,6 @@
     }


-    /**
-     * Record the effective address of the instruction.
-     *
-     * @note Only valid for memory ops.
-     */
-    void setEA(Addr EA) override
-    { panic("BaseSimpleCPU::setEA() not implemented\n"); }
-
-    /**
-     * Get the effective address of the instruction.
-     *
-     * @note Only valid for memory ops.
-     */
-    Addr getEA() const override
-    { panic("BaseSimpleCPU::getEA() not implemented\n"); }
-
     Fault readMem(Addr addr, uint8_t *data, unsigned int size,
                   Request::Flags flags) override
     {

--
To view, visit https://gem5-review.googlesource.com/7122
To unsubscribe, or for help writing mail filters, visit https://gem5-review.googlesource.com/settings

Gerrit-Project: public/gem5
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I23f9ffd70fcb89a8ea5bbb934507fb00da9a0b7f
Gerrit-Change-Number: 7122
Gerrit-PatchSet: 2
Gerrit-Owner: Gabe Black <[email protected]>
Gerrit-Reviewer: Andreas Sandberg <[email protected]>
Gerrit-Reviewer: Curtis Dunham <[email protected]>
Gerrit-Reviewer: Gabe Black <[email protected]>
Gerrit-Reviewer: Giacomo Travaglini <[email protected]>
Gerrit-Reviewer: Jason Lowe-Power <[email protected]>
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev

Reply via email to