Subversion Repositories spk

Rev

Rev 4 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 4 Rev 284
Line 2... Line 2...
2
#include <math.h>
2
#include <math.h>
3
#include <stdio.h>
3
#include <stdio.h>
4
#include <crtdbg.h>
4
#include <crtdbg.h>
5
#include "LiteralHuffTree.h"
5
#include "LiteralHuffTree.h"
6
#include "CRC32.h"
6
#include "CRC32.h"
7
 
-
 
-
 
7
#include <cstring>
8
 
8
 
9
// #pragma optimize( "", off )
9
// #pragma optimize( "", off )
10
 
10
 
11
//
11
//
12
// constants/macros
12
// constants/macros
Line 286... Line 286...
286
//   when pSrc + cb > pDest - the memory regions overlap - we hold it
286
//   when pSrc + cb > pDest - the memory regions overlap - we hold it
287
//   simply - thus working - and do a REP MOVSB by hand
287
//   simply - thus working - and do a REP MOVSB by hand
288
//
288
//
289
void HipPack::MyMemCpy( void* pDest, const void* pSrc, DWORD cb )
289
void HipPack::MyMemCpy( void* pDest, const void* pSrc, DWORD cb )
290
{
290
{
-
 
291
#ifdef _WIN64
-
 
292
	std::memcpy(pDest, pSrc, cb);
-
 
293
#else
291
	__asm
294
	__asm
292
	{
295
	{
293
		mov     esi, pSrc
296
		mov     esi, pSrc
294
		mov     edi, pDest
297
		mov     edi, pDest
295
		mov     ecx, cb
298
		mov     ecx, cb
296
		rep     movsb
299
		rep     movsb
297
	}
300
	}
298
	return;
301
	return;
-
 
302
#endif
299
}
303
}
300
 
304
 
301
#undef BUFF
305
#undef BUFF