runtime: move mstart from Go to C

The assignments done in mstart must be done without write barriers, as
mstart is running without an m or p.  In the gc toolchain the
equivalent code to intialize g and g->m is written in assembler;
on GNU/Linux, it's in the clone function.

Change-Id: Id84d2897e2a72a7ff906c763cf4524e956b709e7
Reviewed-by: Than McIntosh <>
3 files changed