CONFIG_ARCH_SUPPORTS_INT128 for AArch64
Mark Rutland
mark.rutland at arm.com
Tue Oct 31 03:43:32 PDT 2017
On Tue, Oct 31, 2017 at 11:17:52AM +0100, Jason A. Donenfeld wrote:
> Hi folks,
>
> Older versions of gcc are horrible for int128_t on aarch64, emitting a
> __multi3 call, which is slow and defeats the purpose. However, more
> recent versions of gcc (since 5, IIRC), do the right thing and produce
> the proper inlined instructions.
>
> Do we have the infrastructure available to test for this, and
> conditionally set CONFIG_ARCH_SUPPORTS_INT128 if we do?
Judging by Documentation/kbuild/makefiles.txt, we could do something
like the below in the arm64 Makefile:
cflags-y += $(call cc-ifversion, -ge, 0500, -DCONFIG_ARCH_SUPPORTS_INT128)
Note that I havent tested this at all.
Thanks,
More information about the linux-arm-kernel
mailing list