This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[Committed] S/390: Adjust atomic nand to match the 4.4 semantics
- From: Andreas Krebbel <krebbel1 at de dot ibm dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Thu, 20 Nov 2008 23:26:18 +0100
- Subject: [Committed] S/390: Adjust atomic nand to match the 4.4 semantics
Hello,
the attached patch makes the atomic nand implementation in the S/390
back end to match the changed semantics in 4.4.
Boostrapped on s390 and s390x.
Committed to mainline.
Bye,
-Andreas-
2008-11-20 Andreas Krebbel <krebbel1@de.ibm.com>
* gcc/config/s390/s390.c (s390_expand_atomic): Adjust QI/HI atomic
nand to the changed 4.4 semantic.
Index: gcc/config/s390/s390.c
===================================================================
*** gcc/config/s390/s390.c.orig 2008-10-31 10:13:03.000000000 +0100
--- gcc/config/s390/s390.c 2008-11-20 14:51:50.000000000 +0100
*************** s390_expand_atomic (enum machine_mode mo
*** 4681,4690 ****
NULL_RTX, 1, OPTAB_DIRECT);
break;
case MULT: /* NAND */
- new_rtx = expand_simple_binop (SImode, XOR, new_rtx, ac.modemask,
- NULL_RTX, 1, OPTAB_DIRECT);
new_rtx = expand_simple_binop (SImode, AND, new_rtx, val,
NULL_RTX, 1, OPTAB_DIRECT);
break;
default:
gcc_unreachable ();
--- 4681,4690 ----
NULL_RTX, 1, OPTAB_DIRECT);
break;
case MULT: /* NAND */
new_rtx = expand_simple_binop (SImode, AND, new_rtx, val,
NULL_RTX, 1, OPTAB_DIRECT);
+ new_rtx = expand_simple_binop (SImode, XOR, new_rtx, ac.modemask,
+ NULL_RTX, 1, OPTAB_DIRECT);
break;
default:
gcc_unreachable ();