search for: idiv0

Displaying 4 results from an estimated 4 matches for "idiv0".

Did you mean: div0
2014 Sep 06
2
[LLVMdev] [Compiler-RT] [ARM] Where __aeabi_[il]div0 builtins should be implemented?
On Fri, Sep 5, 2014 at 11:32 AM, Jonathan Roelofs <jonathan at codesourcery.com > wrote: > Sergey, > > Not that it'll save you much hassle, but here's an implementation of > __aeabi_idiv0 and __aeabi_ldiv0 that I've been sitting on for a while. > > I vaguely remember compnerd suggesting that I don't commit them to > compiler_rt, but I don't remember why. > I did dig into this further and it seems that they are, in fact, considered part of the RT-ABI :-(. Iv...
2014 Sep 05
5
[LLVMdev] [Compiler-RT] [ARM] Where __aeabi_[il]div0 builtins should be implemented?
Hi, There are several places in compiler-rt which refer to __aeabi_idiv0. For example, in lib/builtins/arm/udivsi3.S: #ifdef __ARM_EABI__ b __aeabi_idiv0 #else JMP(lr) #endif At the same time there is no definition of it. It looks as if it was done intentionally so that third-party could provide custom handler for division by zero. IMHO It's not very con...
2014 Sep 06
3
[LLVMdev] [Compiler-RT] [ARM] Where __aeabi_[il]div0 builtins should be implemented?
...wrote: > I'm in favour for adding them ASAP, but we might need an ifdef to avoid > creating unnecessary (or conflicting) symbols for non-EABI targets. Sure, it makes sense. > A proper solution would be to have: > > LOCAL_LABEL(divby0): > #ifdef __ARM_EABI__ > b __aeabi_idiv0 > #else > mov r0, #0 > JMP(lr) > #endif > > And make both __aeabi_{i,l}div0 return 0. > > I'm hoping both parts of the ifdef to generate *identical* code, but > with the benefit that we can change the behaviour of div0 by > overriding the function's impleme...
2014 Sep 08
2
[LLVMdev] [Compiler-RT] [ARM] Where __aeabi_[il]div0 builtins should be implemented?
...ng a dependency on the target environment's libc implementation. I think that expanding the responsibility of compiler-rt from supporting the code generation from the compiler to integrating into the target environment's libc can be problematic. > I think we should return zero on both idiv0 and ldiv0 and move the > "mov r0, #0" inside the #else for now. > Why 0 and not infinity? Or some other value? > cheers, > --renato -- Saleem Abdulrasool compnerd (at) compnerd (dot) org -------------- next part -------------- An HTML attachment was scrubbed... URL: &lt...