This is the mail archive of the gcc@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]

CANNOT_CHANGE_MODE_CLASS inconsistency


Hi,
How is the FROM and TO arguemnts of the macro supposed to work.
IE if I am validating the validity of (subreg:outer (reg:inner))
is FROM inner and TO outer?  Or is that other way around (why) or
dependent on something (like different for destination, where de-facto
subreg works in oposite way)

My problem is that I need to prohibit nonparadoxical subregs and the use
seems to be quite random.  For instance reload does:

	   (class, CANNOT_CHANGE_MODE_CLASS (GET_MODE (SUBREG_REG (in)),
					     inmode, SUBREG_BYTE (in)))
(like I would expect)
and other places, like simplify-subreg or register_operand does:

		      && REG_CANNOT_CHANGE_MODE_P (REGNO (to),
						   GET_MODE (to),
						   GET_MODE (x),
						   SUBREG_BYTE (to)))
(IE other way around).
Why?

Honza


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