ARM: Make all ARM uops delayed commit.
authorAli Saidi <Ali.Saidi@ARM.com>
Mon, 8 Nov 2010 19:58:22 +0000 (13:58 -0600)
committerAli Saidi <Ali.Saidi@ARM.com>
Mon, 8 Nov 2010 19:58:22 +0000 (13:58 -0600)
src/arch/arm/insts/macromem.hh
src/arch/arm/isa/templates/mem.isa
src/cpu/static_inst.hh

index 018cb1de5d315906813d7ff9df53dbbad328f6aa..1a2db8b9a49c14ff9aed501ade20a8cbe78853f9 100644 (file)
@@ -72,12 +72,6 @@ class MicroOp : public PredOp
     }
 
   public:
-    void
-    setDelayedCommit()
-    {
-        flags[IsDelayedCommit] = true;
-    }
-
     void
     advancePC(PCState &pcState) const
     {
index 29ef8d007d84a8ccd398fa958e5d5e9dd17cb3b6..ab4f1b01bae2e2bf02ad235a29372c9e05a1c501 100644 (file)
@@ -917,6 +917,7 @@ def template RfeConstructor {{
         assert(numMicroops >= 2);
         uops = new StaticInstPtr[numMicroops];
         uops[0] = new %(acc_name)s(machInst, _base, _mode, _wb);
+        uops[0]->setDelayedCommit();
         uops[1] = new %(wb_decl)s;
         uops[1]->setLastMicroop();
 #endif
@@ -934,6 +935,7 @@ def template SrsConstructor {{
         assert(numMicroops >= 2);
         uops = new StaticInstPtr[numMicroops];
         uops[0] = new %(acc_name)s(machInst, _regMode, _mode, _wb);
+        uops[0]->setDelayedCommit();
         uops[1] = new %(wb_decl)s;
         uops[1]->setLastMicroop();
 #endif
@@ -963,6 +965,7 @@ def template LoadStoreDImmConstructor {{
         assert(numMicroops >= 2);
         uops = new StaticInstPtr[numMicroops];
         uops[0] = new %(acc_name)s(machInst, _dest, _dest2, _base, _add, _imm);
+        uops[0]->setDelayedCommit();
         uops[1] = new %(wb_decl)s;
         uops[1]->setLastMicroop();
 #endif
@@ -984,6 +987,7 @@ def template StoreExDImmConstructor {{
         uops = new StaticInstPtr[numMicroops];
         uops[0] = new %(acc_name)s(machInst, _result, _dest, _dest2,
                                    _base, _add, _imm);
+        uops[0]->setDelayedCommit();
         uops[1] = new %(wb_decl)s;
         uops[1]->setLastMicroop();
 #endif
@@ -1001,6 +1005,7 @@ def template LoadStoreImmConstructor {{
         assert(numMicroops >= 2);
         uops = new StaticInstPtr[numMicroops];
         uops[0] = new %(acc_name)s(machInst, _dest, _base, _add, _imm);
+        uops[0]->setDelayedCommit();
         uops[1] = new %(wb_decl)s;
         uops[1]->setLastMicroop();
 #endif
@@ -1021,6 +1026,7 @@ def template StoreExImmConstructor {{
         uops = new StaticInstPtr[numMicroops];
         uops[0] = new %(acc_name)s(machInst, _result, _dest,
                                    _base, _add, _imm);
+        uops[0]->setDelayedCommit();
         uops[1] = new %(wb_decl)s;
         uops[1]->setLastMicroop();
 #endif
@@ -1043,6 +1049,7 @@ def template StoreDRegConstructor {{
         uops = new StaticInstPtr[numMicroops];
         uops[0] = new %(acc_name)s(machInst, _dest, _dest2, _base, _add,
                                    _shiftAmt, _shiftType, _index);
+        uops[0]->setDelayedCommit();
         uops[1] = new %(wb_decl)s;
         uops[1]->setLastMicroop();
 #endif
@@ -1064,6 +1071,7 @@ def template StoreRegConstructor {{
         uops = new StaticInstPtr[numMicroops];
         uops[0] = new %(acc_name)s(machInst, _dest, _base, _add,
                                    _shiftAmt, _shiftType, _index);
+        uops[0]->setDelayedCommit();
         uops[1] = new %(wb_decl)s;
         uops[1]->setLastMicroop();
 #endif
@@ -1087,14 +1095,17 @@ def template LoadDRegConstructor {{
         if ((_dest == _index) || (_dest2 == _index)) {
             IntRegIndex wbIndexReg = INTREG_UREG0;
             uops[0] = new MicroUopRegMov(machInst, INTREG_UREG0, _index);
+            uops[0]->setDelayedCommit();
             uops[1] = new %(acc_name)s(machInst, _dest, _dest2, _base, _add,
                                        _shiftAmt, _shiftType, _index);
+            uops[1]->setDelayedCommit();
             uops[2] = new %(wb_decl)s;
             uops[2]->setLastMicroop();
         } else {
             IntRegIndex wbIndexReg = index;
             uops[0] = new %(acc_name)s(machInst, _dest, _dest2, _base, _add,
                                        _shiftAmt, _shiftType, _index);
+            uops[0]->setDelayedCommit();
             uops[1] = new %(wb_decl)s;
             uops[1]->setLastMicroop();
         }
@@ -1119,20 +1130,25 @@ def template LoadRegConstructor {{
             IntRegIndex wbIndexReg = index;
             uops[0] = new %(acc_name)s(machInst, INTREG_UREG0, _base, _add,
                                        _shiftAmt, _shiftType, _index);
+            uops[0]->setDelayedCommit();
             uops[1] = new %(wb_decl)s;
+            uops[1]->setDelayedCommit();
             uops[2] = new MicroUopRegMov(machInst, INTREG_PC, INTREG_UREG0);
             uops[2]->setLastMicroop();
         } else if(_dest == _index) {
             IntRegIndex wbIndexReg = INTREG_UREG0;
             uops[0] = new MicroUopRegMov(machInst, INTREG_UREG0, _index);
+            uops[0]->setDelayedCommit();
             uops[1] = new %(acc_name)s(machInst, _dest, _base, _add,
                                       _shiftAmt, _shiftType, _index);
+            uops[1]->setDelayedCommit();
             uops[2] = new %(wb_decl)s;
             uops[2]->setLastMicroop();
         } else {
             IntRegIndex wbIndexReg = index;
             uops[0] = new %(acc_name)s(machInst, _dest, _base, _add,
                                       _shiftAmt, _shiftType, _index);
+            uops[0]->setDelayedCommit();
             uops[1] = new %(wb_decl)s;
             uops[1]->setLastMicroop();
 
@@ -1154,11 +1170,14 @@ def template LoadImmConstructor {{
         if (_dest == INTREG_PC) {
             uops[0] = new %(acc_name)s(machInst, INTREG_UREG0, _base, _add,
                                    _imm);
+            uops[0]->setDelayedCommit();
             uops[1] = new %(wb_decl)s;
+            uops[1]->setDelayedCommit();
             uops[2] = new MicroUopRegMov(machInst, INTREG_PC, INTREG_UREG0);
             uops[2]->setLastMicroop();
         } else {
             uops[0] = new %(acc_name)s(machInst, _dest, _base, _add, _imm);
+            uops[0]->setDelayedCommit();
             uops[1] = new %(wb_decl)s;
             uops[1]->setLastMicroop();
         }
index b219fafd66da96a736da5e4f821e40accd27c88e..5951ab1223988236f2570bb6d787af9c8608c36b 100644 (file)
@@ -263,6 +263,8 @@ class StaticInstBase : public RefCounted
     //@}
 
     void setLastMicroop() { flags[IsLastMicroop] = true; }
+    void setDelayedCommit() { flags[IsDelayedCommit] = true; }
+
     /// Operation class.  Used to select appropriate function unit in issue.
     OpClass opClass()     const { return _opClass; }
 };