Quantcast
Channel: Posts recentes
Viewing all articles
Browse latest Browse all 10

Low Precision VFNMADDSS on SDE(AVX Emulator)

$
0
0
inglês

I usedSDE to learn the FMA instruction, but i got trouble this...

result:
3183
3.14159265
10000
FMA:10000.000000-3183.000000*3.141593=0.310305
x87:10000.000000-3183.000000*3.141593=0.310547

is it bug?

Code:
__declspec(naked) float vfnmaddss(float a, float b, float c) {
__asm {
movss xmm0,dword ptr [esp+4]
movss xmm1,dword ptr [esp+8]
movss xmm2,dword ptr [esp+0Ch]
vfnmaddss xmm0, xmm0, xmm1, xmm2
movss dword ptr [esp+4],xmm0
fld dword ptr [esp+4]
ret
}
}


Viewing all articles
Browse latest Browse all 10


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>