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]

Re: [patch] Handle MIPS DSP control registers


Catherine Moore <clm@codesourcery.com> writes:
> Here is the updated patch which incorporates your comments.  I will
> send the wwwdocs patch in a separate message.  Does this look okay to
> install?

Looks good, thanks.  Some comments below...

> -  if (!ISA_HAS_DSP)
> +
> +  /* These DSP control register fields are global.  */
> +  if (ISA_HAS_DSP)
> +    {
> +      global_regs[CCDSP_PO_REGNUM] = 1;
> +      global_regs[CCDSP_SC_REGNUM] = 1;
> +    }
> +  else

Very minor nit, but the comment ought to go directly above the
global_regs assignments, since it doesn't apply when !ISA_HAS_DSP.
I'd prefer:

  /* The SCOUNT and POS fields are global.  */

> +#define DSP_CTRL_REG_FIRST 182
> +#define DSP_CTRL_REG_LAST 187

The new patch doesn't need these macros.

> +The SCOUNT and POS bits of the DSP control register are global.  The
> +WRDSP, EXTPDP, EXTPDPV and MTHLIP instructions modify the SCOUNT and
> +POS bits.  During optimization, the compiler will not delete these
> +instructions and it will not delete calls to functions containing
> +these instructions.

I think we generally mark instruction names like WRDSP as:

  @code{wrdsp}

(SCOUNT and POS are OK as they are.)

OK with those changes, thanks.

Richard


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