I have this function written in C++, where a Vec3 is a structure with 3 floats.
Vec3 foo(Vec v1, Vec2 v2)
{
Vec3 retVec;
retVec.x = v1.x + v2.x;
retVec.y = v1.y + v2.y;
retVec.z = v1.z + v2.z;
return retVec;
} Now I want to rewrite this function into asm. But I need some design suggestions. How should you do this? Should I store the three values that retVec keeps after each other and return the adress to the first element? This is the only idea I can come up with.
Thanks for any suggestions!
/Klarre