[Oberon] FJump and FixLink
andreas_pirklbauer at yahoo.com
Sun Sep 23 18:18:08 CEST 2018
> Personally, I would use C22 in fix().
> And «MOD maxCode» in FixLinx..()
> And try to make ORG.maxCode a power of two for efficiency reasons.
> But feel free to take C22 everywhere.
Ok, now that the issue is fully understood it’s matter of taste. I'll
sleep over it before making a final decision. Thx for the clarification!
PS: For ORG.fix, one advantage of sticking with C24 is that it
makes it deterministic: for negative branch offsets, the leading
bits #22 and #23 will *always* be set to 1, no matter what their
values were before and which does no harm, as you have stated
earlier, while for positive offsets bits #22 and #23 will be set to 0.
This may have been one of the reasons why C24 has been
used in the official Oberon-07 compiler, but I just don’t know.
PS2: For ORG.FixLink, both MOD C22 or MOD maxCode if
maxCode is a power of 2 are fine. Note that ORG.CheckRegs
checks for pc >= maxCode anyway..
More information about the Oberon