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 compilation error raised by vqtbl1q_u8 instruction #185

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

Conversation

passgat
Copy link

@passgat passgat commented Jun 11, 2024

The compilation in Buildroot for the raspberrypi3_qt5we_defconfig configuration:

make raspberrypi3_qt5we_defconfig
make

raises the following error:

In file included from buildroot/output/build/snappy-1.2.1/snappy.cc:29: buildroot/output/build/snappy-1.2.1/snappy-internal.h: In function ‘snappy::internal::V128 snappy::internal::V128_Shuffle(V128, V128)’: buildroot/output/build/snappy-1.2.1/snappy-internal.h:109:10: error: ‘vqtbl1q_u8’ was not declared in this scope; did you mean ‘vtbl1_u8’?
109 | return vqtbl1q_u8(input, shuffle_mask);
| ^~~~~~~~~~
| vtbl1_u8
make[4]: *** [CMakeFiles/snappy.dir/build.make:118: CMakeFiles/snappy.dir/snappy.cc.o] Error 1

As reported by [1], the vqtbl1q_u8 instruction is supported by A64 architectures. For this reason, the patch enables the use of the instruction only for NEON of such architecture.

[1] https://developer.arm.com/architectures/instruction-sets/intrinsics/vqtbl1q_u8

The compilation in Buildroot for the raspberrypi3_qt5we_defconfig
configuration:

make raspberrypi3_qt5we_defconfig
make

raises the following error:

In file included from buildroot/output/build/snappy-1.2.1/snappy.cc:29:
buildroot/output/build/snappy-1.2.1/snappy-internal.h: In function ‘snappy::internal::V128 snappy::internal::V128_Shuffle(V128, V128)’:
buildroot/output/build/snappy-1.2.1/snappy-internal.h:109:10: error: ‘vqtbl1q_u8’ was not declared in this scope; did you mean ‘vtbl1_u8’?
  109 |   return vqtbl1q_u8(input, shuffle_mask);
      |          ^~~~~~~~~~
      |          vtbl1_u8
make[4]: *** [CMakeFiles/snappy.dir/build.make:118: CMakeFiles/snappy.dir/snappy.cc.o] Error 1

As reported by [1], the vqtbl1q_u8 instruction is supported by A64
architectures. For this reason, the patch enables the use of the
instruction only for NEON of such architecture.

[1] https://developer.arm.com/architectures/instruction-sets/intrinsics/vqtbl1q_u8

Signed-off-by: Dario Binacchi <[email protected]>
@passgat
Copy link
Author

passgat commented Jun 19, 2024

A gentle ping,

Thanks
Dario

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

1 participant