X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fthreads%2Finterrupt.c;h=3e522280a5b76ea5baae93e5daf8ecd4746b0028;hb=2cfc156c39840ce7f1cda6b473de1322691a8a0b;hp=c6ca2bd0060339b19aa38d92655564a4869878e1;hpb=f0ad7eb8b43516c7a2999fd217ec85d954dfc791;p=pintos-anon diff --git a/src/threads/interrupt.c b/src/threads/interrupt.c index c6ca2bd..3e52228 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 ("pushfl; popl %0" : "=g" (flags)); + asm volatile ("pushf; pop %0" : "=g" (flags)); return flags & FLAG_IF ? INTR_ON : INTR_OFF; } @@ -310,8 +310,8 @@ make_idtr_operand (uint16_t limit, void *base) /* Handler for all interrupts, faults, and exceptions. This function is called by the assembly language interrupt stubs in - intr-stubs.S (see intr-stubs.pl). FRAME describes the - interrupt and the interrupted thread's registers. */ + intr-stubs.S. FRAME describes the interrupt and the + interrupted thread's registers. */ void intr_handler (struct intr_frame *frame) { @@ -368,7 +368,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 ("movl %%cr2, %0" : "=r" (cr2)); + asm ("mov %0, %%cr2" : "=r" (cr2)); printf ("Interrupt %#04x (%s) at eip=%p\n", f->vec_no, intr_names[f->vec_no], f->eip);