[binutils-gdb] aarch64: remove casts from more struct initializers
Jan Beulich via Binutils-cvs <[email protected]> Mon, 27 Jul 2026 07:16:57 +0000 (GMT)
| Newsgroups | gmane.comp.gnu.binutils.cvs |
|---|---|
| Message-ID | <[email protected]> |
https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3Dca881192416f= 7b588eab5404d90780056da69fa9 commit ca881192416f7b588eab5404d90780056da69fa9 Author: Jan Beulich <[email protected]> Date: Mon Jul 27 09:14:57 2026 +0200 aarch64: remove casts from more struct initializers =20 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 ther= e, 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 =20 -#define FLD AARCH64_FIELD +#define FLD(lsb, w) { .num =3D lsb, .width =3D w } + +#define FLD_CONST_0 { .num =3D 0, .width =3D 1, .is_const =3D true } +#define FLD_CONST_00 { .num =3D 0, .width =3D 2, .is_const =3D true } +#define FLD_CONST_01 { .num =3D 1, .width =3D 2, .is_const =3D true } +#define FLD_CONST_1 { .num =3D 1, .width =3D 1, .is_const =3D true } =20 /* The parentheses used when calling this macro ensure that the list of fi= elds 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}) =20 -#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 d= iff size, but the indirection should eventually be eliminated. */ #define FLD_CRm AARCH64_FIELD( 8, 4)