RET instruction of nedoRISC Core:
23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 | 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
0 | 0 | 1 | 1 | REG0 | 16-bit data |
In user mode registers r5-r15 are shifted up PAR?+2 positions (FILL? trap could be called if needed). Old r15 and r14 move to new places, but keep they data for further usage. Restored r15 should have incremented value at this point.