From 786efaa9e8bfea03e89a53f8089dca5195dec947 Mon Sep 17 00:00:00 2001 From: HappyDOGE <28511119+HappyDOGE@users.noreply.github.com> Date: Thu, 28 Jul 2022 17:42:21 +0300 Subject: [PATCH] use asm fastcopy only on i386 --- materialsystem/cmatqueuedrendercontext.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/materialsystem/cmatqueuedrendercontext.cpp b/materialsystem/cmatqueuedrendercontext.cpp index 519e1f70..96d5bb0f 100644 --- a/materialsystem/cmatqueuedrendercontext.cpp +++ b/materialsystem/cmatqueuedrendercontext.cpp @@ -39,9 +39,7 @@ void FastCopy( byte *pDest, const byte *pSrc, size_t nBytes ) int nBytesFull = nBytes - ( nBytes % BYTES_PER_FULL ); for ( byte *pLimit = pDest + nBytesFull; pDest < pLimit; pDest += BYTES_PER_FULL, pSrc += BYTES_PER_FULL ) { - #ifdef PLATFORM_64BITS - memcpy( pDest, pSrc, BYTES_PER_FULL); - #else + #ifdef __i386__ __asm { mov esi, pSrc @@ -65,6 +63,8 @@ void FastCopy( byte *pDest, const byte *pSrc, size_t nBytes ) movntps [edi + 96], xmm6 movntps [edi + 112], xmm7 } + #else + memcpy( pDest, pSrc, BYTES_PER_FULL); #endif } nBytes -= nBytesFull;