MCPcopy Create free account
hub / github.com/TorqueGameEngines/Torque3D / SSE_MatrixF_x_MatrixF

Function SSE_MatrixF_x_MatrixF

Engine/source/math/mMathSSE.cpp:31–111  ·  view source on GitHub ↗

inlined version here.

Source from the content-addressed store, hash-verified

29#define ADD_SSE_FN
30// inlined version here.
31void SSE_MatrixF_x_MatrixF(const F32 *matA, const F32 *matB, F32 *result)
32{
33 __asm
34 {
35 mov edx, matA
36 mov ecx, matB
37 mov eax, result
38
39 movss xmm0, [edx]
40 movups xmm1, [ecx]
41 shufps xmm0, xmm0, 0
42 movss xmm2, [edx+4]
43 mulps xmm0, xmm1
44 shufps xmm2, xmm2, 0
45 movups xmm3, [ecx+10h]
46 movss xmm7, [edx+8]
47 mulps xmm2, xmm3
48 shufps xmm7, xmm7, 0
49 addps xmm0, xmm2
50 movups xmm4, [ecx+20h]
51 movss xmm2, [edx+0Ch]
52 mulps xmm7, xmm4
53 shufps xmm2, xmm2, 0
54 addps xmm0, xmm7
55 movups xmm5, [ecx+30h]
56 movss xmm6, [edx+10h]
57 mulps xmm2, xmm5
58 movss xmm7, [edx+14h]
59 shufps xmm6, xmm6, 0
60 addps xmm0, xmm2
61 shufps xmm7, xmm7, 0
62 movlps [eax], xmm0
63 movhps [eax+8], xmm0
64 mulps xmm7, xmm3
65 movss xmm0, [edx+18h]
66 mulps xmm6, xmm1
67 shufps xmm0, xmm0, 0
68 addps xmm6, xmm7
69 mulps xmm0, xmm4
70 movss xmm2, [edx+24h]
71 addps xmm6, xmm0
72 movss xmm0, [edx+1Ch]
73 movss xmm7, [edx+20h]
74 shufps xmm0, xmm0, 0
75 shufps xmm7, xmm7, 0
76 mulps xmm0, xmm5
77 mulps xmm7, xmm1
78 addps xmm6, xmm0
79 shufps xmm2, xmm2, 0
80 movlps [eax+10h], xmm6
81 movhps [eax+18h], xmm6
82 mulps xmm2, xmm3
83 movss xmm6, [edx+28h]
84 addps xmm7, xmm2
85 shufps xmm6, xmm6, 0
86 movss xmm2, [edx+2Ch]
87 mulps xmm6, xmm4
88 shufps xmm2, xmm2, 0

Callers 1

TESTFunction · 0.85

Calls

no outgoing calls

Tested by 1

TESTFunction · 0.68