Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

at v5.13-rc4 25 lines 516 B view raw
1// SPDX-License-Identifier: GPL-2.0-only 2#ifndef __SELFTESTS_X86_HELPERS_H 3#define __SELFTESTS_X86_HELPERS_H 4 5#include <asm/processor-flags.h> 6 7static inline unsigned long get_eflags(void) 8{ 9#ifdef __x86_64__ 10 return __builtin_ia32_readeflags_u64(); 11#else 12 return __builtin_ia32_readeflags_u32(); 13#endif 14} 15 16static inline void set_eflags(unsigned long eflags) 17{ 18#ifdef __x86_64__ 19 __builtin_ia32_writeeflags_u64(eflags); 20#else 21 __builtin_ia32_writeeflags_u32(eflags); 22#endif 23} 24 25#endif /* __SELFTESTS_X86_HELPERS_H */