1
1
forked from 0ad/0ad

fixed gcc error with asm code

This was SVN commit r347.
This commit is contained in:
janwas 2004-06-02 15:00:23 +00:00
parent 48d981b030
commit 016ca6ed06
2 changed files with 19 additions and 12 deletions

View File

@ -13,18 +13,24 @@
#endif
// HAVE_C99: check if compiler advertises support for C99
// (make sure it's #defined before testing value to avoid ICC warning)
#undef HAVE_C99
#ifdef __STDC_VERSION__
# if __STDC_VERSION__ >= 199901L
# define HAVE_C99
# endif
#endif
#undef HAVE_C99 // compiler advertises support for C99
#undef HAVE_ASM
#undef HAVE_GETTIMEOFDAY
#undef HAVE_X
#undef CONFIG_DISABLE_EXCEPTIONS
#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
# define HAVE_C99
#endif
#ifdef _MSC_VER
# define HAVE_ASM
#endif
#ifdef OS_UNIX
# define HAVE_GETTIMEOFDAY
#endif
@ -33,4 +39,4 @@
# define HAVE_X
#endif
#undef CONFIG_DISABLE_EXCEPTIONS

View File

@ -5,8 +5,9 @@
*/
#include "precompiled.h"
#include "config.h"
#if _MSC_VER >= 0x1300
#ifdef HAVE_ASM
void memcpy_nt(void* dst, void* src, int len)
{
@ -29,7 +30,7 @@ prefetch_loop:
mov eax, [esi-64]
mov eax, [esi-128]
sub esi, 128
test esi, 4095 ; CHUNK_SIZE-1 (icc doesn't preprocess asm)
test esi, 4095 ; CHUNK_SIZE-1 (icc doesnt preprocess asm)
jnz prefetch_loop
@ -66,4 +67,4 @@ write_loop:
}
}
#endif // #if _MSC_VER >= 0x1300
#endif // #ifdef HAVE_ASM