Changeset 57c2a87 in mainline for kernel/arch/ia32/include/arch/cpuid.h
- Timestamp:
- 2016-05-05T13:02:20Z (8 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- a0d9abcd
- Parents:
- 811770c
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/ia32/include/arch/cpuid.h
r811770c r57c2a87 44 44 45 45 #include <typedefs.h> 46 #include <arch/cpu.h> 46 47 47 48 typedef struct { … … 84 85 85 86 asm volatile ( 86 "pushf\n" 87 "pushf\n" /* read flags */ 87 88 "popl %[ret]\n" 88 89 "movl %[ret], %[val]\n" 89 90 90 " btcl $21, %[val]\n"/* swap the ID bit */91 "xorl %[eflags_id], %[val]\n" /* swap the ID bit */ 91 92 92 "pushl %[val]\n" 93 "pushl %[val]\n" /* propagate the change into flags */ 93 94 "popf\n" 94 95 "pushf\n" 95 96 "popl %[val]\n" 96 97 97 "andl $(1 << 21), %[ret]\n"/* interrested only in ID bit */98 "andl $(1 << 21), %[val]\n"98 "andl %[eflags_id], %[ret]\n" /* interrested only in ID bit */ 99 "andl %[eflags_id], %[val]\n" 99 100 "xorl %[val], %[ret]\n" 100 101 : [ret] "=r" (ret), [val] "=r" (val) 102 : [eflags_id] "i" (EFLAGS_ID) 101 103 ); 102 104
Note:
See TracChangeset
for help on using the changeset viewer.