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

Josh Gao via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 20 19:51:17 PDT 2015


Author: jmgao
Date: Thu Aug 20 21:51:17 2015
New Revision: 245663

URL: http://llvm.org/viewvc/llvm-project?rev=245663&view=rev
Log:
[compiler-rt] Add libgcc compatibility aliases for __cmp{s,d,f}f2.

Reviewers: compnerd

Subscribers: asl, llvm-commits

Differential Revision: http://reviews.llvm.org/D12091

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: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/builtins/comparedf2.c?rev=245663&r1=245662&r2=245663&view=diff
==============================================================================
--- 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: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/builtins/comparesf2.c?rev=245663&r1=245662&r2=245663&view=diff
==============================================================================
--- 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: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/builtins/comparetf2.c?rev=245663&r1=245662&r2=245663&view=diff
==============================================================================
--- 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: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/builtins/int_lib.h?rev=245663&r1=245662&r2=245663&view=diff
==============================================================================
--- 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__




More information about the llvm-commits mailing list