[LLVMdev] [Compiler-RT] [ARM] Where __aeabi_[il]div0 builtins should be implemented?
Renato Golin
renato.golin at linaro.org
Sat Sep 6 15:40:32 PDT 2014
On 6 September 2014 22:46, Saleem Abdulrasool <compnerd at compnerd.org> wrote:
> I did dig into this further and it seems that they are, in fact, considered
> part of the RT-ABI :-(. Ive committed a simple conforming implementation in
> SVN r217322.
Hi Saleem,
This implementation will differ from the current sdiv's expected
(return 0) if called from a place that doesn't mov r0, #0 just before
calling div0.
ARM and GCC both throw an exception, and on non-EABI ARM, we're
returning zero, so it would be good to have at least one consistent
behaviour.
I think we should return zero on both idiv0 and ldiv0 and move the
"mov r0, #0" inside the #else for now.
cheers,
--renato
More information about the llvm-dev
mailing list