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/arm64/frames-arm64.h" | 5 #include "src/arm64/frames-arm64.h" |
6 #include "src/codegen.h" | 6 #include "src/codegen.h" |
7 #include "src/deoptimizer.h" | 7 #include "src/deoptimizer.h" |
8 #include "src/full-codegen/full-codegen.h" | 8 #include "src/full-codegen/full-codegen.h" |
9 #include "src/register-configuration.h" | 9 #include "src/register-configuration.h" |
10 #include "src/safepoint-table.h" | 10 #include "src/safepoint-table.h" |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
58 DCHECK((prev_call_address == NULL) || | 58 DCHECK((prev_call_address == NULL) || |
59 (call_address >= prev_call_address + patch_size())); | 59 (call_address >= prev_call_address + patch_size())); |
60 DCHECK(call_address + patch_size() <= code->instruction_end()); | 60 DCHECK(call_address + patch_size() <= code->instruction_end()); |
61 #ifdef DEBUG | 61 #ifdef DEBUG |
62 prev_call_address = call_address; | 62 prev_call_address = call_address; |
63 #endif | 63 #endif |
64 } | 64 } |
65 } | 65 } |
66 | 66 |
67 | 67 |
68 void Deoptimizer::FillInputFrame(Address tos, JavaScriptFrame* frame) { | |
69 // Set the register values. The values are not important as there are no | |
70 // callee saved registers in JavaScript frames, so all registers are | |
71 // spilled. Registers fp and sp are set to the correct values though. | |
72 for (int i = 0; i < Register::NumRegisters(); i++) { | |
73 input_->SetRegister(i, 0); | |
74 } | |
75 | |
76 // TODO(all): Do we also need to set a value to csp? | |
77 input_->SetRegister(jssp.code(), reinterpret_cast<intptr_t>(frame->sp())); | |
78 input_->SetRegister(fp.code(), reinterpret_cast<intptr_t>(frame->fp())); | |
79 | |
80 for (int i = 0; i < DoubleRegister::kMaxNumRegisters; i++) { | |
81 input_->SetDoubleRegister(i, 0.0); | |
82 } | |
83 | |
84 // Fill the frame content from the actual data on the frame. | |
85 for (unsigned i = 0; i < input_->GetFrameSize(); i += kPointerSize) { | |
86 input_->SetFrameSlot(i, Memory::uint64_at(tos + i)); | |
87 } | |
88 } | |
89 | |
90 bool Deoptimizer::HasAlignmentPadding(SharedFunctionInfo* shared) { | 68 bool Deoptimizer::HasAlignmentPadding(SharedFunctionInfo* shared) { |
91 // There is no dynamic alignment padding on ARM64 in the input frame. | 69 // There is no dynamic alignment padding on ARM64 in the input frame. |
92 return false; | 70 return false; |
93 } | 71 } |
94 | 72 |
95 | 73 |
96 void Deoptimizer::SetPlatformCompiledStubRegisters( | 74 void Deoptimizer::SetPlatformCompiledStubRegisters( |
97 FrameDescription* output_frame, CodeStubDescriptor* descriptor) { | 75 FrameDescription* output_frame, CodeStubDescriptor* descriptor) { |
98 ApiFunction function(descriptor->deoptimization_handler()); | 76 ApiFunction function(descriptor->deoptimization_handler()); |
99 ExternalReference xref(&function, ExternalReference::BUILTIN_CALL, isolate_); | 77 ExternalReference xref(&function, ExternalReference::BUILTIN_CALL, isolate_); |
(...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
358 void FrameDescription::SetCallerConstantPool(unsigned offset, intptr_t value) { | 336 void FrameDescription::SetCallerConstantPool(unsigned offset, intptr_t value) { |
359 // No embedded constant pool support. | 337 // No embedded constant pool support. |
360 UNREACHABLE(); | 338 UNREACHABLE(); |
361 } | 339 } |
362 | 340 |
363 | 341 |
364 #undef __ | 342 #undef __ |
365 | 343 |
366 } // namespace internal | 344 } // namespace internal |
367 } // namespace v8 | 345 } // namespace v8 |
OLD | NEW |