Mercurial > sdl-ios-xcode
comparison src/timer/linux/SDL_systimer.c @ 392:71fe0b713085
*** empty log message ***
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Tue, 04 Jun 2002 22:30:40 +0000 |
parents | 4e8827521296 |
children | 104f32d04cd1 |
comparison
equal
deleted
inserted
replaced
391:52f577c8e0b7 | 392:71fe0b713085 |
---|---|
71 | 71 |
72 #if 1 | 72 #if 1 |
73 /* This is for old binutils version that don't recognize rdtsc mnemonics. | 73 /* This is for old binutils version that don't recognize rdtsc mnemonics. |
74 But all binutils version supports this. | 74 But all binutils version supports this. |
75 */ | 75 */ |
76 #define rdtsc(t) asm(".byte 0x0f, 0x31; " : "=A" (t)); | 76 #define rdtsc(t) asm __volatile__ (".byte 0x0f, 0x31; " : "=A" (t)) |
77 #else | 77 #else |
78 #define rdtsc(t) asm("rdtsc" : "=A" (t)); | 78 #define rdtsc(t) asm __volatile__ ("rdtsc" : "=A" (t)) |
79 #endif | 79 #endif |
80 | 80 |
81 static float calc_cpu_mhz(void) | 81 static float calc_cpu_mhz(void) |
82 { | 82 { |
83 float cpu_mhz; | 83 float cpu_mhz; |