diff options
author | Lars Knoll <lars@trolltech.com> | 2005-07-13 08:58:37 +0000 |
---|---|---|
committer | Lars Knoll <lars@trolltech.com> | 2005-07-13 08:58:37 +0000 |
commit | 19e20c1470c1f8d15f2a78fb29545bde06a65516 (patch) | |
tree | dbe8f14a35ed42c9d755629d014bd6360eae215e /fb | |
parent | bfb10bd2dcca65ba5d346c9d7da594a81c35c101 (diff) |
don't clobber %ebx in the assembler.
Diffstat (limited to 'fb')
-rw-r--r-- | fb/fbmmx.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/fb/fbmmx.c b/fb/fbmmx.c index da3cda0ab..849ea4364 100644 --- a/fb/fbmmx.c +++ b/fb/fbmmx.c @@ -2334,7 +2334,7 @@ static unsigned int detectCPUFeatures(void) { "=m" (vendor[4]), "=m" (vendor[8]) : - : "%eax", "%ebx", "%ecx", "%edx" + : "%eax", "%ecx", "%edx" ); unsigned int features = 0; @@ -2352,7 +2352,8 @@ static unsigned int detectCPUFeatures(void) { /* check for AMD MMX extensions */ unsigned int result; - __asm__("mov $0x80000000, %%eax\n" + __asm__("push %%ebx\n" + "mov $0x80000000, %%eax\n" "cpuid\n" "xor %%edx, %%edx\n" "cmp $0x1, %%eax\n" @@ -2361,9 +2362,10 @@ static unsigned int detectCPUFeatures(void) { "cpuid\n" "skip2:\n" "mov %%edx, %0\n" + "pop %%ebx\n" : "=r" (result) : - : "%eax", "%ebx", "%ecx", "%edx" + : "%eax", "%ecx", "%edx" ); if (result & (1<<22)) features |= MMX_Extensions; |