OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "src/v8.h" | 5 #include "src/v8.h" |
6 | 6 |
7 #if V8_TARGET_ARCH_X87 | 7 #if V8_TARGET_ARCH_X87 |
8 | 8 |
9 #include "src/x87/lithium-codegen-x87.h" | 9 #include "src/x87/lithium-codegen-x87.h" |
10 #include "src/ic.h" | 10 #include "src/ic.h" |
(...skipping 2362 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2373 UNREACHABLE(); | 2373 UNREACHABLE(); |
2374 } | 2374 } |
2375 return cond; | 2375 return cond; |
2376 } | 2376 } |
2377 | 2377 |
2378 | 2378 |
2379 void LCodeGen::DoCompareNumericAndBranch(LCompareNumericAndBranch* instr) { | 2379 void LCodeGen::DoCompareNumericAndBranch(LCompareNumericAndBranch* instr) { |
2380 LOperand* left = instr->left(); | 2380 LOperand* left = instr->left(); |
2381 LOperand* right = instr->right(); | 2381 LOperand* right = instr->right(); |
2382 bool is_unsigned = | 2382 bool is_unsigned = |
2383 instr->is_double() || instr->hydrogen()->CheckFlag(HInstruction::kUint32); | 2383 instr->is_double() || |
| 2384 instr->hydrogen()->left()->CheckFlag(HInstruction::kUint32) || |
| 2385 instr->hydrogen()->right()->CheckFlag(HInstruction::kUint32); |
2384 Condition cc = TokenToCondition(instr->op(), is_unsigned); | 2386 Condition cc = TokenToCondition(instr->op(), is_unsigned); |
2385 | 2387 |
2386 if (left->IsConstantOperand() && right->IsConstantOperand()) { | 2388 if (left->IsConstantOperand() && right->IsConstantOperand()) { |
2387 // We can statically evaluate the comparison. | 2389 // We can statically evaluate the comparison. |
2388 double left_val = ToDouble(LConstantOperand::cast(left)); | 2390 double left_val = ToDouble(LConstantOperand::cast(left)); |
2389 double right_val = ToDouble(LConstantOperand::cast(right)); | 2391 double right_val = ToDouble(LConstantOperand::cast(right)); |
2390 int next_block = EvalComparison(instr->op(), left_val, right_val) ? | 2392 int next_block = EvalComparison(instr->op(), left_val, right_val) ? |
2391 instr->TrueDestination(chunk_) : instr->FalseDestination(chunk_); | 2393 instr->TrueDestination(chunk_) : instr->FalseDestination(chunk_); |
2392 EmitGoto(next_block); | 2394 EmitGoto(next_block); |
2393 } else { | 2395 } else { |
(...skipping 3299 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5693 CallRuntime(Runtime::kHiddenPushBlockContext, 2, instr); | 5695 CallRuntime(Runtime::kHiddenPushBlockContext, 2, instr); |
5694 RecordSafepoint(Safepoint::kNoLazyDeopt); | 5696 RecordSafepoint(Safepoint::kNoLazyDeopt); |
5695 } | 5697 } |
5696 | 5698 |
5697 | 5699 |
5698 #undef __ | 5700 #undef __ |
5699 | 5701 |
5700 } } // namespace v8::internal | 5702 } } // namespace v8::internal |
5701 | 5703 |
5702 #endif // V8_TARGET_ARCH_X87 | 5704 #endif // V8_TARGET_ARCH_X87 |
OLD | NEW |