summaryrefslogtreecommitdiff
path: root/0195-Backport-SME-aarch64-Minor-initial-adjustment-tweak.patch
blob: d962cb934bce9db31263fe88134ed1a24a5aa0a8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
From 0ab484f5de7d28c0a7166439d403e0983834b120 Mon Sep 17 00:00:00 2001
From: Richard Sandiford <richard.sandiford@arm.com>
Date: Tue, 12 Sep 2023 16:05:10 +0100
Subject: [PATCH 096/157] [Backport][SME] aarch64: Minor initial adjustment
 tweak

Reference: https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=ee5466ff4faca2076cc61f1f120d0b5062c8111c

This patch just changes a calculation of initial_adjust
to one that makes it slightly more obvious that the total
adjustment is frame.frame_size.

gcc/
	* config/aarch64/aarch64.cc (aarch64_layout_frame): Tweak
	calculation of initial_adjust for frames in which all saves
	are SVE saves.
---
 gcc/config/aarch64/aarch64.cc | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/gcc/config/aarch64/aarch64.cc b/gcc/config/aarch64/aarch64.cc
index 3329aa364..72604dd9d 100644
--- a/gcc/config/aarch64/aarch64.cc
+++ b/gcc/config/aarch64/aarch64.cc
@@ -9014,11 +9014,10 @@ aarch64_layout_frame (void)
     {
       /* Frame in which all saves are SVE saves:
 
-	 sub sp, sp, hard_fp_offset + below_hard_fp_saved_regs_size
+	 sub sp, sp, frame_size - bytes_below_saved_regs
 	 save SVE registers relative to SP
 	 sub sp, sp, bytes_below_saved_regs  */
-      frame.initial_adjust = (frame.bytes_above_hard_fp
-			      + frame.below_hard_fp_saved_regs_size);
+      frame.initial_adjust = frame.frame_size - frame.bytes_below_saved_regs;
       frame.final_adjust = frame.bytes_below_saved_regs;
     }
   else if (frame.bytes_above_hard_fp.is_constant (&const_above_fp)
-- 
2.33.0