Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(455)

Side by Side Diff: src/compiler/register-allocator.cc

Issue 436593002: [turbofan] Add Int32AddWithOverflow machine operator. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Add more tests. Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/compiler/opcodes.h ('k') | src/compiler/x64/code-generator-x64.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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/compiler/register-allocator.h" 5 #include "src/compiler/register-allocator.h"
6 6
7 #include "src/compiler/linkage.h" 7 #include "src/compiler/linkage.h"
8 #include "src/hydrogen.h" 8 #include "src/hydrogen.h"
9 #include "src/string-stream.h" 9 #include "src/string-stream.h"
10 10
(...skipping 801 matching lines...) Expand 10 before | Expand all | Expand 10 after
812 UnallocatedOperand* input_copy = 812 UnallocatedOperand* input_copy =
813 cur_input->CopyUnconstrained(code_zone()); 813 cur_input->CopyUnconstrained(code_zone());
814 bool is_tagged = HasTaggedValue(cur_input->virtual_register()); 814 bool is_tagged = HasTaggedValue(cur_input->virtual_register());
815 AllocateFixed(cur_input, gap_index + 1, is_tagged); 815 AllocateFixed(cur_input, gap_index + 1, is_tagged);
816 AddConstraintsGapMove(gap_index, input_copy, cur_input); 816 AddConstraintsGapMove(gap_index, input_copy, cur_input);
817 } 817 }
818 } 818 }
819 819
820 // Handle "output same as input" for second instruction. 820 // Handle "output same as input" for second instruction.
821 for (size_t i = 0; i < second->OutputCount(); i++) { 821 for (size_t i = 0; i < second->OutputCount(); i++) {
822 InstructionOperand* output = second->Output(); 822 InstructionOperand* output = second->OutputAt(i);
823 if (!output->IsUnallocated()) continue; 823 if (!output->IsUnallocated()) continue;
824 UnallocatedOperand* second_output = UnallocatedOperand::cast(output); 824 UnallocatedOperand* second_output = UnallocatedOperand::cast(output);
825 if (second_output->HasSameAsInputPolicy()) { 825 if (second_output->HasSameAsInputPolicy()) {
826 ASSERT(second->OutputCount() == 1); // Only valid for one output. 826 ASSERT(i == 0); // Only valid for first output.
827 UnallocatedOperand* cur_input = 827 UnallocatedOperand* cur_input =
828 UnallocatedOperand::cast(second->InputAt(0)); 828 UnallocatedOperand::cast(second->InputAt(0));
829 int output_vreg = second_output->virtual_register(); 829 int output_vreg = second_output->virtual_register();
830 int input_vreg = cur_input->virtual_register(); 830 int input_vreg = cur_input->virtual_register();
831 831
832 UnallocatedOperand* input_copy = 832 UnallocatedOperand* input_copy =
833 cur_input->CopyUnconstrained(code_zone()); 833 cur_input->CopyUnconstrained(code_zone());
834 cur_input->set_virtual_register(second_output->virtual_register()); 834 cur_input->set_virtual_register(second_output->virtual_register());
835 AddConstraintsGapMove(gap_index, input_copy, cur_input); 835 AddConstraintsGapMove(gap_index, input_copy, cur_input);
836 836
(...skipping 1320 matching lines...) Expand 10 before | Expand all | Expand 10 after
2157 allocator_zone_start_allocation_size_; 2157 allocator_zone_start_allocation_size_;
2158 isolate()->GetTStatistics()->SaveTiming(name(), base::TimeDelta(), size); 2158 isolate()->GetTStatistics()->SaveTiming(name(), base::TimeDelta(), size);
2159 } 2159 }
2160 #ifdef DEBUG 2160 #ifdef DEBUG
2161 if (allocator_ != NULL) allocator_->Verify(); 2161 if (allocator_ != NULL) allocator_->Verify();
2162 #endif 2162 #endif
2163 } 2163 }
2164 } 2164 }
2165 } 2165 }
2166 } // namespace v8::internal::compiler 2166 } // namespace v8::internal::compiler
OLDNEW
« no previous file with comments | « src/compiler/opcodes.h ('k') | src/compiler/x64/code-generator-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698