| 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 "v8.h" | 5 #include "v8.h" |
| 6 | 6 |
| 7 #if V8_TARGET_ARCH_MIPS | 7 #if V8_TARGET_ARCH_MIPS |
| 8 | 8 |
| 9 #include "bootstrapper.h" | 9 #include "bootstrapper.h" |
| 10 #include "code-stubs.h" | 10 #include "code-stubs.h" |
| (...skipping 4642 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4653 void StoreBufferOverflowStub::GenerateFixedRegStubsAheadOfTime( | 4653 void StoreBufferOverflowStub::GenerateFixedRegStubsAheadOfTime( |
| 4654 Isolate* isolate) { | 4654 Isolate* isolate) { |
| 4655 StoreBufferOverflowStub stub1(isolate, kDontSaveFPRegs); | 4655 StoreBufferOverflowStub stub1(isolate, kDontSaveFPRegs); |
| 4656 stub1.GetCode(); | 4656 stub1.GetCode(); |
| 4657 // Hydrogen code stubs need stub2 at snapshot time. | 4657 // Hydrogen code stubs need stub2 at snapshot time. |
| 4658 StoreBufferOverflowStub stub2(isolate, kSaveFPRegs); | 4658 StoreBufferOverflowStub stub2(isolate, kSaveFPRegs); |
| 4659 stub2.GetCode(); | 4659 stub2.GetCode(); |
| 4660 } | 4660 } |
| 4661 | 4661 |
| 4662 | 4662 |
| 4663 bool CodeStub::CanUseFPRegisters() { | |
| 4664 return true; // FPU is a base requirement for V8. | |
| 4665 } | |
| 4666 | |
| 4667 | |
| 4668 // Takes the input in 3 registers: address_ value_ and object_. A pointer to | 4663 // Takes the input in 3 registers: address_ value_ and object_. A pointer to |
| 4669 // the value has just been written into the object, now this stub makes sure | 4664 // the value has just been written into the object, now this stub makes sure |
| 4670 // we keep the GC informed. The word in the object where the value has been | 4665 // we keep the GC informed. The word in the object where the value has been |
| 4671 // written is in the address register. | 4666 // written is in the address register. |
| 4672 void RecordWriteStub::Generate(MacroAssembler* masm) { | 4667 void RecordWriteStub::Generate(MacroAssembler* masm) { |
| 4673 Label skip_to_incremental_noncompacting; | 4668 Label skip_to_incremental_noncompacting; |
| 4674 Label skip_to_incremental_compacting; | 4669 Label skip_to_incremental_compacting; |
| 4675 | 4670 |
| 4676 // The first two branch+nop instructions are generated with labels so as to | 4671 // The first two branch+nop instructions are generated with labels so as to |
| 4677 // get the offset fixed up correctly by the bind(Label*) call. We patch it | 4672 // get the offset fixed up correctly by the bind(Label*) call. We patch it |
| (...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4915 // Array literal has ElementsKind of FAST_*_DOUBLE_ELEMENTS. | 4910 // Array literal has ElementsKind of FAST_*_DOUBLE_ELEMENTS. |
| 4916 __ bind(&double_elements); | 4911 __ bind(&double_elements); |
| 4917 __ lw(t1, FieldMemOperand(a1, JSObject::kElementsOffset)); | 4912 __ lw(t1, FieldMemOperand(a1, JSObject::kElementsOffset)); |
| 4918 __ StoreNumberToDoubleElements(a0, a3, t1, t3, t5, a2, &slow_elements); | 4913 __ StoreNumberToDoubleElements(a0, a3, t1, t3, t5, a2, &slow_elements); |
| 4919 __ Ret(USE_DELAY_SLOT); | 4914 __ Ret(USE_DELAY_SLOT); |
| 4920 __ mov(v0, a0); | 4915 __ mov(v0, a0); |
| 4921 } | 4916 } |
| 4922 | 4917 |
| 4923 | 4918 |
| 4924 void StubFailureTrampolineStub::Generate(MacroAssembler* masm) { | 4919 void StubFailureTrampolineStub::Generate(MacroAssembler* masm) { |
| 4925 CEntryStub ces(isolate(), 1, fp_registers_ ? kSaveFPRegs : kDontSaveFPRegs); | 4920 CEntryStub ces(isolate(), 1, kSaveFPRegs); |
| 4926 __ Call(ces.GetCode(), RelocInfo::CODE_TARGET); | 4921 __ Call(ces.GetCode(), RelocInfo::CODE_TARGET); |
| 4927 int parameter_count_offset = | 4922 int parameter_count_offset = |
| 4928 StubFailureTrampolineFrame::kCallerStackParameterCountFrameOffset; | 4923 StubFailureTrampolineFrame::kCallerStackParameterCountFrameOffset; |
| 4929 __ lw(a1, MemOperand(fp, parameter_count_offset)); | 4924 __ lw(a1, MemOperand(fp, parameter_count_offset)); |
| 4930 if (function_mode_ == JS_FUNCTION_STUB_MODE) { | 4925 if (function_mode_ == JS_FUNCTION_STUB_MODE) { |
| 4931 __ Addu(a1, a1, Operand(1)); | 4926 __ Addu(a1, a1, Operand(1)); |
| 4932 } | 4927 } |
| 4933 masm->LeaveFrame(StackFrame::STUB_FAILURE_TRAMPOLINE); | 4928 masm->LeaveFrame(StackFrame::STUB_FAILURE_TRAMPOLINE); |
| 4934 __ sll(a1, a1, kPointerSizeLog2); | 4929 __ sll(a1, a1, kPointerSizeLog2); |
| 4935 __ Ret(USE_DELAY_SLOT); | 4930 __ Ret(USE_DELAY_SLOT); |
| (...skipping 490 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5426 MemOperand(fp, 6 * kPointerSize), | 5421 MemOperand(fp, 6 * kPointerSize), |
| 5427 NULL); | 5422 NULL); |
| 5428 } | 5423 } |
| 5429 | 5424 |
| 5430 | 5425 |
| 5431 #undef __ | 5426 #undef __ |
| 5432 | 5427 |
| 5433 } } // namespace v8::internal | 5428 } } // namespace v8::internal |
| 5434 | 5429 |
| 5435 #endif // V8_TARGET_ARCH_MIPS | 5430 #endif // V8_TARGET_ARCH_MIPS |
| OLD | NEW |