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

Josh Gao via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 18 14:11:42 PDT 2015


jmgao removed rL LLVM as the repository for this revision.
jmgao updated this revision to Diff 32450.
jmgao added a comment.

Add and use an FNALIAS macro


http://reviews.llvm.org/D12091

Files:
  lib/builtins/comparedf2.c
  lib/builtins/comparesf2.c
  lib/builtins/comparetf2.c
  lib/builtins/int_lib.h

Index: lib/builtins/int_lib.h
===================================================================
--- lib/builtins/int_lib.h
+++ lib/builtins/int_lib.h
@@ -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__
Index: lib/builtins/comparetf2.c
===================================================================
--- lib/builtins/comparetf2.c
+++ lib/builtins/comparetf2.c
@@ -79,6 +79,9 @@
     }
 }
 
+// Alias for libgcc compatibility
+FNALIAS(__cmptf2, __letf2);
+
 enum GE_RESULT {
     GE_LESS      = -1,
     GE_EQUAL     =  0,
Index: lib/builtins/comparesf2.c
===================================================================
--- lib/builtins/comparesf2.c
+++ lib/builtins/comparesf2.c
@@ -80,6 +80,9 @@
     }
 }
 
+// Alias for libgcc compatibility
+FNALIAS(__cmpsf2, __lesf2);
+
 enum GE_RESULT {
     GE_LESS      = -1,
     GE_EQUAL     =  0,
Index: lib/builtins/comparedf2.c
===================================================================
--- lib/builtins/comparedf2.c
+++ lib/builtins/comparedf2.c
@@ -80,6 +80,9 @@
     }
 }
 
+// Alias for libgcc compatibility
+FNALIAS(__cmpdf2, __ledf2);
+
 enum GE_RESULT {
     GE_LESS      = -1,
     GE_EQUAL     =  0,


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D12091.32450.patch
Type: text/x-patch
Size: 1437 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150818/fdbb46b0/attachment.bin>


More information about the llvm-commits mailing list