Function core::arch::x86_64::_mm_loadr_ps

1.27.0· source[]
pub unsafe fn _mm_loadr_ps(p: *const f32) -> __m128
This is supported on x86-64 and target feature sse only.
Expand description

Loads four f32 values from aligned memory into a __m128 in reverse order.

If the pointer is not aligned to a 128-bit boundary (16 bytes) a general protection fault will be triggered (fatal program crash).

Functionally equivalent to the following code sequence (assuming p satisfies the alignment restrictions):

let a0 = *p;
let a1 = *p.offset(1);
let a2 = *p.offset(2);
let a3 = *p.offset(3);
__m128::new(a3, a2, a1, a0)

This corresponds to instructions VMOVAPS / MOVAPS followed by some shuffling.

Intel’s documentation