| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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_MIPS | 7 #if V8_TARGET_ARCH_MIPS |
| 8 | 8 |
| 9 // Note on Mips implementation: | 9 // Note on Mips implementation: |
| 10 // | 10 // |
| (...skipping 5335 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5346 | 5346 |
| 5347 // Store result register while executing finally block. | 5347 // Store result register while executing finally block. |
| 5348 __ push(a1); | 5348 __ push(a1); |
| 5349 | 5349 |
| 5350 // Store pending message while executing finally block. | 5350 // Store pending message while executing finally block. |
| 5351 ExternalReference pending_message_obj = | 5351 ExternalReference pending_message_obj = |
| 5352 ExternalReference::address_of_pending_message_obj(isolate()); | 5352 ExternalReference::address_of_pending_message_obj(isolate()); |
| 5353 __ li(at, Operand(pending_message_obj)); | 5353 __ li(at, Operand(pending_message_obj)); |
| 5354 __ lw(a1, MemOperand(at)); | 5354 __ lw(a1, MemOperand(at)); |
| 5355 __ push(a1); | 5355 __ push(a1); |
| 5356 |
| 5357 ClearPendingMessage(); |
| 5356 } | 5358 } |
| 5357 | 5359 |
| 5358 | 5360 |
| 5359 void FullCodeGenerator::ExitFinallyBlock() { | 5361 void FullCodeGenerator::ExitFinallyBlock() { |
| 5360 DCHECK(!result_register().is(a1)); | 5362 DCHECK(!result_register().is(a1)); |
| 5361 // Restore pending message from stack. | 5363 // Restore pending message from stack. |
| 5362 __ pop(a1); | 5364 __ pop(a1); |
| 5363 ExternalReference pending_message_obj = | 5365 ExternalReference pending_message_obj = |
| 5364 ExternalReference::address_of_pending_message_obj(isolate()); | 5366 ExternalReference::address_of_pending_message_obj(isolate()); |
| 5365 __ li(at, Operand(pending_message_obj)); | 5367 __ li(at, Operand(pending_message_obj)); |
| 5366 __ sw(a1, MemOperand(at)); | 5368 __ sw(a1, MemOperand(at)); |
| 5367 | 5369 |
| 5368 // Restore result register from stack. | 5370 // Restore result register from stack. |
| 5369 __ pop(a1); | 5371 __ pop(a1); |
| 5370 | 5372 |
| 5371 // Uncook return address and return. | 5373 // Uncook return address and return. |
| 5372 __ pop(result_register()); | 5374 __ pop(result_register()); |
| 5373 DCHECK_EQ(1, kSmiTagSize + kSmiShiftSize); | 5375 DCHECK_EQ(1, kSmiTagSize + kSmiShiftSize); |
| 5374 __ sra(a1, a1, 1); // Un-smi-tag value. | 5376 __ sra(a1, a1, 1); // Un-smi-tag value. |
| 5375 __ Addu(at, a1, Operand(masm_->CodeObject())); | 5377 __ Addu(at, a1, Operand(masm_->CodeObject())); |
| 5376 __ Jump(at); | 5378 __ Jump(at); |
| 5377 } | 5379 } |
| 5378 | 5380 |
| 5379 | 5381 |
| 5382 void FullCodeGenerator::ClearPendingMessage() { |
| 5383 DCHECK(!result_register().is(a1)); |
| 5384 ExternalReference pending_message_obj = |
| 5385 ExternalReference::address_of_pending_message_obj(isolate()); |
| 5386 __ LoadRoot(a1, Heap::kTheHoleValueRootIndex); |
| 5387 __ li(at, Operand(pending_message_obj)); |
| 5388 __ sw(a1, MemOperand(at)); |
| 5389 } |
| 5390 |
| 5391 |
| 5380 #undef __ | 5392 #undef __ |
| 5381 | 5393 |
| 5382 | 5394 |
| 5383 void BackEdgeTable::PatchAt(Code* unoptimized_code, | 5395 void BackEdgeTable::PatchAt(Code* unoptimized_code, |
| 5384 Address pc, | 5396 Address pc, |
| 5385 BackEdgeState target_state, | 5397 BackEdgeState target_state, |
| 5386 Code* replacement_code) { | 5398 Code* replacement_code) { |
| 5387 static const int kInstrSize = Assembler::kInstrSize; | 5399 static const int kInstrSize = Assembler::kInstrSize; |
| 5388 Address branch_address = pc - 6 * kInstrSize; | 5400 Address branch_address = pc - 6 * kInstrSize; |
| 5389 CodePatcher patcher(branch_address, 1); | 5401 CodePatcher patcher(branch_address, 1); |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5452 Assembler::target_address_at(pc_immediate_load_address)) == | 5464 Assembler::target_address_at(pc_immediate_load_address)) == |
| 5453 reinterpret_cast<uint32_t>( | 5465 reinterpret_cast<uint32_t>( |
| 5454 isolate->builtins()->OsrAfterStackCheck()->entry())); | 5466 isolate->builtins()->OsrAfterStackCheck()->entry())); |
| 5455 return OSR_AFTER_STACK_CHECK; | 5467 return OSR_AFTER_STACK_CHECK; |
| 5456 } | 5468 } |
| 5457 | 5469 |
| 5458 | 5470 |
| 5459 } } // namespace v8::internal | 5471 } } // namespace v8::internal |
| 5460 | 5472 |
| 5461 #endif // V8_TARGET_ARCH_MIPS | 5473 #endif // V8_TARGET_ARCH_MIPS |
| OLD | NEW |