arm: Install __sync libfuncs for Linux.
authorRichard Henderson <rth@redhat.com>
Sun, 27 Nov 2011 00:20:48 +0000 (16:20 -0800)
committerRichard Henderson <rth@gcc.gnu.org>
Sun, 27 Nov 2011 00:20:48 +0000 (16:20 -0800)
        * config/arm/arm.c (arm_init_libfuncs): Call init_sync_libfuncs
        for Linux.

From-SVN: r181755

gcc/ChangeLog
gcc/config/arm/arm.c

index c16f1d8db5838c285a9c490912c22b59ab9deaf0..5a6b5d33733ea785732bba157c2053116ad41371 100644 (file)
@@ -1,3 +1,8 @@
+2011-11-26  Richard Henderson  <rth@redhat.com>
+
+       * config/arm/arm.c (arm_init_libfuncs): Call init_sync_libfuncs
+       for Linux.
+
 2011-11-26  Richard Henderson  <rth@redhat.com>
 
        * optabs.c (expand_atomic_fetch_op): Always return result.
index e3b0b883ec8107f1c21acdd3ad471fe32d3cedb4..ee26c51b0a0cd9bf2ca0094c2aaa81c5c79c5e82 100644 (file)
@@ -1096,6 +1096,10 @@ arm_set_fixed_conv_libfunc (convert_optab optable, enum machine_mode to,
 static void
 arm_init_libfuncs (void)
 {
+  /* For Linux, we have access to kernel support for atomic operations.  */
+  if (arm_abi == ARM_ABI_AAPCS_LINUX)
+    init_sync_libfuncs (2 * UNITS_PER_WORD);
+
   /* There are no special library functions unless we are using the
      ARM BPABI.  */
   if (!TARGET_BPABI)