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

Unified Diff: src/PNaClTranslator.cpp

Issue 1831043002: Fix Subzero binary instruction to allow optional flags argument. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Fix nits. Created 4 years, 9 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 | « no previous file | tests_lit/reader_tests/Inputs/binop-newform.tbc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/PNaClTranslator.cpp
diff --git a/src/PNaClTranslator.cpp b/src/PNaClTranslator.cpp
index caa0c57c6a05052f1d2926d63039102baba66301..27260c39766cec45d3265df5ba9407ceea7cde90 100644
--- a/src/PNaClTranslator.cpp
+++ b/src/PNaClTranslator.cpp
@@ -2198,8 +2198,12 @@ void FunctionParser::ProcessRecord() {
return;
}
case naclbitc::FUNC_CODE_INST_BINOP: {
- // BINOP: [opval, opval, opcode]
- if (!isValidRecordSize(3, "binop"))
+ // Note: Old bitcode files may have an additional 'flags' operand, which is
+ // ignored.
+
+ // BINOP: [opval, opval, opcode, [flags]]
+
+ if (!isValidRecordSizeInRange(3, 4, "binop"))
return;
Ice::Operand *Op1 = getRelativeOperand(Values[0], BaseIndex);
Ice::Operand *Op2 = getRelativeOperand(Values[1], BaseIndex);
« no previous file with comments | « no previous file | tests_lit/reader_tests/Inputs/binop-newform.tbc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698