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

Unified Diff: src/register-configuration.h

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: 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/compiler/register-allocator.cc ('k') | src/register-configuration.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/register-configuration.h
diff --git a/src/register-configuration.h b/src/register-configuration.h
index f12bc7c07c6dfb4beb79477f5a88ce16502b4c71..bd162cc82457ff067001218a77b0fca22ff8b587 100644
--- a/src/register-configuration.h
+++ b/src/register-configuration.h
@@ -34,13 +34,25 @@ class RegisterConfiguration {
int num_allocatable_general_registers() const {
return num_allocatable_general_registers_;
}
- int num_allocatable_double_registers() const {
+ int num_allocatable_double_registers(bool for_turbo = false) const {
+#if V8_TARGET_ARCH_X87
titzer 2015/10/15 16:44:43 Seems like this check should be moved to the ArchD
+ // TODO(X87): Currently Trubofan for X87 uses only one double register.
+ // But crankshaft for X87 has to use more than 1 double register. We
+ // use this temporary solution to return different allocatable double
+ // register number for different compilers and we will unify the number
+ // Turbofan and Crankshaft.
+ return for_turbo ? 1 : num_allocatable_double_registers_;
+#endif
return num_allocatable_double_registers_;
}
// TODO(turbofan): This is a temporary work-around required because our
// register allocator does not yet support the aliasing of single/double
// registers on ARM.
- int num_allocatable_aliased_double_registers() const {
+ int num_allocatable_aliased_double_registers(bool for_turbo = false) const {
+#if V8_TARGET_ARCH_X87
+ // Same reason as num_allocatable_double_registers() function.
+ return for_turbo ? 1 : num_allocatable_aliased_double_registers_;
+#endif
return num_allocatable_aliased_double_registers_;
}
int32_t allocatable_general_codes_mask() const {
« no previous file with comments | « src/compiler/register-allocator.cc ('k') | src/register-configuration.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698