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