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)


Hi Aldy,

On Sun, 3 Nov 2002, Aldy Hernandez wrote:

> I do hope everyone is not only thrilled and excited about the new
> interface, but anxious to approve it.

No.  Because: ...


Ok, just kidding ;-)  I am thrilled and excited, but have no power ;)
OTOH one minor gnit:

ia64.h:
! /* If defined, gives a class of registers that cannot be used as the
!    operand of a SUBREG that changes the mode of the object illegally.  */
!
! #define CLASS_CANNOT_CHANGE_MODE        FR_REGS
!
! /* Defines illegal mode changes for CLASS_CANNOT_CHANGE_MODE.
!    In FP regs, we can't change FP values to integer values and vice
     versa, but we can change e.g. DImode to SImode.  */

! #define CLASS_CANNOT_CHANGE_MODE_P(FROM,TO) \
!   (GET_MODE_CLASS (FROM) != GET_MODE_CLASS (TO))

  /* A C expression that defines the machine-dependent operand constraint
     letters (`I', `J', `K', .. 'P') that specify particular ranges of
--- 993,1003 ----
     : ((CLASS) == FR_REGS && (MODE) == TFmode) ? 1             \
     : (GET_MODE_SIZE (MODE) + UNITS_PER_WORD - 1) / UNITS_PER_WORD)

! /* In FP regs, we can't change FP values to integer values and vice
     versa, but we can change e.g. DImode to SImode.  */

! #define CANNOT_CHANGE_MODE_CLASS(FROM, TO)    \
!   (GET_MODE_SIZE (FROM) != GET_MODE_SIZE (TO) ? FR_REGS : NO_REGS)

The original version used GET_MODE_CLASS, not GET_MODE_SIZE.  Generally
that's not the same, although I don't know for sure on ia64.


Ciao,
Michael.


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