core::arch::powerpc

Function vec_sld

source
pub unsafe fn vec_sld<T, const UIMM4: i32>(a: T, b: T) -> T
where T: VectorSld,
🔬This is a nightly-only experimental API. (stdarch_powerpc #111145)
Available on (PowerPC or PowerPC-64) and target feature altivec and PowerPC only.
Expand description

Vector Shift Left Double

§Endian considerations

This intrinsic is not endian-neutral, so uses of vec_sld in big-endian code must be rewritten for little-endian targets.

Historically, vec_sld could be used to shift by amounts not a multiple of the element size for most types, in which case the purpose of the shift is difficult to determine and difficult to automatically rewrite efficiently for little endian.

So the concatenation of a and b is done in big-endian fashion (left to right), and the shift is always to the left. This will generally produce surprising results for little-endian targets.