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

Unified Diff: src/register-configuration.cc

Issue 2827743002: [ARM] Reserve scratch q-register. (Closed)
Patch Set: Fix issue with allocatable double registers without VFP32DREGS. Created 3 years, 8 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/arm/code-generator-arm.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/register-configuration.cc
diff --git a/src/register-configuration.cc b/src/register-configuration.cc
index d4b90ca9265e4e86900d502d0b51ccddc608a3d8..af35fd3b03c77b1b42acefddc5a54cf76d9faaed 100644
--- a/src/register-configuration.cc
+++ b/src/register-configuration.cc
@@ -22,9 +22,13 @@ static const int kAllocatableGeneralCodes[] = {
ALLOCATABLE_GENERAL_REGISTERS(REGISTER_CODE)};
#undef REGISTER_CODE
-static const int kAllocatableDoubleCodes[] = {
#define REGISTER_CODE(R) DoubleRegister::kCode_##R,
+static const int kAllocatableDoubleCodes[] = {
ALLOCATABLE_DOUBLE_REGISTERS(REGISTER_CODE)};
+#if V8_TARGET_ARCH_ARM
+static const int kAllocatableNoVFP32DoubleCodes[] = {
+ ALLOCATABLE_NO_VFP32_DOUBLE_REGISTERS(REGISTER_CODE)};
+#endif // V8_TARGET_ARCH_ARM
#undef REGISTER_CODE
static const char* const kGeneralRegisterNames[] = {
@@ -99,7 +103,14 @@ class ArchDefaultRegisterConfiguration : public RegisterConfiguration {
#else
#error Unsupported target architecture.
#endif
- kAllocatableGeneralCodes, kAllocatableDoubleCodes,
+ kAllocatableGeneralCodes,
+#if V8_TARGET_ARCH_ARM
+ CpuFeatures::IsSupported(VFP32DREGS)
+ ? kAllocatableDoubleCodes
+ : kAllocatableNoVFP32DoubleCodes,
+#else
+ kAllocatableDoubleCodes,
+#endif
kSimpleFPAliasing ? AliasingKind::OVERLAP : AliasingKind::COMBINE,
kGeneralRegisterNames, kFloatRegisterNames, kDoubleRegisterNames,
kSimd128RegisterNames) {
« no previous file with comments | « src/compiler/arm/code-generator-arm.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698