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

Unified Diff: src/IceIntrinsics.cpp

Issue 1347683002: Subzero: Fix off-by-one asserts in intrinsic info lookup routines. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Add real uses of getReturnType() and getNumArgs() Created 5 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/IceIntrinsics.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/IceIntrinsics.cpp
diff --git a/src/IceIntrinsics.cpp b/src/IceIntrinsics.cpp
index b1ca40ddf6c1ba862a5dc9415c6e36d404731bd9..1dc25cc44626de24c8ada0494c2635177259f47f 100644
--- a/src/IceIntrinsics.cpp
+++ b/src/IceIntrinsics.cpp
@@ -315,17 +315,17 @@ bool Intrinsics::isMemoryOrderValid(IntrinsicID ID, uint64_t Order,
}
Intrinsics::ValidateCallValue
-Intrinsics::FullIntrinsicInfo::validateCall(const Ice::InstCall *Call,
+Intrinsics::FullIntrinsicInfo::validateCall(const InstCall *Call,
SizeT &ArgIndex) const {
assert(NumTypes >= 1);
Variable *Result = Call->getDest();
if (Result == nullptr) {
- if (Signature[0] != Ice::IceType_void)
+ if (getReturnType() != IceType_void)
return Intrinsics::BadReturnType;
- } else if (Signature[0] != Result->getType()) {
+ } else if (getReturnType() != Result->getType()) {
return Intrinsics::BadReturnType;
}
- if (Call->getNumArgs() + 1 != NumTypes) {
+ if (Call->getNumArgs() != getNumArgs()) {
return Intrinsics::WrongNumOfArgs;
}
for (size_t i = 1; i < NumTypes; ++i) {
« no previous file with comments | « src/IceIntrinsics.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698