Index: kernel/arch/ia32/src/asm.S
===================================================================
--- kernel/arch/ia32/src/asm.S	(revision d0294342dd3ac03e0c663f4db0665ad183ac8bea)
+++ kernel/arch/ia32/src/asm.S	(revision a759467d6a34b9623e898573cc3f17541bf75667)
@@ -175,10 +175,4 @@
 
 /*
- * Size of the entire istate structure including the error word and the
- * hardware-saved part.
- */
-#define ISTATE_REAL_SIZE  (ISTATE_SOFT_SIZE + 24)
-
-/*
  * The SYSENTER syscall mechanism can be used for syscalls with
  * four or fewer arguments. To pass these four arguments, we
@@ -191,5 +185,9 @@
 .global sysenter_handler
 sysenter_handler:
-	subl $(ISTATE_REAL_SIZE), %esp
+
+	/*
+	 * Note that the space needed for the istate structure has been
+	 * preallocated on the stack by before_thread_runs_arch().
+	 */
 
 	/*
@@ -260,6 +258,4 @@
 	movl ISTATE_OFFSET_ESP(%esp), %ecx
 
-	addl $(ISTATE_REAL_SIZE), %esp
-	
 	sysexit   /* return to userspace */
 
