Chromium Code Reviews| 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 { |