math: Improve layout of expf data
Wilco Dijkstra
Wilco.Dijkstra@arm.com
Thu Aug 1 22:23:55 GMT 2024
Hi,
>> GCC aligns global data to 16 bytes if their size is >= 16 bytes.
>
> is that true? the following seems to compile "fine" with both gcc and
Absolutely. Overaligning objects for performance is a standard optimization
that practically every compiler does.
> clang, implying that if you are seeing better alignment [of the data,
> rather than just the fields within it], it's a coincidence? (Android
> saw this alignment change after our last llvm update.)
You need to test the pointer since the extra alignment is not reported.
And it's done at -O2 or higher since it can slightly increase data size.
Cheers,
Wilco
More information about the Libc-alpha
mailing list