This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Recog/asm_operands problem with MIPS/gcc3.3
- From: Daniel Jacobowitz <drow at mvista dot com>
- To: gcc-patches at gcc dot gnu dot org
- Cc: Richard Henderson <rth at redhat dot com>
- Date: Thu, 8 Jan 2004 14:34:11 -0500
- Subject: Re: Recog/asm_operands problem with MIPS/gcc3.3
- References: <20040106233609.GA25597@nevyn.them.org> <20040107210353.GA24159@redhat.com> <20040107212556.GA17601@nevyn.them.org> <20040107223323.GA25232@redhat.com>
On Wed, Jan 07, 2004 at 02:33:23PM -0800, Richard Henderson wrote:
> On Wed, Jan 07, 2004 at 04:25:56PM -0500, Daniel Jacobowitz wrote:
> > + /* After reload, reject invalid memory addresses. */
> > + if (strict > 0
> > + && (GET_CODE (op) != MEM
> > + || !strict_memory_address_p (recog_data.operand_mode[opno],
> > + XEXP (op, 0))))
> > + break;
> > +
>
> I'm thinking more like
Yeah, that works also (no surprise). Bootstrapped and regtested on
3.3-branch i686-pc-linux-gnu for kicks, also no surprises. Will you
check this in, at least for HEAD?
> Index: recog.c
> ===================================================================
> RCS file: /cvs/gcc/gcc/gcc/recog.c,v
> retrieving revision 1.190
> diff -c -p -d -r1.190 recog.c
> *** recog.c 11 Dec 2003 00:20:46 -0000 1.190
> --- recog.c 7 Jan 2004 22:32:23 -0000
> *************** constrain_operands (int strict)
> *** 2423,2434 ****
> break;
>
> case 'm':
> ! if (GET_CODE (op) == MEM
> ! /* Before reload, accept what reload can turn into mem. */
> ! || (strict < 0 && CONSTANT_P (op))
> ! /* During reload, accept a pseudo */
> ! || (reload_in_progress && GET_CODE (op) == REG
> ! && REGNO (op) >= FIRST_PSEUDO_REGISTER))
> win = 1;
> break;
>
> --- 2423,2447 ----
> break;
>
> case 'm':
> ! /* Memory operands must be valid, to the extent
> ! required by STRICT. */
> ! if (GET_CODE (op) == MEM)
> ! {
> ! if (strict > 0
> ! && !strict_memory_address_p (GET_MODE (op),
> ! XEXP (op, 0)))
> ! break;
> ! if (strict == 0
> ! && !memory_address_p (GET_MODE (op), XEXP (op, 0)))
> ! break;
> ! win = 1;
> ! }
> ! /* Before reload, accept what reload can turn into mem. */
> ! else if (strict < 0 && CONSTANT_P (op))
> ! win = 1;
> ! /* During reload, accept a pseudo */
> ! else if (reload_in_progress && GET_CODE (op) == REG
> ! && REGNO (op) >= FIRST_PSEUDO_REGISTER)
> win = 1;
> break;
>
>
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer