1
0
mirror of https://github.com/golang/go synced 2024-11-19 20:54:39 -07:00
go/src/pkg/runtime/defs_netbsd_386.go
Joel Sing 8a9edcf790 runtime: fix netbsd runtime defs
Fix and regenerate runtime defs for NetBSD.

Whilst the mcontext struct can be handled across architectures,
the registers are provided as defines that index an array, rather
than as members of the struct. Since these are architecture
dependent, include them via a defs_netbsd_<arch>.go file.

R=golang-dev, m4dh4tt3r, rsc
CC=golang-dev
https://golang.org/cl/6190070
2012-05-16 01:52:20 +10:00

43 lines
943 B
Go

// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// +build ignore
/*
Input to cgo.
GOARCH=amd64 go tool cgo -cdefs defs_netbsd.go defs_netbsd_amd64.go >defs_netbsd_amd64.h
GOARCH=386 go tool cgo -cdefs defs_netbsd.go defs_netbsd_386.go >defs_netbsd_386.h
*/
package runtime
/*
#include <sys/types.h>
#include <machine/mcontext.h>
*/
import "C"
const (
REG_GS = C._REG_GS
REG_FS = C._REG_FS
REG_ES = C._REG_ES
REG_DS = C._REG_DS
REG_EDI = C._REG_EDI
REG_ESI = C._REG_ESI
REG_EBP = C._REG_EBP
REG_ESP = C._REG_ESP
REG_EBX = C._REG_EBX
REG_EDX = C._REG_EDX
REG_ECX = C._REG_ECX
REG_EAX = C._REG_EAX
REG_TRAPNO = C._REG_TRAPNO
REG_ERR = C._REG_ERR
REG_EIP = C._REG_EIP
REG_CS = C._REG_CS
REG_EFL = C._REG_EFL
REG_UESP = C._REG_UESP
REG_SS = C._REG_SS
)