| 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 5327 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5338 // Also cook the return address in lr to the stack (smi encoded Code* delta). | 5338 // Also cook the return address in lr to the stack (smi encoded Code* delta). |
| 5339 __ Sub(x10, lr, Operand(masm_->CodeObject())); | 5339 __ Sub(x10, lr, Operand(masm_->CodeObject())); |
| 5340 __ SmiTag(x10); | 5340 __ SmiTag(x10); |
| 5341 __ Push(result_register(), x10); | 5341 __ Push(result_register(), x10); |
| 5342 | 5342 |
| 5343 // Store pending message while executing finally block. | 5343 // Store pending message while executing finally block. |
| 5344 ExternalReference pending_message_obj = | 5344 ExternalReference pending_message_obj = |
| 5345 ExternalReference::address_of_pending_message_obj(isolate()); | 5345 ExternalReference::address_of_pending_message_obj(isolate()); |
| 5346 __ Mov(x10, pending_message_obj); | 5346 __ Mov(x10, pending_message_obj); |
| 5347 __ Ldr(x10, MemOperand(x10)); | 5347 __ Ldr(x10, MemOperand(x10)); |
| 5348 | 5348 __ Push(x10); |
| 5349 ExternalReference has_pending_message = | |
| 5350 ExternalReference::address_of_has_pending_message(isolate()); | |
| 5351 STATIC_ASSERT(sizeof(bool) == 1); // NOLINT(runtime/sizeof) | |
| 5352 __ Mov(x11, has_pending_message); | |
| 5353 __ Ldrb(x11, MemOperand(x11)); | |
| 5354 __ SmiTag(x11); | |
| 5355 | |
| 5356 __ Push(x10, x11); | |
| 5357 } | 5349 } |
| 5358 | 5350 |
| 5359 | 5351 |
| 5360 void FullCodeGenerator::ExitFinallyBlock() { | 5352 void FullCodeGenerator::ExitFinallyBlock() { |
| 5361 ASM_LOCATION("FullCodeGenerator::ExitFinallyBlock"); | 5353 ASM_LOCATION("FullCodeGenerator::ExitFinallyBlock"); |
| 5362 DCHECK(!result_register().is(x10)); | 5354 DCHECK(!result_register().is(x10)); |
| 5363 | 5355 |
| 5364 // Restore pending message from stack. | 5356 // Restore pending message from stack. |
| 5365 __ Pop(x10, x11); | 5357 __ Pop(x10); |
| 5366 __ SmiUntag(x10); | |
| 5367 ExternalReference has_pending_message = | |
| 5368 ExternalReference::address_of_has_pending_message(isolate()); | |
| 5369 __ Mov(x13, has_pending_message); | |
| 5370 STATIC_ASSERT(sizeof(bool) == 1); // NOLINT(runtime/sizeof) | |
| 5371 __ Strb(x10, MemOperand(x13)); | |
| 5372 | |
| 5373 ExternalReference pending_message_obj = | 5358 ExternalReference pending_message_obj = |
| 5374 ExternalReference::address_of_pending_message_obj(isolate()); | 5359 ExternalReference::address_of_pending_message_obj(isolate()); |
| 5375 __ Mov(x13, pending_message_obj); | 5360 __ Mov(x13, pending_message_obj); |
| 5376 __ Str(x11, MemOperand(x13)); | 5361 __ Str(x10, MemOperand(x13)); |
| 5377 | 5362 |
| 5378 // Restore result register and cooked return address from the stack. | 5363 // Restore result register and cooked return address from the stack. |
| 5379 __ Pop(x10, result_register()); | 5364 __ Pop(x10, result_register()); |
| 5380 | 5365 |
| 5381 // Uncook the return address (see EnterFinallyBlock). | 5366 // Uncook the return address (see EnterFinallyBlock). |
| 5382 __ SmiUntag(x10); | 5367 __ SmiUntag(x10); |
| 5383 __ Add(x11, x10, Operand(masm_->CodeObject())); | 5368 __ Add(x11, x10, Operand(masm_->CodeObject())); |
| 5384 __ Br(x11); | 5369 __ Br(x11); |
| 5385 } | 5370 } |
| 5386 | 5371 |
| (...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5510 return previous_; | 5495 return previous_; |
| 5511 } | 5496 } |
| 5512 | 5497 |
| 5513 | 5498 |
| 5514 #undef __ | 5499 #undef __ |
| 5515 | 5500 |
| 5516 | 5501 |
| 5517 } } // namespace v8::internal | 5502 } } // namespace v8::internal |
| 5518 | 5503 |
| 5519 #endif // V8_TARGET_ARCH_ARM64 | 5504 #endif // V8_TARGET_ARCH_ARM64 |
| OLD | NEW |