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

Unified Diff: src/assembler.cc

Issue 1405673003: provides a mechanism for optimizing compilers to select the different Register configuration. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Add the TODO comments. 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/arm64/macro-assembler-arm64.cc ('k') | src/compiler/graph-visualizer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/assembler.cc
diff --git a/src/assembler.cc b/src/assembler.cc
index 5dd86af15538de6aad7b257b49d778c0c0c6d9d9..e9e75744b10e2b0493152da329c120a9b1165eda 100644
--- a/src/assembler.cc
+++ b/src/assembler.cc
@@ -111,13 +111,14 @@ namespace internal {
const char* Register::ToString() {
// This is the mapping of allocation indices to registers.
DCHECK(reg_code >= 0 && reg_code < kNumRegisters);
- return RegisterConfiguration::ArchDefault()->GetGeneralRegisterName(reg_code);
+ return RegisterConfiguration::ArchDefault(RegisterConfiguration::CRANKSHAFT)
+ ->GetGeneralRegisterName(reg_code);
}
bool Register::IsAllocatable() const {
return ((1 << reg_code) &
- RegisterConfiguration::ArchDefault()
+ RegisterConfiguration::ArchDefault(RegisterConfiguration::CRANKSHAFT)
->allocatable_general_codes_mask()) != 0;
}
@@ -125,13 +126,14 @@ bool Register::IsAllocatable() const {
const char* DoubleRegister::ToString() {
// This is the mapping of allocation indices to registers.
DCHECK(reg_code >= 0 && reg_code < kMaxNumRegisters);
- return RegisterConfiguration::ArchDefault()->GetDoubleRegisterName(reg_code);
+ return RegisterConfiguration::ArchDefault(RegisterConfiguration::CRANKSHAFT)
+ ->GetDoubleRegisterName(reg_code);
}
bool DoubleRegister::IsAllocatable() const {
return ((1 << reg_code) &
- RegisterConfiguration::ArchDefault()
+ RegisterConfiguration::ArchDefault(RegisterConfiguration::CRANKSHAFT)
->allocatable_double_codes_mask()) != 0;
}
« no previous file with comments | « src/arm64/macro-assembler-arm64.cc ('k') | src/compiler/graph-visualizer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698