[PATCH 0/5] aarch64: Remove aarch64_field_kind indirection

Alice Carlotti alice.carlotti@arm.com
Wed May 20 12:08:05 GMT 2026


This patch series remove the aarch64_field_kind enum, and replaces uses of the
enum with direct use of aarch64_field structs instead.  I think this improves
readability overall, and might also be a marginal performance improvement.

Passing aarch64_field as function arguments causes GCC to emit this note:

  note: parameter passing for argument of type ‘aarch64_field’
{aka ‘struct aarch64_field’} changed in GCC 9.1

Is this a problem?  Should I find some way to avoid this note being emitted?


As an interim measure, I've retained some of the aarch64_field_kind enum names
as macros that expand to corresponding the aarch64_field value.  I've
deliberately chosen not to inline all of these remaining uses immediately, as
in many cases I intend to either add comments or rework the surrounding code
first.  After this patch series, there would be 76 macros remaining (not
counting the FLD_CONST_* macros), out of 216 original enum values.


Does this approach look ok?

Thanks,
Alice


More information about the Binutils mailing list