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

Unified Diff: src/compiler/instruction.cc

Issue 2030143002: Add FloatRegister names to RegisterConfiguration. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix non-ARM ports. Created 4 years, 7 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 | « src/compiler/graph-visualizer.cc ('k') | src/register-configuration.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/instruction.cc
diff --git a/src/compiler/instruction.cc b/src/compiler/instruction.cc
index 1a9e8cc5d273d6adab77f3614858cdf985c3cb01..b461c5d8965839a587e5c26c63f97a73cb0d3d3e 100644
--- a/src/compiler/instruction.cc
+++ b/src/compiler/instruction.cc
@@ -126,15 +126,16 @@ std::ostream& operator<<(std::ostream& os,
case InstructionOperand::ALLOCATED: {
LocationOperand allocated = LocationOperand::cast(op);
if (op.IsStackSlot()) {
- os << "[stack:" << LocationOperand::cast(op).index();
+ os << "[stack:" << allocated.index();
} else if (op.IsFPStackSlot()) {
- os << "[fp_stack:" << LocationOperand::cast(op).index();
+ os << "[fp_stack:" << allocated.index();
} else if (op.IsRegister()) {
- os << "[" << LocationOperand::cast(op).GetRegister().ToString() << "|R";
+ os << "[" << allocated.GetRegister().ToString() << "|R";
+ } else if (op.IsDoubleRegister()) {
+ os << "[" << allocated.GetDoubleRegister().ToString() << "|R";
} else {
- DCHECK(op.IsFPRegister());
- os << "[" << LocationOperand::cast(op).GetDoubleRegister().ToString()
- << "|R";
+ DCHECK(op.IsFloatRegister());
+ os << "[" << allocated.GetFloatRegister().ToString() << "|R";
}
if (allocated.IsExplicit()) {
os << "|E";
@@ -247,7 +248,9 @@ ExplicitOperand::ExplicitOperand(LocationKind kind, MachineRepresentation rep,
: LocationOperand(EXPLICIT, kind, rep, index) {
DCHECK_IMPLIES(kind == REGISTER && !IsFloatingPoint(rep),
Register::from_code(index).IsAllocatable());
- DCHECK_IMPLIES(kind == REGISTER && IsFloatingPoint(rep),
+ DCHECK_IMPLIES(kind == REGISTER && (rep == MachineRepresentation::kFloat32),
+ FloatRegister::from_code(index).IsAllocatable());
+ DCHECK_IMPLIES(kind == REGISTER && (rep == MachineRepresentation::kFloat64),
DoubleRegister::from_code(index).IsAllocatable());
}
« no previous file with comments | « src/compiler/graph-visualizer.cc ('k') | src/register-configuration.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698