OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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/codegen.h" | 5 #include "src/codegen.h" |
6 #include "src/deoptimizer.h" | 6 #include "src/deoptimizer.h" |
7 #include "src/full-codegen/full-codegen.h" | 7 #include "src/full-codegen/full-codegen.h" |
8 #include "src/register-configuration.h" | 8 #include "src/register-configuration.h" |
9 #include "src/safepoint-table.h" | 9 #include "src/safepoint-table.h" |
10 | 10 |
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
181 | 181 |
182 __ Dsubu(a4, fp, a4); | 182 __ Dsubu(a4, fp, a4); |
183 | 183 |
184 // Allocate a new deoptimizer object. | 184 // Allocate a new deoptimizer object. |
185 __ PrepareCallCFunction(6, a5); | 185 __ PrepareCallCFunction(6, a5); |
186 // Pass six arguments, according to O32 or n64 ABI. a0..a3 are same for both. | 186 // Pass six arguments, according to O32 or n64 ABI. a0..a3 are same for both. |
187 __ li(a1, Operand(type())); // bailout type, | 187 __ li(a1, Operand(type())); // bailout type, |
188 __ ld(a0, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset)); | 188 __ ld(a0, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset)); |
189 // a2: bailout id already loaded. | 189 // a2: bailout id already loaded. |
190 // a3: code address or 0 already loaded. | 190 // a3: code address or 0 already loaded. |
191 if (kMipsAbi == kN64) { | 191 // a4: already has fp-to-sp delta. |
192 // a4: already has fp-to-sp delta. | 192 __ li(a5, Operand(ExternalReference::isolate_address(isolate()))); |
193 __ li(a5, Operand(ExternalReference::isolate_address(isolate()))); | 193 |
194 } else { // O32 abi. | |
195 // Pass four arguments in a0 to a3 and fifth & sixth arguments on stack. | |
196 __ sd(a4, CFunctionArgumentOperand(5)); // Fp-to-sp delta. | |
197 __ li(a5, Operand(ExternalReference::isolate_address(isolate()))); | |
198 __ sd(a5, CFunctionArgumentOperand(6)); // Isolate. | |
199 } | |
200 // Call Deoptimizer::New(). | 194 // Call Deoptimizer::New(). |
201 { | 195 { |
202 AllowExternalCallThatCantCauseGC scope(masm()); | 196 AllowExternalCallThatCantCauseGC scope(masm()); |
203 __ CallCFunction(ExternalReference::new_deoptimizer_function(isolate()), 6); | 197 __ CallCFunction(ExternalReference::new_deoptimizer_function(isolate()), 6); |
204 } | 198 } |
205 | 199 |
206 // Preserve "deoptimizer" object in register v0 and get the input | 200 // Preserve "deoptimizer" object in register v0 and get the input |
207 // frame descriptor pointer to a1 (deoptimizer->input_); | 201 // frame descriptor pointer to a1 (deoptimizer->input_); |
208 // Move deopt-obj to a0 for call to Deoptimizer::ComputeOutputFrames() below. | 202 // Move deopt-obj to a0 for call to Deoptimizer::ComputeOutputFrames() below. |
209 __ mov(a0, v0); | 203 __ mov(a0, v0); |
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
409 // No embedded constant pool support. | 403 // No embedded constant pool support. |
410 UNREACHABLE(); | 404 UNREACHABLE(); |
411 } | 405 } |
412 | 406 |
413 | 407 |
414 #undef __ | 408 #undef __ |
415 | 409 |
416 | 410 |
417 } // namespace internal | 411 } // namespace internal |
418 } // namespace v8 | 412 } // namespace v8 |
OLD | NEW |