Changeset View
Changeset View
Standalone View
Standalone View
head/lib/csu/mips/crt.h
Show All 28 Lines | |||||
#define HAVE_CTORS | #define HAVE_CTORS | ||||
#define CTORS_CONSTRUCTORS | #define CTORS_CONSTRUCTORS | ||||
#ifdef __mips_o32 | #ifdef __mips_o32 | ||||
#define INIT_CALL_SEQ(func) \ | #define INIT_CALL_SEQ(func) \ | ||||
".set noreorder \n" \ | ".set noreorder \n" \ | ||||
"bal 1f \n" \ | "bal 1f \n" \ | ||||
"nop \n" \ | "nop \n" \ | ||||
"1: \n" \ | "1: \n" \ | ||||
".cpload $ra \n" \ | ".cpload $ra \n" \ | ||||
"addu $sp, $sp, -8 \n" \ | |||||
".set reorder \n" \ | ".set reorder \n" \ | ||||
".cprestore 4 \n" \ | |||||
".local " __STRING(func) "\n" \ | ".local " __STRING(func) "\n" \ | ||||
"jal " __STRING(func) | "jal " __STRING(func) "\n" \ | ||||
"nop \n" \ | |||||
"addu $sp, $sp, 8 \n" | |||||
#else | #else | ||||
#define INIT_CALL_SEQ(func) \ | #define INIT_CALL_SEQ(func) \ | ||||
".set noreorder \n" \ | ".set noreorder \n" \ | ||||
"bal 1f \n" \ | "bal 1f \n" \ | ||||
"nop \n" \ | "nop \n" \ | ||||
"1: \n" \ | "1: \n" \ | ||||
".set reorder \n" \ | ".set reorder \n" \ | ||||
".cpsetup $ra, $v0, 1b \n" \ | ".cpsetup $ra, $v0, 1b \n" \ | ||||
".local " __STRING(func) "\n" \ | ".local " __STRING(func) "\n" \ | ||||
"jal " __STRING(func) | "jal " __STRING(func) | ||||
"nop \n" \ | |||||
#endif | #endif | ||||
#endif | #endif |