Homework: Virtual Machines

Submit your answer before the beginning of the lecture to the submission web site.

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?