[patch] mn10300.md store_movm

DJ Delorie dj@redhat.com
Fri Nov 10 21:35:00 GMT 2000


> Since this is only used in the prologue, I'm not sure I understand
> why it is needed.  Is it to prevent this instruction from being
> moved after any other instruction that uses these registers?

Yes, even though the mn10300 doesn't yet support scheduling.  Just
because it doesn't happen to be a problem now doesn't mean it's not
still wrong.

> In this case, it would probably be reasonable to also note that it
> modifies sp, otherwise it might also be moved after the stack
> adjustment emitted after it.

Hmmm... I didn't run into that, but I can add it.

> You might have to turn it into an expand, though, so that it can
> compute by how much the stack pointer is adjusted.  It would be nice
> to make the expand available only after reload_completed, then.  Or
> maybe you could just mark sp as clobbered.

Clobbered sounds easier.  I was just fixing a bug, not optimizing it.

> Of course, none of this is much relevant, since we don't have any
> scheduling parameters for the mn10300, so I suppose insns wouldn't
> be moved around.

Right, but as part of my training I'm learning about scheduling (of
course, I'm just faking the numbers), and it *did* move something
before it, which is why I noticed.  I figured I'd mention it before it
got forgotten again, so if anyone ever added real scheduling it would
just work.


More information about the Gcc-patches mailing list