Skip to content
This repository has been archived by the owner on Aug 3, 2022. It is now read-only.

Commit

Permalink
x86: More fixing oprofile compilation in PIC mode
Browse files Browse the repository at this point in the history
Change-Id: I4c58b95a9f6f13bdfa59a6b78248f97e86821e5a
  • Loading branch information
kruton committed Feb 7, 2011
1 parent 87866d9 commit c26010c
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions daemon/opd_ibs.c
Expand Up @@ -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;
Expand Down

0 comments on commit c26010c

Please sign in to comment.