aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar John Ericson <Ericson2314@Yahoo.com> 2016-06-29 22:40:08 -0700
committerGravatar John Ericson <Ericson2314@Yahoo.com> 2016-06-29 22:48:09 -0700
commitb96c0ee41bdd2e48e56ec6c08e5fe1a79b58f0d0 (patch)
tree2d110f670dd4d4b1e543da03e92c3e7d6d65161a
parent64cad87781830c81e9294a2fc22f5ec2adadb029 (diff)
downloadrust-x86-b96c0ee41bdd2e48e56ec6c08e5fe1a79b58f0d0.tar.gz
rust-x86-b96c0ee41bdd2e48e56ec6c08e5fe1a79b58f0d0.tar.zst
rust-x86-b96c0ee41bdd2e48e56ec6c08e5fe1a79b58f0d0.zip
Normalize Control Register bitflags' names with the rest of the library
-rw-r--r--src/shared/control_regs.rs56
1 files changed, 28 insertions, 28 deletions
diff --git a/src/shared/control_regs.rs b/src/shared/control_regs.rs
index 4893445..ab03eba 100644
--- a/src/shared/control_regs.rs
+++ b/src/shared/control_regs.rs
@@ -3,39 +3,39 @@
bitflags! {
pub flags Cr0: usize {
- const EnablePaging = 1 << 31,
- const CacheDisable = 1 << 30,
- const NotWriteThrough = 1 << 29,
- const AlignmentMask = 1 << 18,
- const WriteProtect = 1 << 16,
- const NumericError = 1 << 5,
- const ExtensionType = 1 << 4,
- const TaskSwitched = 1 << 3,
- const EmulateCoprocessor = 1 << 2,
- const MonitorCoprocessor = 1 << 1,
- const ProtectedMode = 1 << 0,
+ const CR0_ENABLE_PAGING = 1 << 31,
+ const CR0_CACHE_DISABLE = 1 << 30,
+ const CR0_NOT_WRITE_THROUGH = 1 << 29,
+ const CR0_ALIGNMENT_MASK = 1 << 18,
+ const CR0_WRITE_PROTECT = 1 << 16,
+ const CR0_NUMERIC_ERROR = 1 << 5,
+ const CR0_EXTENSION_TYPE = 1 << 4,
+ const CR0_TASK_SWITCHED = 1 << 3,
+ const CR0_EMULATE_COPROCESSOR = 1 << 2,
+ const CR0_MONITOR_COPROCESSOR = 1 << 1,
+ const CR0_PROTECTED_MODE = 1 << 0,
}
}
bitflags! {
pub flags Cr4: usize {
- const EnableSmap = 1 << 21,
- const EnableSmep = 1 << 20,
- const EnableOsXSave = 1 << 18,
- const EnablePcid = 1 << 17,
- const EnableSmx = 1 << 14,
- const EnableVmx = 1 << 13,
- const UnmaskedSse = 1 << 10,
- const EnableSse = 1 << 9,
- const EnablePpmc = 1 << 8,
- const EnableGlobalPages = 1 << 7,
- const EnableMachineCheck = 1 << 6,
- const EnablePae = 1 << 5,
- const EnablePse = 1 << 4,
- const DebuggingExtensions = 1 << 3,
- const TimeStampDisable = 1 << 2,
- const VirtualInterrupts = 1 << 1,
- const EnableVme = 1 << 0,
+ const CR4_ENABLE_SMAP = 1 << 21,
+ const CR4_ENABLE_SMEP = 1 << 20,
+ const CR4_ENABLE_OS_XSAVE = 1 << 18,
+ const CR4_ENABLE_PCID = 1 << 17,
+ const CR4_ENABLE_SMX = 1 << 14,
+ const CR4_ENABLE_VMX = 1 << 13,
+ const CR4_UNMASKED_SSE = 1 << 10,
+ const CR4_ENABLE_SSE = 1 << 9,
+ const CR4_ENABLE_PPMC = 1 << 8,
+ const CR4_ENABLE_GLOBAL_PAGES = 1 << 7,
+ const CR4_ENABLE_MACHINE_CHECK = 1 << 6,
+ const CR4_ENABLE_PAE = 1 << 5,
+ const CR4_ENABLE_PSE = 1 << 4,
+ const CR4_DEBUGGING_EXTENSIONS = 1 << 3,
+ const CR4_TIME_STAMP_DISABLE = 1 << 2,
+ const CR4_VIRTUAL_INTERRUPTS = 1 << 1,
+ const CR4_ENABLE_VME = 1 << 0,
}
}