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]

Re: [m32c] IRA reload failures in libstdc++


Quoting DJ Delorie <dj@redhat.com>:


> m32c has no problem loading a 24-bit register from a 32-bit memory
> location.

The only truncsipsi2* alternative part that seems to match is Raa / Sd* .
Does that mean that Sd* is as good as m?

m32c doesn't use any of the single-character constraints, as they're too general to pretty much every apply. Sd ("standard displacement") is the most popular addressing mode the m32c supports.

The salient fact here is that there is no register r in A_REGS such
that HARD_REGNO_MODE_OK (rn, PSImode) && !fixed_regs[rn] is true
for [ r , r + HARD_REGNO_NREGS (r, PSImode) ) .

If you mean r + HARD_REGNO_NREGS (r, PSImode) - 1, then any of the

Oops, I meant SImode.


And HARD_REGNO_MODE_OK should only be checked for the first hard reg.


It should be easy enough to test for the "this just doesn't work"
cases and choose the other one, though, yes?

We can test for the 'this cannot possibly work' cases, i.e. where there is no suitable register at all. That would address the problems you have originally identified for the m32c.

There could still be further complications with call return values and
requirements for multiple reload registers overall.

There is also no easy way to check if we need a particular mode because
of addressing restrictions, and doing a performance-optimal solution is
way beyond the scope of reload.


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