Technical: Hardware: G4
Advanced Search
Apple Developer Connection
Member Login Log In | Not a Member? Support

Load Vector for Shift Left or Right

vec_lvsl(arg1, arg2)
vec_lvsr(arg1, arg2)

Each operation creates a vector useful for aligning non-aligned data. arg1 is an integer value, while arg2 is a pointer. The effective address is calculated by adding arg1 to arg2. For vec_lvsl the first byte of the result vector contains the four least significant bits of the effective address; for vec_lvsr the first byte contains 16 minus this value. Each successive byte contains the previous byte's value plus 1. The arg2 type may also be a pointer to a const or volatile-qualified type.
See
Address Alignment for a description of how these instructions are used.

Result

arg1

arg2

vec_lvsl
vec_lvsr
Maps To

vector unsigned char

any integral type

unsigned char *

lvsl
lvsr

vector unsigned char

any integral type

signed char *

lvsl
lvsr

vector unsigned char

any integral type

unsigned short *

lvsl
lvsr

vector unsigned char

any integral type

short *

lvsl
lvsr

vector unsigned char

any integral type

unsigned int *

lvsl
lvsr

vector unsigned char

any integral type

unsigned long *

lvsl
lvsr

vector unsigned char

any integral type

int *

lvsl
lvsr

vector unsigned char

any integral type

long *

lvsl
lvsr

vector unsigned char

any integral type

float *

lvsl
lvsr