[Oberon] Question on ORG.SaveRegs / ORG.RestoreRegs in the FPGA Oberon compiler

Peter Matthias PeterMatthias at web.de
Wed Dec 19 22:57:26 CET 2018



Am 19.12.18 um 19:00 schrieb Paul Reed:
>> ... I suppose it would be possible as well
>> to first pass the parameters beginning with R0 and then directly put
>> procedure address in next free register.
> 
> How would you know which register to use, in advance, since evaluating
> each parameter could involve expressions?
> 
> I don't think you're talking about Prof. Wirth's 2800-line compiler
> anymore, are you? ;-)
Still talking about Project Oberon compiler, but I use different back end.

Answer to my question is that e.g. in Display.Handle at F.handle(F, M), 
F is dereferenced before you know the amount of parameters, and for 
this, it is easiest to intertemporally store the value on the stack.

Peter


More information about the Oberon mailing list