mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
Stylify (mainly line up macro EOL-continuation \'s), and add a dummy
alternative for lint.
This commit is contained in:
parent
1a924d7213
commit
db8f2e326c
2 changed files with 56 additions and 42 deletions
|
|
@ -82,28 +82,35 @@ extern int mcount_lock;
|
|||
|
||||
#define _MCOUNT_DECL static __inline void _mcount
|
||||
|
||||
#define MCOUNT \
|
||||
void \
|
||||
mcount() \
|
||||
{ \
|
||||
uintfptr_t selfpc, frompc; \
|
||||
/* \
|
||||
* Find the return address for mcount, \
|
||||
* and the return address for mcount's caller. \
|
||||
* \
|
||||
* selfpc = pc pushed by call to mcount \
|
||||
*/ \
|
||||
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)); \
|
||||
frompc = ((uintfptr_t *)frompc)[1]; \
|
||||
_mcount(frompc, selfpc); \
|
||||
#ifdef __GNUC__
|
||||
#define MCOUNT \
|
||||
void \
|
||||
mcount() \
|
||||
{ \
|
||||
uintfptr_t selfpc, frompc; \
|
||||
/* \
|
||||
* Find the return address for mcount, \
|
||||
* and the return address for mcount's caller. \
|
||||
* \
|
||||
* selfpc = pc pushed by call to mcount \
|
||||
*/ \
|
||||
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)); \
|
||||
frompc = ((uintfptr_t *)frompc)[1]; \
|
||||
_mcount(frompc, selfpc); \
|
||||
}
|
||||
#else /* __GNUC__ */
|
||||
void \
|
||||
mcount() \
|
||||
{ \
|
||||
}
|
||||
#endif /* __GNUC__ */
|
||||
|
||||
typedef unsigned int uintfptr_t;
|
||||
|
||||
|
|
|
|||
|
|
@ -82,28 +82,35 @@ extern int mcount_lock;
|
|||
|
||||
#define _MCOUNT_DECL static __inline void _mcount
|
||||
|
||||
#define MCOUNT \
|
||||
void \
|
||||
mcount() \
|
||||
{ \
|
||||
uintfptr_t selfpc, frompc; \
|
||||
/* \
|
||||
* Find the return address for mcount, \
|
||||
* and the return address for mcount's caller. \
|
||||
* \
|
||||
* selfpc = pc pushed by call to mcount \
|
||||
*/ \
|
||||
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)); \
|
||||
frompc = ((uintfptr_t *)frompc)[1]; \
|
||||
_mcount(frompc, selfpc); \
|
||||
#ifdef __GNUC__
|
||||
#define MCOUNT \
|
||||
void \
|
||||
mcount() \
|
||||
{ \
|
||||
uintfptr_t selfpc, frompc; \
|
||||
/* \
|
||||
* Find the return address for mcount, \
|
||||
* and the return address for mcount's caller. \
|
||||
* \
|
||||
* selfpc = pc pushed by call to mcount \
|
||||
*/ \
|
||||
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)); \
|
||||
frompc = ((uintfptr_t *)frompc)[1]; \
|
||||
_mcount(frompc, selfpc); \
|
||||
}
|
||||
#else /* __GNUC__ */
|
||||
void \
|
||||
mcount() \
|
||||
{ \
|
||||
}
|
||||
#endif /* __GNUC__ */
|
||||
|
||||
typedef unsigned int uintfptr_t;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue