Index: src/x64/lithium-x64.cc |
=================================================================== |
--- src/x64/lithium-x64.cc (revision 9842) |
+++ src/x64/lithium-x64.cc (working copy) |
@@ -815,28 +815,6 @@ |
} |
-LInstruction* LChunkBuilder::DoBit(Token::Value op, |
- HBitwiseBinaryOperation* instr) { |
- if (instr->representation().IsInteger32()) { |
- ASSERT(instr->left()->representation().IsInteger32()); |
- ASSERT(instr->right()->representation().IsInteger32()); |
- |
- LOperand* left = UseRegisterAtStart(instr->LeastConstantOperand()); |
- LOperand* right = UseOrConstantAtStart(instr->MostConstantOperand()); |
- return DefineSameAsFirst(new LBitI(op, left, right)); |
- } else { |
- ASSERT(instr->representation().IsTagged()); |
- ASSERT(instr->left()->representation().IsTagged()); |
- ASSERT(instr->right()->representation().IsTagged()); |
- |
- LOperand* left = UseFixed(instr->left(), rdx); |
- LOperand* right = UseFixed(instr->right(), rax); |
- LArithmeticT* result = new LArithmeticT(op, left, right); |
- return MarkAsCall(DefineFixed(result, rax), instr); |
- } |
-} |
- |
- |
LInstruction* LChunkBuilder::DoShift(Token::Value op, |
HBitwiseBinaryOperation* instr) { |
if (instr->representation().IsTagged()) { |
@@ -1239,8 +1217,24 @@ |
} |
-LInstruction* LChunkBuilder::DoBitAnd(HBitAnd* instr) { |
- return DoBit(Token::BIT_AND, instr); |
+LInstruction* LChunkBuilder::DoBitwise(HBitwise* instr) { |
+ if (instr->representation().IsInteger32()) { |
+ ASSERT(instr->left()->representation().IsInteger32()); |
+ ASSERT(instr->right()->representation().IsInteger32()); |
+ |
+ LOperand* left = UseRegisterAtStart(instr->LeastConstantOperand()); |
+ LOperand* right = UseOrConstantAtStart(instr->MostConstantOperand()); |
+ return DefineSameAsFirst(new LBitI(left, right)); |
+ } else { |
+ ASSERT(instr->representation().IsTagged()); |
+ ASSERT(instr->left()->representation().IsTagged()); |
+ ASSERT(instr->right()->representation().IsTagged()); |
+ |
+ LOperand* left = UseFixed(instr->left(), rdx); |
+ LOperand* right = UseFixed(instr->right(), rax); |
+ LArithmeticT* result = new LArithmeticT(instr->op(), left, right); |
+ return MarkAsCall(DefineFixed(result, rax), instr); |
+ } |
} |
@@ -1253,16 +1247,6 @@ |
} |
-LInstruction* LChunkBuilder::DoBitOr(HBitOr* instr) { |
- return DoBit(Token::BIT_OR, instr); |
-} |
- |
- |
-LInstruction* LChunkBuilder::DoBitXor(HBitXor* instr) { |
- return DoBit(Token::BIT_XOR, instr); |
-} |
- |
- |
LInstruction* LChunkBuilder::DoDiv(HDiv* instr) { |
if (instr->representation().IsDouble()) { |
return DoArithmeticD(Token::DIV, instr); |