summaryrefslogtreecommitdiffstats
path: root/src/pulsecore/core-util.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2009-11-20 01:02:01 +0100
committerLennart Poettering <lennart@poettering.net>2009-11-20 01:02:01 +0100
commit9708ecd6483ac9037c82a2a2a935e97d027f6b1b (patch)
treee7215343bc75c47ce30d88764e52062206c8d0fd /src/pulsecore/core-util.c
parentf202af17b717f5b383ac072f80a6c1327bc3143b (diff)
parent9033140f18db820f3be9a6acae88a118d9154cf6 (diff)
Merge branch 'master' of ssh://rootserver/home/lennart/git/public/pulseaudio
Diffstat (limited to 'src/pulsecore/core-util.c')
-rw-r--r--src/pulsecore/core-util.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/pulsecore/core-util.c b/src/pulsecore/core-util.c
index 93ddf301..d596c481 100644
--- a/src/pulsecore/core-util.c
+++ b/src/pulsecore/core-util.c
@@ -117,6 +117,7 @@
#include <pulsecore/strbuf.h>
#include <pulsecore/usergroup.h>
#include <pulsecore/strlist.h>
+#include <pulsecore/cpu-x86.h>
#include "core-util.h"
@@ -3085,10 +3086,13 @@ pa_bool_t pa_running_in_vm(void) {
pa_zero(sig);
__asm__ __volatile__ (
- " xor %%ebx, %%ebx \n\t"
+ /* ebx/rbx is being used for PIC! */
+ " push %%"PA_REG_b" \n\t"
" cpuid \n\t"
+ " mov %%ebx, %1 \n\t"
+ " pop %%"PA_REG_b" \n\t"
- : "=a" (eax), "=b" (sig.sig32[0]), "=c" (sig.sig32[1]), "=d" (sig.sig32[2])
+ : "=a" (eax), "=r" (sig.sig32[0]), "=c" (sig.sig32[1]), "=d" (sig.sig32[2])
: "0" (eax)
);