[Sorry Kaz, there might be some overlapping work here.  I wrote the
 patch before realising there was a PR about it.]

This patch fixes link failures in various atomic tests on MIPS16.
The internal optab names use "ior" to be consistent with the GCC
rtl convention, but the external names use "or" instead.

Tested on mips64-linux-gnu.  Applied as obvious.

Richard


gcc/
        PR middle-end/51351
        * optabs.c (init_sync_libfuncs): Use "or" rather than "ior"
        in the external names.

Index: gcc/optabs.c
===================================================================
--- gcc/optabs.c        2011-12-03 16:24:44.000000000 +0000
+++ gcc/optabs.c        2011-12-03 16:25:02.000000000 +0000
@@ -6624,14 +6624,14 @@ init_sync_libfuncs (int max)
 
   init_sync_libfuncs_1 (sync_old_add_optab, "__sync_fetch_and_add", max);
   init_sync_libfuncs_1 (sync_old_sub_optab, "__sync_fetch_and_sub", max);
-  init_sync_libfuncs_1 (sync_old_ior_optab, "__sync_fetch_and_ior", max);
+  init_sync_libfuncs_1 (sync_old_ior_optab, "__sync_fetch_and_or", max);
   init_sync_libfuncs_1 (sync_old_and_optab, "__sync_fetch_and_and", max);
   init_sync_libfuncs_1 (sync_old_xor_optab, "__sync_fetch_and_xor", max);
   init_sync_libfuncs_1 (sync_old_nand_optab, "__sync_fetch_and_nand", max);
 
   init_sync_libfuncs_1 (sync_new_add_optab, "__sync_add_and_fetch", max);
   init_sync_libfuncs_1 (sync_new_sub_optab, "__sync_sub_and_fetch", max);
-  init_sync_libfuncs_1 (sync_new_ior_optab, "__sync_ior_and_fetch", max);
+  init_sync_libfuncs_1 (sync_new_ior_optab, "__sync_or_and_fetch", max);
   init_sync_libfuncs_1 (sync_new_and_optab, "__sync_and_and_fetch", max);
   init_sync_libfuncs_1 (sync_new_xor_optab, "__sync_xor_and_fetch", max);
   init_sync_libfuncs_1 (sync_new_nand_optab, "__sync_nand_and_fetch", max);

Reply via email to