summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorARATA Mizuki <minorinoki@gmail.com>2021-02-25 14:10:36 +0900
committerMarge Bot <ben+marge-bot@smart-cactus.org>2021-03-02 17:29:43 -0500
commit38ebb9db3ff46173176c2e633b1ac34d1d5aa420 (patch)
tree662276105f17223e253c29a3ff80c31fdacff9b4
parent507f8de20b498258ec26d6b44731214e48bfa0a8 (diff)
downloadhaskell-38ebb9db3ff46173176c2e633b1ac34d1d5aa420.tar.gz
Support auto-detection of MAX_REAL_FLOAT_REG and MAX_REAL_DOUBLE_REG up to 6
Fixes #17953
-rw-r--r--includes/stg/MachRegs.h20
1 files changed, 18 insertions, 2 deletions
diff --git a/includes/stg/MachRegs.h b/includes/stg/MachRegs.h
index be7b7d60b4..a04452e0e7 100644
--- a/includes/stg/MachRegs.h
+++ b/includes/stg/MachRegs.h
@@ -717,7 +717,13 @@ the stack. See Note [Overlapping global registers] for implications.
#endif
#if !defined(MAX_REAL_FLOAT_REG)
-# if defined(REG_F4)
+# if defined(REG_F7)
+# error Please manually define MAX_REAL_FLOAT_REG for this architecture
+# elif defined(REG_F6)
+# define MAX_REAL_FLOAT_REG 6
+# elif defined(REG_F5)
+# define MAX_REAL_FLOAT_REG 5
+# elif defined(REG_F4)
# define MAX_REAL_FLOAT_REG 4
# elif defined(REG_F3)
# define MAX_REAL_FLOAT_REG 3
@@ -731,7 +737,17 @@ the stack. See Note [Overlapping global registers] for implications.
#endif
#if !defined(MAX_REAL_DOUBLE_REG)
-# if defined(REG_D2)
+# if defined(REG_D7)
+# error Please manually define MAX_REAL_DOUBLE_REG for this architecture
+# elif defined(REG_D6)
+# define MAX_REAL_DOUBLE_REG 6
+# elif defined(REG_D5)
+# define MAX_REAL_DOUBLE_REG 5
+# elif defined(REG_D4)
+# define MAX_REAL_DOUBLE_REG 4
+# elif defined(REG_D3)
+# define MAX_REAL_DOUBLE_REG 3
+# elif defined(REG_D2)
# define MAX_REAL_DOUBLE_REG 2
# elif defined(REG_D1)
# define MAX_REAL_DOUBLE_REG 1