minios: Fix ret_from_exception routine. Stack consistency is now preserved.
authorkfraser@localhost.localdomain <kfraser@localhost.localdomain>
Fri, 2 Feb 2007 15:30:49 +0000 (15:30 +0000)
committerkfraser@localhost.localdomain <kfraser@localhost.localdomain>
Fri, 2 Feb 2007 15:30:49 +0000 (15:30 +0000)
Signed-off-by: Grzegorz Milos <gm281@cam.ac.uk>
extras/mini-os/arch/x86/x86_32.S

index 46fce169ca748d12f141271b30d9491c03817aa6..b10bc2340138fdc55f17ec0901ae266a4d12418d 100644 (file)
@@ -69,7 +69,7 @@ CS            = 0x2C
        popl %ds;       \
        popl %es;       \
        addl $4,%esp;   \
-       iret;           \
+       iret;           
 
 ENTRY(divide_error)
        pushl $0                # no error code
@@ -101,10 +101,9 @@ do_exception:
     jmp ret_from_exception
     
 ret_from_exception:
-        movb CS(%esp),%cl
-       test $2,%cl          # slow return to ring 2 or 3
-       jne  safesti
-        RESTORE_ALL
+    movb CS(%esp),%cl
+    addl $8,%esp
+    RESTORE_ALL
 
 # A note on the "critical region" in our callback handler.
 # We want to avoid stacking callback handlers due to events occurring