[PATCH] x86: Simplify AMX XSAVEC calculation logic.
Sunil Pandey
skpgkp2@gmail.com
Tue Apr 1 14:03:08 GMT 2025
On Mon, Mar 31, 2025 at 9:25 PM Sunil Pandey <skpgkp2@gmail.com> wrote:
>
>
> On Mon, Mar 31, 2025 at 6:13 AM Florian Weimer <fweimer@redhat.com> wrote:
>
>> * 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
>>
>
> Thank you so much. Will submit v2.
>
v2 patch attached.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://sourceware.org/pipermail/libc-alpha/attachments/20250401/475243f0/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: v2-0001-x86-Simplify-AMX-XSAVEC-calculation-logic.patch
Type: application/octet-stream
Size: 3534 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/libc-alpha/attachments/20250401/475243f0/attachment.obj>
More information about the Libc-alpha
mailing list