X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fthreads%2Finterrupt.c;fp=src%2Fthreads%2Finterrupt.c;h=2b43fd9a109d6bc1cae7280f46164533e86f0b0b;hb=575dc45e34db19ee7808c116e93485b37e0df716;hp=82b7db7d724bed32a60fe5d9c1c004192d2049fd;hpb=a8e7532e684e4ea92a06d4eaf0d9ab714e4c2ad2;p=pintos-anon diff --git a/src/threads/interrupt.c b/src/threads/interrupt.c index 82b7db7..2b43fd9 100644 --- a/src/threads/interrupt.c +++ b/src/threads/interrupt.c @@ -54,7 +54,7 @@ intr_get_level (void) /* Push the flags register on the processor stack, then pop the value off the stack into `flags'. See [IA32-v2b] "PUSHF" and "POP" and [IA32-v3] 5.8.1. */ - asm volatile ("pushf; pop %0" : "=g" (flags)); + asm volatile ("pushfl; popl %0" : "=g" (flags)); return flags & FLAG_IF ? INTR_ON : INTR_OFF; } @@ -380,7 +380,7 @@ intr_dump_frame (const 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" (cr2)); + asm ("movl %%cr2, %0" : "=r" (cr2)); printf ("Interrupt %#04x (%s) at eip=%p\n", f->vec_no, intr_names[f->vec_no], f->eip);