@@ -19,10 +19,13 @@ bitflags! {
19
19
/// Enables using MXCSR and the XMM registers
20
20
/// with `XSAVE`/`XRSTOR`.
21
21
///
22
- /// Must be set if [`YMM `](XCr0Flags::YMM ) is set.
23
- const SSE = 1 << 1 ;
24
- /// Enables AVX instructions and using the upper halves of the YMM registers
22
+ /// Must be set if [`AVX `](XCr0Flags::AVX ) is set.
23
+ const SSE = 1 << 1 ;
24
+ /// Enables AVX instructions and using the upper halves of the AVX registers
25
25
/// with `XSAVE`/`XRSTOR`.
26
+ const AVX = 1 << 2 ;
27
+ /// Alias for [`AVX`](XCr0Flags::AVX)
28
+ #[ deprecated( since = "0.14.5" , note = "use `AVX` instead" ) ]
26
29
const YMM = 1 <<2 ;
27
30
/// Enables MPX instructions and using the BND0-BND3 bound registers
28
31
/// with `XSAVE`/`XRSTOR` (Intel Only).
@@ -95,10 +98,10 @@ mod x86_64 {
95
98
let new_value = reserved | flags. bits ( ) ;
96
99
97
100
assert ! ( flags. contains( XCr0Flags :: X87 ) , "The X87 flag must be set" ) ;
98
- if flags. contains ( XCr0Flags :: YMM ) {
101
+ if flags. contains ( XCr0Flags :: AVX ) {
99
102
assert ! (
100
103
flags. contains( XCr0Flags :: SSE ) ,
101
- "AVX/YMM cannot be enabled without enabling SSE"
104
+ "AVX cannot be enabled without enabling SSE"
102
105
) ;
103
106
}
104
107
let mpx = XCr0Flags :: BNDREG | XCr0Flags :: BNDCSR ;
@@ -111,8 +114,8 @@ mod x86_64 {
111
114
let avx512 = XCr0Flags :: OPMASK | XCr0Flags :: ZMM_HI256 | XCr0Flags :: HI16_ZMM ;
112
115
if flags. intersects ( avx512) {
113
116
assert ! (
114
- flags. contains( XCr0Flags :: YMM ) ,
115
- "AVX-512 cannot be enabled without enabling AVX/YMM "
117
+ flags. contains( XCr0Flags :: AVX ) ,
118
+ "AVX-512 cannot be enabled without enabling AVX"
116
119
) ;
117
120
assert ! (
118
121
flags. contains( avx512) ,
0 commit comments