[PATCH] D103906: Do not generate calls to the 128-bit function __multi3() on 32-bit ARM.

Koutheir Attouchi via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 8 09:52:44 PDT 2021


koutheir added a comment.

> Doesn't this depend on which runtime library you're using? No Arm32 library implement that?
>
> I remember a patch to add 128-bit arithmetic into Armv7 many years ago (from Android) but I'm not sure it ever got into compiler-rt.

I got linking errors due to undefined symbol `__multi3`.

Looking at `compiler-rt/lib/builtins/multi3.c`, I see that `__multi3()` is implemented only if `CRT_HAS_128BIT` is defined:

  #ifdef CRT_HAS_128BIT
  /*...*/
  // Returns: a * b
  
  COMPILER_RT_ABI ti_int __multi3(ti_int a, ti_int b) {
  /*...*/

The file `compiler-rt/lib/builtins/int_types.h` does not define `CRT_HAS_128BIT` on ARM:

  #if defined(__LP64__) || defined(__wasm__) || defined(__mips64) ||             \
      defined(__riscv) || defined(_WIN64)
  #define CRT_HAS_128BIT
  #endif

So, I think the answer to your question is no, `__multi3()` is not implemented for ARM.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D103906/new/

https://reviews.llvm.org/D103906



More information about the llvm-commits mailing list