[PATCH] opcodes/aarch64: make aarch64_ext_ldst_reglist()'s data[] static const

Jan Beulich jbeulich@suse.com
Tue Jul 29 06:53:37 GMT 2025


On 28.07.2025 18:10, Richard Earnshaw (lists) wrote:
> On 28/07/2025 16:58, Jan Beulich wrote:
>> ---
>> I further wonder whether the struct fields being unsigned int isn't
>> wasteful - unsigned char (or bool for "is_reserved") would appear to
>> suffice, without negatively affecting generated code (except on
>> architectures where byte loads are more expensive).
> 
> uint8_t would be fine and preferable to (unsigned) char since it's a value not a character.

I can use uint8_t, but personally I recommend to avoid fixed-width types
where they can be avoided. They will only cause problems on architectures
which have no way to express those types. (E.g. on TI C4x and C54x I
wonder how uint8_t would be expressable, with them having 32 / 16 bits
per byte respectively.) The "not a character" argument imo only applies
to uses of plain char; signed or unsigned forms thereof are normal (just
narrow) integer types according to my understanding).

> I guess on some platforms sizeof(bool) could be larger than a char, but it's probably unusual.

It's not going to be larger than an unsigned int though, I expect. So
still at least no loss if converted.

Jan


More information about the Binutils mailing list