http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58314

--- Comment #14 from Oleg Endo <olegendo at gcc dot gnu.org> ---
Created attachment 31283
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=31283&action=edit
re-work movqi / movhi insns

The attached patch seems to fix the problem.
It removes the questionable reg_reg pattern and allows the *movqi / *movhi
pattern to match any memory address.  However, instead of using the "m" memory
constraint, "Sdd" (displacement address mode only) and "Snd" (any address mode
except displacement) are used, so that the R0 reg "z" constraint can be used
appropriately.
The "Snd" memory constraint had to be fixed for this to work.  Some other minor
changes were required for calculating the proper *movqi / *movhi insn size
(which depends on the size of the displacement constant).

CSiBE doesn't show any regressions regarding displacement addressing modes for
SH4 and SH2A and the test cases for this PR compile fine for me.

Although not fully tested yet, could you guys please have a look at it?
Christian, does it fix your Linux build problems, or are there still more / new
ones?

Reply via email to