[binutils-gdb] tidy tilegx and tilepro MAX_MEM_FOR_RS_ALIGN_CODE

Alan Modra amodra@sourceware.org
Wed Sep 3 05:37:51 GMT 2025


https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=97297d94628346a51d74b6eb13a7c12dccea32e5

commit 97297d94628346a51d74b6eb13a7c12dccea32e5
Author: Alan Modra <amodra@gmail.com>
Date:   Tue Sep 2 21:45:39 2025 +0930

    tidy tilegx and tilepro MAX_MEM_FOR_RS_ALIGN_CODE
    
    These weren't wrong, but should use the BUNDLE_SIZE macros, in case
    they ever change.
    
            * config/tc-tilegx.h (MAX_MEM_FOR_RS_ALIGN_CODE): Use
            TILEGX_BUNDLE_SIZE_IN_BYTES.
            * config/tc-tilepro.h (MAX_MEM_FOR_RS_ALIGN_CODE): Use
            TILEPRO_BUNDLE_SIZE_IN_BYTES.

Diff:
---
 gas/config/tc-tilegx.h  | 3 ++-
 gas/config/tc-tilepro.h | 3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/gas/config/tc-tilegx.h b/gas/config/tc-tilegx.h
index e3789e4ed97..ad935ef6060 100644
--- a/gas/config/tc-tilegx.h
+++ b/gas/config/tc-tilegx.h
@@ -42,7 +42,8 @@ extern const char * tilegx_target_format (void);
 #define HANDLE_ALIGN(sec, fragp) tilegx_handle_align (fragp)
 extern void tilegx_handle_align (struct frag *);
 
-#define MAX_MEM_FOR_RS_ALIGN_CODE(p2align, max) (7 + 8)
+#define MAX_MEM_FOR_RS_ALIGN_CODE(p2align, max) \
+  (2 * TILEGX_BUNDLE_SIZE_IN_BYTES - 1)
 
 struct tilegx_operand;
 #define TC_FIX_TYPE const struct tilegx_operand *
diff --git a/gas/config/tc-tilepro.h b/gas/config/tc-tilepro.h
index f985053d815..4f57309194c 100644
--- a/gas/config/tc-tilepro.h
+++ b/gas/config/tc-tilepro.h
@@ -42,7 +42,8 @@
 #define HANDLE_ALIGN(sec, fragp) tilepro_handle_align (fragp)
 extern void tilepro_handle_align (struct frag *);
 
-#define MAX_MEM_FOR_RS_ALIGN_CODE(p2align, max) (7 + 8)
+#define MAX_MEM_FOR_RS_ALIGN_CODE(p2align, max) \
+  (2 * TILEPRO_BUNDLE_SIZE_IN_BYTES - 1)
 
 struct tilepro_operand;
 #define TC_FIX_TYPE const struct tilepro_operand *


More information about the Binutils-cvs mailing list