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: CANNOT_CHANGE_MODE_CLASS (was Re: CLASS_CANNOT_CHANGE_MODE* redesign)


On Sun, Nov 03, 2002 at 08:21:27PM -0800, Aldy Hernandez wrote:
> --- global.c	4 Nov 2002 03:35:07 -0000
> *************** find_reg (num, losers, alt_regs_p, accep
> *** 977,983 ****
>   #ifdef HARD_REG_SET
>     register		/* Declare it register if it's a scalar.  */
>   #endif
> !     HARD_REG_SET used, used1, used2;
>   
>     enum reg_class class = (alt_regs_p
>   			  ? reg_alternate_class (allocno[num].reg)
> --- 977,985 ----
>   #ifdef HARD_REG_SET
>     register		/* Declare it register if it's a scalar.  */
>   #endif
> !     HARD_REG_SET used, used2;
> !   /* ...except used1, because we take it's address.  */
> !   HARD_REG_SET used1;

Just get rid of the whole #ifdef register thing.  It's stupid.
Two instances.

> --- config/ia64/ia64.h	4 Nov 2002 03:35:10 -0000
> *************** enum reg_class
> - #define CLASS_CANNOT_CHANGE_MODE_P(FROM,TO) \
> -   (GET_MODE_CLASS (FROM) != GET_MODE_CLASS (TO))
> + #define CANNOT_CHANGE_MODE_CLASS(FROM, TO) 	\
> +   (GET_MODE_SIZE (FROM) != GET_MODE_SIZE (TO) ? FR_REGS : NO_REGS)

CLASS != SIZE.  Yes, it really makes a difference.

FR_REGS registers are 83 bits wide, and DFmode is
stored in a different set than DImode, so we have
to use different insns to load/store.


Ok with those changes.


r~


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