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

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

Issue 469213002: [turbofan] Introduce WordRor machine operator. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fix BUILD.gn Created 6 years, 4 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.cc ('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 721b1ff75dd2d283778030d5e72c170293e41daa..cc9d5d903596c472feb0841c756f224817f4600d 100644
--- a/src/compiler/machine-node-factory.h
+++ b/src/compiler/machine-node-factory.h
@@ -119,11 +119,7 @@ class MachineNodeFactory {
return NEW_NODE_2(MACHINE()->WordSar(), a, b);
}
Node* WordRor(Node* a, Node* b) {
- if (MACHINE()->is32()) {
- return Word32Ror(a, b);
- } else {
- return Word64Ror(a, b);
- }
+ return NEW_NODE_2(MACHINE()->WordRor(), a, b);
}
Node* WordEqual(Node* a, Node* b) {
return NEW_NODE_2(MACHINE()->WordEqual(), a, b);
@@ -165,8 +161,7 @@ class MachineNodeFactory {
return NEW_NODE_2(MACHINE()->Word32Sar(), a, b);
}
Node* Word32Ror(Node* a, Node* b) {
- return Word32Or(Word32Shl(a, Int32Sub(Int32Constant(32), b)),
- Word32Shr(a, b));
+ return NEW_NODE_2(MACHINE()->Word32Ror(), a, b);
}
Node* Word32Equal(Node* a, Node* b) {
return NEW_NODE_2(MACHINE()->Word32Equal(), a, b);
@@ -196,8 +191,7 @@ class MachineNodeFactory {
return NEW_NODE_2(MACHINE()->Word64Sar(), a, b);
}
Node* Word64Ror(Node* a, Node* b) {
- return Word64Or(Word64Shl(a, Int64Sub(Int64Constant(64), b)),
- Word64Shr(a, b));
+ return NEW_NODE_2(MACHINE()->Word64Ror(), a, b);
}
Node* Word64Equal(Node* a, Node* b) {
return NEW_NODE_2(MACHINE()->Word64Equal(), a, b);
« no previous file with comments | « src/compiler/instruction-selector.cc ('k') | src/compiler/machine-operator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698