Use C99 compatable asm statements.
This commit is contained in:
parent
778f8875c7
commit
69bb404192
@ -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); \
|
||||
}
|
||||
|
@ -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); \
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user