[binutils-gdb/binutils-2_47-branch] Commit 0e89ce812b79 ("aarch64: Remove cast from struct initializer") didn't go quite far enough: The
Nick Clifton
nickc@sourceware.org
Sun Jul 26 07:12:46 GMT 2026
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=a98ac982f160696989cede4b6b43b5a9c2b32c74
commit a98ac982f160696989cede4b6b43b5a9c2b32c74
Author: Jan Beulich <jbeulich@suse.com>
Date: Sun Jul 26 08:12:29 2026 +0100
Commit 0e89ce812b79 ("aarch64: Remove cast from struct initializer") didn't go quite far enough: The building of aarch64-gen itself has a similar issue. Cover that as well. Since FLD_CONST_* are used only there, move their #define-s there rather than introducing more #undef-s.
Diff:
---
opcodes/aarch64-gen.c | 7 ++++++-
opcodes/aarch64-opc.h | 5 -----
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/opcodes/aarch64-gen.c b/opcodes/aarch64-gen.c
index 2216e550c8c..a387cd4a1e0 100644
--- a/opcodes/aarch64-gen.c
+++ b/opcodes/aarch64-gen.c
@@ -994,7 +994,12 @@ typedef struct operand operand;
#undef F
#endif
-#define FLD AARCH64_FIELD
+#define FLD(lsb, w) { .num = lsb, .width = w }
+
+#define FLD_CONST_0 { .num = 0, .width = 1, .is_const = true }
+#define FLD_CONST_00 { .num = 0, .width = 2, .is_const = true }
+#define FLD_CONST_01 { .num = 1, .width = 2, .is_const = true }
+#define FLD_CONST_1 { .num = 1, .width = 1, .is_const = true }
/* The parentheses used when calling this macro ensure that the list of fields
appears as a single argument to the X and Y macros. */
diff --git a/opcodes/aarch64-opc.h b/opcodes/aarch64-opc.h
index 772f485f50a..be56acb48f1 100644
--- a/opcodes/aarch64-opc.h
+++ b/opcodes/aarch64-opc.h
@@ -59,11 +59,6 @@ typedef struct aarch64_field aarch64_field;
#define AARCH64_FIELD_CONST(val, width) ((aarch64_field) {width, val, true})
#define AARCH64_FIELD_NIL ((aarch64_field) {0, 0, false})
-#define FLD_CONST_0 AARCH64_FIELD_CONST (0, 1)
-#define FLD_CONST_00 AARCH64_FIELD_CONST (0, 2)
-#define FLD_CONST_01 AARCH64_FIELD_CONST (1, 2)
-#define FLD_CONST_1 AARCH64_FIELD_CONST (1, 1)
-
/* Instruction fields. These defines are included to reduce the initial diff
size, but the indirection should eventually be eliminated. */
#define FLD_CRm AARCH64_FIELD( 8, 4)
More information about the Binutils-cvs
mailing list