Paul Koning <paul_kon...@dell.com> writes: >> I assume you by 'instruction' here mean a define_insn and not a single >> RTL or assembler instruction. >> >> So, assume I have two classes M_REGS and Y_REGS and I cannot move >> between them except if I go through an intermediary in C_REGS. >> Do I need a secondary reload? > > Yes >> >> I wouldn't expect so cause I could write a rule that has a scratch from >> C_REGS. Then I move the value from SOURCE to C_REGS and from C_REGS to >> DEST. Have I misunderstood what you said? >>
What about the above case? Couldn't you have something like I described above: (define_insn "transfer" [ (set (match_operand 0 "register_operand" "m") (match_operand 1 "register_operand" "y")) (clobber (match_scratch 2 "c")) ] "" { move from 1 to 2; move from 2 to 0; }) Why would something like this not work and force you to have a secondary reload hook? -- PMatos