src/os_timer.cpp
branchNewGRF_ports
changeset 6800 6c09e1e86fcb
parent 6677 0578c2e31ed1
child 10429 1b99254f9607
equal deleted inserted replaced
6799:2adc1052a548 6800:6c09e1e86fcb
     6 
     6 
     7 #undef RDTSC_AVAILABLE
     7 #undef RDTSC_AVAILABLE
     8 
     8 
     9 /* rdtsc for MSC_VER, uses simple inline assembly, or _rdtsc
     9 /* rdtsc for MSC_VER, uses simple inline assembly, or _rdtsc
    10  * from external win64.asm because VS2005 does not support inline assembly */
    10  * from external win64.asm because VS2005 does not support inline assembly */
    11 #if defined(_MSC_VER) && !defined(RDTSC_AVAILABLE)
    11 #if defined(_MSC_VER) && !defined(RDTSC_AVAILABLE) && !defined(WINCE)
    12 # if _MSC_VER >= 1400
    12 # if _MSC_VER >= 1400
    13 #include <intrin.h>
    13 #include <intrin.h>
    14 uint64 _rdtsc()
    14 uint64 _rdtsc()
    15 {
    15 {
    16 	return __rdtsc();
    16 	return __rdtsc();
    69 #endif
    69 #endif
    70 
    70 
    71 /* In all other cases we have no support for rdtsc. No major issue,
    71 /* In all other cases we have no support for rdtsc. No major issue,
    72  * you just won't be able to profile your code with TIC()/TOC() */
    72  * you just won't be able to profile your code with TIC()/TOC() */
    73 #if !defined(RDTSC_AVAILABLE)
    73 #if !defined(RDTSC_AVAILABLE)
       
    74 /* MSVC (in case of WinCE) can't handle #warning */
       
    75 # if !defined(_MSC_VER)
    74 #warning "(non-fatal) No support for rdtsc(), you won't be able to profile with TIC/TOC"
    76 #warning "(non-fatal) No support for rdtsc(), you won't be able to profile with TIC/TOC"
       
    77 # endif
    75 uint64 _rdtsc() {return 0;}
    78 uint64 _rdtsc() {return 0;}
    76 #endif
    79 #endif