| 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/base/bits.h" | 7 #include "src/base/bits.h" |
| 8 #include "src/code-factory.h" | 8 #include "src/code-factory.h" |
| 9 #include "src/code-stubs.h" | 9 #include "src/code-stubs.h" |
| 10 #include "src/codegen.h" | 10 #include "src/codegen.h" |
| (...skipping 1354 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1365 case CodeStub::RegExpExec: { | 1365 case CodeStub::RegExpExec: { |
| 1366 RegExpExecStub stub(isolate()); | 1366 RegExpExecStub stub(isolate()); |
| 1367 CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr); | 1367 CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr); |
| 1368 break; | 1368 break; |
| 1369 } | 1369 } |
| 1370 case CodeStub::SubString: { | 1370 case CodeStub::SubString: { |
| 1371 SubStringStub stub(isolate()); | 1371 SubStringStub stub(isolate()); |
| 1372 CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr); | 1372 CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr); |
| 1373 break; | 1373 break; |
| 1374 } | 1374 } |
| 1375 case CodeStub::StringCompare: { | |
| 1376 StringCompareStub stub(isolate()); | |
| 1377 CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr); | |
| 1378 break; | |
| 1379 } | |
| 1380 default: | 1375 default: |
| 1381 UNREACHABLE(); | 1376 UNREACHABLE(); |
| 1382 } | 1377 } |
| 1383 } | 1378 } |
| 1384 | 1379 |
| 1385 | 1380 |
| 1386 void LCodeGen::DoUnknownOSRValue(LUnknownOSRValue* instr) { | 1381 void LCodeGen::DoUnknownOSRValue(LUnknownOSRValue* instr) { |
| 1387 GenerateOsrPrologue(); | 1382 GenerateOsrPrologue(); |
| 1388 } | 1383 } |
| 1389 | 1384 |
| (...skipping 1327 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2717 case Token::GTE: | 2712 case Token::GTE: |
| 2718 return greater_equal; | 2713 return greater_equal; |
| 2719 default: | 2714 default: |
| 2720 UNREACHABLE(); | 2715 UNREACHABLE(); |
| 2721 return no_condition; | 2716 return no_condition; |
| 2722 } | 2717 } |
| 2723 } | 2718 } |
| 2724 | 2719 |
| 2725 | 2720 |
| 2726 void LCodeGen::DoStringCompareAndBranch(LStringCompareAndBranch* instr) { | 2721 void LCodeGen::DoStringCompareAndBranch(LStringCompareAndBranch* instr) { |
| 2727 Token::Value op = instr->op(); | 2722 DCHECK(ToRegister(instr->context()).is(esi)); |
| 2723 DCHECK(ToRegister(instr->left()).is(edx)); |
| 2724 DCHECK(ToRegister(instr->right()).is(eax)); |
| 2728 | 2725 |
| 2729 Handle<Code> ic = | 2726 Handle<Code> code = CodeFactory::StringCompare(isolate()).code(); |
| 2730 CodeFactory::CompareIC(isolate(), op, Strength::WEAK).code(); | 2727 CallCode(code, RelocInfo::CODE_TARGET, instr); |
| 2731 CallCode(ic, RelocInfo::CODE_TARGET, instr); | 2728 __ test(eax, eax); |
| 2732 | 2729 |
| 2733 Condition condition = ComputeCompareCondition(op); | 2730 EmitBranch(instr, ComputeCompareCondition(instr->op())); |
| 2734 __ test(eax, Operand(eax)); | |
| 2735 | |
| 2736 EmitBranch(instr, condition); | |
| 2737 } | 2731 } |
| 2738 | 2732 |
| 2739 | 2733 |
| 2740 static InstanceType TestType(HHasInstanceTypeAndBranch* instr) { | 2734 static InstanceType TestType(HHasInstanceTypeAndBranch* instr) { |
| 2741 InstanceType from = instr->from(); | 2735 InstanceType from = instr->from(); |
| 2742 InstanceType to = instr->to(); | 2736 InstanceType to = instr->to(); |
| 2743 if (from == FIRST_TYPE) return to; | 2737 if (from == FIRST_TYPE) return to; |
| 2744 DCHECK(from == to || to == LAST_TYPE); | 2738 DCHECK(from == to || to == LAST_TYPE); |
| 2745 return from; | 2739 return from; |
| 2746 } | 2740 } |
| (...skipping 3597 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6344 RecordSafepoint(Safepoint::kNoLazyDeopt); | 6338 RecordSafepoint(Safepoint::kNoLazyDeopt); |
| 6345 } | 6339 } |
| 6346 | 6340 |
| 6347 | 6341 |
| 6348 #undef __ | 6342 #undef __ |
| 6349 | 6343 |
| 6350 } // namespace internal | 6344 } // namespace internal |
| 6351 } // namespace v8 | 6345 } // namespace v8 |
| 6352 | 6346 |
| 6353 #endif // V8_TARGET_ARCH_X87 | 6347 #endif // V8_TARGET_ARCH_X87 |
| OLD | NEW |