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: [csl-arm] arm.md: Fix a failure from gcc.c-torture/compile/20050113-1.c.


> 2005-09-21  Kazu Hirata  <kazu@codesourcery.com>
>
> 	* config/arm/arm.md (movdi): Force operands[1] to a register
> 	if we have a memory-to-memory move.
> 	(*arm_movdi): Reject memory-to-memory moves.
>
> Index: arm.md
> ===================================================================
> RCS file: /home/gcc/repos/gcc/gcc/gcc/config/arm/arm.md,v
> retrieving revision 1.145.2.37
> diff -u -d -p -r1.145.2.37 arm.md
> --- arm.md	15 Sep 2005 13:53:33 -0000	1.145.2.37
> +++ arm.md	21 Sep 2005 01:58:00 -0000
> @@ -4172,6 +4172,13 @@
>  	    operands[1] = force_reg (DImode, operands[1]);
>          }
>      }
> +  if (TARGET_ARM)
> +    {
> +      if (!no_new_pseudos
> +	  && GET_CODE (operands[0]) == MEM
> +	  && GET_CODE (operands[1]) == MEM)
> +	operands[1] = force_reg (DImode, operands[1]);
> +    }
>    "
>  )

No. You should use the same condition as the TARGET_THUMB case (ie. !REG). For 
these purposes mem and const int are the same thing.

> @@ -4180,7 +4187,9 @@
>  	(match_operand:DI 1 "di_operand"              "rIK,mi,r"))]
>    "TARGET_ARM
>    && !(TARGET_HARD_FLOAT && (TARGET_MAVERICK || TARGET_VFP))
> -  && !TARGET_IWMMXT"
> +  && !TARGET_IWMMXT
> +  && (GET_CODE (operands[0]) != MEM
> +      || GET_CODE (operands[1]) != MEM)"
>    "*
>    return (output_move_double (operands));
>    "

Likewise.

You also need to check the coprocessor movdi patterns in iwmmxt.md and vfp.md.
I guess all the movdf patterns may require a similar fix.

Paul


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