0ad/source/lib/sysdep/ia32/ia32_memcpy_init.cpp
janwas 623e649acb # big refactoring in CPU-specific code, fix for dual core vs. HT detection
all cpu-related stuff is now defined in cpu.h (with cpu_ prefix and
fully encapsulated). fix quite brittle core/HT unit/package detection.
implement mkdir on VC8, where it is deprecated
add strdup on MacOSX
move ia32 code into separate subdir. functions implemented in asm are
called ia32_asm_*.
add some unix versions of sysdep functions (cannot test them)
timer: fix for amd64 linux

This was SVN commit r4995.
2007-04-25 18:19:35 +00:00

23 lines
780 B
C++

#include "precompiled.h"
#include "ia32.h"
#include "ia32_memcpy.h"
// set by ia32_memcpy_init, referenced by ia32_memcpy (asm)
// default to "all codepaths supported"
extern "C" u32 ia32_memcpy_size_mask = ~0u;
void ia32_memcpy_init()
{
// set the mask that is applied to transfer size before
// choosing copy technique. this is the mechanism for disabling
// codepaths that aren't supported on all CPUs; see article for details.
// .. check for PREFETCHNTA and MOVNTQ support. these are part of the SSE
// instruction set, but also supported on older Athlons as part of
// the extended AMD MMX set.
if(!ia32_cap(IA32_CAP_SSE) && !ia32_cap(IA32_CAP_AMD_MMX_EXT))
ia32_memcpy_size_mask = 0u;
}
// ia32_memcpy() is defined in ia32_memcpy_asm.asm