I have been implementing a Vector Math library in C++, using Assembly at some points to improve computational performance.
One of the greater gains is due to implementing the Assembly code for Square Root as described in http://www.codeproject.com/Articles/69941/Best-Square-Root-Method-Algorithm-Function-Precisi
However, of course such implementation only works for x86, as it was already pointed in a past question about this very same code: How to get this sqrt inline assembly working for iOS
Now, my question is: there is any workaround, or is there any way to implement something similar to the following inline-assembly code but that also works for iOS, considering that fsqrt is x86-only?
double inline __declspec (naked) __fastcall sqrt14(double n)
{
_asm fld qword ptr [esp+4]
_asm fsqrt
_asm ret 8
}
Thanks in advance for your time.
EDIT: I am using Visual Studio 2013 to code and compile.