Fixes trapframes on x86
[akaros.git] / kern / arch / i386 / trapentry.S
index 81448c1..8c31530 100644 (file)
@@ -75,6 +75,8 @@
        cld;                                                                       \
        pushl %ds;                                                                 \
        pushl %es;                                                                 \
+       pushl %fs;                                                                 \
+       pushl %gs;                                                                 \
        pushal;                                                                    \
        movw $GD_KD, %ax;                                                          \
        movw %ax, %ds;                                                             \
@@ -84,6 +86,8 @@
        call (func);                                                               \
        popl %esp;                                                                 \
        popal;                                                                     \
+       popl %gs;                                                                  \
+       popl %fs;                                                                  \
        popl %es;                                                                  \
        popl %ds;                                                                  \
        addl $0x8, %esp;                                                           \