x32 AVX fixes - #354
Merged
Merged
x32 AVX fixes#354
Conversation
Surprisingly (to me), SSE2 is available when using the x32 ABI.¹ A side
effect of this is that the AVX load/store code paths were enabled on
this platform despite not being compilable:²
checker.c: In function ‘atomic_read’:
checker.c:2613:5: error: cannot convert a vector of type ‘avx128_t’
{aka ‘__m128i’} to type ‘long long unsigned int’ which has different
size
2613 | return (dword_t)*ptr;
| ^~~~~~
checker.c: In function ‘atomic_write’:
checker.c:2673:5: error: cannot convert a value of type ‘dword_t’ {aka
‘long long unsigned int’} to vector type ‘__vector(2) long long int’
which has different size
2673 | *ptr = (__m128i)v;
| ^
This was exposed by the Debian build farm during the last release cycle.
If relevant, atomics on x32 could be optimised more. There is no need to
use the various `CMPXCHG16B` work arounds when x32 should be able to
just use `MOVQ` (64-bit atomics).
¹ https://en.wikipedia.org/wiki/X32_ABI
² https://buildd.debian.org/status/fetch.php?pkg=rumur&arch=x32&ver=2026.08.30-1&stamp=1788130874&raw=0
This should have been included in c717898.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.