OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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 372 matching lines...) Loading... |
383 codegen_->expected_safepoint_kind_ = kind; | 383 codegen_->expected_safepoint_kind_ = kind; |
384 | 384 |
385 UseScratchRegisterScope temps(codegen_->masm_); | 385 UseScratchRegisterScope temps(codegen_->masm_); |
386 // Preserve the value of lr which must be saved on the stack (the call to | 386 // Preserve the value of lr which must be saved on the stack (the call to |
387 // the stub will clobber it). | 387 // the stub will clobber it). |
388 Register to_be_pushed_lr = | 388 Register to_be_pushed_lr = |
389 temps.UnsafeAcquire(StoreRegistersStateStub::to_be_pushed_lr()); | 389 temps.UnsafeAcquire(StoreRegistersStateStub::to_be_pushed_lr()); |
390 codegen_->masm_->Mov(to_be_pushed_lr, lr); | 390 codegen_->masm_->Mov(to_be_pushed_lr, lr); |
391 switch (codegen_->expected_safepoint_kind_) { | 391 switch (codegen_->expected_safepoint_kind_) { |
392 case Safepoint::kWithRegisters: { | 392 case Safepoint::kWithRegisters: { |
393 StoreRegistersStateStub stub(kDontSaveFPRegs); | 393 StoreRegistersStateStub stub(codegen_->isolate(), kDontSaveFPRegs); |
394 codegen_->masm_->CallStub(&stub); | 394 codegen_->masm_->CallStub(&stub); |
395 break; | 395 break; |
396 } | 396 } |
397 case Safepoint::kWithRegistersAndDoubles: { | 397 case Safepoint::kWithRegistersAndDoubles: { |
398 StoreRegistersStateStub stub(kSaveFPRegs); | 398 StoreRegistersStateStub stub(codegen_->isolate(), kSaveFPRegs); |
399 codegen_->masm_->CallStub(&stub); | 399 codegen_->masm_->CallStub(&stub); |
400 break; | 400 break; |
401 } | 401 } |
402 default: | 402 default: |
403 UNREACHABLE(); | 403 UNREACHABLE(); |
404 } | 404 } |
405 } | 405 } |
406 | 406 |
407 ~PushSafepointRegistersScope() { | 407 ~PushSafepointRegistersScope() { |
408 Safepoint::Kind kind = codegen_->expected_safepoint_kind_; | 408 Safepoint::Kind kind = codegen_->expected_safepoint_kind_; |
409 ASSERT((kind & Safepoint::kWithRegisters) != 0); | 409 ASSERT((kind & Safepoint::kWithRegisters) != 0); |
410 switch (kind) { | 410 switch (kind) { |
411 case Safepoint::kWithRegisters: { | 411 case Safepoint::kWithRegisters: { |
412 RestoreRegistersStateStub stub(kDontSaveFPRegs); | 412 RestoreRegistersStateStub stub(codegen_->isolate(), kDontSaveFPRegs); |
413 codegen_->masm_->CallStub(&stub); | 413 codegen_->masm_->CallStub(&stub); |
414 break; | 414 break; |
415 } | 415 } |
416 case Safepoint::kWithRegistersAndDoubles: { | 416 case Safepoint::kWithRegistersAndDoubles: { |
417 RestoreRegistersStateStub stub(kSaveFPRegs); | 417 RestoreRegistersStateStub stub(codegen_->isolate(), kSaveFPRegs); |
418 codegen_->masm_->CallStub(&stub); | 418 codegen_->masm_->CallStub(&stub); |
419 break; | 419 break; |
420 } | 420 } |
421 default: | 421 default: |
422 UNREACHABLE(); | 422 UNREACHABLE(); |
423 } | 423 } |
424 codegen_->expected_safepoint_kind_ = Safepoint::kSimple; | 424 codegen_->expected_safepoint_kind_ = Safepoint::kSimple; |
425 } | 425 } |
426 | 426 |
427 private: | 427 private: |
(...skipping 56 matching lines...) Loading... |
484 | 484 |
485 protected: | 485 protected: |
486 MacroAssembler* masm() const { return codegen_->masm(); } | 486 MacroAssembler* masm() const { return codegen_->masm(); } |
487 | 487 |
488 LCodeGen* codegen_; | 488 LCodeGen* codegen_; |
489 }; | 489 }; |
490 | 490 |
491 } } // namespace v8::internal | 491 } } // namespace v8::internal |
492 | 492 |
493 #endif // V8_ARM64_LITHIUM_CODEGEN_ARM64_H_ | 493 #endif // V8_ARM64_LITHIUM_CODEGEN_ARM64_H_ |
OLD | NEW |