Use C99 compatable asm statements.

This commit is contained in:
David E. O'Brien 2003-06-02 00:29:35 +00:00
parent 778f8875c7
commit 69bb404192
2 changed files with 4 additions and 4 deletions

View File

@ -94,14 +94,14 @@ mcount() \
* \
* selfpc = pc pushed by call to mcount \
*/ \
asm("movq 8(%%rbp),%0" : "=r" (selfpc)); \
__asm("movq 8(%%rbp),%0" : "=r" (selfpc)); \
/* \
* frompc = pc pushed by call to mcount's caller. \
* The caller's stack frame has already been built, so %ebp is \
* the caller's frame pointer. The caller's raddr is in the \
* caller's frame following the caller's caller's frame pointer.\
*/ \
asm("movq (%%rbp),%0" : "=r" (frompc)); \
__asm("movq (%%rbp),%0" : "=r" (frompc)); \
frompc = ((uintfptr_t *)frompc)[1]; \
_mcount(frompc, selfpc); \
}

View File

@ -94,14 +94,14 @@ mcount() \
* \
* selfpc = pc pushed by call to mcount \
*/ \
asm("movl 4(%%ebp),%0" : "=r" (selfpc)); \
__asm("movl 4(%%ebp),%0" : "=r" (selfpc)); \
/* \
* frompc = pc pushed by call to mcount's caller. \
* The caller's stack frame has already been built, so %ebp is \
* the caller's frame pointer. The caller's raddr is in the \
* caller's frame following the caller's caller's frame pointer.\
*/ \
asm("movl (%%ebp),%0" : "=r" (frompc)); \
__asm("movl (%%ebp),%0" : "=r" (frompc)); \
frompc = ((uintfptr_t *)frompc)[1]; \
_mcount(frompc, selfpc); \
}