X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fuserprog%2Fexception.c;h=d4e02b9b7b5ef736784702309e66086ff850d405;hb=d948f4722c2e2079da2a0c38a492d9955b09a26a;hp=9a4eb90fd7eb184de733e867188c84cce337633a;hpb=4ebf33908a571a7cde93fe618902b044e3633cdf;p=pintos-anon diff --git a/src/userprog/exception.c b/src/userprog/exception.c index 9a4eb90..d4e02b9 100644 --- a/src/userprog/exception.c +++ b/src/userprog/exception.c @@ -139,7 +139,7 @@ page_fault (struct intr_frame *f) See [IA32-v2a] "MOV--Move to/from Control Registers" and [IA32-v3] 5.14 "Interrupt 14--Page Fault Exception (#PF)". */ - asm ("mov %0, %%cr2" : "=r" (fault_addr)); + asm ("movl %%cr2, %0" : "=r" (fault_addr)); /* Turn interrupts back on (they were only off so that we could be assured of reading CR2 before it changed). */