From 8253f255b7936070b3bae07fe9aead104f2ecde7 Mon Sep 17 00:00:00 2001 From: Mark Seaborn Date: Mon, 3 Jun 2013 12:51:11 -0700 Subject: PNaCl ABI checker: Disallow ExtractValue and InsertValue instructions (2nd try) Uses of these are removed by ExpandMulWithOverflow and ExpandStructRegs. This change was previously committed but reverted because it broke a varargs function call in 255.vortex in Spec2k. This has since been fixed by changing ExpandVarArgs. BUG=https://code.google.com/p/nativeclient/issues/detail?id=3343 TEST=PNaCl toolchain trybots + all the Spec2k tests this time around Review URL: https://codereview.chromium.org/16336012 --- lib/Analysis/NaCl/PNaClABIVerifyFunctions.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'lib') diff --git a/lib/Analysis/NaCl/PNaClABIVerifyFunctions.cpp b/lib/Analysis/NaCl/PNaClABIVerifyFunctions.cpp index d1d5f38405..ad01ae58a2 100644 --- a/lib/Analysis/NaCl/PNaClABIVerifyFunctions.cpp +++ b/lib/Analysis/NaCl/PNaClABIVerifyFunctions.cpp @@ -102,6 +102,9 @@ bool PNaClABIVerifyFunctions::runOnFunction(Function &F) { case Instruction::ExtractElement: case Instruction::InsertElement: case Instruction::ShuffleVector: + // ExtractValue and InsertValue operate on struct values. + case Instruction::ExtractValue: + case Instruction::InsertValue: Reporter->addError() << "Function " << F.getName() << " has disallowed instruction: " << BBI->getOpcodeName() << "\n"; @@ -132,8 +135,6 @@ bool PNaClABIVerifyFunctions::runOnFunction(Function &F) { case Instruction::And: case Instruction::Or: case Instruction::Xor: - case Instruction::ExtractValue: - case Instruction::InsertValue: // Memory instructions case Instruction::Alloca: case Instruction::Load: -- cgit v1.2.3-70-g09d2