Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(234)

Side by Side Diff: src/IceIntrinsics.cpp

Issue 1359993002: Fix code checking arguments to an intrinsic call. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Fix nits. Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | src/PNaClTranslator.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 //===- subzero/src/IceIntrinsics.cpp - Functions related to intrinsics ----===// 1 //===- subzero/src/IceIntrinsics.cpp - Functions related to intrinsics ----===//
2 // 2 //
3 // The Subzero Code Generator 3 // The Subzero Code Generator
4 // 4 //
5 // This file is distributed under the University of Illinois Open Source 5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details. 6 // License. See LICENSE.TXT for details.
7 // 7 //
8 //===----------------------------------------------------------------------===// 8 //===----------------------------------------------------------------------===//
9 /// 9 ///
10 /// \file 10 /// \file
(...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after
323 if (getReturnType() != IceType_void) 323 if (getReturnType() != IceType_void)
324 return Intrinsics::BadReturnType; 324 return Intrinsics::BadReturnType;
325 } else if (getReturnType() != Result->getType()) { 325 } else if (getReturnType() != Result->getType()) {
326 return Intrinsics::BadReturnType; 326 return Intrinsics::BadReturnType;
327 } 327 }
328 if (Call->getNumArgs() != getNumArgs()) { 328 if (Call->getNumArgs() != getNumArgs()) {
329 return Intrinsics::WrongNumOfArgs; 329 return Intrinsics::WrongNumOfArgs;
330 } 330 }
331 for (size_t i = 1; i < NumTypes; ++i) { 331 for (size_t i = 1; i < NumTypes; ++i) {
332 if (Call->getArg(i - 1)->getType() != Signature[i]) { 332 if (Call->getArg(i - 1)->getType() != Signature[i]) {
333 ArgIndex = i; 333 ArgIndex = i - 1;
334 return Intrinsics::WrongCallArgType; 334 return Intrinsics::WrongCallArgType;
335 } 335 }
336 } 336 }
337 return Intrinsics::IsValidCall; 337 return Intrinsics::IsValidCall;
338 } 338 }
339 339
340 Type Intrinsics::FullIntrinsicInfo::getArgType(SizeT Index) const { 340 Type Intrinsics::FullIntrinsicInfo::getArgType(SizeT Index) const {
341 assert(NumTypes > 1); 341 assert(NumTypes > 1);
342 assert(Index + 1 < NumTypes); 342 assert(Index + 1 < NumTypes);
343 return Signature[Index + 1]; 343 return Signature[Index + 1];
344 } 344 }
345 345
346 } // end of namespace Ice 346 } // end of namespace Ice
OLDNEW
« no previous file with comments | « no previous file | src/PNaClTranslator.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698