vec_ldiz, vec_ldiza

Purpose

Loads a vector from four 4-byte unsigned integer values at the given memory address, with zero extension to 8-byte unsigned integer values.

Syntax

d=vec_ldiz(a, b)
d=vec_ldiza(a, b)

Result and argument types

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

d a b
vector4double long unsigned*

Result value

The effective address (EA) is the sum of a and b. The effective address is truncated to a 16-byte alignment. The contents of the 16 bytes starting at the effective address are loaded from memory. Each of their four 4-byte integer values is extended with zeros to fill 8-byte integer values before being saved in the result value.

vec_ldiza generates an exception (SIGBUS) if the effective address is not aligned to a 16-byte memory boundary.

Formula

d[0] = (unsigned long) Memory_4B[EA]
d[1] = (unsigned long) Memory_4B[EA+4]
d[2] = (unsigned long) Memory_4B[EA+8]
d[3] = (unsigned long) Memory_4B[EA+12]
Note: Memory_4B[] is a 4-byte integer array.

Example

Memory values: (10, 20, 30, 40)
Convert result values d to IEEE floating point numbers using: d2 = vec_cfid(d)
d2: (10.0, 20.0, 30.0, 40.0)