So... gcc assumes the register push/pops happen before the frame
pointer is initialized?  So the epilog always restores $sp from $fp
before restoring registers?

That would make the m32c port much less efficient, since it has the
exitd opcode which restores $sp, releases the frame, and returns, all
in one.

But, why is it that gcc is *almost* doing what I expect?  It *does*
save the $sp value, and restores it before the epilogue, but it
doesn't restore the value it has at the end of the prologue.  I mean,
if only it copied $sp to $a1 *before* mucking with $sp, it would have
worked perfectly...

Reply via email to