Closed mallicksm closed 1 year ago
Agree doesn't break anything and is shorter. The reason for the "+ (uservec - trampoline)" is to make sure that the user jumps to uservec, which might not be at the start of TRAMPOLINE. (Though it happens to be at the start.) Keeping it is also makes the code symmetric for call and return.
trap.c:100 w_stvec(TRAMPOLINE + (uservec - trampoline)) should read w_stvec(TRAMPOLINE)