diff options
Diffstat (limited to 'src/asm/snapvector.asm')
-rw-r--r-- | src/asm/snapvector.asm | 20 |
1 files changed, 1 insertions, 19 deletions
diff --git a/src/asm/snapvector.asm b/src/asm/snapvector.asm index 000777b4..22f9b225 100644 --- a/src/asm/snapvector.asm +++ b/src/asm/snapvector.asm @@ -45,9 +45,6 @@ IFDEF idx64 qsnapvectorsse PROC sub rsp, 8 - stmxcsr [rsp] ; save SSE control word - ldmxcsr ssecw ; set to round nearest - movaps xmm1, ssemask ; initialize the mask register movups xmm0, [rcx] ; here is stored our vector. Read 4 values in one go movaps xmm2, xmm0 ; keep a copy of the original data @@ -57,20 +54,13 @@ IFDEF idx64 cvtdq2ps xmm0, xmm0 ; convert 4 int to single fp orps xmm0, xmm1 ; combine all 4 values again movups [rcx], xmm0 ; write 3 rounded and 1 unchanged values back to memory - - ldmxcsr [rsp] ; restore sse control word to old value - add rsp, 8 ret qsnapvectorsse ENDP ELSE qsnapvectorsse PROC - sub esp, 8 - stmxcsr [esp] ; save SSE control word - ldmxcsr ssecw ; set to round nearest - - mov eax, dword ptr 12[esp] ; store address of vector in eax + mov eax, dword ptr 4[esp] ; store address of vector in eax movaps xmm1, ssemask ; initialize the mask register for maskmovdqu movups xmm0, [eax] ; here is stored our vector. Read 4 values in one go movaps xmm2, xmm0 ; keep a copy of the original data @@ -80,9 +70,6 @@ ELSE cvtdq2ps xmm0, xmm0 ; convert 4 int to single fp orps xmm0, xmm1 ; combine all 4 values again movups [eax], xmm0 ; write 3 rounded and 1 unchanged values back to memory - - ldmxcsr [esp] ; restore sse control word to old value - add esp, 8 ret qsnapvectorsse ENDP @@ -95,14 +82,9 @@ ELSE qsnapvectorx87 PROC mov eax, dword ptr 4[esp] - sub esp, 2 - fnstcw word ptr [esp] - fldcw fpucw qroundx87 [eax] qroundx87 4[eax] qroundx87 8[eax] - fldcw [esp] - add esp, 2 ret qsnapvectorx87 ENDP |