OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 731 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
742 // and overwrite this afterwards. | 742 // and overwrite this afterwards. |
743 if (r.is(rsp)) { | 743 if (r.is(rsp)) { |
744 ASSERT(i > 0); | 744 ASSERT(i > 0); |
745 r = Register::toRegister(i - 1); | 745 r = Register::toRegister(i - 1); |
746 } | 746 } |
747 __ pop(r); | 747 __ pop(r); |
748 } | 748 } |
749 | 749 |
750 // Set up the roots register. | 750 // Set up the roots register. |
751 ExternalReference roots_address = ExternalReference::roots_address(); | 751 ExternalReference roots_address = ExternalReference::roots_address(); |
752 __ movq(r13, roots_address); | 752 __ InitializeRootRegister(); |
753 | 753 __ InitializeSmiConstantRegister(); |
754 __ movq(kSmiConstantRegister, | |
755 reinterpret_cast<uint64_t>(Smi::FromInt(kSmiConstantRegisterValue)), | |
756 RelocInfo::NONE); | |
757 | 754 |
758 // Return to the continuation point. | 755 // Return to the continuation point. |
759 __ ret(0); | 756 __ ret(0); |
760 } | 757 } |
761 | 758 |
762 | 759 |
763 void Deoptimizer::TableEntryGenerator::GeneratePrologue() { | 760 void Deoptimizer::TableEntryGenerator::GeneratePrologue() { |
764 // Create a sequence of deoptimization entries. | 761 // Create a sequence of deoptimization entries. |
765 Label done; | 762 Label done; |
766 for (int i = 0; i < count(); i++) { | 763 for (int i = 0; i < count(); i++) { |
767 int start = masm()->pc_offset(); | 764 int start = masm()->pc_offset(); |
768 USE(start); | 765 USE(start); |
769 __ push_imm32(i); | 766 __ push_imm32(i); |
770 __ jmp(&done); | 767 __ jmp(&done); |
771 ASSERT(masm()->pc_offset() - start == table_entry_size_); | 768 ASSERT(masm()->pc_offset() - start == table_entry_size_); |
772 } | 769 } |
773 __ bind(&done); | 770 __ bind(&done); |
774 } | 771 } |
775 | 772 |
776 #undef __ | 773 #undef __ |
777 | 774 |
778 | 775 |
779 } } // namespace v8::internal | 776 } } // namespace v8::internal |
780 | 777 |
781 #endif // V8_TARGET_ARCH_X64 | 778 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |