diff options
author | Johannes Stoelp <johannes.stoelp@gmail.com> | 2021-12-11 20:59:21 +0100 |
---|---|---|
committer | Johannes Stoelp <johannes.stoelp@gmail.com> | 2021-12-11 20:59:21 +0100 |
commit | 7e19b13aa9e92e411491c2a745a693dcda500926 (patch) | |
tree | c6be1f740621006c2f66274fc26c140fe1c7914c /src/x86_64.rs | |
parent | 1c4159662e44d0096539e282e0b2bfda349dd4bb (diff) | |
download | mini-kvm-rs-7e19b13aa9e92e411491c2a745a693dcda500926.tar.gz mini-kvm-rs-7e19b13aa9e92e411491c2a745a693dcda500926.zip |
fmt: add TF flag
Diffstat (limited to 'src/x86_64.rs')
-rw-r--r-- | src/x86_64.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/x86_64.rs b/src/x86_64.rs index db1e922..d87319c 100644 --- a/src/x86_64.rs +++ b/src/x86_64.rs @@ -16,6 +16,8 @@ mod x86_64 { pub const RFLAGS_ZF: u64 = 1 << 6; /// Sign flag. pub const RFLAGS_SF: u64 = 1 << 7; + /// Trap flag. + pub const RFLAGS_TF: u64 = 1 << 8; /// Sign flag. pub const RFLAGS_IF: u64 = 1 << 9; /// Direction flag. @@ -32,6 +34,7 @@ mod x86_64 { pub const fn rflags_af(r: u64) -> u64 { (r & RFLAGS_AF) >> 4 } pub const fn rflags_zf(r: u64) -> u64 { (r & RFLAGS_ZF) >> 6 } pub const fn rflags_sf(r: u64) -> u64 { (r & RFLAGS_SF) >> 7 } + pub const fn rflags_tf(r: u64) -> u64 { (r & RFLAGS_TF) >> 8 } pub const fn rflags_if(r: u64) -> u64 { (r & RFLAGS_IF) >> 9 } pub const fn rflags_df(r: u64) -> u64 { (r & RFLAGS_DF) >> 10 } pub const fn rflags_of(r: u64) -> u64 { (r & RFLAGS_OF) >> 11 } |