blob: 23e9db3c1c1903d53ac3bdfcca2c8a019844b6c2 [file] [log] [blame]
Russ Coxe9d62a62013-03-14 11:35:13 -07001// Copyright 2009 The Go Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style
3// license that can be found in the LICENSE file.
4
5#include "runtime.h"
6#include "defs_GOOS_GOARCH.h"
7#include "os_GOOS.h"
8
9void
10runtime·lwp_mcontext_init(McontextT *mc, void *stack, M *mp, G *gp, void (*fn)(void))
11{
12 mc->__gregs[REG_EIP] = (uint32)runtime·lwp_tramp;
13 mc->__gregs[REG_UESP] = (uint32)stack;
14 mc->__gregs[REG_EBX] = (uint32)mp;
15 mc->__gregs[REG_EDX] = (uint32)gp;
16 mc->__gregs[REG_ESI] = (uint32)fn;
17}