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

Side by Side Diff: src/arm/lithium-codegen-arm.cc

Issue 6128007: Reuse the gap move resolver. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge/build/ia32
Patch Set: Created 9 years, 11 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/arm/lithium-codegen-arm.h ('k') | src/ia32/lithium-codegen-ia32.h » ('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 2010 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
11 // with the distribution. 11 // with the distribution.
(...skipping 582 matching lines...) Expand 10 before | Expand all | Expand 10 after
594 594
595 595
596 void LCodeGen::DoParallelMove(LParallelMove* move) { 596 void LCodeGen::DoParallelMove(LParallelMove* move) {
597 // d0 must always be a scratch register. 597 // d0 must always be a scratch register.
598 DoubleRegister dbl_scratch = d0; 598 DoubleRegister dbl_scratch = d0;
599 LUnallocated marker_operand(LUnallocated::NONE); 599 LUnallocated marker_operand(LUnallocated::NONE);
600 600
601 Register core_scratch = scratch0(); 601 Register core_scratch = scratch0();
602 bool destroys_core_scratch = false; 602 bool destroys_core_scratch = false;
603 603
604 LGapResolver resolver(move->move_operands(), &marker_operand); 604 const ZoneList<LMoveOperands>* moves =
605 const ZoneList<LMoveOperands>* moves = resolver.ResolveInReverseOrder(); 605 resolver_.Resolve(move->move_operands(), &marker_operand);
606 for (int i = moves->length() - 1; i >= 0; --i) { 606 for (int i = moves->length() - 1; i >= 0; --i) {
607 LMoveOperands move = moves->at(i); 607 LMoveOperands move = moves->at(i);
608 LOperand* from = move.from(); 608 LOperand* from = move.from();
609 LOperand* to = move.to(); 609 LOperand* to = move.to();
610 ASSERT(!from->IsDoubleRegister() || 610 ASSERT(!from->IsDoubleRegister() ||
611 !ToDoubleRegister(from).is(dbl_scratch)); 611 !ToDoubleRegister(from).is(dbl_scratch));
612 ASSERT(!to->IsDoubleRegister() || !ToDoubleRegister(to).is(dbl_scratch)); 612 ASSERT(!to->IsDoubleRegister() || !ToDoubleRegister(to).is(dbl_scratch));
613 ASSERT(!from->IsRegister() || !ToRegister(from).is(core_scratch)); 613 ASSERT(!from->IsRegister() || !ToRegister(from).is(core_scratch));
614 ASSERT(!to->IsRegister() || !ToRegister(to).is(core_scratch)); 614 ASSERT(!to->IsRegister() || !ToRegister(to).is(core_scratch));
615 if (from == &marker_operand) { 615 if (from == &marker_operand) {
(...skipping 2025 matching lines...) Expand 10 before | Expand all | Expand 10 after
2641 2641
2642 2642
2643 void LCodeGen::DoOsrEntry(LOsrEntry* instr) { 2643 void LCodeGen::DoOsrEntry(LOsrEntry* instr) {
2644 Abort("DoOsrEntry unimplemented."); 2644 Abort("DoOsrEntry unimplemented.");
2645 } 2645 }
2646 2646
2647 2647
2648 #undef __ 2648 #undef __
2649 2649
2650 } } // namespace v8::internal 2650 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/arm/lithium-codegen-arm.h ('k') | src/ia32/lithium-codegen-ia32.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698