+// func switchToCrashStack0(fn func())
+TEXT runtime·switchToCrashStack0(SB), NOSPLIT, $0-8
+ MOVV fn+0(FP), REGCTXT // context register
+ MOVV g_m(g), R2 // curm
+
+ // set g to gcrash
+ MOVV $runtime·gcrash(SB), g // g = &gcrash
+ CALL runtime·save_g(SB)
+ MOVV R2, g_m(g) // g.m = curm
+ MOVV g, m_g0(R2) // curm.g0 = g
+
+ // switch to crashstack
+ MOVV (g_stack+stack_hi)(g), R2
+ ADDV $(-4*8), R2, R29
+
+ // call target function
+ MOVV 0(REGCTXT), R25
+ JAL (R25)
+
+ // should never return
+ CALL runtime·abort(SB)
+ UNDEF
+