compilation error in function returning a struct in C -
i keep getting compilation error:
error: expected ‘;’, ‘,’ or ‘)’ before ‘&’ token
on marked line below:
//128 bit vector struct (4 integers) typedef struct { int w, x, y, z; } ivector4; ivector4 sseadd(ivector4 &v1, ivector4 &v2) // <-- line { ivector4 vr; asm { mov eax v1 mov ebx v2 // movups xmm0, [eax] movups xmm1, [ebx] // paddd xmm0 xmm1 movups [rv] } return rv; }
i can't see what's wrong: seems problem?
edit:
hi responses.
i'm using gcc compiler, , realize assembly code had provided incorrect.i wondering if best use built_in functions -msse/-msse2.
also, what's efficient way load , extract values vector such v4si?
i'm finding loading , extracting vector costly ooperation.
when sse intrinsics, did mean?
thanks help.
c not have references. need compile c++ those.
Comments
Post a Comment