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: SPARC: minor tweaks


From: Eric Botcazou <ebotcazou@libertysurf.fr>
Date: Sun, 15 May 2005 12:28:23 +0200

> Btw, any reason why in the movdi expander:
> 
>   /* Handle MEM cases first.  */
>   if (GET_CODE (operands[0]) == MEM)
>     {
>       /* If it's a REG, we can always do it.
> 	 The const zero case is more complex, on v9
> 	 we can always perform it.  */
>       if (register_operand (operands[1], DImode)
> 	  || (TARGET_V9
>               && (operands[1] == const0_rtx)))
>         goto movdi_is_ok;
> 
> since 0 is a register (or a pair of registers)?

I think what it's trying to say is:

	If we're TARGET_V9, we can store DImode const zero
	to memory.

	Else, this is not possible since only half of
	the DImode value is available using fixed registers.

For non-v9, we only have SImode %g0.  So the compiler has to end up
producing something like:

	mov 0, %g1
	std %g0, [%mem]

for this to work out.

On v9, %g0 alone stores the whole DImode.

	stx %g0, [%mem]


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