mips: Install the __sync libfuncs for mips16
authorRichard Henderson <rth@redhat.com>
Sun, 20 Nov 2011 23:16:30 +0000 (15:16 -0800)
committerRichard Henderson <rth@gcc.gnu.org>
Sun, 20 Nov 2011 23:16:30 +0000 (15:16 -0800)
        * config/mips/mips.c (mips_init_libfuncs): Call init_sync_libfuncs.

From-SVN: r181539

gcc/ChangeLog
gcc/config/mips/mips.c

index 9bef97dff15cc06924e88de292e2d96f959de6ef..6a14c5419ce4598a0b839ec1c29acd806c0337ba 100644 (file)
@@ -1,3 +1,7 @@
+2011-11-20  Richard Henderson  <rth@redhat.com>
+
+       * config/mips/mips.c (mips_init_libfuncs): Call init_sync_libfuncs.
+
 2011-11-20  Uros Bizjak  <ubizjak@gmail.com>
 
        PR target/51235
index ff72e28a35c2db3abedb6b0b9343938b8cafc81a..75e73bda2a19bf1b861f28194b64efc4941df148 100644 (file)
@@ -11218,9 +11218,13 @@ mips_init_libfuncs (void)
     }
 
   /* The MIPS16 ISA does not have an encoding for "sync", so we rely
-     on an external non-MIPS16 routine to implement __sync_synchronize.  */
+     on an external non-MIPS16 routine to implement __sync_synchronize.
+     Similarly for the rest of the ll/sc libfuncs.  */
   if (TARGET_MIPS16)
-    synchronize_libfunc = init_one_libfunc ("__sync_synchronize");
+    {
+      synchronize_libfunc = init_one_libfunc ("__sync_synchronize");
+      init_sync_libfuncs (UNITS_PER_WORD);
+    }
 }
 
 /* Build up a multi-insn sequence that loads label TARGET into $AT.  */