Skip to content
This repository was archived by the owner on Aug 7, 2025. It is now read-only.

Commit cdcd279

Browse files
William Douglasbryteise
authored andcommitted
Fix test errors configuring the system mask
Also make a mask check more consistent with the rest of the code. Signed-off-by: William Douglas <[email protected]>
1 parent 6bafae4 commit cdcd279

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/swupd_lib/manifest_parser.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -112,19 +112,19 @@ uint64_t get_opt_level_mask(void)
112112
opt_level_mask = (SSE << 8) | SSE;
113113
}
114114

115-
if (opt_level_mask & AVX512 && avx512_is_unhelpful()) {
115+
if ((opt_level_mask >> 8) & AVX512 && avx512_is_unhelpful()) {
116116
/* Pretend we are AVX2 only */
117117
opt_level_mask = (AVX2 << 8) | AVX2 | SSE;
118118
}
119119

120-
if (access(avx512_skip_file, F_OK)) {
120+
if (!access(avx512_skip_file, F_OK)) {
121121
if ((opt_level_mask >> 8) & AVX512) {
122122
/* Downgrade the entire system to AVX2 */
123123
opt_level_mask = (AVX2 << 8) | AVX2 | SSE;
124124
}
125125
}
126126

127-
if (access(avx2_skip_file, F_OK)) {
127+
if (!access(avx2_skip_file, F_OK)) {
128128
if ((opt_level_mask >> 8) & AVX2) {
129129
/* Downgrade the entire system to SSE */
130130
opt_level_mask = (SSE << 8) | SSE;

0 commit comments

Comments
 (0)