This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: CANNOT_CHANGE_MODE_CLASS (was Re: CLASS_CANNOT_CHANGE_MODE* redesign)
- From: Richard Henderson <rth at redhat dot com>
- To: Aldy Hernandez <aldyh at redhat dot com>
- Cc: Michael Matz <matz at suse dot de>, gcc-patches at gcc dot gnu dot org
- Date: Mon, 4 Nov 2002 04:05:15 -0800
- Subject: Re: CANNOT_CHANGE_MODE_CLASS (was Re: CLASS_CANNOT_CHANGE_MODE* redesign)
- References: <20021024215423.GB992@redhat.com> <Pine.LNX.4.33.0210251158320.20702-100000@wotan.suse.de> <20021025183135.GA19283@redhat.com> <20021025200058.GA7484@redhat.com> <20021104042127.GA4862@redhat.com>
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~