Patchwork [AArch64/GCC,4/N] Remove useless parameter 'base_rtx'

login
register
mail settings
Submitter Jiong Wang
Date July 22, 2014, 2:50 p.m.
Message ID <53CE7A53.6060702@arm.com>
Download mbox | patch
Permalink /patch/372491/
State New
Headers show

Comments

Jiong Wang - July 22, 2014, 2:50 p.m.
This patch removes the useless paramter 'base_rtx', as we use
stack_pointer_rtx always.

*no functional change*

OK to install?

thanks

gcc/
   * config/aarch64/aarch64.c (aarch64_save_or_restore_fprs): Remove base_rtx.
   (aarch64_save_or_restore_callee_save_registers): Likewise.
Marcus Shawcroft - July 23, 2014, 4:07 p.m.
On 22 July 2014 15:50, Jiong Wang <jiong.wang@arm.com> wrote:

> gcc/
>   * config/aarch64/aarch64.c (aarch64_save_or_restore_fprs): Remove
> base_rtx.
>   (aarch64_save_or_restore_callee_save_registers): Likewise.

OK and applied.
/Marcus

Patch

>From a3712f8a84293a76586eb329bff1eec6e7233a21 Mon Sep 17 00:00:00 2001
From: Jiong Wang <jiong.wang@arm.com>
Date: Tue, 17 Jun 2014 21:38:16 +0100
Subject: [PATCH 04/19] [AArch64/GCC][4/20] Remove useless parameter
 'base_rtx'

This patch removes the useless paramter 'base_rtx', as we always use
stack_pointer_rtx.

*no functional change*

2014-06-16  Jiong Wang <jiong.wang@arm.com>
	    Marcus Shawcroft  <marcus.shawcroft@arm.com>

gcc/
  * config/aarch64/aarch64.c (aarch64_save_or_restore_fprs): Remove base_rtx.
  (aarch64_save_or_restore_callee_save_registers): Likewise.
---
 gcc/config/aarch64/aarch64.c |   13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)

diff --git a/gcc/config/aarch64/aarch64.c b/gcc/config/aarch64/aarch64.c
index bd43736..abcf30b 100644
--- a/gcc/config/aarch64/aarch64.c
+++ b/gcc/config/aarch64/aarch64.c
@@ -1908,7 +1908,7 @@  aarch64_register_saved_on_entry (int regno)
 
 static void
 aarch64_save_or_restore_fprs (HOST_WIDE_INT start_offset, int increment,
-			      bool restore, rtx base_rtx)
+			      bool restore)
 
 {
   unsigned regno;
@@ -1924,7 +1924,7 @@  aarch64_save_or_restore_fprs (HOST_WIDE_INT start_offset, int increment,
 	  rtx mem;
 	  mem = gen_mem_ref (DFmode,
 			     plus_constant (Pmode,
-					    base_rtx,
+					    stack_pointer_rtx,
 					    start_offset));
 
 	  for (regno2 = regno + 1;
@@ -1944,7 +1944,7 @@  aarch64_save_or_restore_fprs (HOST_WIDE_INT start_offset, int increment,
 	      mem2 = gen_mem_ref (DFmode,
 				  plus_constant
 				  (Pmode,
-				   base_rtx,
+				   stack_pointer_rtx,
 				   start_offset + increment));
 	      if (restore == false)
 		{
@@ -1998,7 +1998,6 @@  aarch64_save_or_restore_callee_save_registers (HOST_WIDE_INT start_offset,
 					       bool restore)
 {
   rtx insn;
-  rtx base_rtx = stack_pointer_rtx;
   HOST_WIDE_INT increment = UNITS_PER_WORD;
   rtx (*gen_mem_ref) (enum machine_mode, rtx) = (frame_pointer_needed
 						 ? gen_frame_mem : gen_rtx_MEM);
@@ -2013,7 +2012,7 @@  aarch64_save_or_restore_callee_save_registers (HOST_WIDE_INT start_offset,
 	  rtx mem;
 	  mem = gen_mem_ref (Pmode,
 			     plus_constant (Pmode,
-					    base_rtx,
+					    stack_pointer_rtx,
 					    start_offset));
 
 	  for (regno2 = regno + 1;
@@ -2032,7 +2031,7 @@  aarch64_save_or_restore_callee_save_registers (HOST_WIDE_INT start_offset,
 	      mem2 = gen_mem_ref (Pmode,
 				  plus_constant
 				  (Pmode,
-				   base_rtx,
+				   stack_pointer_rtx,
 				   start_offset + increment));
 	      if (restore == false)
 		{
@@ -2077,7 +2076,7 @@  aarch64_save_or_restore_callee_save_registers (HOST_WIDE_INT start_offset,
 	}
     }
 
-  aarch64_save_or_restore_fprs (start_offset, increment, restore, base_rtx);
+  aarch64_save_or_restore_fprs (start_offset, increment, restore);
 }
 
 /* AArch64 stack frames generated by this compiler look like:
-- 
1.7.9.5