next up previous
Next: I/O instructions Up: MIT REVERSIBLE COMPUTING PROJECT Previous: Replace JR and

New RJ or RBRA instruction.

This would be just like J or BRA (depending on which one is kept in the instruction set) except that it would also flip/negate the CPU direction bit.

The direction change should take effect directly after the instruction is executed, immediately affecting how the PC is to be updated.

This instruction would allow us to branch to a fragment of code to be run in reverse, or to call a subroutine in reverse. This will cut in half the code size of many programs that clean up their own garbage, since the same subroutine that created the garbage can be used in reverse to clean it up. Otherwise, two copies of the subroutine with opposite behavior would generally be needed.



Michael Frank
Wed Jul 23 13:48:27 EDT 1997