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/v8.h" | 5 #include "src/v8.h" |
6 | 6 |
7 #if V8_TARGET_ARCH_ARM64 | 7 #if V8_TARGET_ARCH_ARM64 |
8 | 8 |
9 #include "src/code-factory.h" | 9 #include "src/code-factory.h" |
10 #include "src/code-stubs.h" | 10 #include "src/code-stubs.h" |
(...skipping 419 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
430 __ Pop(x0); | 430 __ Pop(x0); |
431 EmitProfilingCounterReset(); | 431 EmitProfilingCounterReset(); |
432 __ Bind(&ok); | 432 __ Bind(&ok); |
433 | 433 |
434 // Make sure that the constant pool is not emitted inside of the return | 434 // Make sure that the constant pool is not emitted inside of the return |
435 // sequence. This sequence can get patched when the debugger is used. See | 435 // sequence. This sequence can get patched when the debugger is used. See |
436 // debug-arm64.cc:BreakLocationIterator::SetDebugBreakAtReturn(). | 436 // debug-arm64.cc:BreakLocationIterator::SetDebugBreakAtReturn(). |
437 { | 437 { |
438 InstructionAccurateScope scope(masm_, | 438 InstructionAccurateScope scope(masm_, |
439 Assembler::kJSRetSequenceInstructions); | 439 Assembler::kJSRetSequenceInstructions); |
440 CodeGenerator::RecordPositions(masm_, function()->end_position() - 1); | 440 if (function()->end_position() != RelocInfo::kNoPosition) { |
| 441 CodeGenerator::RecordPositions(masm_, function()->end_position() - 1); |
| 442 } |
441 __ RecordJSReturn(); | 443 __ RecordJSReturn(); |
442 // This code is generated using Assembler methods rather than Macro | 444 // This code is generated using Assembler methods rather than Macro |
443 // Assembler methods because it will be patched later on, and so the size | 445 // Assembler methods because it will be patched later on, and so the size |
444 // of the generated code must be consistent. | 446 // of the generated code must be consistent. |
445 const Register& current_sp = __ StackPointer(); | 447 const Register& current_sp = __ StackPointer(); |
446 // Nothing ensures 16 bytes alignment here. | 448 // Nothing ensures 16 bytes alignment here. |
447 DCHECK(!current_sp.Is(csp)); | 449 DCHECK(!current_sp.Is(csp)); |
448 __ mov(current_sp, fp); | 450 __ mov(current_sp, fp); |
449 int no_frame_start = masm_->pc_offset(); | 451 int no_frame_start = masm_->pc_offset(); |
450 __ ldp(fp, lr, MemOperand(current_sp, 2 * kXRegSize, PostIndex)); | 452 __ ldp(fp, lr, MemOperand(current_sp, 2 * kXRegSize, PostIndex)); |
(...skipping 4872 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5323 return previous_; | 5325 return previous_; |
5324 } | 5326 } |
5325 | 5327 |
5326 | 5328 |
5327 #undef __ | 5329 #undef __ |
5328 | 5330 |
5329 | 5331 |
5330 } } // namespace v8::internal | 5332 } } // namespace v8::internal |
5331 | 5333 |
5332 #endif // V8_TARGET_ARCH_ARM64 | 5334 #endif // V8_TARGET_ARCH_ARM64 |
OLD | NEW |