| 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 #if V8_TARGET_ARCH_X87 | 5 #if V8_TARGET_ARCH_X87 |
| 6 | 6 |
| 7 #include "src/crankshaft/x87/lithium-codegen-x87.h" | 7 #include "src/crankshaft/x87/lithium-codegen-x87.h" |
| 8 | 8 |
| 9 #include "src/base/bits.h" | 9 #include "src/base/bits.h" |
| 10 #include "src/code-factory.h" | 10 #include "src/code-factory.h" |
| (...skipping 2434 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2445 return no_condition; | 2445 return no_condition; |
| 2446 } | 2446 } |
| 2447 } | 2447 } |
| 2448 | 2448 |
| 2449 | 2449 |
| 2450 void LCodeGen::DoStringCompareAndBranch(LStringCompareAndBranch* instr) { | 2450 void LCodeGen::DoStringCompareAndBranch(LStringCompareAndBranch* instr) { |
| 2451 DCHECK(ToRegister(instr->context()).is(esi)); | 2451 DCHECK(ToRegister(instr->context()).is(esi)); |
| 2452 DCHECK(ToRegister(instr->left()).is(edx)); | 2452 DCHECK(ToRegister(instr->left()).is(edx)); |
| 2453 DCHECK(ToRegister(instr->right()).is(eax)); | 2453 DCHECK(ToRegister(instr->right()).is(eax)); |
| 2454 | 2454 |
| 2455 Handle<Code> code = CodeFactory::StringCompare(isolate()).code(); | 2455 if (Token::IsOrderedRelationalCompareOp(instr->op())) { |
| 2456 CallCode(code, RelocInfo::CODE_TARGET, instr); | 2456 Handle<Code> code = CodeFactory::StringCompare(isolate()).code(); |
| 2457 __ test(eax, eax); | 2457 CallCode(code, RelocInfo::CODE_TARGET, instr); |
| 2458 __ test(eax, eax); |
| 2459 } else { |
| 2460 Handle<Code> code = CodeFactory::StringEqual(isolate()).code(); |
| 2461 CallCode(code, RelocInfo::CODE_TARGET, instr); |
| 2462 __ CompareRoot(eax, Heap::kTrueValueRootIndex); |
| 2463 } |
| 2458 | 2464 |
| 2459 EmitBranch(instr, ComputeCompareCondition(instr->op())); | 2465 EmitBranch(instr, ComputeCompareCondition(instr->op())); |
| 2460 } | 2466 } |
| 2461 | 2467 |
| 2462 | 2468 |
| 2463 static InstanceType TestType(HHasInstanceTypeAndBranch* instr) { | 2469 static InstanceType TestType(HHasInstanceTypeAndBranch* instr) { |
| 2464 InstanceType from = instr->from(); | 2470 InstanceType from = instr->from(); |
| 2465 InstanceType to = instr->to(); | 2471 InstanceType to = instr->to(); |
| 2466 if (from == FIRST_TYPE) return to; | 2472 if (from == FIRST_TYPE) return to; |
| 2467 DCHECK(from == to || to == LAST_TYPE); | 2473 DCHECK(from == to || to == LAST_TYPE); |
| (...skipping 3292 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5760 __ mov(Operand(ebp, StandardFrameConstants::kContextOffset), context); | 5766 __ mov(Operand(ebp, StandardFrameConstants::kContextOffset), context); |
| 5761 } | 5767 } |
| 5762 | 5768 |
| 5763 | 5769 |
| 5764 #undef __ | 5770 #undef __ |
| 5765 | 5771 |
| 5766 } // namespace internal | 5772 } // namespace internal |
| 5767 } // namespace v8 | 5773 } // namespace v8 |
| 5768 | 5774 |
| 5769 #endif // V8_TARGET_ARCH_X87 | 5775 #endif // V8_TARGET_ARCH_X87 |
| OLD | NEW |