Skip to content

Commit

Permalink
use read_unaligned in vld1_p64
Browse files Browse the repository at this point in the history
  • Loading branch information
SparrowLii committed Sep 10, 2021
1 parent a4ca211 commit 3e0efe2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions crates/core_arch/src/aarch64/neon/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -624,15 +624,15 @@ pub unsafe fn vld1q_p16(ptr: *const p16) -> poly16x8_t {
#[target_feature(enable = "neon,aes")]
#[cfg_attr(test, assert_instr(ldr))]
pub unsafe fn vld1_p64(ptr: *const p64) -> poly64x1_t {
transmute(u64x1::new(*ptr))
read_unaligned(ptr.cast())
}

/// Load multiple single-element structures to one, two, three, or four registers.
#[inline]
#[target_feature(enable = "neon,aes")]
#[cfg_attr(test, assert_instr(ldr))]
pub unsafe fn vld1q_p64(ptr: *const p64) -> poly64x2_t {
transmute(u64x2::new(*ptr, *ptr.offset(1)))
read_unaligned(ptr.cast())
}

/// Load multiple single-element structures to one, two, three, or four registers.
Expand Down

0 comments on commit 3e0efe2

Please sign in to comment.