Hi Aaron,

On Mon, Dec 19, 2016 at 09:57:07AM -0600, Aaron Sawdey wrote:
> Bootstrap/regtest in progress on ppc64le -mcpu=power8, ok for trunk if
> results are clean?


> +/* Generate alignment check and branch code to set up for
> +   strncmp when we don't have DI alignment.
> +   STRNCMP_LABEL is the label to branch if there is a page crossing.
> +   SRC is the string pointer to be examined.
> +   BYTES is the max number of bytes to compare.       */

You have "tab, space" before the */ .

> +static void
> +expand_strncmp_align_check (rtx strncmp_label, rtx src, HOST_WIDE_INT bytes)
> +{
> +  rtx lab_ref = gen_rtx_LABEL_REF (VOIDmode, strncmp_label);
> +  rtx src_check = copy_addr_to_reg (XEXP (src, 0));
> +  if (GET_MODE (src_check) == SImode)
> +    emit_insn (gen_andsi3 (src_check, src_check, GEN_INT (0xfff)));
> +  else
> +    emit_insn (gen_anddi3 (src_check, src_check, GEN_INT (0xfff)));
> +  rtx cond = gen_reg_rtx (CCmode);
> +  emit_move_insn (cond, gen_rtx_COMPARE (CCmode, src_check,
> +                                      GEN_INT (4096 - bytes)));
>  

And the page break here still.

> +  /* SLOW_UNALIGNED_ACCESS -- don't do unaligned stuff.       */

Tab space.

> +    {
> +      /* Compare sequence:
> +      check each 8B with: ld/ld cmpd bne
> +      cleanup code at end:
> +      cmpb          get byte that differs
> +      cmpb          look for zero byte
> +      orc           combine
> +      cntlzd        get bit of first zero/diff byte
> +      subfic        convert for rldcl use
> +      rldcl rldcl   extract diff/zero byte
> +      subf          subtract for final result

Mixed tabs and spaces here.

> +      /* We must always left-align the data we read, and
> +      clear any bytes to the right that are beyond the string.
> +      Otherwise the cmpb sequence won't produce the correct
> +      results.  The beginning of the compare will be done
> +      with word_mode so will not have any extra shifts or
> +      clear rights.  */

You have just a tab before */ here.

> +  /* Generate the final sequence that identifies the differing
> +     byte and generates the final result, taking into account
> +     zero bytes:
> +
> +     cmpb           cmpb_result1, src1, src2
> +     cmpb           cmpb_result2, src1, zero
> +     orc            cmpb_result1, cmp_result1, cmpb_result2
> +     cntlzd         get bit of first zero/diff byte
> +     addi           convert for rldcl use
> +     rldcl rldcl   extract diff/zero byte
> +     subf           subtract for final result
> +  */

Mixed tabs and spaces.

The rest looks good.  Please fix those remaining whitespace errors, and
it is okay for trunk.  Thanks,


Segher

Reply via email to