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]

[patch,doc]: sync_builtins: nand


Hi,

implementing the remaining atomic builtins for HI/QImode on s390 I found
the following issue:

Whereas any implementation I found basically stated that nand means:
	result = ~op0 & op1
in md.texi I read:
	result = op0 & ~o1
However, up until today I thought nand to be defined as:
	result = ~(op0 & op1)

Is there a reason for gcc not defining it the latter way?
Thanks for any clarification.



In the meanwhile, I propose the following patch to align the doc with
the sources.
Ok for 4.1?

Bye,
Adrian
 
2005-10-11  Adrian Straetling  <straetling@de.ibm.com>

	  * doc/md.texi: Adapt to implementation.


Index: gcc/doc/md.texi
===================================================================
*** gcc/doc/md.texi.orig	2005-11-07 22:38:21.000000000 +0100
--- gcc/doc/md.texi	2005-11-10 21:45:52.940637006 +0100
*************** These patterns emit code for an atomic o
*** 4182,4188 ****
  Operand 0 is the memory on which the atomic operation is performed.
  Operand 1 is the second operand to the binary operator.
  
! The ``nand'' operation is @code{op0 & ~op1}.
  
  This pattern must issue any memory barrier instructions such that all
  memory operations before the atomic operation occur before the atomic
--- 4182,4188 ----
  Operand 0 is the memory on which the atomic operation is performed.
  Operand 1 is the second operand to the binary operator.
  
! The ``nand'' operation is @code{~op0 & op1}.
  
  This pattern must issue any memory barrier instructions such that all
  memory operations before the atomic operation occur before the atomic


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