Debian Codegraph @

debian/patches/fix_cpuid_asm.patch

raw symbols SCIP
1 Authorscip-debian debian i7z 0.27.2+git2013.10.12-g5023138-8 i7z/patches/`fix_cpuid_asm.patch`#Author.: Andreas Beckmann <[email protected]scip-debian . . . identity/`[email protected]`.>
2 Descriptionscip-debian debian i7z 0.27.2+git2013.10.12-g5023138-8 i7z/patches/`fix_cpuid_asm.patch`#Description.: fix cpuid inline assembly
3 the old code zeroed the upper half of %rbx
4
5 --- a/helper_functions.cscip-debian debian i7z 0.27.2+git2013.10.12-g5023138-8 i7z/upstream/`helper_functions.c`:
6 +++ b/helper_functions.cscip-debian debian i7z 0.27.2+git2013.10.12-g5023138-8 i7z/upstream/`helper_functions.c`:
7 @@ -101,13 +101,7 @@ static inline void cpuid (unsigned int i
8 unsigned int *ecx, unsigned int *edx)
9 {
10 unsigned int _eax = info, _ebx, _ecx, _edx;
11 - asm volatile ("mov %%ebx, %%edi;" // save ebx (for PIC)
12 - "cpuid;"
13 - "mov %%ebx, %%esi;" // pass to caller
14 - "mov %%edi, %%ebx;" // restore ebx
15 - :"+a" (_eax), "=S" (_ebx), "=c" (_ecx), "=d" (_edx)
16 - : /* inputs: eax is handled above */
17 - :"edi" /* clobbers: we hit edi directly */);
18 + asm volatile ("cpuid\n\t" : "+a" (_eax), "=b" (_ebx), "=c" (_ecx), "=d" (_edx) : : );
19 if (eax) *eax = _eax;
20 if (ebx) *ebx = _ebx;
21 if (ecx) *ecx = _ecx;