vmull_p64 failed to compile on armv8

Jeffrey Walton noloader@gmail.com
Sat Jul 30 04:21:00 GMT 2016

> I am trying to use the vmull_p64 instruction.  The error I am receiving is:
> /usr/lib/gcc/aarch64-linux-gnu/6/include/arm_neon.h: In function ‘__v16u mul128(uint64x1_t, uint64x1_t)’:
> /usr/lib/gcc/aarch64-linux-gnu/6/include/arm_neon.h:21892:1: error: inlining failed in call to always_inline ‘poly128_t vmull_p64(poly64_t, poly64_t)’: target specific option mismatch
>  vmull_p64 (poly64_t a, poly64_t b)
>  ^~~~~~~~~
> gf64_vmull.cpp:138:27: note: called from here
>    res = vmull_p64(a64,b64);

PMULL and PMULL2 are part of the Crypto extensions from the ACLE. They
are optional extensions, so they get enabled with a "+crypto" for
architecture flags. You should add -march=armv8-a+crypto or
-march=armv8-a+crc+crypto to your CFLAGS or CXXFLAGS. Also see

An FYI... Linaro is missing is missing vreinterpretq_*_p128 for for
converting polynomials. If you are using the Linaro GCC 4.9 toolchain,
then you will have to do the C-cast. Also see

Note... if you attempt Aarch32 on Aarch64, then there could be other
complications. I still have not figured out this problem. Also see


More information about the Gcc-help mailing list