Dave Korn wrote:
  In particular, I really don't understand what a RELOAD_FOR_INPUT_ADDRESS
means when all the operands are regs, or why there should be three reloads for
the same operand when it's just a clobber scratch.  Is there something special
about how reload handles clobber and match_scratch?

Reload types are used for a number of purposes. One of them is the ordering used when emitting the actual reload fixup insns. A fixup for an input reload must come before the insn. A fixup for an output reload must come after the insn. A fixup for an address used by an input reload must come before the input reloads. A fixup for an address used by an output reload must come after the insn, but before the output reloads. Etc. Careful ordering allows us to know the lifetimes of every reload, and hence allows us to share reload registers between reload types that don't overlap, thus reducing the total number of spill regs required.

In this case, we have an input reload that requires secondary reloads. Obviously, the secondary reloads must be emitted before the input reload, so we just use the "input address" reload type for convenience, even though there is no actual address involved here. That gets the reloads emitted in the right place.

As usual, I'm over simplifying.
--
Jim Wilson, GNU Tools Support, http://www.specifix.com

Reply via email to