Reviewers: Benedikt Meurer,
Message:
This cropped up when I was generating the interpreter prototype in the
snapshot.
I'm not sure why it didn't happen for the current TurboFanCodeStubs.
Benedikt, PTAL, thanks.
Description:
[turbofan] Use NumAllocatableRegisters() instead of
kMaxNumAllocatableRegisters.
Use NumAllocatableRegisters() instead of kMaxNumAllocatableRegisters in
ArchDefaultRegisterConfiguration::ArchDefaultRegisterConfiguration()
otherwise the compiler DCHECKS if triggered during snapshot builds on
Arm where only 16 DoubleRegisters are avaiable instead of 32.
BUG=v8:4280
LOG=N
Please review this at https://codereview.chromium.org/1230473006/
Base URL: https://chromium.googlesource.com/v8/v8.git@master
Affected files (+4, -2 lines):
M src/compiler/register-configuration.cc
Index: src/compiler/register-configuration.cc
diff --git a/src/compiler/register-configuration.cc
b/src/compiler/register-configuration.cc
index
a3d3be1790a6a41ea64fb506f3be4b81d525fd3a..ebe6cfe23c34f3942b3945bc8d6f57687cbccedd
100644
--- a/src/compiler/register-configuration.cc
+++ b/src/compiler/register-configuration.cc
@@ -25,7 +25,7 @@ class ArchDefaultRegisterConfiguration : public
RegisterConfiguration {
1,
1,
#else
- DoubleRegister::kMaxNumAllocatableRegisters,
+ DoubleRegister::NumAllocatableRegisters(),
DoubleRegister::NumAllocatableAliasedRegisters(),
#endif
general_register_name_table_,
@@ -35,7 +35,9 @@ class ArchDefaultRegisterConfiguration : public
RegisterConfiguration {
for (int i = 0; i < Register::kMaxNumAllocatableRegisters; ++i) {
general_register_name_table_[i] =
Register::AllocationIndexToString(i);
}
- for (int i = 0; i < DoubleRegister::kMaxNumAllocatableRegisters; ++i) {
+ DCHECK_GE(DoubleRegister::kMaxNumAllocatableRegisters,
+ DoubleRegister::NumAllocatableRegisters());
+ for (int i = 0; i < DoubleRegister::NumAllocatableRegisters(); ++i) {
double_register_name_table_[i] =
DoubleRegister::AllocationIndexToString(i);
}
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.