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

Unified Diff: src/lithium.cc

Issue 1287383003: Re-reland: Remove register index/code indirection (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix MIPS tests again Created 5 years, 2 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/ia32/macro-assembler-ia32.h ('k') | src/lithium-allocator.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/lithium.cc
diff --git a/src/lithium.cc b/src/lithium.cc
index 7d37532ace71140d61bf42f20937aac91ac3088d..bc48a0a16389e3f505ebba26fba867726f45e271 100644
--- a/src/lithium.cc
+++ b/src/lithium.cc
@@ -56,24 +56,22 @@ void LOperand::PrintTo(StringStream* stream) {
break;
case LUnallocated::FIXED_REGISTER: {
int reg_index = unalloc->fixed_register_index();
- if (reg_index < 0 ||
- reg_index >= Register::kMaxNumAllocatableRegisters) {
+ if (reg_index < 0 || reg_index >= Register::kNumRegisters) {
stream->Add("(=invalid_reg#%d)", reg_index);
} else {
const char* register_name =
- Register::AllocationIndexToString(reg_index);
+ Register::from_code(reg_index).ToString();
stream->Add("(=%s)", register_name);
}
break;
}
case LUnallocated::FIXED_DOUBLE_REGISTER: {
int reg_index = unalloc->fixed_register_index();
- if (reg_index < 0 ||
- reg_index >= DoubleRegister::kMaxNumAllocatableRegisters) {
+ if (reg_index < 0 || reg_index >= DoubleRegister::kMaxNumRegisters) {
stream->Add("(=invalid_double_reg#%d)", reg_index);
} else {
const char* double_register_name =
- DoubleRegister::AllocationIndexToString(reg_index);
+ DoubleRegister::from_code(reg_index).ToString();
stream->Add("(=%s)", double_register_name);
}
break;
@@ -106,21 +104,19 @@ void LOperand::PrintTo(StringStream* stream) {
break;
case REGISTER: {
int reg_index = index();
- if (reg_index < 0 || reg_index >= Register::kMaxNumAllocatableRegisters) {
+ if (reg_index < 0 || reg_index >= Register::kNumRegisters) {
stream->Add("(=invalid_reg#%d|R)", reg_index);
} else {
- stream->Add("[%s|R]", Register::AllocationIndexToString(reg_index));
+ stream->Add("[%s|R]", Register::from_code(reg_index).ToString());
}
break;
}
case DOUBLE_REGISTER: {
int reg_index = index();
- if (reg_index < 0 ||
- reg_index >= DoubleRegister::kMaxNumAllocatableRegisters) {
+ if (reg_index < 0 || reg_index >= DoubleRegister::kMaxNumRegisters) {
stream->Add("(=invalid_double_reg#%d|R)", reg_index);
} else {
- stream->Add("[%s|R]",
- DoubleRegister::AllocationIndexToString(reg_index));
+ stream->Add("[%s|R]", DoubleRegister::from_code(reg_index).ToString());
}
break;
}
« no previous file with comments | « src/ia32/macro-assembler-ia32.h ('k') | src/lithium-allocator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698