Clarify ROX.
[pintos-anon] / solutions / p2.patch
index 4c0bbd98e006b7cb53af41e82c8a462feb19cbd9..62608d4f153f66fe8e757cd7399600e429193edc 100644 (file)
@@ -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;
 +}