m3x4 - 3x4 multiply

m3x4 - 3x4 multiply

Calling Format

m3x4    dest, src0, src1

Operands

Name Registers
dest An output register or temporary register.
Cannot specify anything other than the default mask { .xyzw }.
src0 A temporary register, input register, or floating-point constant register.
src1 A temporary register, an input register, or a floating-point constant register.
Specifies the starting register of a 3x4 matrix. (In other words, if src1 is r0, then the 3x4 matrix is stored in r0, r1, r2 and r3.)

You cannot specify a floating-point constant register for both src0 and src1.
You cannot specify an input register for both src0 and src1 at the same time.
You cannot specify the same register for dest and src0.

If you set dest to the registers that immediately follow src1 (this is src2, src3, src4 in Macro Expansion below), there is no way to anticipate the result because the contents of those registers will be updated during the execution of the expanded instructions.

Overview

Stores the result of multiplying a 3x4 matrix and a 3-component vector in dest.

Operation

src2 = Next_Index_Of ( src1 )
src3 = Next_Index_Of ( src2 )
src4 = Next_Index_Of ( src3 )
dest.x = ( src0.x * src1.x ) + ( src0.y * src1.y ) + ( src0.z * src1.z )
dest.y = ( src0.x * src2.x ) + ( src0.y * src2.y ) + ( src0.z * src2.z )
dest.z = ( src0.x * src3.x ) + ( src0.y * src3.y ) + ( src0.z * src3.z )
dest.w = ( src0.x * src4.x ) + ( src0.y * src4.y ) + ( src0.z * src4.z )

Macro Expansion

dp3     dest.x, src0, src1
dp3     dest.y, src0, src2  // src2 = next index of src1
dp3     dest.z, src0, src3  // src3 = next index of src2
dp3     dest.w, src0, src4  // src4 = next index of src3

Code Example

m3x4    r0, r1, c0
// This is expanded as follows
// dp3     r0.x, r1, c0
// dp3     r0.y, r1, c1
// dp3     r0.z, r1, c2
// dp3     r0.w, r1, c3

Timetable

123456789
dp3 read MUL ADD ADD post write
dp3 read MUL ADD ADD post write
dp3 read MUL ADD ADD post write
dp3 read MUL ADD ADD post write

Revision History

2011/12/20
Initial version.

CONFIDENTIAL