[PATCH] Fix spelling of ones' complement.

Marek Polacek polacek@redhat.com
Tue Nov 16 01:48:33 GMT 2021


Nitpicking time.  It's spelled "ones' complement" rather than "one's
complement".  I didn't go into config/.

Ok for trunk?

gcc/ChangeLog:

	* doc/implement-c.texi: Fix spelling.
	* doc/md.texi: Likewise.
	* expmed.c (emit_store_flag_int): Likewise.
	* optabs.c (expand_abs): Likewise.
	(expand_one_cmpl_abs_nojump): Likewise.
	* optabs.h (expand_abs): Likewise.
	* tree-ssa-ccp.c (gimple_nop_atomic_bit_test_and_p): Likewise.
---
 gcc/doc/implement-c.texi | 2 +-
 gcc/doc/md.texi          | 2 +-
 gcc/expmed.c             | 2 +-
 gcc/optabs.c             | 4 ++--
 gcc/optabs.h             | 2 +-
 gcc/tree-ssa-ccp.c       | 2 +-
 6 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/gcc/doc/implement-c.texi b/gcc/doc/implement-c.texi
index b656ac8ec4f..5dcd79004de 100644
--- a/gcc/doc/implement-c.texi
+++ b/gcc/doc/implement-c.texi
@@ -236,7 +236,7 @@ GCC does not support any extended integer types.
 
 @item
 @cite{Whether signed integer types are represented using sign and magnitude,
-two's complement, or one's complement, and whether the extraordinary value
+two's complement, or ones' complement, and whether the extraordinary value
 is a trap representation or an ordinary value (C99 and C11 6.2.6.2).}
 
 GCC supports only two's complement integer types, and all bit patterns
diff --git a/gcc/doc/md.texi b/gcc/doc/md.texi
index 41f1850bf6e..64a4cc0834e 100644
--- a/gcc/doc/md.texi
+++ b/gcc/doc/md.texi
@@ -1930,7 +1930,7 @@ A 3-bit unsigned integer constant.
 A 6-bit unsigned integer constant.
 
 @item CnL
-One's complement of a 6-bit unsigned integer constant.
+Ones' complement of a 6-bit unsigned integer constant.
 
 @item CmL
 Two's complement of a 6-bit unsigned integer constant.
diff --git a/gcc/expmed.c b/gcc/expmed.c
index 4abce11b647..6f19da6ef92 100644
--- a/gcc/expmed.c
+++ b/gcc/expmed.c
@@ -5940,7 +5940,7 @@ emit_store_flag_int (rtx target, rtx subtarget, enum rtx_code code, rtx op0,
 	}
 
       /* If we couldn't do it that way, for NE we can "or" the two's complement
-	 of the value with itself.  For EQ, we take the one's complement of
+	 of the value with itself.  For EQ, we take the ones' complement of
 	 that "or", which is an extra insn, so we only handle EQ if branches
 	 are expensive.  */
 
diff --git a/gcc/optabs.c b/gcc/optabs.c
index 019bbb62882..d3d801fb96d 100644
--- a/gcc/optabs.c
+++ b/gcc/optabs.c
@@ -3742,7 +3742,7 @@ expand_abs (machine_mode mode, rtx op0, rtx target,
   return target;
 }
 
-/* Emit code to compute the one's complement absolute value of OP0
+/* Emit code to compute the ones' complement absolute value of OP0
    (if (OP0 < 0) OP0 = ~OP0), with result to TARGET if convenient.
    (TARGET may be NULL_RTX.)  The return value says where the result
    actually is to be found.
@@ -3775,7 +3775,7 @@ expand_one_cmpl_abs_nojump (machine_mode mode, rtx op0, rtx target)
       delete_insns_since (last);
     }
 
-  /* If this machine has expensive jumps, we can do one's complement
+  /* If this machine has expensive jumps, we can do ones' complement
      absolute value of X as (((signed) x >> (W-1)) ^ x).  */
 
   scalar_int_mode int_mode;
diff --git a/gcc/optabs.h b/gcc/optabs.h
index 3bbceff92d9..9ed96944ebe 100644
--- a/gcc/optabs.h
+++ b/gcc/optabs.h
@@ -219,7 +219,7 @@ extern rtx expand_unop (machine_mode, optab, rtx, rtx, int);
 extern rtx expand_abs_nojump (machine_mode, rtx, rtx, int);
 extern rtx expand_abs (machine_mode, rtx, rtx, int, int);
 
-/* Expand the one's complement absolute value operation.  */
+/* Expand the ones' complement absolute value operation.  */
 extern rtx expand_one_cmpl_abs_nojump (machine_mode, rtx, rtx);
 
 /* Expand the copysign operation.  */
diff --git a/gcc/tree-ssa-ccp.c b/gcc/tree-ssa-ccp.c
index 0666dc652d0..8d3f68b1367 100644
--- a/gcc/tree-ssa-ccp.c
+++ b/gcc/tree-ssa-ccp.c
@@ -3341,7 +3341,7 @@ extern bool gimple_nop_atomic_bit_test_and_p (tree, tree *,
    in there), and/or if mask_2 is a power of 2 constant.
    Similarly for xor instead of or, use ATOMIC_BIT_TEST_AND_COMPLEMENT
    in that case.  And similarly for and instead of or, except that
-   the second argument to the builtin needs to be one's complement
+   the second argument to the builtin needs to be ones' complement
    of the mask instead of mask.  */
 
 static void

base-commit: a031aaa2ac9d4c74994df085a0d8c79bd55792c9
-- 
2.33.1



More information about the Gcc-patches mailing list