[llvm-commits] CVS: llvm/lib/Bytecode/Reader/ReadInst.cpp

Chris Lattner lattner at cs.uiuc.edu
Mon Sep 8 13:21:06 PDT 2003


Changes in directory llvm/lib/Bytecode/Reader:

ReadInst.cpp updated: 1.47 -> 1.48

---
Log message:

Read volatile loads/stores


---
Diffs of the changes:

Index: llvm/lib/Bytecode/Reader/ReadInst.cpp
diff -u llvm/lib/Bytecode/Reader/ReadInst.cpp:1.47 llvm/lib/Bytecode/Reader/ReadInst.cpp:1.48
--- llvm/lib/Bytecode/Reader/ReadInst.cpp:1.47	Mon Sep  8 13:04:16 2003
+++ llvm/lib/Bytecode/Reader/ReadInst.cpp	Mon Sep  8 13:20:14 2003
@@ -405,18 +405,20 @@
     return false;
   }
 
+  case 62:   // volatile load
   case Instruction::Load:
     if (Raw.NumOperands != 1) return true;
     if (!isa<PointerType>(Raw.Ty)) return true;
-    Res = new LoadInst(getValue(Raw.Ty, Raw.Arg1));
+    Res = new LoadInst(getValue(Raw.Ty, Raw.Arg1), "", Raw.Opcode == 62);
     return false;
 
+  case 63:   // volatile store 
   case Instruction::Store: {
     if (!isa<PointerType>(Raw.Ty) || Raw.NumOperands != 2) return true;
 
     Value *Ptr = getValue(Raw.Ty, Raw.Arg2);
     const Type *ValTy = cast<PointerType>(Ptr->getType())->getElementType();
-    Res = new StoreInst(getValue(ValTy, Raw.Arg1), Ptr);
+    Res = new StoreInst(getValue(ValTy, Raw.Arg1), Ptr, Raw.Opcode == 63);
     return false;
   }
   }  // end switch(Raw.Opcode) 





More information about the llvm-commits mailing list