x86: More fixing oprofile compilation in PIC mode

Change-Id: I4c58b95a9f6f13bdfa59a6b78248f97e86821e5a
diff --git a/daemon/opd_ibs.c b/daemon/opd_ibs.c
index f4af7c2..ce6d90b 100644
--- a/daemon/opd_ibs.c
+++ b/daemon/opd_ibs.c
@@ -496,7 +496,17 @@
 	unsigned ebx, ecx, edx;
 
 	/* CPUID Fn0000_0001_EAX Family, Model, Stepping */
+#ifdef __PIC__
+	__asm__ __volatile__ (
+		"pushl %%ebx\n"
+		"cpuid\n"
+		"mov %%ebx, %1\n"
+		"popl %%ebx"
+		: "=a" (v.eax), "=r" (ebx), "=c" (ecx), "=d" (edx) : "0" (1)
+	);
+#else
 	asm ("cpuid" : "=a" (v.eax), "=b" (ebx), "=c" (ecx), "=d" (edx) : "0" (1));
+#endif
 
 	ibs_family   = v.family + v.ext_family;
 	ibs_model    = v.model + v.ext_model;