[compiler-rt] r245663 - [compiler-rt] Add libgcc compatibility aliases for __cmp{s, d, f}f2.

Pete Cooper via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 20 22:15:07 PDT 2015


> On Aug 20, 2015, at 9:46 PM, Josh Gao <jmgao at google.com> wrote:
> 
> Sorry about that,
No problem.  It just passed again now so its all good.
> I didn't realize that only ELF supported function aliases.
Me neither.  I’d have caused the same error had i implemented this.

Pete
> 
> -Josh
> 
> On Thu, Aug 20, 2015 at 9:42 PM, Pete Cooper <peter_cooper at apple.com <mailto:peter_cooper at apple.com>> wrote:
> 
>> On Aug 20, 2015, at 9:41 PM, Saleem Abdulrasool <compnerd at compnerd.org <mailto:compnerd at compnerd.org>> wrote:
>> 
>> On Thu, Aug 20, 2015 at 9:02 PM, Pete Cooper via llvm-commits <llvm-commits at lists.llvm.org <mailto:llvm-commits at lists.llvm.org>> wrote:
>> Hi Josh
>> 
>> We’re getting a Darwin bot failure with this commit.  Any chance you can take a look?
>> 
>> It should be fixed with SVN r245669. 
> Great.  Thanks very much for the quick fix.  I’ll keep an eye on the bots.
>> It would break on any non-ELF target, since it is the only one to support aliases.
> Interesting.  I didn’t know that.
> 
> Thanks,
> Pete
> 
>>  
>> One of the errors is this, I think the others are similar, and likely all from the same macro.
>> 
>> compiler-rt/lib/builtins/comparedf2.c:84:1: error: only weak aliases are supported on darwin
>> 
>> FNALIAS(__cmpdf2, __ledf2);
>> ^
>> compiler-rt/lib/builtins/int_lib.h:24:36: note: expanded from macro 'FNALIAS'
>>   void alias_name() __attribute__((alias(#original_name)))
>> 
>> Cheers,
>> Pete
>> > On Aug 20, 2015, at 7:51 PM, Josh Gao via llvm-commits <llvm-commits at lists.llvm.org <mailto:llvm-commits at lists.llvm.org>> wrote:
>> >
>> > Author: jmgao
>> > Date: Thu Aug 20 21:51:17 2015
>> > New Revision: 245663
>> >
>> > URL: https://urldefense.proofpoint.com/v2/url?u=http-3A__llvm.org_viewvc_llvm-2Dproject-3Frev-3D245663-26view-3Drev&d=BQIGaQ&c=eEvniauFctOgLOKGJOplqw&r=03tkj3107244TlY4t3_hEgkDY-UG6gKwwK0wOUS3qjM&m=BB2VwxEuZugRrby1sA0WX7Xsamu41YWpfZuyGvNnlWc&s=76UfhTPqOuLhN_NCHR4WLwO8xHZddsYSes7fzxcX6_w&e= <https://urldefense.proofpoint.com/v2/url?u=http-3A__llvm.org_viewvc_llvm-2Dproject-3Frev-3D245663-26view-3Drev&d=BQIGaQ&c=eEvniauFctOgLOKGJOplqw&r=03tkj3107244TlY4t3_hEgkDY-UG6gKwwK0wOUS3qjM&m=BB2VwxEuZugRrby1sA0WX7Xsamu41YWpfZuyGvNnlWc&s=76UfhTPqOuLhN_NCHR4WLwO8xHZddsYSes7fzxcX6_w&e=>
>> > Log:
>> > [compiler-rt] Add libgcc compatibility aliases for __cmp{s,d,f}f2.
>> >
>> > Reviewers: compnerd
>> >
>> > Subscribers: asl, llvm-commits
>> >
>> > Differential Revision: https://urldefense.proofpoint.com/v2/url?u=http-3A__reviews.llvm.org_D12091&d=BQIGaQ&c=eEvniauFctOgLOKGJOplqw&r=03tkj3107244TlY4t3_hEgkDY-UG6gKwwK0wOUS3qjM&m=BB2VwxEuZugRrby1sA0WX7Xsamu41YWpfZuyGvNnlWc&s=NGbTwVkyT6chsOrbX9sKlGh5vfLXVArge-jxlDsw4As&e= <https://urldefense.proofpoint.com/v2/url?u=http-3A__reviews.llvm.org_D12091&d=BQIGaQ&c=eEvniauFctOgLOKGJOplqw&r=03tkj3107244TlY4t3_hEgkDY-UG6gKwwK0wOUS3qjM&m=BB2VwxEuZugRrby1sA0WX7Xsamu41YWpfZuyGvNnlWc&s=NGbTwVkyT6chsOrbX9sKlGh5vfLXVArge-jxlDsw4As&e=>
>> >
>> > Modified:
>> >    compiler-rt/trunk/lib/builtins/comparedf2.c
>> >    compiler-rt/trunk/lib/builtins/comparesf2.c
>> >    compiler-rt/trunk/lib/builtins/comparetf2.c
>> >    compiler-rt/trunk/lib/builtins/int_lib.h
>> >
>> > Modified: compiler-rt/trunk/lib/builtins/comparedf2.c
>> > URL: https://urldefense.proofpoint.com/v2/url?u=http-3A__llvm.org_viewvc_llvm-2Dproject_compiler-2Drt_trunk_lib_builtins_comparedf2.c-3Frev-3D245663-26r1-3D245662-26r2-3D245663-26view-3Ddiff&d=BQIGaQ&c=eEvniauFctOgLOKGJOplqw&r=03tkj3107244TlY4t3_hEgkDY-UG6gKwwK0wOUS3qjM&m=BB2VwxEuZugRrby1sA0WX7Xsamu41YWpfZuyGvNnlWc&s=vKCxo9dJc8LlhXmSkrrD6xKixY-T23dgUmVcHKTR78M&e= <https://urldefense.proofpoint.com/v2/url?u=http-3A__llvm.org_viewvc_llvm-2Dproject_compiler-2Drt_trunk_lib_builtins_comparedf2.c-3Frev-3D245663-26r1-3D245662-26r2-3D245663-26view-3Ddiff&d=BQIGaQ&c=eEvniauFctOgLOKGJOplqw&r=03tkj3107244TlY4t3_hEgkDY-UG6gKwwK0wOUS3qjM&m=BB2VwxEuZugRrby1sA0WX7Xsamu41YWpfZuyGvNnlWc&s=vKCxo9dJc8LlhXmSkrrD6xKixY-T23dgUmVcHKTR78M&e=>
>> > ==============================================================================
>> > --- compiler-rt/trunk/lib/builtins/comparedf2.c (original)
>> > +++ compiler-rt/trunk/lib/builtins/comparedf2.c Thu Aug 20 21:51:17 2015
>> > @@ -80,6 +80,9 @@ __ledf2(fp_t a, fp_t b) {
>> >     }
>> > }
>> >
>> > +// Alias for libgcc compatibility
>> > +FNALIAS(__cmpdf2, __ledf2);
>> > +
>> > enum GE_RESULT {
>> >     GE_LESS      = -1,
>> >     GE_EQUAL     =  0,
>> >
>> > Modified: compiler-rt/trunk/lib/builtins/comparesf2.c
>> > URL: https://urldefense.proofpoint.com/v2/url?u=http-3A__llvm.org_viewvc_llvm-2Dproject_compiler-2Drt_trunk_lib_builtins_comparesf2.c-3Frev-3D245663-26r1-3D245662-26r2-3D245663-26view-3Ddiff&d=BQIGaQ&c=eEvniauFctOgLOKGJOplqw&r=03tkj3107244TlY4t3_hEgkDY-UG6gKwwK0wOUS3qjM&m=BB2VwxEuZugRrby1sA0WX7Xsamu41YWpfZuyGvNnlWc&s=RPQq3PpFJoeOht-jTLWgtVATweLX6p0WDGYrRhaN5Gg&e= <https://urldefense.proofpoint.com/v2/url?u=http-3A__llvm.org_viewvc_llvm-2Dproject_compiler-2Drt_trunk_lib_builtins_comparesf2.c-3Frev-3D245663-26r1-3D245662-26r2-3D245663-26view-3Ddiff&d=BQIGaQ&c=eEvniauFctOgLOKGJOplqw&r=03tkj3107244TlY4t3_hEgkDY-UG6gKwwK0wOUS3qjM&m=BB2VwxEuZugRrby1sA0WX7Xsamu41YWpfZuyGvNnlWc&s=RPQq3PpFJoeOht-jTLWgtVATweLX6p0WDGYrRhaN5Gg&e=>
>> > ==============================================================================
>> > --- compiler-rt/trunk/lib/builtins/comparesf2.c (original)
>> > +++ compiler-rt/trunk/lib/builtins/comparesf2.c Thu Aug 20 21:51:17 2015
>> > @@ -80,6 +80,9 @@ __lesf2(fp_t a, fp_t b) {
>> >     }
>> > }
>> >
>> > +// Alias for libgcc compatibility
>> > +FNALIAS(__cmpsf2, __lesf2);
>> > +
>> > enum GE_RESULT {
>> >     GE_LESS      = -1,
>> >     GE_EQUAL     =  0,
>> >
>> > Modified: compiler-rt/trunk/lib/builtins/comparetf2.c
>> > URL: https://urldefense.proofpoint.com/v2/url?u=http-3A__llvm.org_viewvc_llvm-2Dproject_compiler-2Drt_trunk_lib_builtins_comparetf2.c-3Frev-3D245663-26r1-3D245662-26r2-3D245663-26view-3Ddiff&d=BQIGaQ&c=eEvniauFctOgLOKGJOplqw&r=03tkj3107244TlY4t3_hEgkDY-UG6gKwwK0wOUS3qjM&m=BB2VwxEuZugRrby1sA0WX7Xsamu41YWpfZuyGvNnlWc&s=ukLelFyM4yR8JHDkKExIxb_PCAAfVdmmCvupWO9Tzxk&e= <https://urldefense.proofpoint.com/v2/url?u=http-3A__llvm.org_viewvc_llvm-2Dproject_compiler-2Drt_trunk_lib_builtins_comparetf2.c-3Frev-3D245663-26r1-3D245662-26r2-3D245663-26view-3Ddiff&d=BQIGaQ&c=eEvniauFctOgLOKGJOplqw&r=03tkj3107244TlY4t3_hEgkDY-UG6gKwwK0wOUS3qjM&m=BB2VwxEuZugRrby1sA0WX7Xsamu41YWpfZuyGvNnlWc&s=ukLelFyM4yR8JHDkKExIxb_PCAAfVdmmCvupWO9Tzxk&e=>
>> > ==============================================================================
>> > --- compiler-rt/trunk/lib/builtins/comparetf2.c (original)
>> > +++ compiler-rt/trunk/lib/builtins/comparetf2.c Thu Aug 20 21:51:17 2015
>> > @@ -79,6 +79,9 @@ COMPILER_RT_ABI enum LE_RESULT __letf2(f
>> >     }
>> > }
>> >
>> > +// Alias for libgcc compatibility
>> > +FNALIAS(__cmptf2, __letf2);
>> > +
>> > enum GE_RESULT {
>> >     GE_LESS      = -1,
>> >     GE_EQUAL     =  0,
>> >
>> > Modified: compiler-rt/trunk/lib/builtins/int_lib.h
>> > URL: https://urldefense.proofpoint.com/v2/url?u=http-3A__llvm.org_viewvc_llvm-2Dproject_compiler-2Drt_trunk_lib_builtins_int-5Flib.h-3Frev-3D245663-26r1-3D245662-26r2-3D245663-26view-3Ddiff&d=BQIGaQ&c=eEvniauFctOgLOKGJOplqw&r=03tkj3107244TlY4t3_hEgkDY-UG6gKwwK0wOUS3qjM&m=BB2VwxEuZugRrby1sA0WX7Xsamu41YWpfZuyGvNnlWc&s=XiCSfg9LKmkG1BdWSrdiglTtdTouCdFzFWC8El7o-As&e= <https://urldefense.proofpoint.com/v2/url?u=http-3A__llvm.org_viewvc_llvm-2Dproject_compiler-2Drt_trunk_lib_builtins_int-5Flib.h-3Frev-3D245663-26r1-3D245662-26r2-3D245663-26view-3Ddiff&d=BQIGaQ&c=eEvniauFctOgLOKGJOplqw&r=03tkj3107244TlY4t3_hEgkDY-UG6gKwwK0wOUS3qjM&m=BB2VwxEuZugRrby1sA0WX7Xsamu41YWpfZuyGvNnlWc&s=XiCSfg9LKmkG1BdWSrdiglTtdTouCdFzFWC8El7o-As&e=>
>> > ==============================================================================
>> > --- compiler-rt/trunk/lib/builtins/int_lib.h (original)
>> > +++ compiler-rt/trunk/lib/builtins/int_lib.h Thu Aug 20 21:51:17 2015
>> > @@ -20,6 +20,9 @@
>> > /* Assumption: Right shift of signed negative is arithmetic shift. */
>> > /* Assumption: Endianness is little or big (not mixed). */
>> >
>> > +#define FNALIAS(alias_name, original_name) \
>> > +  void alias_name() __attribute__((alias(#original_name)))
>> > +
>> > /* ABI macro definitions */
>> >
>> > #if __ARM_EABI__
>> >
>> >
>> > _______________________________________________
>> > llvm-commits mailing list
>> > llvm-commits at lists.llvm.org <mailto:llvm-commits at lists.llvm.org>
>> > https://urldefense.proofpoint.com/v2/url?u=http-3A__lists.llvm.org_cgi-2Dbin_mailman_listinfo_llvm-2Dcommits&d=BQIGaQ&c=eEvniauFctOgLOKGJOplqw&r=03tkj3107244TlY4t3_hEgkDY-UG6gKwwK0wOUS3qjM&m=BB2VwxEuZugRrby1sA0WX7Xsamu41YWpfZuyGvNnlWc&s=-Na1POe5DXysRwtYGz3X6CHnSiIa22KXVLsg2I8xioY&e= <https://urldefense.proofpoint.com/v2/url?u=http-3A__lists.llvm.org_cgi-2Dbin_mailman_listinfo_llvm-2Dcommits&d=BQIGaQ&c=eEvniauFctOgLOKGJOplqw&r=03tkj3107244TlY4t3_hEgkDY-UG6gKwwK0wOUS3qjM&m=BB2VwxEuZugRrby1sA0WX7Xsamu41YWpfZuyGvNnlWc&s=-Na1POe5DXysRwtYGz3X6CHnSiIa22KXVLsg2I8xioY&e=>
>> 
>> _______________________________________________
>> llvm-commits mailing list
>> llvm-commits at lists.llvm.org <mailto:llvm-commits at lists.llvm.org>
>> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits <https://urldefense.proofpoint.com/v2/url?u=http-3A__lists.llvm.org_cgi-2Dbin_mailman_listinfo_llvm-2Dcommits&d=BQMFaQ&c=eEvniauFctOgLOKGJOplqw&r=03tkj3107244TlY4t3_hEgkDY-UG6gKwwK0wOUS3qjM&m=x2nRpSZDJ_RhrFSuiOk5NxVdJ6GlsxguUhHShRVl_kk&s=jmOyj81_ooo6fLX2aZP11YdqkHxxw24nRAHPvnTvYfQ&e=>
>> 
>> 
>> 
>> -- 
>> Saleem Abdulrasool
>> compnerd (at) compnerd (dot) org
> 
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150820/fa4e867f/attachment.html>


More information about the llvm-commits mailing list