projects
/
pintos-anon
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Use "r" (&uint64) instead of "m" (uint64) as constraints on lidt, lgdt
[pintos-anon]
/
src
/
userprog
/
gdt.c
diff --git
a/src/userprog/gdt.c
b/src/userprog/gdt.c
index 42cad61449265c0e1179dfaf0dbc03b57c3010c0..34e2c050d739abfe44d04c1d052fa6124670e307 100644
(file)
--- a/
src/userprog/gdt.c
+++ b/
src/userprog/gdt.c
@@
-46,7
+46,7
@@
gdt_init (void)
/* Load GDTR, TR. See [IA32-v3] 2.4.1, 2.4.4, 6.2.3. */
gdtr_operand = make_gdtr_operand (sizeof gdt - 1, gdt);
/* Load GDTR, TR. See [IA32-v3] 2.4.1, 2.4.4, 6.2.3. */
gdtr_operand = make_gdtr_operand (sizeof gdt - 1, gdt);
- asm volatile ("lgdt
%0" :: "m" (
gdtr_operand));
+ asm volatile ("lgdt
[%0]" :: "r" (&
gdtr_operand));
asm volatile ("ltr %w0" :: "r" (SEL_TSS));
}
\f
asm volatile ("ltr %w0" :: "r" (SEL_TSS));
}
\f