You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
calls should only preserve DC0 (except interrupts) while calling, loops should have an infinite loop type, and loops should use the same stack, systems, and instructions
#4
Open
vadixidav opened this issue
Jul 31, 2016
· 1 comment
When the processor makes a call, it should preserve only DC0, except for an interrupt which will preserve the addresses, directions, and values of DC1-3. This eliminates the prefetch dilemma encountered when using static ram and several issues which prevented parameters from being passed via DCs and DCs from being used for persistent stacks without excessive tracking of which functions overwrote the DCs (which still didn't permit moving the stack down multiple words at once).
The processor should also use the same systems between calling and loops. Theoretically speaking, a loop should never begin and end outside of the same function, and several loops mechanisms and calling mechanisms carry over perfectly after calls only preserve DC0:
return -> break
recursive tail call -> continue
call -> infinite loop with end location at next PC
This will allow infinite loops to be added, hardware to be reduced, and the call/loop stack to be significantly extended without sacrificing anything.
The text was updated successfully, but these errors were encountered:
To achieve this loops should be implemented such that their program is stored inline, but their immediate values are stored in a different location so that, at the loops end, DC0 is restored to the next location from before the loop. If this were not the case, the location to set DC0 to after a call/loop would have to be stored. This effectively makes the return DC0 inferred the same regardless of if a call is being used or not, and it solves the break DC0 loading problem that was previously an issue by making it inferrable. Loop ends can still properly return the DC0 since DC0 always returns to that location. Therefore a loop can be operated without any instruction overhead at all, including overhead for handling the index if that can be optimized out.
It is also necessary to have an instruction for opening loops (inferred program, defined data, defined end) and calling (defined program, inferred data, inferred end).
When the processor makes a call, it should preserve only DC0, except for an interrupt which will preserve the addresses, directions, and values of DC1-3. This eliminates the prefetch dilemma encountered when using static ram and several issues which prevented parameters from being passed via DCs and DCs from being used for persistent stacks without excessive tracking of which functions overwrote the DCs (which still didn't permit moving the stack down multiple words at once).
The processor should also use the same systems between calling and loops. Theoretically speaking, a loop should never begin and end outside of the same function, and several loops mechanisms and calling mechanisms carry over perfectly after calls only preserve DC0:
This will allow infinite loops to be added, hardware to be reduced, and the call/loop stack to be significantly extended without sacrificing anything.
The text was updated successfully, but these errors were encountered: