Hacker News new | past | comments | ask | show | jobs | submit login
How to Write a Maths Library in 2016 (codersnotes.com)
27 points by ingve on Feb 20, 2016 | hide | past | favorite | 3 comments



In regards to the section on `vectorcall`, I think that the UNIX x64 ABI specifies that any floating point/SSE parameters are passed in the XMM* registers, so it should stay in the registers the whole time.

OTOH I am not sure if GCC actually does this in practice. Whenever I've had to read x64 code produced by GCC with -S, I've noticed it tends to constant spill quite a lot.


Does that still work if the floats are contained in a small struct? (a la float3, float3x3 etc)


To be honest, I have only limited experience with vectors at the moment, so I'm not entirely sure. I scanned the ABI[0], but in my current sleep-deprived state I can't make all that much sense of it, sorry. You might have better luck!

[0]: http://www.x86-64.org/documentation/abi-0.99.7.pdf




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: