Merge branch 'rth/atomic/ppc'
authorRichard Henderson <rth@redhat.com>
Thu, 17 Nov 2011 22:12:31 +0000 (14:12 -0800)
committerRichard Henderson <rth@gcc.gnu.org>
Thu, 17 Nov 2011 22:12:31 +0000 (14:12 -0800)
From-SVN: r181459

gcc/ChangeLog
gcc/config/rs6000/rs6000.c

index 2368d46bf53a3318440f60ab58e1f90814571b66..1066aae88000fc8e040b660d55311a9ce20bcdc9 100644 (file)
        * builtins.c (expand_builtin): Remove 4th parameter representing 
        weak/strong mode when __atomic_compare_exchange becomes a library call.
 
+2011-11-17  Richard Henderson  <rth@redhat.com>
+
+       * config/rs6000/rs6000.c (rs6000_expand_atomic_compare_and_swap): Get
+       new pseudo for target after convert_modes.
+       (rs6000_expand_atomic_exchange, rs6000_expand_atomic_op): Likewise.
+
 2011-11-17  Richard Henderson  <rth@redhat.com>
 
        * builtins.c (expand_builtin_mem_thread_fence): Remove.
index 89c2ea088b7ba6574e78a775f2f17cc77e977ec7..f01353b894233b94eb2224b53f1507235d360d84 100644 (file)
@@ -17341,12 +17341,12 @@ rs6000_expand_atomic_compare_and_swap (rtx operands[])
       /* Shift and mask OLDVAL into position with the word.  */
       oldval = convert_modes (SImode, mode, oldval, 1);
       oldval = expand_simple_binop (SImode, ASHIFT, oldval, shift,
-                                   oldval, 1, OPTAB_LIB_WIDEN);
+                                   NULL_RTX, 1, OPTAB_LIB_WIDEN);
 
       /* Shift and mask NEWVAL into position within the word.  */
       newval = convert_modes (SImode, mode, newval, 1);
       newval = expand_simple_binop (SImode, ASHIFT, newval, shift,
-                                   newval, 1, OPTAB_LIB_WIDEN);
+                                   NULL_RTX, 1, OPTAB_LIB_WIDEN);
 
       /* Prepare to adjust the return value.  */
       retval = gen_reg_rtx (SImode);
@@ -17434,7 +17434,7 @@ rs6000_expand_atomic_exchange (rtx operands[])
       /* Shift and mask VAL into position with the word.  */
       val = convert_modes (SImode, mode, val, 1);
       val = expand_simple_binop (SImode, ASHIFT, val, shift,
-                                val, 1, OPTAB_LIB_WIDEN);
+                                NULL_RTX, 1, OPTAB_LIB_WIDEN);
 
       /* Prepare to adjust the return value.  */
       retval = gen_reg_rtx (SImode);
@@ -17487,7 +17487,7 @@ rs6000_expand_atomic_op (enum rtx_code code, rtx mem, rtx val,
       /* Shift and mask VAL into position with the word.  */
       val = convert_modes (SImode, mode, val, 1);
       val = expand_simple_binop (SImode, ASHIFT, val, shift,
-                                val, 1, OPTAB_LIB_WIDEN);
+                                NULL_RTX, 1, OPTAB_LIB_WIDEN);
 
       switch (code)
        {