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

Unified Diff: src/compiler/machine-node-factory.h

Issue 436593002: [turbofan] Add Int32AddWithOverflow machine operator. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Add more tests. Created 6 years, 5 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/compiler/instruction-selector-impl.h ('k') | src/compiler/machine-operator.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/machine-node-factory.h
diff --git a/src/compiler/machine-node-factory.h b/src/compiler/machine-node-factory.h
index b0e153181feb8d143c2e6341b54dc6319c7c54f1..94d23f01b70826e2eb2fbd164acf751f85557a3b 100644
--- a/src/compiler/machine-node-factory.h
+++ b/src/compiler/machine-node-factory.h
@@ -195,6 +195,12 @@ class MachineNodeFactory {
Node* Int32Add(Node* a, Node* b) {
return NEW_NODE_2(MACHINE()->Int32Add(), a, b);
}
+ void Int32AddWithOverflow(Node* a, Node* b, Node** val_return,
+ Node** ovf_return) {
+ Node* add = NEW_NODE_2(MACHINE()->Int32AddWithOverflow(), a, b);
+ if (val_return) *val_return = NEW_NODE_1(COMMON()->Projection(0), add);
+ if (ovf_return) *ovf_return = NEW_NODE_1(COMMON()->Projection(1), add);
+ }
Node* Int32Sub(Node* a, Node* b) {
return NEW_NODE_2(MACHINE()->Int32Sub(), a, b);
}
« no previous file with comments | « src/compiler/instruction-selector-impl.h ('k') | src/compiler/machine-operator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698