Index: kernel/arch/ia32/src/userspace.c
===================================================================
--- kernel/arch/ia32/src/userspace.c	(revision 8e000b8d397020a2917b63703b403249b3a674ea)
+++ kernel/arch/ia32/src/userspace.c	(revision 3cc110fd26aa526528a9c7a4962a95fc10e58feb)
@@ -70,6 +70,6 @@
 		"movl %[uarg], %%eax\n"
 		
-		/* %ebx is defined to hold pcb_ptr - set it to 0 */
-		"xorl %%ebx, %%ebx\n"
+		/* %edi is defined to hold pcb_ptr - set it to 0 */
+		"xorl %%edi, %%edi\n"
 		
 		"iret\n"
Index: uspace/lib/libc/arch/ia32/src/entry.s
===================================================================
--- uspace/lib/libc/arch/ia32/src/entry.s	(revision 8e000b8d397020a2917b63703b403249b3a674ea)
+++ uspace/lib/libc/arch/ia32/src/entry.s	(revision 3cc110fd26aa526528a9c7a4962a95fc10e58feb)
@@ -27,4 +27,7 @@
 #
 
+INTEL_CPUID_STANDARD = 1
+INTEL_SEP = 11
+
 .section .init, "ax"
 
@@ -35,5 +38,5 @@
 ## User-space task entry point
 #
-# %ebx contains the PCB pointer
+# %edi contains the PCB pointer
 #
 __entry:
@@ -44,6 +47,15 @@
 	# Do not set %gs, it contains descriptor that can see TLS
 
+	# Detect the mechanism used for making syscalls
+	movl $(INTEL_CPUID_STANDARD), %eax
+	cpuid
+	bt $(INTEL_SEP), %edx
+	jnc 0f
+	leal __syscall_fast_func, %eax
+	movl $__syscall_fast, (%eax)
+0:
+
 	# Pass the PCB pointer to __main as the first argument
-	pushl %ebx
+	pushl %edi
 	call __main
 
Index: uspace/srv/loader/arch/ia32/ia32.s
===================================================================
--- uspace/srv/loader/arch/ia32/ia32.s	(revision 8e000b8d397020a2917b63703b403249b3a674ea)
+++ uspace/srv/loader/arch/ia32/ia32.s	(revision 3cc110fd26aa526528a9c7a4962a95fc10e58feb)
@@ -40,7 +40,7 @@
 	movl 0x8(%ebp), %eax
 
-	# %ebx := pcb
-	# pcb is passed to the entry point int %ebx
-	mov 0xc(%ebp), %ebx
+	# %edi := pcb
+	# pcb is passed to the entry point in %edi
+	mov 0xc(%ebp), %edi
 
 	# Save a tiny bit of stack space
