Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4)

Side by Side Diff: src/crankshaft/mips64/lithium-codegen-mips64.cc

Issue 2122953002: [crankshaft] do not restore rsi in stub for deferred number conversions (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: fixing register overlap on arm64 Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/crankshaft/mips/lithium-codegen-mips.cc ('k') | src/crankshaft/ppc/lithium-codegen-ppc.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 4610 matching lines...) Expand 10 before | Expand all | Expand 10 after
4621 4621
4622 // Slow case: Call the runtime system to do the number allocation. 4622 // Slow case: Call the runtime system to do the number allocation.
4623 __ bind(&slow); 4623 __ bind(&slow);
4624 { 4624 {
4625 // TODO(3095996): Put a valid pointer value in the stack slot where the 4625 // TODO(3095996): Put a valid pointer value in the stack slot where the
4626 // result register is stored, as this register is in the pointer map, but 4626 // result register is stored, as this register is in the pointer map, but
4627 // contains an integer value. 4627 // contains an integer value.
4628 __ mov(dst, zero_reg); 4628 __ mov(dst, zero_reg);
4629 // Preserve the value of all registers. 4629 // Preserve the value of all registers.
4630 PushSafepointRegistersScope scope(this); 4630 PushSafepointRegistersScope scope(this);
4631 4631 // Reset the context register.
4632 // NumberTagI and NumberTagD use the context from the frame, rather than 4632 if (!dst.is(cp)) {
4633 // the environment's HContext or HInlinedContext value. 4633 __ mov(cp, zero_reg);
4634 // They only call Runtime::kAllocateHeapNumber. 4634 }
4635 // The corresponding HChange instructions are added in a phase that does
4636 // not have easy access to the local context.
4637 __ ld(cp, MemOperand(fp, StandardFrameConstants::kContextOffset));
4638 __ CallRuntimeSaveDoubles(Runtime::kAllocateHeapNumber); 4635 __ CallRuntimeSaveDoubles(Runtime::kAllocateHeapNumber);
4639 RecordSafepointWithRegisters( 4636 RecordSafepointWithRegisters(
4640 instr->pointer_map(), 0, Safepoint::kNoLazyDeopt); 4637 instr->pointer_map(), 0, Safepoint::kNoLazyDeopt);
4641 __ StoreToSafepointRegisterSlot(v0, dst); 4638 __ StoreToSafepointRegisterSlot(v0, dst);
4642 } 4639 }
4643 4640
4644 // Done. Put the value in dbl_scratch into the value of the allocated heap 4641 // Done. Put the value in dbl_scratch into the value of the allocated heap
4645 // number. 4642 // number.
4646 __ bind(&done); 4643 __ bind(&done);
4647 __ sdc1(dbl_scratch, FieldMemOperand(dst, HeapNumber::kValueOffset)); 4644 __ sdc1(dbl_scratch, FieldMemOperand(dst, HeapNumber::kValueOffset));
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
4680 4677
4681 4678
4682 void LCodeGen::DoDeferredNumberTagD(LNumberTagD* instr) { 4679 void LCodeGen::DoDeferredNumberTagD(LNumberTagD* instr) {
4683 // TODO(3095996): Get rid of this. For now, we need to make the 4680 // TODO(3095996): Get rid of this. For now, we need to make the
4684 // result register contain a valid pointer because it is already 4681 // result register contain a valid pointer because it is already
4685 // contained in the register pointer map. 4682 // contained in the register pointer map.
4686 Register reg = ToRegister(instr->result()); 4683 Register reg = ToRegister(instr->result());
4687 __ mov(reg, zero_reg); 4684 __ mov(reg, zero_reg);
4688 4685
4689 PushSafepointRegistersScope scope(this); 4686 PushSafepointRegistersScope scope(this);
4690 // NumberTagI and NumberTagD use the context from the frame, rather than 4687 // Reset the context register.
4691 // the environment's HContext or HInlinedContext value. 4688 if (!reg.is(cp)) {
4692 // They only call Runtime::kAllocateHeapNumber. 4689 __ mov(cp, zero_reg);
4693 // The corresponding HChange instructions are added in a phase that does 4690 }
4694 // not have easy access to the local context.
4695 __ ld(cp, MemOperand(fp, StandardFrameConstants::kContextOffset));
4696 __ CallRuntimeSaveDoubles(Runtime::kAllocateHeapNumber); 4691 __ CallRuntimeSaveDoubles(Runtime::kAllocateHeapNumber);
4697 RecordSafepointWithRegisters( 4692 RecordSafepointWithRegisters(
4698 instr->pointer_map(), 0, Safepoint::kNoLazyDeopt); 4693 instr->pointer_map(), 0, Safepoint::kNoLazyDeopt);
4699 __ StoreToSafepointRegisterSlot(v0, reg); 4694 __ StoreToSafepointRegisterSlot(v0, reg);
4700 } 4695 }
4701 4696
4702 4697
4703 void LCodeGen::DoSmiTag(LSmiTag* instr) { 4698 void LCodeGen::DoSmiTag(LSmiTag* instr) {
4704 HChange* hchange = instr->hydrogen(); 4699 HChange* hchange = instr->hydrogen();
4705 Register input = ToRegister(instr->value()); 4700 Register input = ToRegister(instr->value());
(...skipping 1030 matching lines...) Expand 10 before | Expand all | Expand 10 after
5736 __ ld(result, FieldMemOperand(scratch, 5731 __ ld(result, FieldMemOperand(scratch,
5737 FixedArray::kHeaderSize - kPointerSize)); 5732 FixedArray::kHeaderSize - kPointerSize));
5738 __ bind(deferred->exit()); 5733 __ bind(deferred->exit());
5739 __ bind(&done); 5734 __ bind(&done);
5740 } 5735 }
5741 5736
5742 #undef __ 5737 #undef __
5743 5738
5744 } // namespace internal 5739 } // namespace internal
5745 } // namespace v8 5740 } // namespace v8
OLDNEW
« no previous file with comments | « src/crankshaft/mips/lithium-codegen-mips.cc ('k') | src/crankshaft/ppc/lithium-codegen-ppc.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698