Changeset add04f7 in mainline for kernel/arch/ia32/include/cpuid.h
- Timestamp:
- 2009-03-03T15:20:49Z (16 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- f24d300
- Parents:
- deca67b
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/ia32/include/cpuid.h
rdeca67b radd04f7 75 75 76 76 asm volatile ( 77 "pushf\n" /* read flags */78 "popl % 0\n"79 "movl % 0, %1\n"77 "pushf\n" /* read flags */ 78 "popl %[ret]\n" 79 "movl %[ret], %[val]\n" 80 80 81 "btcl $21, % 1\n"/* swap the ID bit */81 "btcl $21, %[val]\n" /* swap the ID bit */ 82 82 83 "pushl % 1\n"/* propagate the change into flags */83 "pushl %[val]\n" /* propagate the change into flags */ 84 84 "popf\n" 85 85 "pushf\n" 86 "popl % 1\n"86 "popl %[val]\n" 87 87 88 "andl $(1 << 21), % 0\n"/* interrested only in ID bit */89 "andl $(1 << 21), % 1\n"90 "xorl % 1, %0\n"91 : "=r" (ret),"=r" (val)88 "andl $(1 << 21), %[ret]\n" /* interrested only in ID bit */ 89 "andl $(1 << 21), %[val]\n" 90 "xorl %[val], %[ret]\n" 91 : [ret] "=r" (ret), [val] "=r" (val) 92 92 ); 93 93 … … 99 99 asm volatile ( 100 100 "cpuid\n" 101 : "=a" (info->cpuid_eax), "=b" (info->cpuid_ebx), "=c" (info->cpuid_ecx), "=d" (info->cpuid_edx) 101 : "=a" (info->cpuid_eax), "=b" (info->cpuid_ebx), 102 "=c" (info->cpuid_ecx), "=d" (info->cpuid_edx) 102 103 : "a" (cmd) 103 104 );
Note:
See TracChangeset
for help on using the changeset viewer.