2020-03-29 13:49:57 +00:00
|
|
|
#ifndef __ARCH_COMMON_COMMON_DEFS_H
|
|
|
|
#define __ARCH_COMMON_COMMON_DEFS_H
|
|
|
|
|
|
|
|
#ifndef SETUP_FRAME
|
|
|
|
# define SETUP_FRAME(__proc)
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef PUSH_FRAME
|
|
|
|
# define PUSH_FRAME(__proc)
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef POP_FRAME
|
|
|
|
# define POP_FRAME(__proc)
|
|
|
|
#endif
|
|
|
|
|
2020-03-29 14:03:18 +00:00
|
|
|
#ifndef ENT
|
|
|
|
# define ENT(__proc)
|
|
|
|
#endif
|
|
|
|
|
2020-03-29 13:49:57 +00:00
|
|
|
#define FUNC(__proc) \
|
2020-03-29 14:12:23 +00:00
|
|
|
.global __proc; \
|
2020-03-29 13:49:57 +00:00
|
|
|
.align 2; \
|
|
|
|
.type __proc, @function; \
|
2020-03-29 14:03:18 +00:00
|
|
|
ENT(__proc) \
|
2020-03-29 13:49:57 +00:00
|
|
|
__proc: \
|
|
|
|
SETUP_FRAME(__proc)
|
|
|
|
|
|
|
|
#define END(__proc) \
|
|
|
|
.end __proc; \
|
|
|
|
.size __proc,.-__proc;
|
|
|
|
|
2020-03-29 14:12:23 +00:00
|
|
|
#define ALIAS(__alias, __real) \
|
|
|
|
.weak __alias; \
|
|
|
|
__alias = __real;
|
|
|
|
|
2020-03-29 14:50:38 +00:00
|
|
|
#define REG_OFFSET(__reg) (MCONTEXT_GREGS + ((__reg) * REG_SZ))
|
2020-03-29 14:27:19 +00:00
|
|
|
|
2020-03-29 13:49:57 +00:00
|
|
|
#endif
|