summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Bytecode/Reader/InstructionReader.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2003-09-08 18:20:14 +0000
committerChris Lattner <sabre@nondot.org>2003-09-08 18:20:14 +0000
commita9083c961ec1ec435e302087ad3c29dc0dd8a3d0 (patch)
tree75bb1d859c68d93080d46ae23570f57b5671abd1 /llvm/lib/Bytecode/Reader/InstructionReader.cpp
parent6052fe375cfe93879e1f665d54ab9902f1b83781 (diff)
downloadbcm5719-llvm-a9083c961ec1ec435e302087ad3c29dc0dd8a3d0.tar.gz
bcm5719-llvm-a9083c961ec1ec435e302087ad3c29dc0dd8a3d0.zip
Read volatile loads/stores
llvm-svn: 8401
Diffstat (limited to 'llvm/lib/Bytecode/Reader/InstructionReader.cpp')
-rw-r--r--llvm/lib/Bytecode/Reader/InstructionReader.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/llvm/lib/Bytecode/Reader/InstructionReader.cpp b/llvm/lib/Bytecode/Reader/InstructionReader.cpp
index 2ae21683b5f..603c20564ca 100644
--- a/llvm/lib/Bytecode/Reader/InstructionReader.cpp
+++ b/llvm/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)
OpenPOWER on IntegriCloud