Skip to content

Commit 91214e2

Browse files
committed
XCr0: rename YMM to AVX
Signed-off-by: Joe Richey <[email protected]>
1 parent 436bda7 commit 91214e2

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/registers/xcontrol.rs

+7-7
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@ bitflags! {
1919
/// Enables using MXCSR and the XMM registers
2020
/// with `XSAVE`/`XRSTOR`.
2121
///
22-
/// Must be set if [`YMM`](XCr0Flags::YMM) is set.
22+
/// Must be set if [`AVX`](XCr0Flags::AVX) is set.
2323
const SSE = 1<<1;
24-
/// Enables AVX instructions and using the upper halves of the YMM registers
24+
/// Enables AVX instructions and using the upper halves of the AVX registers
2525
/// with `XSAVE`/`XRSTOR`.
26-
const YMM = 1<<2;
26+
const AVX = 1<<2;
2727
/// Enables MPX instructions and using the BND0-BND3 bound registers
2828
/// with `XSAVE`/`XRSTOR` (Intel Only).
2929
const BNDREG = 1 << 3;
@@ -95,10 +95,10 @@ mod x86_64 {
9595
let new_value = reserved | flags.bits();
9696

9797
assert!(flags.contains(XCr0Flags::X87), "The X87 flag must be set");
98-
if flags.contains(XCr0Flags::YMM) {
98+
if flags.contains(XCr0Flags::AVX) {
9999
assert!(
100100
flags.contains(XCr0Flags::SSE),
101-
"AVX/YMM cannot be enabled without enabling SSE"
101+
"AVX cannot be enabled without enabling SSE"
102102
);
103103
}
104104
let mpx = XCr0Flags::BNDREG | XCr0Flags::BNDCSR;
@@ -111,8 +111,8 @@ mod x86_64 {
111111
let avx512 = XCr0Flags::OPMASK | XCr0Flags::ZMM_HI256 | XCr0Flags::HI16_ZMM;
112112
if flags.intersects(avx512) {
113113
assert!(
114-
flags.contains(XCr0Flags::YMM),
115-
"AVX-512 cannot be enabled without enabling AVX/YMM"
114+
flags.contains(XCr0Flags::AVX),
115+
"AVX-512 cannot be enabled without enabling AVX"
116116
);
117117
assert!(
118118
flags.contains(avx512),

0 commit comments

Comments
 (0)