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: Recog/asm_operands problem with MIPS/gcc3.3


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



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;
  


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