]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Add Imbe_SnoopedStoreBegin and Imbe_SnoopedStoreEnd, to be used for
authorJulian Seward <jseward@acm.org>
Mon, 30 Jun 2008 10:31:47 +0000 (10:31 +0000)
committerJulian Seward <jseward@acm.org>
Mon, 30 Jun 2008 10:31:47 +0000 (10:31 +0000)
bracketing snooped stores; fix up compilation pipeline to accept
(ignore) them.

git-svn-id: svn://svn.valgrind.org/vex/trunk@1857

VEX/priv/guest-ppc/toIR.c
VEX/priv/host-ppc/isel.c
VEX/priv/ir/irdefs.c
VEX/pub/libvex_ir.h

index 0ea60eae4b22d49b306422ae9ff5292f01c225b2..1721baade1366a5019966a170086b5a20049ec61 100644 (file)
@@ -4895,9 +4895,13 @@ static Bool dis_memsync ( UInt theInstr )
             If resaddr != lwarx_resaddr, CR0[EQ] is undefined, and
             whether rS is stored is dependent on that value. */
 
-         /* Success?  Do the (32bit) store */
+         /* Success?  Do the (32bit) store.  Mark the store as
+            snooped, so that threading tools can handle it differently
+            if necessary. */
+         stmt( IRStmt_MBE(Imbe_SnoopedStoreBegin) );
          storeBE( mkexpr(EA), mkSzNarrow32(ty, mkexpr(rS)) );
-         
+         stmt( IRStmt_MBE(Imbe_SnoopedStoreEnd) );
+
          // Set CR0[LT GT EQ S0] = 0b001 || XER[SO]
          putCR321(0, mkU8(1<<1));
          break;
index b0bc3bd21b9afc9d49033006b8dda33c7b274485..6911407b1cfa07d061acdc3e67a49f9ad963f7b4 100644 (file)
@@ -3947,6 +3947,8 @@ static void iselStmt ( ISelEnv* env, IRStmt* stmt )
             return;
          case Imbe_BusLock:
          case Imbe_BusUnlock:
+         case Imbe_SnoopedStoreBegin:
+         case Imbe_SnoopedStoreEnd:
             return;
          default:
             break;
index 55c5aaa57b34855470f7d4d5c113a1dcfa993e82..f2528c5f43a2d6a5333bd13f85ecf1d282d25fb1 100644 (file)
@@ -745,10 +745,12 @@ void ppIRJumpKind ( IRJumpKind kind )
 void ppIRMBusEvent ( IRMBusEvent event )
 {
    switch (event) {
-      case Imbe_Fence:     vex_printf("Fence"); break;
-      case Imbe_BusLock:   vex_printf("BusLock"); break;
-      case Imbe_BusUnlock: vex_printf("BusUnlock"); break;
-      default:             vpanic("ppIRMBusEvent");
+      case Imbe_Fence:             vex_printf("Fence"); break;
+      case Imbe_BusLock:           vex_printf("BusLock"); break;
+      case Imbe_BusUnlock:         vex_printf("BusUnlock"); break;
+      case Imbe_SnoopedStoreBegin: vex_printf("SnoopedStoreBegin"); break;
+      case Imbe_SnoopedStoreEnd:   vex_printf("SnoopedStoreEnd"); break;
+      default:                     vpanic("ppIRMBusEvent");
    }
 }
 
@@ -2534,6 +2536,7 @@ void tcStmt ( IRSB* bb, IRStmt* stmt, IRType gWordTy )
       case Ist_MBE:
          switch (stmt->Ist.MBE.event) {
             case Imbe_Fence: case Imbe_BusLock: case Imbe_BusUnlock:
+            case Imbe_SnoopedStoreBegin: case Imbe_SnoopedStoreEnd:
                break;
             default: sanityCheckFail(bb,stmt,"IRStmt.MBE.event: unknown");
                break;
index 6a8dc763226884e957886faf54d14ccdfff94018..232f189c9716c3748b7c6f91a7f0ac96f052f81e 100644 (file)
@@ -1336,7 +1336,9 @@ typedef
    enum { 
       Imbe_Fence=0x18000, 
       Imbe_BusLock, 
-      Imbe_BusUnlock
+      Imbe_BusUnlock,
+      Imbe_SnoopedStoreBegin,
+      Imbe_SnoopedStoreEnd
    }
    IRMBusEvent;