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 ce9d80382aa2bc937579a35eebbe3ce12033abbc)
@@ -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
 
