1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
bitflags! {
flags RFlags: u64 {
const RFLAGS_ID = 1 << 21,
const RFLAGS_VIP = 1 << 20,
const RFLAGS_VIF = 1 << 19,
const RFLAGS_AC = 1 << 18,
const RFLAGS_VM = 1 << 17,
const RFLAGS_RF = 1 << 16,
const RFLAGS_NT = 1 << 14,
const RFLAGS_IOPL0 = 0 << 12,
const RFLAGS_IOPL1 = 1 << 12,
const RFLAGS_IOPL2 = 2 << 12,
const RFLAGS_IOPL3 = 3 << 12,
const RFLAGS_OF = 1 << 11,
const RFLAGS_DF = 1 << 10,
const RFLAGS_IF = 1 << 9,
const RFLAGS_TF = 1 << 8,
const RFLAGS_SF = 1 << 7,
const RFLAGS_ZF = 1 << 6,
const RFLAGS_AF = 1 << 4,
const RFLAGS_PF = 1 << 2,
const RFLAGS_A1 = 1 << 1,
const RFLAGS_CF = 1 << 0,
}
}
impl RFlags {
pub fn new() -> RFlags {
RFLAGS_A1
}
}