2008-05-03 11:16:32 +00:00
|
|
|
#include <machine/asm.h>
|
|
|
|
__FBSDID("$FreeBSD$");
|
|
|
|
|
|
|
|
.section .init,"ax",%progbits
|
|
|
|
.align 4
|
|
|
|
.globl _init
|
|
|
|
.type _init,%function
|
|
|
|
_init:
|
2010-03-13 02:10:20 +00:00
|
|
|
.set noreorder
|
2010-03-03 21:59:23 +00:00
|
|
|
#if defined(__ABICALLS__) && (defined(__mips_o32) || defined(__mips_o64))
|
|
|
|
SETUP_GP
|
|
|
|
#endif
|
|
|
|
PTR_ADDU sp, sp, -CALLFRAME_SIZ
|
|
|
|
REG_S ra, CALLFRAME_RA(sp)
|
|
|
|
#if defined(__ABICALLS__)
|
|
|
|
#if defined(__mips_o32) || defined(__mips_o64)
|
|
|
|
SAVE_GP(CALLFRAME_GP)
|
2008-05-03 11:16:32 +00:00
|
|
|
#else
|
2010-03-03 21:59:23 +00:00
|
|
|
SETUP_GP64(CALLFRAME_GP, _init)
|
|
|
|
#endif
|
|
|
|
#else /* __ABICALLS__ */
|
|
|
|
#if defined(__mips_n32) || defined(__mips_n64)
|
|
|
|
REG_S gp, CALLFRAME_GP(sp)
|
|
|
|
#endif
|
2008-05-03 11:16:32 +00:00
|
|
|
#endif
|
2010-03-03 21:59:23 +00:00
|
|
|
.set reorder
|
2008-05-03 11:16:32 +00:00
|
|
|
|
|
|
|
.section .fini,"ax",%progbits
|
|
|
|
.align 4
|
|
|
|
.globl _fini
|
|
|
|
.type _fini,%function
|
|
|
|
_fini:
|
2010-03-03 21:59:23 +00:00
|
|
|
.set noreorder
|
|
|
|
#if defined(__ABICALLS__) && (defined(__mips_o32) || defined(__mips_o64))
|
|
|
|
SETUP_GP
|
|
|
|
#endif
|
|
|
|
PTR_ADDU sp, sp, -CALLFRAME_SIZ
|
|
|
|
REG_S ra, CALLFRAME_RA(sp)
|
|
|
|
#if defined(__ABICALLS__)
|
|
|
|
#if defined(__mips_o32) || defined(__mips_o64)
|
|
|
|
SAVE_GP(CALLFRAME_GP)
|
2008-05-03 11:16:32 +00:00
|
|
|
#else
|
2010-03-03 21:59:23 +00:00
|
|
|
SETUP_GP64(CALLFRAME_GP, _fini)
|
|
|
|
#endif
|
|
|
|
#else /* __ABICALLS__ */
|
|
|
|
#if defined(__mips_n32) || defined(__mips_n64)
|
|
|
|
REG_S gp, CALLFRAME_GP(sp)
|
|
|
|
#endif
|
2008-05-03 11:16:32 +00:00
|
|
|
#endif
|
2010-03-03 21:59:23 +00:00
|
|
|
.set reorder
|