Repository navigation
Make the alignment configurable - #1379
mkannwischer wants to merge 1 commit into
Conversation
8c86285 to
b64cbd8
Compare
CBMC Results (ML-DSA-65, REDUCE-RAM)
Full Results (229 configurations)
|
CBMC Results (ML-DSA-44, REDUCE-RAM)
Full Results (229 configurations)
|
CBMC Results (ML-DSA-44)
Full Results (229 configurations)
|
CBMC Results (ML-DSA-87, REDUCE-RAM)
Full Results (229 configurations)
|
CBMC Results (ML-DSA-65)
Full Results (229 configurations)
|
CBMC Results (ML-DSA-87)
Full Results (229 configurations)
|
There was a problem hiding this comment.
Overall this looks good, thanks @mkannwischer! Some documentation nits in comments. We should also use this opportunity to fix the pre-existing defect that if no alignment declarator is known, we silently build the backends without alignment constraints.
b64cbd8 to
d0b1155
Compare
I've addressed your comments. Apologies for the long delay, I had somehow forgotten about it. Could you take another look, please? |
Add two experimental config options: MLD_CONFIG_ALIGN sets the alignment of large buffers and structures in bytes, MLD_CONFIG_ALIGN_ATTRIBUTE replaces the declarator prefix for compilers supporting neither __attribute__((aligned(N))) nor __declspec(align(N)). MLD_DEFAULT_ALIGN is renamed to MLD_ALIGN_BYTES. MLD_ALIGN_BYTES, MLD_ALIGN and MLD_ALIGN_UP are derived from the two options. If no alignment declarator is known, MLD_ALIGN_BYTES is 1 and setting MLD_CONFIG_ALIGN is an error. The x86_64 and AArch64 backends reject an alignment below what their load and store instructions require, so they refuse to build without alignment on such compilers. MLD_TOTAL_ALLOC_* is measured for the default alignment, so it is not defined once the alignment is customized, and the allocation test skips itself in that case. - Partially addresses #1346 Signed-off-by: Matthias J. Kannwischer <matthias@zerorisc.com>
d0b1155 to
160f0a2
Compare
Add two experimental config options: MLD_CONFIG_ALIGN sets the alignment of large buffers and structures in bytes, MLD_CONFIG_ALIGN_ATTRIBUTE replaces the declarator prefix for compilers whose spelling mldsa-native does not know. MLD_DEFAULT_ALIGN, MLD_ALIGN and MLD_ALIGN_UP derive from them.
The x86_64 and AArch64 backends reject an alignment below what their load and store instructions require.
MLD_TOTAL_ALLOC_* is measured for the default alignment, so it is no longer defined once the alignment is customized, and the allocation test skips itself in that case.