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]

reload vs adds with clobbers


In gen_reload (reload1.c) there's a chunk of code that creates an add
insn without going through the usual expanders:

line 7471:
      if (op0 != XEXP (in, 0) || op1 != XEXP (in, 1))
	in = gen_rtx_PLUS (GET_MODE (in), op0, op1);

      insn = emit_insn (gen_rtx_SET (VOIDmode, out, in));
      code = recog_memoized (insn);

Unfortunately, for xstormy16, the add instruction has a clobber (it
clobbers the carry), so it doesn't match.  The fallthrough code (for
above) tries to expand the add into two insns, but that totally blows
up in this case (adding a constant to a register) due to its
assumptions about what would fail the above recog.

What's the right way to address this problem?


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