summaryrefslogtreecommitdiffstats
path: root/lib/mipsunwinder/init_context_32.S
diff options
context:
space:
mode:
Diffstat (limited to 'lib/mipsunwinder/init_context_32.S')
-rw-r--r--lib/mipsunwinder/init_context_32.S12
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/mipsunwinder/init_context_32.S b/lib/mipsunwinder/init_context_32.S
new file mode 100644
index 0000000000..a943d13dc3
--- /dev/null
+++ b/lib/mipsunwinder/init_context_32.S
@@ -0,0 +1,12 @@
+#include "mips.h"
+
+ .text
+ .global mips_bt_start
+
+mips_bt_start:
+ addiu v0, ra, -8
+ sw v0, 0(a0) /* ctx->pc = ra - 8 */
+ sw sp, 4(a0) /* ctx->sp = sp */
+ sw zero, 8(a0) /* ctx->depth = 0 */
+ sw zero, 12(a0) /* ctx->valid = 0 */
+ jr ra