Diff for libplaton/platon/cpu/bogomips.c between version 1.2 and 1.3
| version 1.2, 2002/10/02 20:13:58 |
version 1.3, 2010/04/24 10:17:01 |
|
|
| |
|
| #include <platon/misc/bogomips.h> |
#include <platon/misc/bogomips.h> |
| |
|
| static __inline__ void __delay(int loops) |
#if defined(__sparc__) |
| { |
|
| __asm__ volatile ( |
|
| ".align 2,0x90\n" |
|
| "1: decl %0\n" |
|
| "jns 1b\n" |
|
| ::"a" (loops) /*:"ax"*/); |
|
| } |
|
| |
|
| #if 0 /* This Sparc Linux version of __delay() */ |
/* This Sparc Linux version of __delay() */ |
| |
|
| static __inline__ void __delay(unsigned long loops) |
static __inline__ void __delay(unsigned long loops) |
| { |
{ |
| Line 23 static __inline__ void __delay(unsigned |
|
| Line 16 static __inline__ void __delay(unsigned |
|
| "0" (loops)); |
"0" (loops)); |
| } |
} |
| |
|
| |
#else |
| |
|
| |
static __inline__ void __delay(int loops) |
| |
{ |
| |
__asm__ volatile ( |
| |
".align 2,0x90\n" |
| |
"1: decl %0\n" |
| |
"jns 1b\n" |
| |
::"a" (loops) /*:"ax"*/); |
| |
} |
| |
|
| #endif |
#endif |
| |
|
| unsigned long get_userspace_loops_per_sec() |
unsigned long get_userspace_loops_per_sec() |
Platon Group <platon@platon.org> http://platon.org/
|
|