tcg: Reload local variables after return from longjmp

Upstream 0d10193870b5a81c3bce13a602a5403c3a55cf6c

Change-Id: I5c0bb1ea9d5cb053b4c36a115a1d1fbb2fa1c3ee
diff --git a/cpu-exec.c b/cpu-exec.c
index 17bc910..58d6e5d 100644
--- a/cpu-exec.c
+++ b/cpu-exec.c
@@ -627,6 +627,10 @@
                 /* reset soft MMU for next block (it can currently
                    only be set by a memory fault) */
             } /* for(;;) */
+        } else {
+            /* Reload env after longjmp - the compiler may have smashed all
+             * local variables as longjmp is marked 'noreturn'. */
+            env = cpu_single_env;
         }
     } /* for(;;) */