binutils Newspaper
JULY 29, 2026
Date
/
Architectures
Components
Topics
News & Policy
Other
binutils/opcodes

Fix struct initializer for aarch64-gen.

Corrects a struct initializer issue in the aarch64 opcode generator.

This commit fixes a similar issue in the aarch64-gen code as a previous commit did for the aarch64 architecture itself. It addresses an incorrect cast within a struct initializer that was affecting the build of the aarch64 opcode generator. Constant definitions were moved to resolve this.

In Details

This commit refactors the definition of FLD_CONST_* macros in aarch64-gen.c to use a direct struct initializer instead of relying on AARCH64_FIELD_CONST. This resolves a similar issue to commit 0e89ce812b79 where a cast was applied to a struct initializer. The macros were moved from aarch64-opc.h to aarch64-gen.c as they are only used there, avoiding the need for additional #undef directives.

For Context
aarch64-gen.c
A C source file within the binutils project responsible for generating opcode information for the AArch64 architecture.
struct initializer
A construct used in C to assign initial values to the members of a structure at the time of its declaration or creation.
macro
A fragment of code that is intended to be expanded in place by the C preprocessor. Macros can be used to define constants or create shorthand for more complex code snippets.
Filed Under: aarch64opcodesbuild