[SPARC] Adjust T constraint

Eric Botcazou ebotcazou@adacore.com
Mon Dec 12 07:57:00 GMT 2016


The main purpose of the T constraint is to make sure that a memory reference 
is aligned on a 64-bit boundary in 32-bit mode.  But define_memory_constraint 
is not appropriate for such a constraint, because reload may think that it can 
satisfy it by reloading the address, which is of course wrong; this apparently 
never happens with old reload, but does with LRA and is responsible for the 
last couple of regressions in the testsuite in 32-bit mode.

Tested on SPARC/Solaris w/ and w/o -mlra, applied on the mainline.


2016-12-12  Eric Botcazou  <ebotcazou@adacore.com>

	* config/sparc/constraints.md (T): Use special memory constraint.
	(U): Minor tweak.
	(W): Add TARGET_ARCH64 test.
	* config/sparc/sparc.md (*movdi_insn_sp32): Replace 'W' with 'T'.
	(*movdf_insn_sp32): Likewise.
	(*mov<VM64:mode>_insn_sp32): Likewise.  Replace 'e' with 'f' in
	conjunction with offsettable memory references.

-- 
Eric Botcazou
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sparc_lra-2c.diff
Type: text/x-patch
Size: 3489 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20161212/9dbe7920/attachment.bin>


More information about the Gcc-patches mailing list