Index: src/compiler/x64/instruction-selector-x64.cc |
diff --git a/src/compiler/x64/instruction-selector-x64.cc b/src/compiler/x64/instruction-selector-x64.cc |
index 8f52606691b7c75e153a6bfc3f6f488fac9b1845..697c8b2fc4d2a2a85221c42a82ce7c69ba4d98a4 100644 |
--- a/src/compiler/x64/instruction-selector-x64.cc |
+++ b/src/compiler/x64/instruction-selector-x64.cc |
@@ -21,8 +21,6 @@ class X64OperandGenerator FINAL : public OperandGenerator { |
Register::ToAllocationIndex(reg)); |
} |
- InstructionOperand* UseImmediate64(Node* node) { return UseImmediate(node); } |
- |
bool CanBeImmediate(Node* node) { |
switch (node->opcode()) { |
case IrOpcode::kInt32Constant: |
@@ -32,23 +30,6 @@ class X64OperandGenerator FINAL : public OperandGenerator { |
} |
} |
- bool CanBeImmediate64(Node* node) { |
- switch (node->opcode()) { |
- case IrOpcode::kInt32Constant: |
- return true; |
- case IrOpcode::kNumberConstant: |
- return true; |
- case IrOpcode::kHeapConstant: { |
- // Constants in new space cannot be used as immediates in V8 because |
- // the GC does not scan code objects when collecting the new generation. |
- Unique<HeapObject> value = OpParameter<Unique<HeapObject> >(node); |
- return !isolate()->heap()->InNewSpace(*value.handle()); |
- } |
- default: |
- return false; |
- } |
- } |
- |
bool CanBeBetterLeftOperand(Node* node) const { |
return !selector()->IsLive(node); |
} |
@@ -352,7 +333,7 @@ static void VisitWord32Shift(InstructionSelector* selector, Node* node, |
// TODO(turbofan): assembler only supports some addressing modes for shifts. |
if (g.CanBeImmediate(right)) { |
- selector->Emit(opcode, g.DefineSameAsFirst(node), g.UseRegister(left), |
+ selector->Emit(opcode, g.DefineSameAsFirst(node), g.Use(left), |
g.UseImmediate(right)); |
} else { |
Int32BinopMatcher m(node); |
@@ -362,7 +343,7 @@ static void VisitWord32Shift(InstructionSelector* selector, Node* node, |
right = mright.left().node(); |
} |
} |
- selector->Emit(opcode, g.DefineSameAsFirst(node), g.UseRegister(left), |
+ selector->Emit(opcode, g.DefineSameAsFirst(node), g.Use(left), |
g.UseFixed(right, rcx)); |
} |
} |
@@ -378,7 +359,7 @@ static void VisitWord64Shift(InstructionSelector* selector, Node* node, |
// TODO(turbofan): assembler only supports some addressing modes for shifts. |
if (g.CanBeImmediate(right)) { |
- selector->Emit(opcode, g.DefineSameAsFirst(node), g.UseRegister(left), |
+ selector->Emit(opcode, g.DefineSameAsFirst(node), g.Use(left), |
g.UseImmediate(right)); |
} else { |
Int64BinopMatcher m(node); |
@@ -388,7 +369,7 @@ static void VisitWord64Shift(InstructionSelector* selector, Node* node, |
right = mright.left().node(); |
} |
} |
- selector->Emit(opcode, g.DefineSameAsFirst(node), g.UseRegister(left), |
+ selector->Emit(opcode, g.DefineSameAsFirst(node), g.Use(left), |
g.UseFixed(right, rcx)); |
} |
} |