Skip to content

Commit

Permalink
Fix asm! options for _mm_mask_load_sh and _mm_maskz_load_sh
Browse files Browse the repository at this point in the history
These functions read from a pointer, so `readonly` has to be used instead of `nomem`.
  • Loading branch information
eduardosm authored and Amanieu committed Nov 10, 2024
1 parent 9afecaf commit 74d3956
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions crates/core_arch/src/x86/avx512fp16.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1107,7 +1107,7 @@ pub unsafe fn _mm_mask_load_sh(src: __m128h, k: __mmask8, mem_addr: *const f16)
dst = inout(xmm_reg) dst,
k = in(kreg) k,
p = in(reg) mem_addr,
options(pure, nomem, nostack, preserves_flags)
options(pure, readonly, nostack, preserves_flags)
);
dst
}
Expand All @@ -1126,7 +1126,7 @@ pub unsafe fn _mm_maskz_load_sh(k: __mmask8, mem_addr: *const f16) -> __m128h {
dst = out(xmm_reg) dst,
k = in(kreg) k,
p = in(reg) mem_addr,
options(pure, nomem, nostack, preserves_flags)
options(pure, readonly, nostack, preserves_flags)
);
dst
}
Expand Down

0 comments on commit 74d3956

Please sign in to comment.