This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[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 ();


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]