Read volatile loads/stores
authorChris Lattner <sabre@nondot.org>
Mon, 8 Sep 2003 18:20:14 +0000 (18:20 +0000)
committerChris Lattner <sabre@nondot.org>
Mon, 8 Sep 2003 18:20:14 +0000 (18:20 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8401 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Bytecode/Reader/InstructionReader.cpp

index 2ae21683b5f9aa268bef87494a4506bddf5e4af9..603c20564caa0b7aeea5a1fab00cebc296af31a0 100644 (file)
@@ -405,18 +405,20 @@ bool BytecodeParser::ParseInstruction(const unsigned char *&Buf,
     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)