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 #include "src/v8.h" | 5 #include "src/v8.h" |
6 | 6 |
7 #include "src/arm64/lithium-codegen-arm64.h" | 7 #include "src/arm64/lithium-codegen-arm64.h" |
8 #include "src/arm64/lithium-gap-resolver-arm64.h" | 8 #include "src/arm64/lithium-gap-resolver-arm64.h" |
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 2536 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2547 } | 2547 } |
2548 | 2548 |
2549 | 2549 |
2550 void LCodeGen::DoCmpT(LCmpT* instr) { | 2550 void LCodeGen::DoCmpT(LCmpT* instr) { |
2551 DCHECK(ToRegister(instr->context()).is(cp)); | 2551 DCHECK(ToRegister(instr->context()).is(cp)); |
2552 Token::Value op = instr->op(); | 2552 Token::Value op = instr->op(); |
2553 Condition cond = TokenToCondition(op, false); | 2553 Condition cond = TokenToCondition(op, false); |
2554 | 2554 |
2555 DCHECK(ToRegister(instr->left()).Is(x1)); | 2555 DCHECK(ToRegister(instr->left()).Is(x1)); |
2556 DCHECK(ToRegister(instr->right()).Is(x0)); | 2556 DCHECK(ToRegister(instr->right()).Is(x0)); |
2557 Handle<Code> ic = CodeFactory::CompareIC(isolate(), op).code(); | 2557 Handle<Code> ic = |
| 2558 CodeFactory::CompareIC(isolate(), op, instr->language_mode()).code(); |
2558 CallCode(ic, RelocInfo::CODE_TARGET, instr); | 2559 CallCode(ic, RelocInfo::CODE_TARGET, instr); |
2559 // Signal that we don't inline smi code before this stub. | 2560 // Signal that we don't inline smi code before this stub. |
2560 InlineSmiCheckInfo::EmitNotInlined(masm()); | 2561 InlineSmiCheckInfo::EmitNotInlined(masm()); |
2561 | 2562 |
2562 // Return true or false depending on CompareIC result. | 2563 // Return true or false depending on CompareIC result. |
2563 // This instruction is marked as call. We can clobber any register. | 2564 // This instruction is marked as call. We can clobber any register. |
2564 DCHECK(instr->IsMarkedAsCall()); | 2565 DCHECK(instr->IsMarkedAsCall()); |
2565 __ LoadTrueFalseRoots(x1, x2); | 2566 __ LoadTrueFalseRoots(x1, x2); |
2566 __ Cmp(x0, 0); | 2567 __ Cmp(x0, 0); |
2567 __ Csel(ToRegister(instr->result()), x1, x2, cond); | 2568 __ Csel(ToRegister(instr->result()), x1, x2, cond); |
(...skipping 2974 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5542 __ SmiTagAndPush(char_code); | 5543 __ SmiTagAndPush(char_code); |
5543 CallRuntimeFromDeferred(Runtime::kCharFromCode, 1, instr, instr->context()); | 5544 CallRuntimeFromDeferred(Runtime::kCharFromCode, 1, instr, instr->context()); |
5544 __ StoreToSafepointRegisterSlot(x0, result); | 5545 __ StoreToSafepointRegisterSlot(x0, result); |
5545 } | 5546 } |
5546 | 5547 |
5547 | 5548 |
5548 void LCodeGen::DoStringCompareAndBranch(LStringCompareAndBranch* instr) { | 5549 void LCodeGen::DoStringCompareAndBranch(LStringCompareAndBranch* instr) { |
5549 DCHECK(ToRegister(instr->context()).is(cp)); | 5550 DCHECK(ToRegister(instr->context()).is(cp)); |
5550 Token::Value op = instr->op(); | 5551 Token::Value op = instr->op(); |
5551 | 5552 |
5552 Handle<Code> ic = CodeFactory::CompareIC(isolate(), op).code(); | 5553 Handle<Code> ic = CodeFactory::CompareIC(isolate(), op, SLOPPY).code(); |
5553 CallCode(ic, RelocInfo::CODE_TARGET, instr); | 5554 CallCode(ic, RelocInfo::CODE_TARGET, instr); |
5554 InlineSmiCheckInfo::EmitNotInlined(masm()); | 5555 InlineSmiCheckInfo::EmitNotInlined(masm()); |
5555 | 5556 |
5556 Condition condition = TokenToCondition(op, false); | 5557 Condition condition = TokenToCondition(op, false); |
5557 | 5558 |
5558 EmitCompareAndBranch(instr, condition, x0, 0); | 5559 EmitCompareAndBranch(instr, condition, x0, 0); |
5559 } | 5560 } |
5560 | 5561 |
5561 | 5562 |
5562 void LCodeGen::DoSubI(LSubI* instr) { | 5563 void LCodeGen::DoSubI(LSubI* instr) { |
(...skipping 487 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6050 Handle<ScopeInfo> scope_info = instr->scope_info(); | 6051 Handle<ScopeInfo> scope_info = instr->scope_info(); |
6051 __ Push(scope_info); | 6052 __ Push(scope_info); |
6052 __ Push(ToRegister(instr->function())); | 6053 __ Push(ToRegister(instr->function())); |
6053 CallRuntime(Runtime::kPushBlockContext, 2, instr); | 6054 CallRuntime(Runtime::kPushBlockContext, 2, instr); |
6054 RecordSafepoint(Safepoint::kNoLazyDeopt); | 6055 RecordSafepoint(Safepoint::kNoLazyDeopt); |
6055 } | 6056 } |
6056 | 6057 |
6057 | 6058 |
6058 | 6059 |
6059 } } // namespace v8::internal | 6060 } } // namespace v8::internal |
OLD | NEW |