diff options
author | Kenny Root <kroot@google.com> | 2011-02-07 13:06:17 -0800 |
---|---|---|
committer | Kenny Root <kroot@google.com> | 2011-02-07 13:15:49 -0800 |
commit | c26010c3ef84ee69a148788e17c75d12d23fadbd (patch) | |
tree | 82132f98808ea9efce09a24e58538ec6bfb47cc8 | |
parent | 87866d93bd7de46ffe9333437e5230c6eda58448 (diff) | |
download | oprofile-c26010c3ef84ee69a148788e17c75d12d23fadbd.tar.gz |
x86: More fixing oprofile compilation in PIC modeandroid-sdk-tools_r12android-sdk-adt_r12android-sdk-3.1_r1android-3.2_r1android-3.2.4_r1android-3.2.2_r2android-3.2.2_r1android-3.2.1_r2android-3.2.1_r1android-3.1_r1
Change-Id: I4c58b95a9f6f13bdfa59a6b78248f97e86821e5a
-rw-r--r-- | daemon/opd_ibs.c | 10 |
1 files changed, 10 insertions, 0 deletions
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 @@ static void check_cpuid_family_model_stepping() 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; |