OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 404 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
415 class PushSafepointRegistersScope V8_FINAL BASE_EMBEDDED { | 415 class PushSafepointRegistersScope V8_FINAL BASE_EMBEDDED { |
416 public: | 416 public: |
417 PushSafepointRegistersScope(LCodeGen* codegen, | 417 PushSafepointRegistersScope(LCodeGen* codegen, |
418 Safepoint::Kind kind) | 418 Safepoint::Kind kind) |
419 : codegen_(codegen) { | 419 : codegen_(codegen) { |
420 ASSERT(codegen_->info()->is_calling()); | 420 ASSERT(codegen_->info()->is_calling()); |
421 ASSERT(codegen_->expected_safepoint_kind_ == Safepoint::kSimple); | 421 ASSERT(codegen_->expected_safepoint_kind_ == Safepoint::kSimple); |
422 codegen_->expected_safepoint_kind_ = kind; | 422 codegen_->expected_safepoint_kind_ = kind; |
423 | 423 |
424 switch (codegen_->expected_safepoint_kind_) { | 424 switch (codegen_->expected_safepoint_kind_) { |
425 case Safepoint::kWithRegisters: | 425 case Safepoint::kWithRegisters: { |
426 codegen_->masm_->PushSafepointRegisters(); | 426 StoreRegistersStateStub stub1(kDontSaveFPRegs); |
| 427 codegen_->masm_->push(ra); |
| 428 codegen_->masm_->CallStub(&stub1); |
427 break; | 429 break; |
428 case Safepoint::kWithRegistersAndDoubles: | 430 } |
429 codegen_->masm_->PushSafepointRegistersAndDoubles(); | 431 case Safepoint::kWithRegistersAndDoubles: { |
| 432 StoreRegistersStateStub stub2(kSaveFPRegs); |
| 433 codegen_->masm_->push(ra); |
| 434 codegen_->masm_->CallStub(&stub2); |
430 break; | 435 break; |
| 436 } |
431 default: | 437 default: |
432 UNREACHABLE(); | 438 UNREACHABLE(); |
433 } | 439 } |
434 } | 440 } |
435 | 441 |
436 ~PushSafepointRegistersScope() { | 442 ~PushSafepointRegistersScope() { |
437 Safepoint::Kind kind = codegen_->expected_safepoint_kind_; | 443 Safepoint::Kind kind = codegen_->expected_safepoint_kind_; |
438 ASSERT((kind & Safepoint::kWithRegisters) != 0); | 444 ASSERT((kind & Safepoint::kWithRegisters) != 0); |
439 switch (kind) { | 445 switch (kind) { |
440 case Safepoint::kWithRegisters: | 446 case Safepoint::kWithRegisters: { |
441 codegen_->masm_->PopSafepointRegisters(); | 447 RestoreRegistersStateStub stub1(kDontSaveFPRegs); |
| 448 codegen_->masm_->push(ra); |
| 449 codegen_->masm_->CallStub(&stub1); |
442 break; | 450 break; |
443 case Safepoint::kWithRegistersAndDoubles: | 451 } |
444 codegen_->masm_->PopSafepointRegistersAndDoubles(); | 452 case Safepoint::kWithRegistersAndDoubles: { |
| 453 RestoreRegistersStateStub stub2(kSaveFPRegs); |
| 454 codegen_->masm_->push(ra); |
| 455 codegen_->masm_->CallStub(&stub2); |
445 break; | 456 break; |
| 457 } |
446 default: | 458 default: |
447 UNREACHABLE(); | 459 UNREACHABLE(); |
448 } | 460 } |
449 codegen_->expected_safepoint_kind_ = Safepoint::kSimple; | 461 codegen_->expected_safepoint_kind_ = Safepoint::kSimple; |
450 } | 462 } |
451 | 463 |
452 private: | 464 private: |
453 LCodeGen* codegen_; | 465 LCodeGen* codegen_; |
454 }; | 466 }; |
455 | 467 |
(...skipping 30 matching lines...) Expand all Loading... |
486 LCodeGen* codegen_; | 498 LCodeGen* codegen_; |
487 Label entry_; | 499 Label entry_; |
488 Label exit_; | 500 Label exit_; |
489 Label* external_exit_; | 501 Label* external_exit_; |
490 int instruction_index_; | 502 int instruction_index_; |
491 }; | 503 }; |
492 | 504 |
493 } } // namespace v8::internal | 505 } } // namespace v8::internal |
494 | 506 |
495 #endif // V8_MIPS_LITHIUM_CODEGEN_MIPS_H_ | 507 #endif // V8_MIPS_LITHIUM_CODEGEN_MIPS_H_ |
OLD | NEW |