OLD | NEW |
1 // Copyright 2010 the V8 project authors. All rights reserved. | 1 // Copyright 2010 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 922 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
933 | 933 |
934 if (summary->IsCall()) { | 934 if (summary->IsCall()) { |
935 for (int i = 0; i < Register::kNumAllocatableRegisters; ++i) { | 935 for (int i = 0; i < Register::kNumAllocatableRegisters; ++i) { |
936 if (output == NULL || !output->IsRegister() || | 936 if (output == NULL || !output->IsRegister() || |
937 output->index() != i) { | 937 output->index() != i) { |
938 LiveRange* range = FixedLiveRangeFor(i); | 938 LiveRange* range = FixedLiveRangeFor(i); |
939 range->AddUseInterval(curr_position, | 939 range->AddUseInterval(curr_position, |
940 curr_position.InstructionEnd()); | 940 curr_position.InstructionEnd()); |
941 } | 941 } |
942 } | 942 } |
| 943 } |
| 944 |
| 945 if (summary->IsCall() || summary->IsSaveDoubles()) { |
943 for (int i = 0; i < DoubleRegister::kNumAllocatableRegisters; ++i) { | 946 for (int i = 0; i < DoubleRegister::kNumAllocatableRegisters; ++i) { |
944 if (output == NULL || !output->IsDoubleRegister() || | 947 if (output == NULL || !output->IsDoubleRegister() || |
945 output->index() != i) { | 948 output->index() != i) { |
946 LiveRange* range = FixedDoubleLiveRangeFor(i); | 949 LiveRange* range = FixedDoubleLiveRangeFor(i); |
947 range->AddUseInterval(curr_position, | 950 range->AddUseInterval(curr_position, |
948 curr_position.InstructionEnd()); | 951 curr_position.InstructionEnd()); |
949 } | 952 } |
950 } | 953 } |
951 } | 954 } |
952 | 955 |
(...skipping 647 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1600 } | 1603 } |
1601 for (int i = 0; i < summary->TempCount(); i++) { | 1604 for (int i = 0; i < summary->TempCount(); i++) { |
1602 ASSERT(LUnallocated::cast(summary->TempAt(i))->HasFixedPolicy() || | 1605 ASSERT(LUnallocated::cast(summary->TempAt(i))->HasFixedPolicy() || |
1603 !LUnallocated::cast(summary->TempAt(i))->HasRegisterPolicy()); | 1606 !LUnallocated::cast(summary->TempAt(i))->HasRegisterPolicy()); |
1604 } | 1607 } |
1605 #endif | 1608 #endif |
1606 summary->MarkAsCall(); | 1609 summary->MarkAsCall(); |
1607 } | 1610 } |
1608 | 1611 |
1609 | 1612 |
| 1613 void LAllocator::MarkAsSaveDoubles() { |
| 1614 current_summary()->MarkAsSaveDoubles(); |
| 1615 } |
| 1616 |
| 1617 |
1610 void LAllocator::RecordDefinition(HInstruction* instr, LUnallocated* operand) { | 1618 void LAllocator::RecordDefinition(HInstruction* instr, LUnallocated* operand) { |
1611 operand->set_virtual_register(instr->id()); | 1619 operand->set_virtual_register(instr->id()); |
1612 current_summary()->SetOutput(operand); | 1620 current_summary()->SetOutput(operand); |
1613 } | 1621 } |
1614 | 1622 |
1615 | 1623 |
1616 void LAllocator::RecordTemporary(LUnallocated* operand) { | 1624 void LAllocator::RecordTemporary(LUnallocated* operand) { |
1617 ASSERT(next_virtual_register_ < LUnallocated::kMaxVirtualRegisters); | 1625 ASSERT(next_virtual_register_ < LUnallocated::kMaxVirtualRegisters); |
1618 if (!operand->HasFixedPolicy()) { | 1626 if (!operand->HasFixedPolicy()) { |
1619 operand->set_virtual_register(next_virtual_register_++); | 1627 operand->set_virtual_register(next_virtual_register_++); |
(...skipping 517 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2137 LiveRange* current = live_ranges()->at(i); | 2145 LiveRange* current = live_ranges()->at(i); |
2138 if (current != NULL) current->Verify(); | 2146 if (current != NULL) current->Verify(); |
2139 } | 2147 } |
2140 } | 2148 } |
2141 | 2149 |
2142 | 2150 |
2143 #endif | 2151 #endif |
2144 | 2152 |
2145 | 2153 |
2146 } } // namespace v8::internal | 2154 } } // namespace v8::internal |
OLD | NEW |