We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
v128_{load,store}
1 parent f86f39d commit 55df6edCopy full SHA for 55df6ed
crates/core_arch/src/wasm32/simd128.rs
@@ -290,7 +290,7 @@ extern "C" {
290
#[cfg_attr(test, assert_instr(v128.load))]
291
#[target_feature(enable = "simd128")]
292
pub unsafe fn v128_load(m: *const v128) -> v128 {
293
- *m
+ ptr::read_unaligned(m)
294
}
295
296
/// Load eight 8-bit integers and sign extend each one to a 16-bit lane
@@ -396,7 +396,7 @@ pub unsafe fn v128_load64_zero(m: *const u64) -> v128 {
396
#[cfg_attr(test, assert_instr(v128.store))]
397
398
pub unsafe fn v128_store(m: *mut v128, a: v128) {
399
- *m = a;
+ ptr::write_unaligned(m, a);
400
401
402
/// Loads an 8-bit value from `m` and sets lane `L` of `v` to that value.
0 commit comments