diff options
author | Chris Lattner <sabre@nondot.org> | 2003-09-08 18:20:14 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2003-09-08 18:20:14 +0000 |
commit | dba2b225c8acc3db039d8380a9c2854505e7f9df (patch) | |
tree | 1a44319f71e3d99b82e25c596912164a1e263d18 /lib/Bytecode/Reader | |
parent | bd9df30983bcc886a88df603b91940b5b03f8aeb (diff) |
Read volatile loads/stores
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8401 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Bytecode/Reader')
-rw-r--r-- | lib/Bytecode/Reader/InstructionReader.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/Bytecode/Reader/InstructionReader.cpp b/lib/Bytecode/Reader/InstructionReader.cpp index 2ae21683b5..603c20564c 100644 --- a/lib/Bytecode/Reader/InstructionReader.cpp +++ b/lib/Bytecode/Reader/InstructionReader.cpp @@ -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) |