[PATCH] D24071: [compiler-rt] [builtins] Allow building the necessary ARM builtins for MSVC mode with cmake
Renato Golin via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 31 04:41:11 PDT 2016
rengolin added a comment.
In https://reviews.llvm.org/D24071#530115, @jmolloy wrote:
> Ah, OK, then we need to handle them similar to __eabi_divmod. The right place to change is in lib/Target/ARM/ARMISelLowering.cpp - look for divmod and see what changes you need to teach LLVM that __rt_div* isn't just DIV but DIVMOD too.
Yup. In EABI, both mod and divmod call aeabi_divmod. Mod, in DAG, connects to the second return value directly and LLVM knows how to lower that directly.
I suspect you'll need to do the same for many other EABI calls, not just divmod.
More information about the llvm-commits