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

Unified 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/compiler/code-generator-impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/code-generator.cc
diff --git a/src/compiler/code-generator.cc b/src/compiler/code-generator.cc
index 5cf9d97ae6c3f3cee78dd42c6d2fcfb1bc743eed..ce5ce1e2e9d581e3c7855ee4f38ef99cac41fe4e 100644
--- a/src/compiler/code-generator.cc
+++ b/src/compiler/code-generator.cc
@@ -716,8 +716,12 @@ void CodeGenerator::AddTranslationForOperand(Translation* translation,
CHECK(false);
}
} else if (op->IsFPStackSlot()) {
- DCHECK(IsFloatingPoint(type.representation()));
- translation->StoreDoubleStackSlot(LocationOperand::cast(op)->index());
+ if (type.representation() == MachineRepresentation::kFloat64) {
+ translation->StoreDoubleStackSlot(LocationOperand::cast(op)->index());
+ } else {
+ DCHECK_EQ(MachineRepresentation::kFloat32, type.representation());
+ translation->StoreFloatStackSlot(LocationOperand::cast(op)->index());
+ }
} else if (op->IsRegister()) {
InstructionOperandConverter converter(this, instr);
if (type.representation() == MachineRepresentation::kBit) {
@@ -734,9 +738,13 @@ void CodeGenerator::AddTranslationForOperand(Translation* translation,
CHECK(false);
}
} else if (op->IsFPRegister()) {
- DCHECK(IsFloatingPoint(type.representation()));
InstructionOperandConverter converter(this, instr);
- translation->StoreDoubleRegister(converter.ToDoubleRegister(op));
+ if (type.representation() == MachineRepresentation::kFloat64) {
+ translation->StoreDoubleRegister(converter.ToDoubleRegister(op));
+ } else {
+ DCHECK_EQ(MachineRepresentation::kFloat32, type.representation());
+ translation->StoreFloatRegister(converter.ToFloatRegister(op));
+ }
} else if (op->IsImmediate()) {
InstructionOperandConverter converter(this, instr);
Constant constant = converter.ToConstant(op);
« 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