projects
/
ardour.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Parse information from harvid independent from the locale
[ardour.git]
/
libs
/
pbd
/
fpu.cc
diff --git
a/libs/pbd/fpu.cc
b/libs/pbd/fpu.cc
index 9838b4565beb7b354e2d8b18ff054331983a66b8..7c3e0978812e28affd3cb68e661def7adf401484 100644
(file)
--- a/
libs/pbd/fpu.cc
+++ b/
libs/pbd/fpu.cc
@@
-33,7
+33,7
@@
#include "pbd/fpu.h"
#include "pbd/error.h"
#include "pbd/fpu.h"
#include "pbd/error.h"
-#include "i18n.h"
+#include "
pbd/
i18n.h"
using namespace PBD;
using namespace std;
using namespace PBD;
using namespace std;
@@
-48,32
+48,25
@@
FPU* FPU::_instance (0);
static void
__cpuid(int regs[4], int cpuid_leaf)
{
static void
__cpuid(int regs[4], int cpuid_leaf)
{
- int eax, ebx, ecx, edx;
asm volatile (
#if defined(__i386__)
"pushl %%ebx;\n\t"
#endif
asm volatile (
#if defined(__i386__)
"pushl %%ebx;\n\t"
#endif
- "movl %4, %%eax;\n\t"
"cpuid;\n\t"
"cpuid;\n\t"
- "movl %%eax,
%0
;\n\t"
- "movl %%ebx,
%1
;\n\t"
- "movl %%ecx,
%2
;\n\t"
- "movl %%edx,
%3
;\n\t"
+ "movl %%eax,
(%1)
;\n\t"
+ "movl %%ebx,
4(%1)
;\n\t"
+ "movl %%ecx,
8(%1)
;\n\t"
+ "movl %%edx,
12(%1)
;\n\t"
#if defined(__i386__)
"popl %%ebx;\n\t"
#endif
#if defined(__i386__)
"popl %%ebx;\n\t"
#endif
- :"=
m" (eax), "=m" (ebx), "=m" (ecx), "=m" (edx)
- :"
r
" (cpuid_leaf)
- :
"%eax",
+ :"=
a" (cpuid_leaf) /* %eax clobbered by CPUID */
+ :"
S" (regs), "a
" (cpuid_leaf)
+ :
#if !defined(__i386__)
"%ebx",
#endif
#if !defined(__i386__)
"%ebx",
#endif
- "%ecx", "%edx");
-
- regs[0] = eax;
- regs[1] = ebx;
- regs[2] = ecx;
- regs[3] = edx;
+ "%ecx", "%edx", "memory");
}
#endif /* !PLATFORM_WINDOWS */
}
#endif /* !PLATFORM_WINDOWS */
@@
-143,6
+136,11
@@
FPU::FPU ()
error << _("FPU object instantiated more than once") << endmsg;
}
error << _("FPU object instantiated more than once") << endmsg;
}
+ if (getenv("ARDOUR_FPU_FLAGS")) {
+ _flags = Flags (atoi (getenv("ARDOUR_FPU_FLAGS")));
+ return;
+ }
+
#if !( (defined __x86_64__) || (defined __i386__) || (defined _M_X64) || (defined _M_IX86) ) // !ARCH_X86
/* Non-Intel architecture, nothing to do here */
return;
#if !( (defined __x86_64__) || (defined __i386__) || (defined _M_X64) || (defined _M_IX86) ) // !ARCH_X86
/* Non-Intel architecture, nothing to do here */
return;