This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: add h8sx support to h8300
On Jul 14, 2004, Richard Sandiford <rsandifo@redhat.com> wrote:
> The idea is that, if nothing is using er6, there's no reason why it
> can't be allocated for a movmd.
Right. The trick is to figure out whether something *is* using it.
HFP_REG and FP_REG both refer to er6, although the latter does so by
means of elimination. That's why I thought it might make sense to
test for both. Before HFP_REG and FP_REG were split, when we tested
for FP_REG, we covered both meanings. After the split, in order to
preserve behavior, we had to test both. That was my reasoning. Was
it wrong?
> The register allocators might normally shy away from that because
> er6 is a call-saved register. "Hey, I've got this call-clobbered
> register sitting free. Why not use that instead of er6?". Even '!'
> wasn't enough to convince them otherwise.
There's also effects from the REG_ALLOC_ORDER. But getting the
allocator to prefer er6 over any other register would probably end up
getting far worse results if it turns out that we need a frame
pointer.
--
Alexandre Oliva http://www.ic.unicamp.br/~oliva/
Red Hat Compiler Engineer aoliva@{redhat.com, gcc.gnu.org}
Free Software Evangelist oliva@{lsd.ic.unicamp.br, gnu.org}