[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
Wed Aug 19 10:43:19 PDT 2015


jmgao updated this revision to Diff 32575.
jmgao marked an inline comment as done.

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.32575.patch
Type: text/x-patch
Size: 1429 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150819/0e3e74ea/attachment.bin>


More information about the llvm-commits mailing list