Add comment to elaborate on store-conditional result code (and remove
authorSteve Reinhardt <stever@eecs.umich.edu>
Sun, 19 Oct 2003 04:21:14 +0000 (21:21 -0700)
committerSteve Reinhardt <stever@eecs.umich.edu>
Sun, 19 Oct 2003 04:21:14 +0000 (21:21 -0700)
stale reference to machine.def).

arch/alpha/isa_desc:
    Add comment describing store-conditional result code
cpu/exec_context.hh:
    update comments

--HG--
extra : convert_revision : ac59e0ad7a9440cb6656617fdf05495b59c68f55

arch/alpha/isa_desc
cpu/exec_context.hh

index e9b93a895cd7938e05fb72cf93def1b43a84b4b5..b5536525d1f3ba2583a160fb575aa6949d4f9e61 100644 (file)
@@ -1808,11 +1808,19 @@ decode OPCODE default Unknown::unknown() {
        0x2e: stl_c({{ EA = Rb + disp; }}, {{ Mem.ul = Ra<31:0>; }},
                    {{
                        uint64_t tmp = Mem_write_result;
+                       // see stq_c
                        Ra = (tmp == 0 || tmp == 1) ? tmp : Ra;
                    }}, LOCKED);
        0x2f: stq_c({{ EA = Rb + disp; }}, {{ Mem.uq = Ra; }},
                    {{
                        uint64_t tmp = Mem_write_result;
+                       // If the write operation returns 0 or 1, then
+                       // this was a conventional store conditional,
+                       // and the value indicates the success/failure
+                       // of the operation.  If another value is
+                       // returned, then this was a Turbolaser
+                       // mailbox access, and we don't update the
+                       // result register at all.
                        Ra = (tmp == 0 || tmp == 1) ? tmp : Ra;
                    }}, LOCKED);
     }
index ddfc53684e3aae2dc8e580abb96568422eb02adf..4a2688f1cd0b0fc7ea2bd67c46ec44238efe0f66 100644 (file)
@@ -218,7 +218,7 @@ class ExecContext
             cregs = &req->xc->regs.miscRegs;
 
             if (req->flags & UNCACHEABLE) {
-                // Don't update result register (see machine.def)
+                // Don't update result register (see stq_c in isa_desc)
                 req->result = 2;
                 req->xc->storeCondFailures = 0;//Needed? [RGD]
             } else {
@@ -239,12 +239,11 @@ class ExecContext
             }
         }
 
-        // Need to clear any locked flags on other proccessors for this
-        // address
-        // Only do this for succsful Store Conditionals and all other
-        // stores (WH64?)
-        // Unsuccesful Store Conditionals would have returned above,
-        // and wouldn't fall through
+        // Need to clear any locked flags on other proccessors for
+        // this address.  Only do this for succsful Store Conditionals
+        // and all other stores (WH64?).  Unsuccessful Store
+        // Conditionals would have returned above, and wouldn't fall
+        // through.
         for (int i = 0; i < system->xcvec.size(); i++){
             cregs = &system->xcvec[i]->regs.miscRegs;
             if ((cregs->lock_addr & ~0xf) == (req->paddr & ~0xf)) {