| 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_ARM | 7 #if V8_TARGET_ARCH_ARM |
| 8 | 8 |
| 9 #include "bootstrapper.h" | 9 #include "bootstrapper.h" |
| 10 #include "code-stubs.h" | 10 #include "code-stubs.h" |
| (...skipping 4437 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4448 void StoreBufferOverflowStub::GenerateFixedRegStubsAheadOfTime( | 4448 void StoreBufferOverflowStub::GenerateFixedRegStubsAheadOfTime( |
| 4449 Isolate* isolate) { | 4449 Isolate* isolate) { |
| 4450 StoreBufferOverflowStub stub1(isolate, kDontSaveFPRegs); | 4450 StoreBufferOverflowStub stub1(isolate, kDontSaveFPRegs); |
| 4451 stub1.GetCode(); | 4451 stub1.GetCode(); |
| 4452 // Hydrogen code stubs need stub2 at snapshot time. | 4452 // Hydrogen code stubs need stub2 at snapshot time. |
| 4453 StoreBufferOverflowStub stub2(isolate, kSaveFPRegs); | 4453 StoreBufferOverflowStub stub2(isolate, kSaveFPRegs); |
| 4454 stub2.GetCode(); | 4454 stub2.GetCode(); |
| 4455 } | 4455 } |
| 4456 | 4456 |
| 4457 | 4457 |
| 4458 bool CodeStub::CanUseFPRegisters() { | |
| 4459 return true; // VFP2 is a base requirement for V8 | |
| 4460 } | |
| 4461 | |
| 4462 | |
| 4463 // Takes the input in 3 registers: address_ value_ and object_. A pointer to | 4458 // Takes the input in 3 registers: address_ value_ and object_. A pointer to |
| 4464 // the value has just been written into the object, now this stub makes sure | 4459 // the value has just been written into the object, now this stub makes sure |
| 4465 // we keep the GC informed. The word in the object where the value has been | 4460 // we keep the GC informed. The word in the object where the value has been |
| 4466 // written is in the address register. | 4461 // written is in the address register. |
| 4467 void RecordWriteStub::Generate(MacroAssembler* masm) { | 4462 void RecordWriteStub::Generate(MacroAssembler* masm) { |
| 4468 Label skip_to_incremental_noncompacting; | 4463 Label skip_to_incremental_noncompacting; |
| 4469 Label skip_to_incremental_compacting; | 4464 Label skip_to_incremental_compacting; |
| 4470 | 4465 |
| 4471 // The first two instructions are generated with labels so as to get the | 4466 // The first two instructions are generated with labels so as to get the |
| 4472 // offset fixed up correctly by the bind(Label*) call. We patch it back and | 4467 // offset fixed up correctly by the bind(Label*) call. We patch it back and |
| (...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4708 | 4703 |
| 4709 // Array literal has ElementsKind of FAST_DOUBLE_ELEMENTS. | 4704 // Array literal has ElementsKind of FAST_DOUBLE_ELEMENTS. |
| 4710 __ bind(&double_elements); | 4705 __ bind(&double_elements); |
| 4711 __ ldr(r5, FieldMemOperand(r1, JSObject::kElementsOffset)); | 4706 __ ldr(r5, FieldMemOperand(r1, JSObject::kElementsOffset)); |
| 4712 __ StoreNumberToDoubleElements(r0, r3, r5, r6, d0, &slow_elements); | 4707 __ StoreNumberToDoubleElements(r0, r3, r5, r6, d0, &slow_elements); |
| 4713 __ Ret(); | 4708 __ Ret(); |
| 4714 } | 4709 } |
| 4715 | 4710 |
| 4716 | 4711 |
| 4717 void StubFailureTrampolineStub::Generate(MacroAssembler* masm) { | 4712 void StubFailureTrampolineStub::Generate(MacroAssembler* masm) { |
| 4718 CEntryStub ces(isolate(), 1, fp_registers_ ? kSaveFPRegs : kDontSaveFPRegs); | 4713 CEntryStub ces(isolate(), 1, kSaveFPRegs); |
| 4719 __ Call(ces.GetCode(), RelocInfo::CODE_TARGET); | 4714 __ Call(ces.GetCode(), RelocInfo::CODE_TARGET); |
| 4720 int parameter_count_offset = | 4715 int parameter_count_offset = |
| 4721 StubFailureTrampolineFrame::kCallerStackParameterCountFrameOffset; | 4716 StubFailureTrampolineFrame::kCallerStackParameterCountFrameOffset; |
| 4722 __ ldr(r1, MemOperand(fp, parameter_count_offset)); | 4717 __ ldr(r1, MemOperand(fp, parameter_count_offset)); |
| 4723 if (function_mode_ == JS_FUNCTION_STUB_MODE) { | 4718 if (function_mode_ == JS_FUNCTION_STUB_MODE) { |
| 4724 __ add(r1, r1, Operand(1)); | 4719 __ add(r1, r1, Operand(1)); |
| 4725 } | 4720 } |
| 4726 masm->LeaveFrame(StackFrame::STUB_FAILURE_TRAMPOLINE); | 4721 masm->LeaveFrame(StackFrame::STUB_FAILURE_TRAMPOLINE); |
| 4727 __ mov(r1, Operand(r1, LSL, kPointerSizeLog2)); | 4722 __ mov(r1, Operand(r1, LSL, kPointerSizeLog2)); |
| 4728 __ add(sp, sp, r1); | 4723 __ add(sp, sp, r1); |
| (...skipping 505 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5234 MemOperand(fp, 6 * kPointerSize), | 5229 MemOperand(fp, 6 * kPointerSize), |
| 5235 NULL); | 5230 NULL); |
| 5236 } | 5231 } |
| 5237 | 5232 |
| 5238 | 5233 |
| 5239 #undef __ | 5234 #undef __ |
| 5240 | 5235 |
| 5241 } } // namespace v8::internal | 5236 } } // namespace v8::internal |
| 5242 | 5237 |
| 5243 #endif // V8_TARGET_ARCH_ARM | 5238 #endif // V8_TARGET_ARCH_ARM |
| OLD | NEW |