Revert Intel-style assembly back to AT&T-style.
[pintos-anon] / src / userprog / exception.c
index 9a4eb90fd7eb184de733e867188c84cce337633a..d4e02b9b7b5ef736784702309e66086ff850d405 100644 (file)
@@ -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). */