optabs.c: Update inline documentation
diff mbox

Message ID alpine.DEB.2.00.1609121510080.29007@tp.orcam.me.uk
State Accepted
Headers show

Commit Message

Maciej W. Rozycki Sept. 12, 2016, 2:37 p.m. UTC
Hi,

 I've noticed commit 147425 ("cond-optab merge target-independent bits"), 
<https://gcc.gnu.org/ml/gcc-patches/2009-04/msg01030.html>, changed the 
semantics of `prepare_cmp_insn' function arguments, however did not fully 
accordingly update its documentation comment.  Here's the missing update.

	gcc/
	* optabs.c (prepare_cmp_insn): Update documentation comment.

 OK to apply?

  Maciej

gcc-optabs-prepare-cmp-insn-doc.diff

Comments

Jeff Law Sept. 12, 2016, 3:52 p.m. UTC | #1
On 09/12/2016 08:37 AM, Maciej W. Rozycki wrote:
> Hi,
>
>  I've noticed commit 147425 ("cond-optab merge target-independent bits"),
> <https://gcc.gnu.org/ml/gcc-patches/2009-04/msg01030.html>, changed the
> semantics of `prepare_cmp_insn' function arguments, however did not fully
> accordingly update its documentation comment.  Here's the missing update.
>
> 	gcc/
> 	* optabs.c (prepare_cmp_insn): Update documentation comment.
>
>  OK to apply?
OK.
jeff
Maciej W. Rozycki Sept. 13, 2016, 9:47 a.m. UTC | #2
On Mon, 12 Sep 2016, Jeff Law wrote:

> > 	gcc/
> > 	* optabs.c (prepare_cmp_insn): Update documentation comment.
> > 
> >  OK to apply?
> OK.
> jeff

 Committed, thanks.

  Maciej

Patch
diff mbox

Index: gcc/gcc/optabs.c
===================================================================
--- gcc.orig/gcc/optabs.c	2016-08-15 17:24:21.124480231 +0100
+++ gcc/gcc/optabs.c	2016-08-15 17:42:29.370598925 +0100
@@ -3716,13 +3716,17 @@  can_compare_p (enum rtx_code code, machi
 }
 
 /* This function is called when we are going to emit a compare instruction that
-   compares the values found in *PX and *PY, using the rtl operator COMPARISON.
+   compares the values found in X and Y, using the rtl operator COMPARISON.
 
-   *PMODE is the mode of the inputs (in case they are const_int).
-   *PUNSIGNEDP nonzero says that the operands are unsigned;
+   If they have mode BLKmode, then SIZE specifies the size of both operands.
+
+   UNSIGNEDP nonzero says that the operands are unsigned;
    this matters if they need to be widened (as given by METHODS).
 
-   If they have mode BLKmode, then SIZE specifies the size of both operands.
+   *PTEST is where the resulting comparison RTX is returned or NULL_RTX
+   if we failed to produce one.
+
+   *PMODE is the mode of the inputs (in case they are const_int).
 
    This function performs all the setup necessary so that the caller only has
    to emit a single comparison insn.  This setup can involve doing a BLKmode