| 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 "v8.h" | 5 #include "v8.h" |
| 6 | 6 |
| 7 #if V8_TARGET_ARCH_X64 | 7 #if V8_TARGET_ARCH_X64 |
| 8 | 8 |
| 9 #include "bootstrapper.h" | 9 #include "bootstrapper.h" |
| 10 #include "code-stubs.h" | 10 #include "code-stubs.h" |
| (...skipping 4179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4190 | 4190 |
| 4191 void StoreBufferOverflowStub::GenerateFixedRegStubsAheadOfTime( | 4191 void StoreBufferOverflowStub::GenerateFixedRegStubsAheadOfTime( |
| 4192 Isolate* isolate) { | 4192 Isolate* isolate) { |
| 4193 StoreBufferOverflowStub stub1(isolate, kDontSaveFPRegs); | 4193 StoreBufferOverflowStub stub1(isolate, kDontSaveFPRegs); |
| 4194 stub1.GetCode(); | 4194 stub1.GetCode(); |
| 4195 StoreBufferOverflowStub stub2(isolate, kSaveFPRegs); | 4195 StoreBufferOverflowStub stub2(isolate, kSaveFPRegs); |
| 4196 stub2.GetCode(); | 4196 stub2.GetCode(); |
| 4197 } | 4197 } |
| 4198 | 4198 |
| 4199 | 4199 |
| 4200 bool CodeStub::CanUseFPRegisters() { | |
| 4201 return true; // Always have SSE2 on x64. | |
| 4202 } | |
| 4203 | |
| 4204 | |
| 4205 // Takes the input in 3 registers: address_ value_ and object_. A pointer to | 4200 // Takes the input in 3 registers: address_ value_ and object_. A pointer to |
| 4206 // the value has just been written into the object, now this stub makes sure | 4201 // the value has just been written into the object, now this stub makes sure |
| 4207 // we keep the GC informed. The word in the object where the value has been | 4202 // we keep the GC informed. The word in the object where the value has been |
| 4208 // written is in the address register. | 4203 // written is in the address register. |
| 4209 void RecordWriteStub::Generate(MacroAssembler* masm) { | 4204 void RecordWriteStub::Generate(MacroAssembler* masm) { |
| 4210 Label skip_to_incremental_noncompacting; | 4205 Label skip_to_incremental_noncompacting; |
| 4211 Label skip_to_incremental_compacting; | 4206 Label skip_to_incremental_compacting; |
| 4212 | 4207 |
| 4213 // The first two instructions are generated with labels so as to get the | 4208 // The first two instructions are generated with labels so as to get the |
| 4214 // offset fixed up correctly by the bind(Label*) call. We patch it back and | 4209 // offset fixed up correctly by the bind(Label*) call. We patch it back and |
| (...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4469 __ StoreNumberToDoubleElements(rax, | 4464 __ StoreNumberToDoubleElements(rax, |
| 4470 r9, | 4465 r9, |
| 4471 r11, | 4466 r11, |
| 4472 xmm0, | 4467 xmm0, |
| 4473 &slow_elements); | 4468 &slow_elements); |
| 4474 __ ret(0); | 4469 __ ret(0); |
| 4475 } | 4470 } |
| 4476 | 4471 |
| 4477 | 4472 |
| 4478 void StubFailureTrampolineStub::Generate(MacroAssembler* masm) { | 4473 void StubFailureTrampolineStub::Generate(MacroAssembler* masm) { |
| 4479 CEntryStub ces(isolate(), 1, fp_registers_ ? kSaveFPRegs : kDontSaveFPRegs); | 4474 CEntryStub ces(isolate(), 1, kSaveFPRegs); |
| 4480 __ Call(ces.GetCode(), RelocInfo::CODE_TARGET); | 4475 __ Call(ces.GetCode(), RelocInfo::CODE_TARGET); |
| 4481 int parameter_count_offset = | 4476 int parameter_count_offset = |
| 4482 StubFailureTrampolineFrame::kCallerStackParameterCountFrameOffset; | 4477 StubFailureTrampolineFrame::kCallerStackParameterCountFrameOffset; |
| 4483 __ movp(rbx, MemOperand(rbp, parameter_count_offset)); | 4478 __ movp(rbx, MemOperand(rbp, parameter_count_offset)); |
| 4484 masm->LeaveFrame(StackFrame::STUB_FAILURE_TRAMPOLINE); | 4479 masm->LeaveFrame(StackFrame::STUB_FAILURE_TRAMPOLINE); |
| 4485 __ PopReturnAddressTo(rcx); | 4480 __ PopReturnAddressTo(rcx); |
| 4486 int additional_offset = function_mode_ == JS_FUNCTION_STUB_MODE | 4481 int additional_offset = function_mode_ == JS_FUNCTION_STUB_MODE |
| 4487 ? kPointerSize | 4482 ? kPointerSize |
| 4488 : 0; | 4483 : 0; |
| 4489 __ leap(rsp, MemOperand(rsp, rbx, times_pointer_size, additional_offset)); | 4484 __ leap(rsp, MemOperand(rsp, rbx, times_pointer_size, additional_offset)); |
| (...skipping 537 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5027 return_value_operand, | 5022 return_value_operand, |
| 5028 NULL); | 5023 NULL); |
| 5029 } | 5024 } |
| 5030 | 5025 |
| 5031 | 5026 |
| 5032 #undef __ | 5027 #undef __ |
| 5033 | 5028 |
| 5034 } } // namespace v8::internal | 5029 } } // namespace v8::internal |
| 5035 | 5030 |
| 5036 #endif // V8_TARGET_ARCH_X64 | 5031 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |