This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch] Handle MIPS DSP control registers
- From: Richard Sandiford <rdsandiford at googlemail dot com>
- To: Catherine Moore <clm at codesourcery dot com>
- Cc: Chao-ying Fu <fu at mips dot com>, gcc-patches at gcc dot gnu dot org
- Date: Sat, 01 Nov 2008 17:52:25 +0000
- Subject: Re: [patch] Handle MIPS DSP control registers
- References: <48FF8A80.8070502@codesourcery.com> <87ljwf6kkd.fsf@firetop.home> <000d01c93628$b0517550$a914a8c0@mips.com> <87r664y93q.fsf@firetop.home> <490A2B2A.4040208@codesourcery.com>
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