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

Side by Side Diff: src/compiler/code-generator.cc

Issue 2031873002: [deoptimizer] Support float registers and slots. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix compile. Created 4 years, 6 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
« no previous file with comments | « no previous file | src/compiler/code-generator-impl.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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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/code-generator.h" 5 #include "src/compiler/code-generator.h"
6 6
7 #include "src/address-map.h" 7 #include "src/address-map.h"
8 #include "src/compiler/code-generator-impl.h" 8 #include "src/compiler/code-generator-impl.h"
9 #include "src/compiler/linkage.h" 9 #include "src/compiler/linkage.h"
10 #include "src/compiler/pipeline.h" 10 #include "src/compiler/pipeline.h"
(...skipping 698 matching lines...) Expand 10 before | Expand all | Expand 10 after
709 translation->StoreInt32StackSlot(LocationOperand::cast(op)->index()); 709 translation->StoreInt32StackSlot(LocationOperand::cast(op)->index());
710 } else if (type == MachineType::Uint8() || type == MachineType::Uint16() || 710 } else if (type == MachineType::Uint8() || type == MachineType::Uint16() ||
711 type == MachineType::Uint32()) { 711 type == MachineType::Uint32()) {
712 translation->StoreUint32StackSlot(LocationOperand::cast(op)->index()); 712 translation->StoreUint32StackSlot(LocationOperand::cast(op)->index());
713 } else if (type.representation() == MachineRepresentation::kTagged) { 713 } else if (type.representation() == MachineRepresentation::kTagged) {
714 translation->StoreStackSlot(LocationOperand::cast(op)->index()); 714 translation->StoreStackSlot(LocationOperand::cast(op)->index());
715 } else { 715 } else {
716 CHECK(false); 716 CHECK(false);
717 } 717 }
718 } else if (op->IsFPStackSlot()) { 718 } else if (op->IsFPStackSlot()) {
719 DCHECK(IsFloatingPoint(type.representation())); 719 if (type.representation() == MachineRepresentation::kFloat64) {
720 translation->StoreDoubleStackSlot(LocationOperand::cast(op)->index()); 720 translation->StoreDoubleStackSlot(LocationOperand::cast(op)->index());
721 } else {
722 DCHECK_EQ(MachineRepresentation::kFloat32, type.representation());
723 translation->StoreFloatStackSlot(LocationOperand::cast(op)->index());
724 }
721 } else if (op->IsRegister()) { 725 } else if (op->IsRegister()) {
722 InstructionOperandConverter converter(this, instr); 726 InstructionOperandConverter converter(this, instr);
723 if (type.representation() == MachineRepresentation::kBit) { 727 if (type.representation() == MachineRepresentation::kBit) {
724 translation->StoreBoolRegister(converter.ToRegister(op)); 728 translation->StoreBoolRegister(converter.ToRegister(op));
725 } else if (type == MachineType::Int8() || type == MachineType::Int16() || 729 } else if (type == MachineType::Int8() || type == MachineType::Int16() ||
726 type == MachineType::Int32()) { 730 type == MachineType::Int32()) {
727 translation->StoreInt32Register(converter.ToRegister(op)); 731 translation->StoreInt32Register(converter.ToRegister(op));
728 } else if (type == MachineType::Uint8() || type == MachineType::Uint16() || 732 } else if (type == MachineType::Uint8() || type == MachineType::Uint16() ||
729 type == MachineType::Uint32()) { 733 type == MachineType::Uint32()) {
730 translation->StoreUint32Register(converter.ToRegister(op)); 734 translation->StoreUint32Register(converter.ToRegister(op));
731 } else if (type.representation() == MachineRepresentation::kTagged) { 735 } else if (type.representation() == MachineRepresentation::kTagged) {
732 translation->StoreRegister(converter.ToRegister(op)); 736 translation->StoreRegister(converter.ToRegister(op));
733 } else { 737 } else {
734 CHECK(false); 738 CHECK(false);
735 } 739 }
736 } else if (op->IsFPRegister()) { 740 } else if (op->IsFPRegister()) {
737 DCHECK(IsFloatingPoint(type.representation()));
738 InstructionOperandConverter converter(this, instr); 741 InstructionOperandConverter converter(this, instr);
739 translation->StoreDoubleRegister(converter.ToDoubleRegister(op)); 742 if (type.representation() == MachineRepresentation::kFloat64) {
743 translation->StoreDoubleRegister(converter.ToDoubleRegister(op));
744 } else {
745 DCHECK_EQ(MachineRepresentation::kFloat32, type.representation());
746 translation->StoreFloatRegister(converter.ToFloatRegister(op));
747 }
740 } else if (op->IsImmediate()) { 748 } else if (op->IsImmediate()) {
741 InstructionOperandConverter converter(this, instr); 749 InstructionOperandConverter converter(this, instr);
742 Constant constant = converter.ToConstant(op); 750 Constant constant = converter.ToConstant(op);
743 Handle<Object> constant_object; 751 Handle<Object> constant_object;
744 switch (constant.type()) { 752 switch (constant.type()) {
745 case Constant::kInt32: 753 case Constant::kInt32:
746 DCHECK(type == MachineType::Int32() || type == MachineType::Uint32() || 754 DCHECK(type == MachineType::Int32() || type == MachineType::Uint32() ||
747 type.representation() == MachineRepresentation::kBit); 755 type.representation() == MachineRepresentation::kBit);
748 constant_object = 756 constant_object =
749 isolate()->factory()->NewNumberFromInt(constant.ToInt32()); 757 isolate()->factory()->NewNumberFromInt(constant.ToInt32());
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
807 : frame_(gen->frame()), masm_(gen->masm()), next_(gen->ools_) { 815 : frame_(gen->frame()), masm_(gen->masm()), next_(gen->ools_) {
808 gen->ools_ = this; 816 gen->ools_ = this;
809 } 817 }
810 818
811 819
812 OutOfLineCode::~OutOfLineCode() {} 820 OutOfLineCode::~OutOfLineCode() {}
813 821
814 } // namespace compiler 822 } // namespace compiler
815 } // namespace internal 823 } // namespace internal
816 } // namespace v8 824 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | src/compiler/code-generator-impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698