X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?p=pintos-anon;a=blobdiff_plain;f=src%2Fuserprog%2Fexception.c;h=d4e02b9b7b5ef736784702309e66086ff850d405;hp=9a4eb90fd7eb184de733e867188c84cce337633a;hb=575dc45e34db19ee7808c116e93485b37e0df716;hpb=a8e7532e684e4ea92a06d4eaf0d9ab714e4c2ad2 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). */