Hi, sorry for the dumb question, but how do i get the address of an object inside a member function in inline assembly?
I have no experience with assembler yet. It seems like names of variables on the stack are treated as pointers in inline assembly, but I have no clue about how to get the address of the object itself (this and [this] do not work). struct float4 { float[4] _data; float dot(in float4 rhs) const { float r = void; asm { movups XMM0, this; // need pointer to _data movups XMM1, rhs; ... movss r, XMM0; } return r; } } Please note that even this doesn't work: float* ptr = cast(float*) _data.ptr; asm { movups XMM0, ptr; } => 2 operands found for movups instead of the expected 1