> Dave,
>
> I actually do not know...
>
> You can generate an assembly file -S and -dP options.
> You'll see, that every register move being performed to save a value and
> clobber this register in the future.
> So, in the example below, r8 being used at line 120.
> r7 - 169. Instead of using r7, the value nextMux can be saved on stack...
but
> this is cheaper to do in a register.
> r14 - in bittests.

Yes, all the registers are being used again - it is just that sometimes they
could be better used.  In this case, there is no need for a copy of the same
data in r7 (for later use in line 169) and in r14 (for the bittests) - it
would be more efficient just to use r7 for line 169 *and* for the bittests.

>
> Yes, I agree there are some stupid register moves, but currently I can do
> nothing with it.

Ok, that's fair enough.  Every compiler I have used, for every processor,
generates some extra register moves.  Sometimes the compiler writer can do
something with them once they know they are there - other times it is not at
all obvious how to improve the compiler.  The only thing I can do to help is
to find examples (maybe one day I'll have time to find out how gcc works
internally, but that will be for sometime in the future...) and point them
out to you.  If you can make use of such information to improve mpsgcc, then
that's great.  If you can't, then that's ok too - I don't image that you are
so bored that fighting every extra register move is your highest priority.

mvh.

David



Reply via email to