Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix runtime AVX2 detection for checksum #501

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Icenowy
Copy link

@Icenowy Icenowy commented Jul 2, 2023

The way GCC implements function-multiversioning is to generate a dispatcher function, thus it could not be used when a function is not built by GCC (e.g. a direct .S file, in the situation of AVX2 checksum).

Use function-multiversioning to declare a wrapper that will calls the appropriate checksum generatator function when AVX2 is present and do nothing when not present.

The way GCC implements function-multiversioning is to generate a
dispatcher function, thus it could not be used when a function is not
built by GCC (e.g. a direct .S file, in the situation of AVX2 checksum).

Use function-multiversioning to declare a wrapper that will calls the
appropriate checksum generatator function when AVX2 is present and do
nothing when not present.

Signed-off-by: Icenowy Zheng <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant