File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -187,7 +187,10 @@ mod tests {
187
187
impl PartialEq < XsaveArea > for XsaveArea {
188
188
fn eq ( & self , other : & XsaveArea ) -> bool {
189
189
for i in 0 ..self . data . len ( ) {
190
- if self . data [ i] != other. data [ i] {
190
+ // Ignore XSTATE_BV (state-component bitmap) that occupies the first byte of the XSAVE Header
191
+ // (at offset 512 bytes from the start). The value may change, for more information see the following chapter:
192
+ // 13.7 OPERATION OF XSAVE - Intel® 64 and IA-32 Architectures Software Developer’s Manual.
193
+ if i != 512 && self . data [ i] != other. data [ i] {
191
194
return false ;
192
195
}
193
196
}
Original file line number Diff line number Diff line change @@ -151,7 +151,10 @@ mod tests {
151
151
impl PartialEq < XsaveArea > for XsaveArea {
152
152
fn eq ( & self , other : & XsaveArea ) -> bool {
153
153
for i in 0 ..self . data . len ( ) {
154
- if self . data [ i] != other. data [ i] {
154
+ // Ignore XSTATE_BV (state-component bitmap) that occupies the first byte of the XSAVE Header
155
+ // (at offset 512 bytes from the start). The value may change, for more information see the following chapter:
156
+ // 13.7 OPERATION OF XSAVE - Intel® 64 and IA-32 Architectures Software Developer’s Manual.
157
+ if i != 512 && self . data [ i] != other. data [ i] {
155
158
return false ;
156
159
}
157
160
}
You can’t perform that action at this time.
0 commit comments