[LLVMdev] [Compiler-RT] [ARM] Where __aeabi_[il]div0 builtins should be implemented?

Saleem Abdulrasool compnerd at compnerd.org
Sat Sep 6 14:53:43 PDT 2014


On Sat, Sep 6, 2014 at 11:39 AM, Joerg Sonnenberger <joerg at britannica.bec.de
> wrote:

> On Sat, Sep 06, 2014 at 03:09:27PM +0300, Sergey Dmitrouk wrote:
> > Will see what Saleem (and maybe others) thinks of this, maybe there is a
> > non-obvious reason to do not implement these functions in compiler-rt.
>
> One issue is that they depend on OS-specific functionality.
> E.g. the ability to raise a signal. That's primarily why I didn't add an
> implementation.


Yes, that would be the best possible solution.  However, given that the
specification calls for the definition to be weak, the c library could
override the function and provide an alternate implementation.  Conforming
to the first option doesn't require any runtime library support, so, Ive
taken the liberty of implementing that as a means to get compiler-rt usable
in an environment which does not provide a custom division-by-zero handler
from the math library.


>
> Joerg
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>

-- 
Saleem Abdulrasool
compnerd (at) compnerd (dot) org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20140906/63917da9/attachment.html>


More information about the llvm-dev mailing list