[amdgcn] Unfix registers for frame pointer
authorKwok Cheung Yeung <kcy@codesourcery.com>
Fri, 15 Nov 2019 16:49:08 +0000 (16:49 +0000)
committerKwok Cheung Yeung <kcy@gcc.gnu.org>
Fri, 15 Nov 2019 16:49:08 +0000 (16:49 +0000)
Allow the registers used for the frame pointer to be used for other purposes
if the frame pointer is not being used.

2019-11-15  Kwok Cheung Yeung  <kcy@codesourcery.com>

gcc/
* config/gcn/gcn.h (FIXED_REGISTERS): Unfix frame pointer.
(CALL_USED_REGISTERS): Make frame pointer callee-saved.

From-SVN: r278306

gcc/ChangeLog
gcc/config/gcn/gcn.h

index 8c06b82..fcc4f7b 100644 (file)
@@ -1,5 +1,10 @@
 2019-11-15  Kwok Cheung Yeung  <kcy@codesourcery.com>
 
+       * config/gcn/gcn.h (FIXED_REGISTERS): Unfix frame pointer.
+       (CALL_USED_REGISTERS): Make frame pointer callee-saved.
+
+2019-11-15  Kwok Cheung Yeung  <kcy@codesourcery.com>
+
        * config/gcn/gcn.c (MAX_NORMAL_SGPR_COUNT, MAX_NORMAL_VGPR_COUNT): New.
        (gcn_conditional_register_usage): Use constants in place of hard-coded
        values.
index dd3789b..e60b431 100644 (file)
     /* Scalars.  */                                \
     1, 1, 0, 0, 1, 1, 0, 0, 1, 1,                  \
 /*             fp    sp    lr.  */                 \
-    1, 1, 0, 0, 1, 1, 1, 1, 0, 0,                  \
+    1, 1, 0, 0, 0, 0, 1, 1, 0, 0,                  \
 /*  exec_save, cc_save */                          \
     1, 1, 1, 1, 0, 0, 0, 0, 0, 0,                  \
     0, 0, 0, 0, 0, 0, 0, 0, 0, 0,                  \
 #define CALL_USED_REGISTERS {                      \
     /* Scalars.  */                                \
     1, 1, 1, 1, 1, 1, 1, 1, 1, 1,                  \
-    1, 1, 1, 1, 1, 1, 1, 1, 1, 1,                  \
+    1, 1, 1, 1, 0, 0, 1, 1, 1, 1,                  \
     1, 1, 1, 1, 1, 1, 1, 1, 1, 1,                  \
     1, 1, 0, 0, 0, 0, 0, 0, 0, 0,                  \
     0, 0, 0, 0, 0, 0, 0, 0, 0, 0,                  \