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/crankshaft/mips64/lithium-codegen-mips64.h" | 5 #include "src/crankshaft/mips64/lithium-codegen-mips64.h" |
6 | 6 |
7 #include "src/code-factory.h" | 7 #include "src/code-factory.h" |
8 #include "src/code-stubs.h" | 8 #include "src/code-stubs.h" |
9 #include "src/crankshaft/hydrogen-osr.h" | 9 #include "src/crankshaft/hydrogen-osr.h" |
10 #include "src/crankshaft/mips64/lithium-gap-resolver-mips64.h" | 10 #include "src/crankshaft/mips64/lithium-gap-resolver-mips64.h" |
(...skipping 2374 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2385 return kNoCondition; | 2385 return kNoCondition; |
2386 } | 2386 } |
2387 } | 2387 } |
2388 | 2388 |
2389 | 2389 |
2390 void LCodeGen::DoStringCompareAndBranch(LStringCompareAndBranch* instr) { | 2390 void LCodeGen::DoStringCompareAndBranch(LStringCompareAndBranch* instr) { |
2391 DCHECK(ToRegister(instr->context()).is(cp)); | 2391 DCHECK(ToRegister(instr->context()).is(cp)); |
2392 DCHECK(ToRegister(instr->left()).is(a1)); | 2392 DCHECK(ToRegister(instr->left()).is(a1)); |
2393 DCHECK(ToRegister(instr->right()).is(a0)); | 2393 DCHECK(ToRegister(instr->right()).is(a0)); |
2394 | 2394 |
2395 if (Token::IsOrderedRelationalCompareOp(instr->op())) { | 2395 Handle<Code> code = CodeFactory::StringCompare(isolate(), instr->op()).code(); |
2396 Handle<Code> code = CodeFactory::StringCompare(isolate()).code(); | 2396 CallCode(code, RelocInfo::CODE_TARGET, instr); |
2397 CallCode(code, RelocInfo::CODE_TARGET, instr); | 2397 __ LoadRoot(at, Heap::kTrueValueRootIndex); |
2398 | 2398 EmitBranch(instr, eq, v0, Operand(at)); |
2399 EmitBranch(instr, ComputeCompareCondition(instr->op()), v0, | |
2400 Operand(zero_reg)); | |
2401 } else { | |
2402 Handle<Code> code = CodeFactory::StringEqual(isolate()).code(); | |
2403 CallCode(code, RelocInfo::CODE_TARGET, instr); | |
2404 __ LoadRoot(at, Heap::kTrueValueRootIndex); | |
2405 | |
2406 EmitBranch(instr, ComputeCompareCondition(instr->op()), v0, Operand(at)); | |
2407 } | |
2408 } | 2399 } |
2409 | 2400 |
2410 | 2401 |
2411 static InstanceType TestType(HHasInstanceTypeAndBranch* instr) { | 2402 static InstanceType TestType(HHasInstanceTypeAndBranch* instr) { |
2412 InstanceType from = instr->from(); | 2403 InstanceType from = instr->from(); |
2413 InstanceType to = instr->to(); | 2404 InstanceType to = instr->to(); |
2414 if (from == FIRST_TYPE) return to; | 2405 if (from == FIRST_TYPE) return to; |
2415 DCHECK(from == to || to == LAST_TYPE); | 2406 DCHECK(from == to || to == LAST_TYPE); |
2416 return from; | 2407 return from; |
2417 } | 2408 } |
(...skipping 3283 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5701 void LCodeGen::DoStoreFrameContext(LStoreFrameContext* instr) { | 5692 void LCodeGen::DoStoreFrameContext(LStoreFrameContext* instr) { |
5702 Register context = ToRegister(instr->context()); | 5693 Register context = ToRegister(instr->context()); |
5703 __ sd(context, MemOperand(fp, StandardFrameConstants::kContextOffset)); | 5694 __ sd(context, MemOperand(fp, StandardFrameConstants::kContextOffset)); |
5704 } | 5695 } |
5705 | 5696 |
5706 | 5697 |
5707 #undef __ | 5698 #undef __ |
5708 | 5699 |
5709 } // namespace internal | 5700 } // namespace internal |
5710 } // namespace v8 | 5701 } // namespace v8 |
OLD | NEW |