diff mbox series

[5/5,amdgcn] Unfix frame pointer

Message ID fa1d812f-f4d5-3e2f-e7ec-0f5a31bd83e7@codesourcery.com
State New
Headers show
Series Reduce register usage on AMD GCN | expand

Commit Message

Kwok Cheung Yeung Nov. 14, 2019, 3:34 p.m. UTC
This patch unfixes the registers for the hard frame pointer so that they 
can be used for other purposes if the frame pointer is not in use.

This patch is dependent on the commit 'Support using multiple registers 
to hold the frame pointer' (r277895) to work properly.

Okay for trunk?

Kwok


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

	gcc/
	* config/gcn/gcn.h (FIXED_REGISTERS): Unfix frame pointer.
	(CALL_USED_REGISTERS): Make frame pointer callee-saved.
---
  gcc/config/gcn/gcn.h | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Andrew Stubbs Nov. 15, 2019, 11:36 a.m. UTC | #1
On 14/11/2019 15:34, Kwok Cheung Yeung wrote:
> This patch unfixes the registers for the hard frame pointer so that they 
> can be used for other purposes if the frame pointer is not in use.
> 
> This patch is dependent on the commit 'Support using multiple registers 
> to hold the frame pointer' (r277895) to work properly.
> 
> Okay for trunk?

OK

Andrew
diff mbox series

Patch

diff --git a/gcc/config/gcn/gcn.h b/gcc/config/gcn/gcn.h
index dd3789b..e60b431 100644
--- a/gcc/config/gcn/gcn.h
+++ b/gcc/config/gcn/gcn.h
@@ -162,7 +162,7 @@ 
      /* 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,		    \
@@ -203,7 +203,7 @@ 
  #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, 		    \