This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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.
>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



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]