Macros for symbols used in both ASM and C

-The macros take care of prepending the leading underscore when
 necessary.
This commit is contained in:
Arun Thomas
2010-08-17 16:44:07 +00:00
parent c8cfcab5db
commit 9a21d1a2fd
209 changed files with 1511 additions and 1863 deletions

View File

@@ -1,14 +1,11 @@
/* */
/* sections */
#include <machine/asm.h>
.globl _read_tsc /* read the cycle counter (Pentium and up) */
.text
/**===========================================================================* */
/* PUBLIC void read_tsc(unsigned long *high, unsigned long *low); */
/* Read the cycle counter of the CPU. Pentium and up. */
.balign 16
_read_tsc:
ENTRY(read_tsc)
push %edx
push %eax
.byte 0x0f /* this is the RDTSC instruction */
@@ -26,8 +23,7 @@ _read_tsc:
/**===========================================================================* */
/* PUBLIC void read_host_time_ns(unsigned long *high, unsigned long *low); */
/* access real time in ns from host in vmware. */
.balign 16
_read_host_time_ns:
ENTRY(read_host_time_ns)
pushl %edx
pushl %eax
pushl %ecx