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]

How to handle subreg(mem(X)) after reload?


Hi all,

I'm having a problem with a subreg(mem(X)) insn being generated as a
result of reload. The abort message is "unrecognizable insn". I don't
have anything in my md file which will recognize this as a valid
instruction. The insn in question looks like this:

(insn 2179 2178 1796 0 (set:QI (subreg:QI (mem:SI (plus:QI (reg/f:QI 49 R20/FP)
                    (const_int 104 [0x68])) [6 __x0+0 S4 A8]) 0)
        (reg:QI 0 W)) -1 (nil)
    (nil))

In other words, something like [FP+104].0 <- W.

This insn resulted as a reload for an instruction which used a pseudo,
and using W as a secondary reload register:

P122.0 <- 0

became

W <- 0
[FP+104].0 <- W

My question is, what would I have to put in my md file to pass this?
Should I include moves of the form above (as well as the opposite move
into W)? Or is there an easier way to make GCC do the work of equating
this instruction down more simply, into, for example:

[FP+104+0] <- W (note: big-endian)

Or does GCC have to be told that [X].0 == [X+0]? If so, how?

Thanks,

--Rob


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