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

lib/arm: don't use explicit armv8.2-a on gcc 13.2 and later #370

Merged
merged 1 commit into from
May 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions lib/arm/adler32_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -214,11 +214,13 @@ adler32_arm_neon(u32 adler, const u8 *p, size_t len)
# ifdef __clang__
# define ATTRIBUTES _target_attribute("dotprod")
/*
* With gcc, arch=armv8.2-a is needed for dotprod intrinsics, unless the
* default target is armv8.3-a or later in which case it must be omitted.
* armv8.3-a or later can be detected by checking for __ARM_FEATURE_JCVT.
* With gcc 13.1 and earlier (before gcc commit 73d3bc348190 or 9aac37ab8a7b,
* "aarch64: Remove architecture dependencies from intrinsics"),
* arch=armv8.2-a is needed for the dotprod intrinsics, unless the default
* target is armv8.3-a or later in which case it must be omitted. armv8.3-a
* or later can be detected by checking for __ARM_FEATURE_JCVT.
*/
# elif defined(__ARM_FEATURE_JCVT)
# elif GCC_PREREQ(13, 2) || defined(__ARM_FEATURE_JCVT)
# define ATTRIBUTES _target_attribute("+dotprod")
# else
# define ATTRIBUTES _target_attribute("arch=armv8.2-a+dotprod")
Expand Down
10 changes: 6 additions & 4 deletions lib/arm/crc32_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -551,11 +551,13 @@ crc32_arm_pmullx4(u32 crc, const u8 *p, size_t len)
# ifdef __clang__
# define ATTRIBUTES _target_attribute("aes,crc,sha3")
/*
* With gcc, arch=armv8.2-a is needed for the sha3 intrinsics, unless the
* default target is armv8.3-a or later in which case it must be omitted.
* armv8.3-a or later can be detected by checking for __ARM_FEATURE_JCVT.
* With gcc 13.1 and earlier (before gcc commit 73d3bc348190 or 9aac37ab8a7b,
* "aarch64: Remove architecture dependencies from intrinsics"),
* arch=armv8.2-a is needed for the sha3 intrinsics, unless the default
* target is armv8.3-a or later in which case it must be omitted. armv8.3-a
* or later can be detected by checking for __ARM_FEATURE_JCVT.
*/
# elif defined(__ARM_FEATURE_JCVT)
# elif GCC_PREREQ(13, 2) || defined(__ARM_FEATURE_JCVT)
# define ATTRIBUTES _target_attribute("+crypto,+crc,+sha3")
# else
# define ATTRIBUTES _target_attribute("arch=armv8.2-a+crypto+crc+sha3")
Expand Down
Loading