Add memory clobbers to several asm statements,
[pintos-anon] / src / userprog / process.c
index bece1fe95cc990c2e8313bf8481ed0b1e7136f52..675dc254af3db38cfea22ec26d77250aeb9206a9 100644 (file)
@@ -72,7 +72,7 @@ execute_thread (void *file_name_)
      arguments on the stack in the form of a `struct intr_frame',
      we just point the stack pointer (%esp) to our stack frame
      and jump to it. */
-  asm ("movl %0, %%esp; jmp intr_exit" :: "g" (&if_));
+  asm volatile ("movl %0, %%esp; jmp intr_exit" : : "g" (&if_) : "memory");
   NOT_REACHED ();
 }