This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: cprop_reg problem on sparc
> Sorry, the final path component should be "mzero2.c"
Thanks. I think we that need the same treatment in:
/* If we are accessing SRC in some mode other that what we
set it in, make sure that the replacement is valid. */
if (mode != vd->e[regno].mode)
{
if (hard_regno_nregs[regno][mode]
> hard_regno_nregs[regno][vd->e[regno].mode])
goto no_move_special_case;
}
as:
/* If we are narrowing the input to a smaller number of hard regs,
and it is in big endian, we are really extracting a high part.
Since we generally associate a low part of a value with the value itself,
we must not do the same for the high part.
Note we can still get low parts for the same mode combination through
a two-step copy involving differently sized hard regs.
Assume hard regs fr* are 32 bits bits each, while r* are 64 bits each:
(set (reg:DI r0) (reg:DI fr0))
(set (reg:SI fr2) (reg:SI r0))
loads the low part of (reg:DI fr0) - i.e. fr1 - into fr2, while:
(set (reg:SI fr2) (reg:SI fr0))
loads the high part of (reg:DI fr0) into fr2.
We can't properly represent the latter case in our tables, so don't
record anything then. */
else if (sn < (unsigned int) hard_regno_nregs[sr][vd->e[sr].mode]
&& (GET_MODE_SIZE (vd->e[sr].mode) > UNITS_PER_WORD
? WORDS_BIG_ENDIAN : BYTES_BIG_ENDIAN))
return;
i.e. we need to bail out if we are narrowing and this is a big-endian target.
--
Eric Botcazou