Re: [fpc-devel] Is there a way to make Register Allocation inside of Interrupt Service Routines more efficient when using inline-assembler?

2016-08-22 Thread Florian Klämpfl
Am 21.08.2016 um 13:32 schrieb Michael Ring:
> Was getting high hopes for a moment...
> 
> @Charlie: the last point you mention, this optimization is already there. As 
> long as I do not call a
> procedure and directly include inline assembler in the interrupt routine all 
> is fine, only really
> used registers are in the list of registers that need to get saved and the 
> interrupt handlers gets
> quite lean & efficient.
> 
> @Sergej: I just started wondering on usage of fp registers, when I call a 
> routine that uses floating
> point I see that the fp registers are not marked as reserved by the compiler, 
> what do you think?
> 
> The procedure below (test) uses $f0 and $f2 but they are not marked as 
> allocated:
> 
> # Register at,v0,v1,a0,a1,a2,a3,t0,t1,t2,t3,t4,t5,t6,t7,t8,t9,ra 
> allocated
> jal P$TEST_$$_TEST
> nop
> # Register at,v0,v1,a0,a1,a2,a3,t0,t1,t2,t3,t4,t5,t6,t7,t8,t9,ra 
> released
> 
> could this be a bug? (I have also modified 
> tcpuparamanager.get_volatile_registers_fp to return [] so
> i'd expect to see $f0..$f19 pushed to stack but I see nothing)

Soft float activated?

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


Re: [fpc-devel] Is there a way to make Register Allocation inside of Interrupt Service Routines more efficient when using inline-assembler?

2016-08-22 Thread Michael Schnell



On 13.08.2016 18:57, Michael Ring wrote:
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.

Just an additional comment:

There are MIPS CPUs (e.g. PIC32 series) that feature multiple register 
sets and with that (certain definable) ISRs don't need to save any 
registers, but the hardware automatically activates an an alternate 
register set until return from interrupt is performed.


I suggest that this case should be able to be handled as well.

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