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

Unified Diff: src/crankshaft/lithium.cc

Issue 2092413002: [RegisterConfiguration] Streamline access to arch defaults, simplify Registers. (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 | « src/crankshaft/ia32/lithium-gap-resolver-ia32.cc ('k') | src/crankshaft/lithium-allocator.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/crankshaft/lithium.cc
diff --git a/src/crankshaft/lithium.cc b/src/crankshaft/lithium.cc
index 5aed08718ade4a406479d278d81e3c128bdf7adf..4b3e0bc63a8d7279d37bcf42946215b5a501578d 100644
--- a/src/crankshaft/lithium.cc
+++ b/src/crankshaft/lithium.cc
@@ -40,6 +40,7 @@
namespace v8 {
namespace internal {
+const auto GetRegConfig = RegisterConfiguration::Crankshaft;
void LOperand::PrintTo(StringStream* stream) {
LUnallocated* unalloc = NULL;
@@ -63,7 +64,7 @@ void LOperand::PrintTo(StringStream* stream) {
stream->Add("(=invalid_reg#%d)", reg_index);
} else {
const char* register_name =
- Register::from_code(reg_index).ToString();
+ GetRegConfig()->GetGeneralRegisterName(reg_index);
stream->Add("(=%s)", register_name);
}
break;
@@ -74,7 +75,7 @@ void LOperand::PrintTo(StringStream* stream) {
stream->Add("(=invalid_double_reg#%d)", reg_index);
} else {
const char* double_register_name =
- DoubleRegister::from_code(reg_index).ToString();
+ GetRegConfig()->GetDoubleRegisterName(reg_index);
stream->Add("(=%s)", double_register_name);
}
break;
@@ -110,7 +111,8 @@ void LOperand::PrintTo(StringStream* stream) {
if (reg_index < 0 || reg_index >= Register::kNumRegisters) {
stream->Add("(=invalid_reg#%d|R)", reg_index);
} else {
- stream->Add("[%s|R]", Register::from_code(reg_index).ToString());
+ stream->Add("[%s|R]",
+ GetRegConfig()->GetGeneralRegisterName(reg_index));
}
break;
}
@@ -119,7 +121,7 @@ void LOperand::PrintTo(StringStream* stream) {
if (reg_index < 0 || reg_index >= DoubleRegister::kMaxNumRegisters) {
stream->Add("(=invalid_double_reg#%d|R)", reg_index);
} else {
- stream->Add("[%s|R]", DoubleRegister::from_code(reg_index).ToString());
+ stream->Add("[%s|R]", GetRegConfig()->GetDoubleRegisterName(reg_index));
}
break;
}
« no previous file with comments | « src/crankshaft/ia32/lithium-gap-resolver-ia32.cc ('k') | src/crankshaft/lithium-allocator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698