diff options
author | 2016-07-04 14:08:17 +0200 | |
---|---|---|
committer | 2016-07-04 14:08:17 +0200 | |
commit | c12e050a69dd1a9b04f07ab78a166c6371d35a6f (patch) | |
tree | fea35bcf5b507efdd4c1c0f5dab146360c70478a /src/rflags.rs | |
parent | 32257991aaa3700620f1d6c180cfec3e2d65a360 (diff) | |
parent | bd2950de1a48d72cbb718cc9a367142e0eb97b72 (diff) | |
download | rust-x86-c12e050a69dd1a9b04f07ab78a166c6371d35a6f.tar.gz rust-x86-c12e050a69dd1a9b04f07ab78a166c6371d35a6f.tar.zst rust-x86-c12e050a69dd1a9b04f07ab78a166c6371d35a6f.zip |
Merge pull request #16 from QuiltOS/master
Fix #15: Combine with https://github.com/Tobba/libcpu
Diffstat (limited to 'src/rflags.rs')
-rw-r--r-- | src/rflags.rs | 56 |
1 files changed, 0 insertions, 56 deletions
diff --git a/src/rflags.rs b/src/rflags.rs deleted file mode 100644 index 6af25b1..0000000 --- a/src/rflags.rs +++ /dev/null @@ -1,56 +0,0 @@ -//! Description of RFlag values that store the results of operations and the state of the processor. - -/// RFLAGS description. -bitflags! { - flags RFlags: u64 { - /// ID Flag (ID) - const RFLAGS_ID = 1 << 21, - /// Virtual Interrupt Pending (VIP) - const RFLAGS_VIP = 1 << 20, - /// Virtual Interrupt Flag (VIF) - const RFLAGS_VIF = 1 << 19, - /// Alignment Check (AC) - const RFLAGS_AC = 1 << 18, - /// Virtual-8086 Mode (VM) - const RFLAGS_VM = 1 << 17, - /// Resume Flag (RF) - const RFLAGS_RF = 1 << 16, - /// Nested Task (NT) - const RFLAGS_NT = 1 << 14, - /// I/O Privilege Level (IOPL) 0 - const RFLAGS_IOPL0 = 0 << 12, - /// I/O Privilege Level (IOPL) 1 - const RFLAGS_IOPL1 = 1 << 12, - /// I/O Privilege Level (IOPL) 2 - const RFLAGS_IOPL2 = 2 << 12, - /// I/O Privilege Level (IOPL) 3 - const RFLAGS_IOPL3 = 3 << 12, - /// Overflow Flag (OF) - const RFLAGS_OF = 1 << 11, - /// Direction Flag (DF) - const RFLAGS_DF = 1 << 10, - /// Interrupt Enable Flag (IF) - const RFLAGS_IF = 1 << 9, - /// Trap Flag (TF) - const RFLAGS_TF = 1 << 8, - /// Sign Flag (SF) - const RFLAGS_SF = 1 << 7, - /// Zero Flag (ZF) - const RFLAGS_ZF = 1 << 6, - /// Auxiliary Carry Flag (AF) - const RFLAGS_AF = 1 << 4, - /// Parity Flag (PF) - const RFLAGS_PF = 1 << 2, - /// Bit 1 is always 1. - const RFLAGS_A1 = 1 << 1, - /// Carry Flag (CF) - const RFLAGS_CF = 1 << 0, - } -} - -impl RFlags { - /// Creates a new RFlags entry. Ensures bit 1 is set. - pub fn new() -> RFlags { - RFLAGS_A1 - } -} |