Hi....,
I'm trying to make this function "VectorScale" using 3DNow... in Fasm
In vb.net... that goes
Public Shared Sub VectorScale(ByRef vDest As vec3_t, _
ByVal vVec As vec3_t, _
ByVal fScale As Single)
vDest.x = vVec.x * fScale
vDest.y = vVec.y * fScale
vDest.z = vVec.z * fScale
End Sub
In Fasm...
proc VectorScale vDest, vVec, fScale
;femms ;3DNow
movd MM0, [fScale]
mov ecx, [vVec]
punpckldq MM0, MM0 ; {s s}
mov eax, [vDest] ; Vector Destination
movq MM1, [ecx+0] ; vA.xy {Ay Ax}
movd MM2, [ecx+8] ; vA.z0 {0 Az}
pfmul MM1, MM0 ;{ Ays Axs}
pfmul MM2, MM0 ; {0*s Azs}
movq [eax], MM1 ; {Ays Axs}
movd [eax+8], MM2 ; {0 Azs}
femms
ret
endp
After I call function in vb.net I must declare like this
Public Shared Sub VectorScale(ByRef vDest As vec3_t, _
ByRef vVec As vec3_t, _
ByVal fScale As Single)
End Sub
...and it work's fine.... but I want to call function like this..
Public Shared Sub VectorScale(ByRef vDest As vec3_t, _
ByVal vVec As vec3_t, _
ByVal fScale As Single)
End Sub
......(ByRef, ByVal, ByVal) then I have error...please help
|