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

Specifically check for NEON for ARMv8 CPUs #169

Closed
wants to merge 1 commit into from
Closed

Conversation

dm0-
Copy link

@dm0- dm0- commented May 1, 2023

The actual NEON implementation uses instructions that are not supported on 32-bit CPUs. These errors happen when building for armv7a:

/var/tmp/portage/app-arch/snappy-1.1.10-r1/work/snappy-1.1.10/snappy-internal.h:106:10: error: ‘vminvq_u8’ was not declared in this scope; did you mean ‘vminq_u8’?
  106 |   assert(vminvq_u8(shuffle_mask) >= 0 && vmaxvq_u8(shuffle_mask) <= 15);
      |          ^~~~~~~~~
/var/tmp/portage/app-arch/snappy-1.1.10-r1/work/snappy-1.1.10/snappy-internal.h:106:42: error: ‘vmaxvq_u8’ was not declared in this scope; did you mean ‘vmaxq_u8’?
  106 |   assert(vminvq_u8(shuffle_mask) >= 0 && vmaxvq_u8(shuffle_mask) <= 15);
      |                                          ^~~~~~~~~
/var/tmp/portage/app-arch/snappy-1.1.10-r1/work/snappy-1.1.10/snappy-internal.h:107:10: error: ‘vqtbl1q_u8’ was not declared in this scope; did you mean ‘vtbl1_u8’?
  107 |   return vqtbl1q_u8(input, shuffle_mask);
      |          ^~~~~~~~~~
      |          vtbl1_u8

This PR just makes the CMake test use the vmaxvq_u8 intrinsic to find the maximum vector element to test for A64 NEON, since that's an instruction used in the code. You can check supported instruction targets here: https://arm-software.github.io/acle/neon_intrinsics/advsimd.html

The actual NEON implementation uses instructions that are not
supported on 32-bit CPUs.  Make the CMake test reflect this so that
ARMv7 builds succeed again.

Signed-off-by: David Michael <fedora.dm0@gmail.com>
@danilak-G
Copy link
Collaborator

Fixed with 32ded45, it is a slightly better fix, thanks for reporting!

@danilak-G danilak-G closed this Aug 18, 2024
@dm0- dm0- deleted the neon branch August 18, 2024 11:56
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.

None yet

2 participants