diff -ur mvia-1.0-dist/src/vipk_core/modgate.h mvia-1.0/src/vipk_core/modgate.h
--- mvia-1.0-dist/src/vipk_core/modgate.h       Mon Apr  5 20:04:14 1999
+++ mvia-1.0/src/vipk_core/modgate.h    Mon Jan 31 15:57:28 2000
@@ -27,15 +27,17 @@
 #ifndef set_trap_gate
 #include <asm/desc.h>
 #define _set_gate(gate_addr,type,dpl,addr) \
-__asm__ __volatile__ ("movw %%dx,%%ax\n\t" \
-        "movw %2,%%dx\n\t" \
+do { \
+  int __d0, __d1; \
+  __asm__ __volatile__ ("movw %%dx,%%ax\n\t" \
+        "movw %4,%%dx\n\t" \
         "movl %%eax,%0\n\t" \
         "movl %%edx,%1" \
         :"=m" (*((long *) (gate_addr))), \
-         "=m" (*(1+(long *) (gate_addr))) \
+         "=m" (*(1+(long *) (gate_addr))), "=&a" (__d0), "=&d" (__d1) \
         :"i" ((short) (0x8000+(dpl<<13)+(type<<8))), \
-         "d" ((char *) (addr)),"a" (__KERNEL_CS << 16) \
-        :"ax","dx")
+         "3" ((char *) (addr)),"2" (__KERNEL_CS << 16)); \
+} while (0)
 
 #define set_trap_gate(n, addr)                 \
     _set_gate(idt_table+n,15,0,addr);

