Revert Intel-style assembly back to AT&T-style.
[pintos-anon] / src / threads / thread.c
index 7a5c726a096c2c36c38652308ae02359678141e3..dc23efb4b2dfb3bb608084940991a3c916d50ae6 100644 (file)
@@ -376,7 +376,7 @@ running_thread (void)
      down to the start of a page.  Because `struct thread' is
      always at the beginning of a page and the stack pointer is
      somewhere in the middle, this locates the curent thread. */
-  asm ("mov %0, %%esp" : "=g" (esp));
+  asm ("mov %%esp, %0" : "=g" (esp));
   return pg_round_down (esp);
 }