X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fthreads%2Fthread.c;fp=src%2Fthreads%2Fthread.c;h=dc23efb4b2dfb3bb608084940991a3c916d50ae6;hb=575dc45e34db19ee7808c116e93485b37e0df716;hp=7a5c726a096c2c36c38652308ae02359678141e3;hpb=a8e7532e684e4ea92a06d4eaf0d9ab714e4c2ad2;p=pintos-anon diff --git a/src/threads/thread.c b/src/threads/thread.c index 7a5c726..dc23efb 100644 --- a/src/threads/thread.c +++ b/src/threads/thread.c @@ -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); }