OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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/crankshaft/x87/lithium-x87.h" | 5 #include "src/crankshaft/x87/lithium-x87.h" |
6 | 6 |
7 #include <sstream> | 7 #include <sstream> |
8 | 8 |
9 #if V8_TARGET_ARCH_X87 | 9 #if V8_TARGET_ARCH_X87 |
10 | 10 |
(...skipping 464 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
475 if (i < blocks->length() - 1) next = blocks->at(i + 1); | 475 if (i < blocks->length() - 1) next = blocks->at(i + 1); |
476 DoBasicBlock(blocks->at(i), next); | 476 DoBasicBlock(blocks->at(i), next); |
477 if (is_aborted()) return NULL; | 477 if (is_aborted()) return NULL; |
478 } | 478 } |
479 status_ = DONE; | 479 status_ = DONE; |
480 return chunk_; | 480 return chunk_; |
481 } | 481 } |
482 | 482 |
483 | 483 |
484 LUnallocated* LChunkBuilder::ToUnallocated(Register reg) { | 484 LUnallocated* LChunkBuilder::ToUnallocated(Register reg) { |
485 return new(zone()) LUnallocated(LUnallocated::FIXED_REGISTER, | 485 return new (zone()) LUnallocated(LUnallocated::FIXED_REGISTER, reg.code()); |
486 Register::ToAllocationIndex(reg)); | |
487 } | 486 } |
488 | 487 |
489 | 488 |
490 LUnallocated* LChunkBuilder::ToUnallocated(X87Register reg) { | 489 LUnallocated* LChunkBuilder::ToUnallocated(X87Register reg) { |
491 return new (zone()) LUnallocated(LUnallocated::FIXED_DOUBLE_REGISTER, | 490 return new (zone()) |
492 X87Register::ToAllocationIndex(reg)); | 491 LUnallocated(LUnallocated::FIXED_DOUBLE_REGISTER, reg.code()); |
493 } | 492 } |
494 | 493 |
495 | 494 |
496 LOperand* LChunkBuilder::UseFixed(HValue* value, Register fixed_register) { | 495 LOperand* LChunkBuilder::UseFixed(HValue* value, Register fixed_register) { |
497 return Use(value, ToUnallocated(fixed_register)); | 496 return Use(value, ToUnallocated(fixed_register)); |
498 } | 497 } |
499 | 498 |
500 | 499 |
501 LOperand* LChunkBuilder::UseRegister(HValue* value) { | 500 LOperand* LChunkBuilder::UseRegister(HValue* value) { |
502 return Use(value, new(zone()) LUnallocated(LUnallocated::MUST_HAVE_REGISTER)); | 501 return Use(value, new(zone()) LUnallocated(LUnallocated::MUST_HAVE_REGISTER)); |
(...skipping 2222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2725 LAllocateBlockContext* result = | 2724 LAllocateBlockContext* result = |
2726 new(zone()) LAllocateBlockContext(context, function); | 2725 new(zone()) LAllocateBlockContext(context, function); |
2727 return MarkAsCall(DefineFixed(result, esi), instr); | 2726 return MarkAsCall(DefineFixed(result, esi), instr); |
2728 } | 2727 } |
2729 | 2728 |
2730 | 2729 |
2731 } // namespace internal | 2730 } // namespace internal |
2732 } // namespace v8 | 2731 } // namespace v8 |
2733 | 2732 |
2734 #endif // V8_TARGET_ARCH_X87 | 2733 #endif // V8_TARGET_ARCH_X87 |
OLD | NEW |