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

Peter Matthias PeterMatthias at web.de
Wed Dec 19 18:02:26 CET 2018


Am 18.12.18 um 22:41 schrieb Paul Reed:

>> But still, shouldn’t this register be somehow accounted for ?
>> ... by
>> ELSE Put2(Ldr, RH, SP, 0); Put1(Add, SP, SP, 4); DEC(r); DEC(frame, 4)
> Right.  If the procedure variable was not actually loaded before the
> parameters were evaluated (ie the procedure was not the result of an
> expression), no registers needed to be saved, so the save is explicitly
> avoided.

There comes the question: why is the register variable loaded before the 
parameters are evaluated? To save a register? This should not matter on 
RISC5. Looks to me it would be much nicer code without.

Peter


More information about the Oberon mailing list