[ARM] Lower modulo operation to generate __aeabi_divmod on Android
authorSumanth Gundapaneni <sgundapa@codeaurora.org>
Fri, 31 Jul 2015 00:45:12 +0000 (00:45 +0000)
committerSumanth Gundapaneni <sgundapa@codeaurora.org>
Fri, 31 Jul 2015 00:45:12 +0000 (00:45 +0000)
commit8d13756dddf797177b863f458e4dce87dcdac979
tree416c8bd5384e187027f822e2565d2b17e0e8c586
parent2623dd4454030a52b86c44c7f80c043d7f29ac70
[ARM] Lower modulo operation to generate __aeabi_divmod on Android

For a modulo (reminder) operation,
clang -target armv7-none-linux-gnueabi generates "__modsi3"
clang -target armv7-none-eabi generates "__aeabi_idivmod"
clang -target armv7-linux-androideabi generates "__modsi3"
Android bionic libc doesn't provide a __modsi3, instead it provides a
"__aeabi_idivmod". This patch fixes the LLVM ARMISelLowering to generate
the correct call when ever there is a modulo operation.

Differential Revision: http://reviews.llvm.org/D11661

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243717 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/ARM/ARMISelLowering.cpp
test/CodeGen/ARM/divmod-eabi.ll