diff mbox series

[commit] amdgcn: Add padding to trampoline

Message ID 20240809122537.159882-1-ams@baylibre.com
State New
Headers show
Series [commit] amdgcn: Add padding to trampoline | expand

Commit Message

Andrew Stubbs Aug. 9, 2024, 12:25 p.m. UTC
This avoids a -Wpadded warning (testcase gcc.dg/20050607-1.c).

gcc/ChangeLog:

	* config/gcn/gcn.cc (gcn_asm_trampoline_template): Add .align.
	* config/gcn/gcn.h (TRAMPOLINE_SIZE): Increase to 40.
---
 gcc/config/gcn/gcn.cc | 1 +
 gcc/config/gcn/gcn.h  | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/gcc/config/gcn/gcn.cc b/gcc/config/gcn/gcn.cc
index 0725d15c8ed..17316a7ddb8 100644
--- a/gcc/config/gcn/gcn.cc
+++ b/gcc/config/gcn/gcn.cc
@@ -3794,6 +3794,7 @@  gcn_asm_trampoline_template (FILE *f)
   asm_fprintf (f, "\ts_mov_b32\ts%i, 0xffff\n", CC_SAVE_REG);
   asm_fprintf (f, "\ts_mov_b32\ts%i, 0xffff\n", CC_SAVE_REG + 1);
   asm_fprintf (f, "\ts_setpc_b64\ts[%i:%i]\n", CC_SAVE_REG, CC_SAVE_REG + 1);
+  asm_fprintf (f, "\t.align 8\n");
 }
 
 /* Implement TARGET_TRAMPOLINE_INIT.
diff --git a/gcc/config/gcn/gcn.h b/gcc/config/gcn/gcn.h
index e3bfd29c17d..bd2afa61c10 100644
--- a/gcc/config/gcn/gcn.h
+++ b/gcc/config/gcn/gcn.h
@@ -831,7 +831,7 @@  enum gcn_builtin_codes
 #define PROFILE_BEFORE_PROLOGUE 0
 
 /* Trampolines */
-#define TRAMPOLINE_SIZE 36
+#define TRAMPOLINE_SIZE 40  /* 36 + 4 padding for alignment.  */
 #define TRAMPOLINE_ALIGNMENT 64
 
 /* MD Optimization.