[PicForth] Re: question - recycling GPR variables
Samuel Tardieu
sam at rfc1149.net
Fri Nov 19 22:21:30 CET 2004
>>>>> "David" == David McNab <david at rebirthing.co.nz> writes:
David> With other HLLs such as C, the compiler avoids a data stack
David> altogether, and allocates cells in absolute GPR locations
David> instead. It then uses heuristics to analyse the call tree and
David> recycle these GPRs wherever possible.
Interesting. Do they also properly handle interrupts? Is multitasking
supported then? Does that play well with dynamic calls?
David> Is there anything like this in PicForth? I'm trying to conserve
David> data memory, and would prefer not to have 9 GPRs permanently
David> allocated for just this one driver alone.
There is no such thing at this time. If you can come up with a clean
model, we may try to implement it.
If I do a compiler for the PIC18f, I think I'll do a full blown
register allocator, as the multiple FSR can be of some use
there.
Sam
--
Samuel Tardieu -- sam at rfc1149.net -- http://www.rfc1149.net/sam
More information about the PicForth
mailing list