Homework: Virtual Machines

Please print your answers to the questions below and hand them in to a 6.828 staff member at the beginning of lecture.

The translated version of isPrime shown towards the end of Section 3.2 of the Adams/Agesen paper does not end with a ret instruction; instead, it ends with a jmp through %gs. What return instruction pointer is on the stack when isPrime starts, and why can't the translated isPrime return directly to that address?