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]

Re: Help with constraint for single register


On Sat, Dec 25, 2004 at 07:45:20PM -0500, Robert Baruch wrote:
> QUESTION #1: Since I'm always going to use DONE, do I really have to
> define an RTL template here? Or can I leave it empty? Should I leave
> it in just for documentation purposes?

You can leave it empty, though I sometimes leave them for
documentation.  Of course there's the risk that the documentation will
just get out of date :-)

Empty is, IIRC, (const_int 0).

> Next, I have a define_insn for *movqi, which can only be passed moves
> through W. If there's a move that does not involve W, we better debug
> that situation.
> 
> QUESTION #2: Uh oh, somehow the compiler got a hold of W anyway, and
> generated RTL for const -1 -> W, and passed that move to my expander.
> How did the compiler grab W? I didn't include it in GENERAL_REGS.
> Here's an excerpt of the register masks:

As Ulrich wrote, reload will do this; a fundamental assumption is that
all register moves are valid.  Do you have secondary reload classes
yet?

-- 
Daniel Jacobowitz


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