summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorzbb <zbb@FreeBSD.org>2013-09-20 20:44:32 +0000
committerzbb <zbb@FreeBSD.org>2013-09-20 20:44:32 +0000
commit966b366427b15044cbfd78c185455bc2eaba1935 (patch)
tree52b3da81344585f0755176a8b3ec3eed37e68734
parente226cdd9b86260d8a329201e38a0ea97b4cd4c39 (diff)
downloadFreeBSD-src-966b366427b15044cbfd78c185455bc2eaba1935.zip
FreeBSD-src-966b366427b15044cbfd78c185455bc2eaba1935.tar.gz
Fix GCC build for all ARMs. Revert bug introduced in r255613.
Previous change applied in r255613 fixed build for ARMv6 but broke it for previous architecture revisions. This commit eventually fixes GCC build for all ARM revisions. Approved by: cognet (mentor) Approved by: re (kib)
-rw-r--r--sys/arm/arm/stdatomic.c32
1 files changed, 28 insertions, 4 deletions
diff --git a/sys/arm/arm/stdatomic.c b/sys/arm/arm/stdatomic.c
index 79bfbb6..a2db9f0 100644
--- a/sys/arm/arm/stdatomic.c
+++ b/sys/arm/arm/stdatomic.c
@@ -666,6 +666,30 @@ EMIT_FETCH_AND_OP_4(fetch_and_or, "orr")
EMIT_FETCH_AND_OP_4(fetch_and_sub, "sub")
EMIT_FETCH_AND_OP_4(fetch_and_xor, "eor")
+#ifndef __clang__
+__strong_reference(__sync_lock_test_and_set_1_c, __sync_lock_test_and_set_1);
+__strong_reference(__sync_lock_test_and_set_2_c, __sync_lock_test_and_set_2);
+__strong_reference(__sync_lock_test_and_set_4_c, __sync_lock_test_and_set_4);
+__strong_reference(__sync_val_compare_and_swap_1_c, __sync_val_compare_and_swap_1);
+__strong_reference(__sync_val_compare_and_swap_2_c, __sync_val_compare_and_swap_2);
+__strong_reference(__sync_val_compare_and_swap_4_c, __sync_val_compare_and_swap_4);
+__strong_reference(__sync_fetch_and_add_1_c, __sync_fetch_and_add_1);
+__strong_reference(__sync_fetch_and_add_2_c, __sync_fetch_and_add_2);
+__strong_reference(__sync_fetch_and_add_4_c, __sync_fetch_and_add_4);
+__strong_reference(__sync_fetch_and_and_1_c, __sync_fetch_and_and_1);
+__strong_reference(__sync_fetch_and_and_2_c, __sync_fetch_and_and_2);
+__strong_reference(__sync_fetch_and_and_4_c, __sync_fetch_and_and_4);
+__strong_reference(__sync_fetch_and_sub_1_c, __sync_fetch_and_sub_1);
+__strong_reference(__sync_fetch_and_sub_2_c, __sync_fetch_and_sub_2);
+__strong_reference(__sync_fetch_and_sub_4_c, __sync_fetch_and_sub_4);
+__strong_reference(__sync_fetch_and_or_1_c, __sync_fetch_and_or_1);
+__strong_reference(__sync_fetch_and_or_2_c, __sync_fetch_and_or_2);
+__strong_reference(__sync_fetch_and_or_4_c, __sync_fetch_and_or_4);
+__strong_reference(__sync_fetch_and_xor_1_c, __sync_fetch_and_xor_1);
+__strong_reference(__sync_fetch_and_xor_2_c, __sync_fetch_and_xor_2);
+__strong_reference(__sync_fetch_and_xor_4_c, __sync_fetch_and_xor_4);
+#endif
+
#else /* __ARM_ARCH_5__ */
#ifdef _KERNEL
@@ -834,10 +858,6 @@ EMIT_ALL_OPS_N(1, uint8_t, "ldrb", "strb", "streqb")
EMIT_ALL_OPS_N(2, uint16_t, "ldrh", "strh", "streqh")
EMIT_ALL_OPS_N(4, uint32_t, "ldr", "str", "streq")
-#endif /* _KERNEL */
-
-#endif
-
#ifndef __clang__
__strong_reference(__sync_lock_test_and_set_1_c, __sync_lock_test_and_set_1);
__strong_reference(__sync_lock_test_and_set_2_c, __sync_lock_test_and_set_2);
@@ -862,4 +882,8 @@ __strong_reference(__sync_fetch_and_xor_2_c, __sync_fetch_and_xor_2);
__strong_reference(__sync_fetch_and_xor_4_c, __sync_fetch_and_xor_4);
#endif
+#endif /* _KERNEL */
+
+#endif
+
#endif /* __SYNC_ATOMICS */
OpenPOWER on IntegriCloud