Files
Matt Turner 3382beeda2 alpha: select ARCH_SUPPORTS_INT128
gcc supports __int128 on Alpha, and the 64x64 to 128-bit multiply that
the users in the scheduler and in lib/ care about maps onto mulq/umulh
rather than an out-of-line libgcc helper.

Variable 128-bit shifts are another matter. gcc open-codes them when
optimizing for speed, but with CONFIG_CC_OPTIMIZE_FOR_SIZE=y it calls the
libgcc routines __ashlti3, __ashrti3 and __lshrti3 instead. The kernel
does not link against libgcc, so provide the three helpers in C, as s390
does, and export them for modules. They are built into the kernel proper
rather than lib.a so the exports are present even when nothing built in
references them. Like the s390 versions they are marked noinstr, since
the compiler may emit calls to them from noinstr code.

Gate the select on CC_HAS_INT128 as the other 64-bit architectures do.

Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Matt Turner <mattst88@gmail.com>
Tested-by: Magnus Lindholm <linmag7@gmail.com>
Reviewed-by: Magnus Lindholm <linmag7@gmail.com>
Link: https://lore.kernel.org/r/20261017174007.695344-1-mattst88@gmail.com
Signed-off-by: Magnus Lindholm <linmag7@gmail.com>
2026-10-18 00:44:15 +02:00
..
2026-10-18 00:44:15 +02:00
2024-05-03 22:09:30 +02:00
2026-10-18 00:44:15 +02:00