Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/xiph/opus.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsezero <sezero@users.sourceforge.net>2019-10-06 14:37:02 +0300
committerJean-Marc Valin <jmvalin@jmvalin.ca>2020-07-08 06:10:17 +0300
commit484af2580b82dffd695fcd0841fc34a9dc5f7293 (patch)
tree7e03e2174cf522f51d008cfdd1d04d8daa04373b
parentf8ed894b1fb681109abc73ba75b3d6237a751d72 (diff)
configure: adjust x86 get cpu info inline assembly method for PIC case
.. just like the way it is done in celt/x86/x86cpu.c. Signed-off-by: Jean-Marc Valin <jmvalin@jmvalin.ca>
-rw-r--r--configure.ac13
1 files changed, 13 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 18ece291..f12f0aa9 100644
--- a/configure.ac
+++ b/configure.ac
@@ -691,6 +691,18 @@ AS_IF([test x"$enable_intrinsics" = x"yes"],[
unsigned int CPUInfo2;
unsigned int CPUInfo3;
unsigned int InfoType;
+ #if defined(__i386__) && defined(__PIC__)
+ __asm__ __volatile__ (
+ "xchg %%ebx, %1\n"
+ "cpuid\n"
+ "xchg %%ebx, %1\n":
+ "=a" (CPUInfo0),
+ "=r" (CPUInfo1),
+ "=c" (CPUInfo2),
+ "=d" (CPUInfo3) :
+ "a" (InfoType), "c" (0)
+ );
+ #else
__asm__ __volatile__ (
"cpuid":
"=a" (CPUInfo0),
@@ -699,6 +711,7 @@ AS_IF([test x"$enable_intrinsics" = x"yes"],[
"=d" (CPUInfo3) :
"a" (InfoType), "c" (0)
);
+ #endif
]])],
[get_cpuid_by_asm="yes"
AC_MSG_RESULT([Inline Assembly])