search for: _lldiv

Displaying 2 results from an estimated 2 matches for "_lldiv".

2012 Jan 13
2
[LLVMdev] Odd weak symbol thing on i386
...rd library. It works on ARM, Mips, Microblaze,ppc, ppc64, and x86_64. On i386 a very strange thing happens. Here's the source: #include <stdlib.h> #define __weak_alias(sym) __attribute__ ((weak, alias (#sym))) lldiv_t lldiv(long long int num, long long int denom) __weak_alias(_lldiv); lldiv_t _lldiv(long long num, long long denom) { lldiv_t r; r.quot = num / denom; r.rem = num % denom; if (num >= 0 && r.rem < 0) { r.quot++; r.rem -= denom; } return (r); } I get the following code em...
2012 Jan 13
0
[LLVMdev] Odd weak symbol thing on i386
...Mips, > Microblaze,ppc, ppc64, and x86_64. On i386 a very strange thing happens. > Here's the source: > > #include <stdlib.h> > #define       __weak_alias(sym) __attribute__ ((weak, alias (#sym))) > > lldiv_t lldiv(long long int num, long long int denom) __weak_alias(_lldiv); > > lldiv_t _lldiv(long long num, long long denom) > { >        lldiv_t r; >        r.quot = num / denom; >        r.rem = num % denom; >        if (num >= 0 && r.rem < 0) { >                r.quot++; >                r.rem -= denom; >        } >    ...