vec_insertl

Purpose

Inserts a source element into a source vector at a specified byte position in natural byte order.

Note: This built-in function is valid only when the -mcpu option is set to target Power10 processors.

Syntax

d=vec_insertl(a,b,c)

Result and argument types

The following table describes the types of the returned value and the function arguments.

Table 1. Result and argument types
d a b c
vector unsigned char unsigned char vector unsigned char unsigned int
vector unsigned short unsigned short vector unsigned short unsigned int
vector unsigned int unsigned int vector unsigned int unsigned int
vector unsigned long long unsigned long long vector unsigned long long unsigned int
vector unsigned char vector unsigned char vector unsigned char unsigned int
vector unsigned short vector unsigned short vector unsigned short unsigned int
vector unsigned int vector unsigned int vector unsigned int unsigned int

Result value

When a is a scalar, let e be equal to a. Otherwise, when a is a vector, let e be the rightmost element of the leftmost doubleword of a in register order. Then d is set to the value of b with e inserted at byte position c in natural byte order. Other than the bytes modified by the insert operation, bytes of d are identical to the corresponding bytes of b.

Note: The byte index c must be in the range 0 to 15, inclusive. The result is undefined if the byte index does not address an element boundary.