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]

Re: choose_reload_regs V2.0


On Mon, 11 Sep 2000, Alan Goluban wrote:
> 
> Regarding your patch for mips.md, dated Thu, 7 Sep 2000:
> I tried to compile egcs-20000904 with your patch, but there was a small
> problem. It seems that "" is missing:

Odd.  I remember actually making sure it compiles...

> Regarding your patch for reload.c, dated Tue, 5 Sep 2000, for adding third
> argument to function regno_clobbered_p(); I think the folowing change
> is needed:
> -----------------------------------------------------------------
> --- reload.c	Mon Sep 10 13:22:59 2000
> +++ reload.c.new	Mon Sep 10 13:24:23 2000
> @@ -6626,7 +6626,7 @@ regno_clobbered_p (regno, insn, mode)
>      {
>        int test = REGNO (XEXP (PATTERN (insn), 0));
>  
> -      return regno >= test && test < endregno;
> +      return (test >= regno && test < endregno);
>      }
>  
>    if (GET_CODE (PATTERN (insn)) == PARALLEL)
> @@ -6640,7 +6640,7 @@ regno_clobbered_p (regno, insn, mode)
>  	    {
>  	      int test = REGNO (XEXP (elt, 0));
>  	      
> -	      if (regno >= test && test < endregno)
> +	      if (test >= regno && test < endregno)
>  		return 1;
>  	    }
>  	}
> -----------------------------------------------------------------

Thanks, I'll fix that immeditely (it's obviously correct).

> asm("rd %%wim, %%l0; nop; nop; nop\n"
>     "or %%l0, %0, %%l0\n"
>     "wr %%l0, %%wim; nop; nop; nop\n"
>     :
>     : "r"(bits)
>     : "%l0" );
> 
> This is (almost) real-world example, because linux-kernel has a number of
> similar macros for various archs. The compiler doesn't know anything about
> WIM register, so effectively there are no outputs, but one explicit clobber.
> How this clobber (%l0) can be marked as an earlyclobber?

It should automatically be considered earlyclobber, though not with the
same mechanism as normal operands.  I'll look into this problem once I
have some time.

Bernd
 


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