Hi!

I am trying to bring interrupt handling routine size down (and speed up) for mipsel-embedded target.

I need to use inline assembler routines like this one

procedure TSystemCore.setCoreTimerComp(value : longWord); assembler; nostackframe;
asm
  mtc0 $a1,$11,0
end ['a1'];

inside of the interrupt handler, but as soon as I include the call to this procedure the number of registers that get saved explodes. When I only need to modify some peripheral I usually get away with only $v0 and $v1 registers getting saved, but with asm routine included all registers get saved.

Same is true if I put the asm block directly inside of the interrupt handler.

As you can see I have added the used registers list for this procedure so my expectation was that only the register declared does get added to the list of used registers.

Is this a bug on mips platform or is there in general no way to define the list of used registers for an assembler routine so that register allocation works more efficient?

Or is there another way for me to trick freepascal in not saving all registers?

Thank you,

Michael


_______________________________________________
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel

Reply via email to