VirtualBox

Ignore:
Timestamp:
Feb 6, 2007 5:16:02 AM (18 years ago)
Author:
vboxsync
Message:

ASMReadTSC().

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/include/VBoxDefs.h

    r382 r689  
    3131
    3232#include <iprt/alloc.h>
     33#include <iprt/asm.h>
    3334
    3435#ifdef VBOX_GUI_DEBUG
     
    8182public:
    8283    inline static uint64_t ticks() {
    83 #if defined (Q_CC_MSVC)
    84         union {
    85             uint64_t ll;
    86             struct {
    87                 uint32_t low, high;
    88             } l;
    89         } val;
    90         __asm rdtsc
    91         __asm mov val.l.low, eax
    92         __asm mov val.l.high, edx
    93          return val.ll;
    94 #elif defined (Q_CC_GNU)
    95         uint64_t val;
    96         asm volatile ("rdtsc" : "=A" (val));
    97         return val;
    98 #else
    99         return 0;
    100 #endif
     84        return ASMReadTSC();
    10185    }
    10286    inline static uint64_t msecs( uint64_t tcks ) {
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette