[PATCH] D36675: [ARM][Compiler-rt] Fix AEABI builtins to correctly pass arguments to non-AEABI functions on HF targets
Oleg Ranevskyy via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 14 17:11:06 PDT 2017
iid_iunknown updated this revision to Diff 111102.
iid_iunknown added a comment.
Address review remarks: make the macro names less generic.
Repository:
rL LLVM
https://reviews.llvm.org/D36675
Files:
lib/builtins/arm/aeabi_dcmp.S
lib/builtins/arm/aeabi_fcmp.S
Index: lib/builtins/arm/aeabi_fcmp.S
===================================================================
--- lib/builtins/arm/aeabi_fcmp.S
+++ lib/builtins/arm/aeabi_fcmp.S
@@ -18,11 +18,20 @@
// }
// }
+#if defined(COMPILER_RT_ARMHF_TARGET)
+# define CONVERT_FCMP_ARGS_TO_SF2_ARGS \
+ vmov s0, r0 SEPARATOR \
+ vmov s1, r1
+#else
+# define CONVERT_FCMP_ARGS_TO_SF2_ARGS
+#endif
+
#define DEFINE_AEABI_FCMP(cond) \
.syntax unified SEPARATOR \
.p2align 2 SEPARATOR \
DEFINE_COMPILERRT_FUNCTION(__aeabi_fcmp ## cond) \
push { r4, lr } SEPARATOR \
+ CONVERT_FCMP_ARGS_TO_SF2_ARGS SEPARATOR \
bl SYMBOL_NAME(__ ## cond ## sf2) SEPARATOR \
cmp r0, #0 SEPARATOR \
b ## cond 1f SEPARATOR \
Index: lib/builtins/arm/aeabi_dcmp.S
===================================================================
--- lib/builtins/arm/aeabi_dcmp.S
+++ lib/builtins/arm/aeabi_dcmp.S
@@ -18,11 +18,20 @@
// }
// }
+#if defined(COMPILER_RT_ARMHF_TARGET)
+# define CONVERT_DCMP_ARGS_TO_DF2_ARGS \
+ vmov d0, r0, r1 SEPARATOR \
+ vmov d1, r2, r3
+#else
+# define CONVERT_DCMP_ARGS_TO_DF2_ARGS
+#endif
+
#define DEFINE_AEABI_DCMP(cond) \
.syntax unified SEPARATOR \
.p2align 2 SEPARATOR \
DEFINE_COMPILERRT_FUNCTION(__aeabi_dcmp ## cond) \
push { r4, lr } SEPARATOR \
+ CONVERT_DCMP_ARGS_TO_DF2_ARGS SEPARATOR \
bl SYMBOL_NAME(__ ## cond ## df2) SEPARATOR \
cmp r0, #0 SEPARATOR \
b ## cond 1f SEPARATOR \
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D36675.111102.patch
Type: text/x-patch
Size: 2072 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170815/87194366/attachment.bin>
More information about the llvm-commits
mailing list