Revision 28ab0e2e target-i386/helper.c

b/target-i386/helper.c
1775 1775
    cpu_x86_flush_tlb(env, addr);
1776 1776
}
1777 1777

  
1778
/* rdtsc */
1779
#if !defined(__i386__) && !defined(__x86_64__)
1780
uint64_t emu_time;
1781
#endif
1782

  
1783 1778
void helper_rdtsc(void)
1784 1779
{
1785 1780
    uint64_t val;
1786
#if defined(__i386__) || defined(__x86_64__)
1787
    asm volatile ("rdtsc" : "=A" (val));
1788
#else
1789
    /* better than nothing: the time increases */
1790
    val = emu_time++;
1791
#endif
1781
    
1782
    val = cpu_get_tsc(env);
1792 1783
    EAX = val;
1793 1784
    EDX = val >> 32;
1794 1785
}

Also available in: Unified diff