Index: src/ia32/lithium-codegen-ia32.cc |
diff --git a/src/ia32/lithium-codegen-ia32.cc b/src/ia32/lithium-codegen-ia32.cc |
index ab73406a13ec52ba365f343abee71a8abf0d2a9e..061ec9b6d3542b93c029da74ba1d105becb0d769 100644 |
--- a/src/ia32/lithium-codegen-ia32.cc |
+++ b/src/ia32/lithium-codegen-ia32.cc |
@@ -1679,8 +1679,9 @@ void LCodeGen::DoBitI(LBitI* instr) { |
ASSERT(left->IsRegister()); |
if (right->IsConstantOperand()) { |
- int right_operand = ToRepresentation(LConstantOperand::cast(right), |
- instr->hydrogen()->representation()); |
+ int32_t right_operand = |
+ ToRepresentation(LConstantOperand::cast(right), |
+ instr->hydrogen()->representation()); |
switch (instr->op()) { |
case Token::BIT_AND: |
__ and_(ToRegister(left), right_operand); |
@@ -1689,7 +1690,11 @@ void LCodeGen::DoBitI(LBitI* instr) { |
__ or_(ToRegister(left), right_operand); |
break; |
case Token::BIT_XOR: |
- __ xor_(ToRegister(left), right_operand); |
+ if (right_operand == int32_t(~0)) { |
+ __ not_(ToRegister(left)); |
+ } else { |
+ __ xor_(ToRegister(left), right_operand); |
+ } |
break; |
default: |
UNREACHABLE(); |
@@ -1990,13 +1995,6 @@ void LCodeGen::DoSeqStringSetChar(LSeqStringSetChar* instr) { |
} |
-void LCodeGen::DoBitNotI(LBitNotI* instr) { |
- LOperand* input = instr->value(); |
- ASSERT(input->Equals(instr->result())); |
- __ not_(ToRegister(input)); |
-} |
- |
- |
void LCodeGen::DoThrow(LThrow* instr) { |
__ push(ToOperand(instr->value())); |
ASSERT(ToRegister(instr->context()).is(esi)); |