mips64: factor out frame management macros into arch/common/common-defs.h

pull/17/head
Ariadne Conill 2020-03-29 13:49:57 +00:00
parent 8536f1fa3b
commit 2f4eb16f38
2 changed files with 29 additions and 11 deletions

28
arch/common/common-defs.h Normal file
View File

@ -0,0 +1,28 @@
#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
#define FUNC(__proc) \
.globl __proc; \
.align 2; \
.type __proc, @function; \
.ent __proc, 0; \
__proc: \
SETUP_FRAME(__proc)
#define END(__proc) \
.end __proc; \
.size __proc,.-__proc;
#endif

View File

@ -85,16 +85,6 @@
.cpreturn; \
daddiu $sp, FRAMESZ
#define FUNC(__proc) \
.globl __proc; \
.align 2; \
.type __proc, @function; \
.ent __proc, 0; \
__proc: \
SETUP_FRAME(__proc)
#define END(__proc) \
.end __proc; \
.size __proc,.-__proc;
#include <common-defs.h>
#endif