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

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

Issue 469743002: [turbofan] Refactor the InstructionSelector tests. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: ARM64 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/arm/instruction-selector-arm.cc ('k') | test/cctest/cctest.gyp » ('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 faee93ebb2660daf81588a3964dc3a6c51e21587..721b1ff75dd2d283778030d5e72c170293e41daa 100644
--- a/src/compiler/machine-node-factory.h
+++ b/src/compiler/machine-node-factory.h
@@ -118,6 +118,13 @@ class MachineNodeFactory {
Node* WordSar(Node* a, Node* b) {
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);
+ }
+ }
Node* WordEqual(Node* a, Node* b) {
return NEW_NODE_2(MACHINE()->WordEqual(), a, b);
}
@@ -157,6 +164,10 @@ class MachineNodeFactory {
Node* Word32Sar(Node* a, Node* b) {
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));
+ }
Node* Word32Equal(Node* a, Node* b) {
return NEW_NODE_2(MACHINE()->Word32Equal(), a, b);
}
@@ -184,6 +195,10 @@ class MachineNodeFactory {
Node* Word64Sar(Node* a, Node* b) {
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));
+ }
Node* Word64Equal(Node* a, Node* b) {
return NEW_NODE_2(MACHINE()->Word64Equal(), a, b);
}
« no previous file with comments | « src/compiler/arm/instruction-selector-arm.cc ('k') | test/cctest/cctest.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698