Yes it seems to use the SSE registers for return value. I found a function attribute sseregparm for GCC, but unfortunately I can't find a complementary attribute to it.
Indeed. As the ABI said, the structure is returned in the XMM0:XMM1 registers rather than the RAX:RDX. I'm not sure why the structure is not returned only in XMM0 as it would fit nicely in there, but the other article that Martins posted describes that only the lower 64bits of the XMM registers are used.
Anyway, I may be able to add a special case for this kind of structure, say by adding the flag asOBJ_APP_CLASS_ALLFLOATS, or something like that. It would then be possible to have the code in as_callfunc_x64_gcc.cpp use that flag to handle the type correctly. However, this will have to wait for a future version, unless you feel up to implementing it yourself.
For now I'll just make sure the library properly checks for the return of simple types and gives an error since there is no way code can predict the way it should be handled.
The unfortunate final verdict is that on Linux 64bit you will only be able to return this type by value in registered functions if you use the asCALL_GENERIC calling convention via function wrappers. However, don't feel too bad about this, because I believe the asCALL_GENERIC calling convention is actually faster than the native calling convention on Linux 64bit, as there are less dynamic decisions that the library has to make.
Thanks for the help in clearing out the doubts.
Regards,
Andreas