Hi, I'm writing a new gcc port, and having problems making reload work.
Say I've got a mov instruction that only works via an accumulator A, and a two-operand add instruction. "r" regclass includes regs A,X,Y, and "a" regclass only includes reg A. So mov has constraints like: 0 = "g,a" 1 = "a,gi" and add3 has constraints: 0 = "r" 1 = "0" 2 = "i" (say) Then if there's an insn before reload like: add3 X, Y, 1 Reload will notice this, and generate a reload to put Y into X, so you'll end up with: mov X, Y add3 X, X, 1 That seems to be happening correctly. Now, what I _expected_ to happen is that reload would then be repeated to handle the newly added mov insn, which would see that the mov insn's constraint don't match, and would then generate an additional reload to yield: mov A, Y mov X, A add3 X, X, 1 but in fact this final step doesn't seem to be happening -- it just finishes reload without changing the bogus "mov X, Y" insn and goes on to die with an "insn does not satisfy its constraints:" error in final. I've been trying to track through reload seeing what it's doing, but my mind is being twisted into little knots, and I'd really like to at least know if what I think should be happening is accurate. Any hints? Thanks, -Miles -- .Numeric stability is probably not all that important when you're guessing.