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: [ColdFire 47/63] Fix PR target/28181


On Wed, 2007-01-10 at 12:03 +0000, Richard Sandiford wrote:
> This patch fixes PR target/28181.  See the thread starting at:
> 
>     http://gcc.gnu.org/ml/gcc-patches/2006-12/msg00766.html
> 
> for previous discussion about this PR.  The problem is that we
> may sometimes need to reload paradoxical HImode or SImode subregs
> of spilled QImode pseudos.  reload sees no reason not to generate
> such reloads for address registers because address registers are
> allowed to store HImode and SImode values.  However, it may then
> decide to reload the inner QImode spill slot rather than an
> HImode or SImode MEM.  Such loads cannot be done with address
> registers.
> 
> As I said in my follow-up to the above message, I think the correct
> fix is to (a) allow address registers to hold bytes and (b) to define
> SECONDARY_RELOAD_CLASS in such a way that we require a DATA_REGS
> temporary when loading or storing them.  No change is needed to the
> movqi patterns because they already handle moves from constants to
> address registers, and between address registers and data registers,
> despite what m68k_regno_mode_ok says.
> 
> Richard
> 
> 
> gcc/
> 	PR target/28181
> 	* config/m68k/m68k-protos.h (m68k_secondary_reload_class): Declare.
> 	(m68k_preferred_reload_class): Likewise.
> 	* config/m68k/m68k.h (HARD_REGNO_MODE_OK): Remove duplicated comment.
> 	(SECONDARY_RELOAD_CLASS): Define.
> 	(PREFERRED_RELOAD_CLASS): Use m68k_preferred_reload_class.
> 	(LIMIT_RELOAD_CLASS): Delete.
> 	* config/m68k/m68k.c (m68k_regno_mode_ok): Don't prevent address
> 	registers from storing bytes.
> 	(m68k_secondary_reload_class): New function.
> 	(m68k_preferred_reload_class): Likewise.
OK.
Jeff



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