diff --git a/x86.h b/x86.h
index 4774e7585d1f96f6d5e63bd25e31d8b371b3a5d2..76173227f2c39e98e25f6f89f9ce76c2fe1e1257 100644
--- a/x86.h
+++ b/x86.h
@@ -64,7 +64,7 @@ lidt(struct gatedesc *p, int size)
   pd[1] = (uint)p;
   pd[2] = (uint)p >> 16;
 
-  asm volatile("lidt (%0)" : : "g" (pd));
+  asm volatile("lidt (%0)" : : "r" (&pd));
 }
 
 static __inline void