X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=solutions%2Fp2.patch;h=62608d4f153f66fe8e757cd7399600e429193edc;hb=b113b06bfd2092b03d46299ca881c711dc576e0d;hp=4c0bbd98e006b7cb53af41e82c8a462feb19cbd9;hpb=4ebf33908a571a7cde93fe618902b044e3633cdf;p=pintos-anon diff --git a/solutions/p2.patch b/solutions/p2.patch index 4c0bbd9..62608d4 100644 --- a/solutions/p2.patch +++ b/solutions/p2.patch @@ -604,7 +604,7 @@ diff -u src/userprog/syscall.c~ src/userprog/syscall.c +get_user (uint8_t *dst, const uint8_t *usrc) +{ + int eax; -+ asm ("mov %%eax, offset 1f; mov %%al, %2; mov %0, %%al; 1:" ++ asm ("movl $1f, %%eax; movb %2, %%al; movb %%al, %0; 1:" + : "=m" (*dst), "=&a" (eax) : "m" (*usrc)); + return eax != 0; +} @@ -616,7 +616,7 @@ diff -u src/userprog/syscall.c~ src/userprog/syscall.c +put_user (uint8_t *udst, uint8_t byte) +{ + int eax; -+ asm ("mov %%eax, offset 1f; mov %0, %b2; 1:" ++ asm ("movl $1f, %%eax; movb %b2, %0; 1:" + : "=m" (*udst), "=&a" (eax) : "r" (byte)); + return eax != 0; +}