Skip to content

Commit 74d3956

Browse files
eduardosmAmanieu
authored andcommitted
Fix asm! options for _mm_mask_load_sh and _mm_maskz_load_sh
These functions read from a pointer, so `readonly` has to be used instead of `nomem`.
1 parent 9afecaf commit 74d3956

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

crates/core_arch/src/x86/avx512fp16.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1107,7 +1107,7 @@ pub unsafe fn _mm_mask_load_sh(src: __m128h, k: __mmask8, mem_addr: *const f16)
11071107
dst = inout(xmm_reg) dst,
11081108
k = in(kreg) k,
11091109
p = in(reg) mem_addr,
1110-
options(pure, nomem, nostack, preserves_flags)
1110+
options(pure, readonly, nostack, preserves_flags)
11111111
);
11121112
dst
11131113
}
@@ -1126,7 +1126,7 @@ pub unsafe fn _mm_maskz_load_sh(k: __mmask8, mem_addr: *const f16) -> __m128h {
11261126
dst = out(xmm_reg) dst,
11271127
k = in(kreg) k,
11281128
p = in(reg) mem_addr,
1129-
options(pure, nomem, nostack, preserves_flags)
1129+
options(pure, readonly, nostack, preserves_flags)
11301130
);
11311131
dst
11321132
}

0 commit comments

Comments
 (0)