[PATCH] x86: Simplify AMX XSAVEC calculation logic.
Florian Weimer
fweimer@redhat.com
Mon Mar 31 13:13:48 GMT 2025
* Sunil K. Pandey:
> +#ifdef __x86_64__
> + if (amx_flag)
> + {
> + unsigned int amx_size
> + = xstate_comp_offsets[18] + xstate_comp_sizes[18];
> + _dl_x86_features_tlsdesc_state_size
> + = ALIGN_UP (amx_size + TLSDESC_CALL_REGISTER_SAVE_AREA,
> + 64);
> + }
> +#endif
I diskike the magic 18 (as the AMX bit number) appearing here.
The logic for including and excluding states seems reversed to me.
Shouldn't we save and restore everything that we don't know anything
about, especially for the TLSDESC case?
Thanks,
Florian
More information about the Libc-alpha
mailing list