OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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_X64 | 5 #if V8_TARGET_ARCH_X64 |
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/cpu-profiler.h" | 10 #include "src/cpu-profiler.h" |
(...skipping 981 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
992 case CodeStub::RegExpExec: { | 992 case CodeStub::RegExpExec: { |
993 RegExpExecStub stub(isolate()); | 993 RegExpExecStub stub(isolate()); |
994 CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr); | 994 CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr); |
995 break; | 995 break; |
996 } | 996 } |
997 case CodeStub::SubString: { | 997 case CodeStub::SubString: { |
998 SubStringStub stub(isolate()); | 998 SubStringStub stub(isolate()); |
999 CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr); | 999 CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr); |
1000 break; | 1000 break; |
1001 } | 1001 } |
1002 case CodeStub::StringCompare: { | |
1003 StringCompareStub stub(isolate()); | |
1004 CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr); | |
1005 break; | |
1006 } | |
1007 default: | 1002 default: |
1008 UNREACHABLE(); | 1003 UNREACHABLE(); |
1009 } | 1004 } |
1010 } | 1005 } |
1011 | 1006 |
1012 | 1007 |
1013 void LCodeGen::DoUnknownOSRValue(LUnknownOSRValue* instr) { | 1008 void LCodeGen::DoUnknownOSRValue(LUnknownOSRValue* instr) { |
1014 GenerateOsrPrologue(); | 1009 GenerateOsrPrologue(); |
1015 } | 1010 } |
1016 | 1011 |
(...skipping 1467 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2484 } | 2479 } |
2485 __ movp(temp, FieldOperand(input, HeapObject::kMapOffset)); | 2480 __ movp(temp, FieldOperand(input, HeapObject::kMapOffset)); |
2486 __ testb(FieldOperand(temp, Map::kBitFieldOffset), | 2481 __ testb(FieldOperand(temp, Map::kBitFieldOffset), |
2487 Immediate(1 << Map::kIsUndetectable)); | 2482 Immediate(1 << Map::kIsUndetectable)); |
2488 EmitBranch(instr, not_zero); | 2483 EmitBranch(instr, not_zero); |
2489 } | 2484 } |
2490 | 2485 |
2491 | 2486 |
2492 void LCodeGen::DoStringCompareAndBranch(LStringCompareAndBranch* instr) { | 2487 void LCodeGen::DoStringCompareAndBranch(LStringCompareAndBranch* instr) { |
2493 DCHECK(ToRegister(instr->context()).is(rsi)); | 2488 DCHECK(ToRegister(instr->context()).is(rsi)); |
2494 Token::Value op = instr->op(); | 2489 DCHECK(ToRegister(instr->left()).is(rdx)); |
| 2490 DCHECK(ToRegister(instr->right()).is(rax)); |
2495 | 2491 |
2496 Handle<Code> ic = | 2492 Handle<Code> code = CodeFactory::StringCompare(isolate()).code(); |
2497 CodeFactory::CompareIC(isolate(), op, Strength::WEAK).code(); | 2493 CallCode(code, RelocInfo::CODE_TARGET, instr); |
2498 CallCode(ic, RelocInfo::CODE_TARGET, instr); | |
2499 | |
2500 Condition condition = TokenToCondition(op, false); | |
2501 __ testp(rax, rax); | 2494 __ testp(rax, rax); |
2502 | 2495 |
2503 EmitBranch(instr, condition); | 2496 EmitBranch(instr, TokenToCondition(instr->op(), false)); |
2504 } | 2497 } |
2505 | 2498 |
2506 | 2499 |
2507 static InstanceType TestType(HHasInstanceTypeAndBranch* instr) { | 2500 static InstanceType TestType(HHasInstanceTypeAndBranch* instr) { |
2508 InstanceType from = instr->from(); | 2501 InstanceType from = instr->from(); |
2509 InstanceType to = instr->to(); | 2502 InstanceType to = instr->to(); |
2510 if (from == FIRST_TYPE) return to; | 2503 if (from == FIRST_TYPE) return to; |
2511 DCHECK(from == to || to == LAST_TYPE); | 2504 DCHECK(from == to || to == LAST_TYPE); |
2512 return from; | 2505 return from; |
2513 } | 2506 } |
(...skipping 3407 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5921 RecordSafepoint(Safepoint::kNoLazyDeopt); | 5914 RecordSafepoint(Safepoint::kNoLazyDeopt); |
5922 } | 5915 } |
5923 | 5916 |
5924 | 5917 |
5925 #undef __ | 5918 #undef __ |
5926 | 5919 |
5927 } // namespace internal | 5920 } // namespace internal |
5928 } // namespace v8 | 5921 } // namespace v8 |
5929 | 5922 |
5930 #endif // V8_TARGET_ARCH_X64 | 5923 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |