diff options
| author | Russ Cox <rsc@golang.org> | 2014-11-11 01:29:05 -0500 |
|---|---|---|
| committer | Russ Cox <rsc@golang.org> | 2014-11-11 01:29:05 -0500 |
| commit | 0d49f7b5fcbf5d5efad05dd4416574127bdd9dfd (patch) | |
| tree | cf61de43486099206711555021a8f5ab4faa5428 /src/runtime | |
| parent | 0185ba76edce85d2bc5d3da63091774039326dcd (diff) | |
| download | go-0d49f7b5fcbf5d5efad05dd4416574127bdd9dfd.tar.xz | |
[dev.cc] cmd/dist: adjust for build process without cmd/cc
[This CL is part of the removal of C code from package runtime.
See golang.org/s/dev.cc for an overview.]
- Remove references to C compiler directories.
- Remove generation of special header files.
- Remove generation of Go source files from C declarations.
- Compile Go sources before rest of package (was after),
so that Go compiler can write go_asm.h for use in assembly.
- Move TLS information from cmd/dist (was embedding in output)
to src/runtime/go_tls.h, which it can be maintained directly.
LGTM=r
R=r, dave
CC=austin, golang-codereviews, iant, khr
https://golang.org/cl/172960043
Diffstat (limited to 'src/runtime')
| -rw-r--r-- | src/runtime/defs.c | 15 | ||||
| -rw-r--r-- | src/runtime/go_tls.h | 22 |
2 files changed, 22 insertions, 15 deletions
diff --git a/src/runtime/defs.c b/src/runtime/defs.c deleted file mode 100644 index b0a9b20d7f..0000000000 --- a/src/runtime/defs.c +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright 2013 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. - -// This file is compiled by cmd/dist to obtain debug information -// about the given header files. - -#include "runtime.h" -#include "arch_GOARCH.h" -#include "malloc.h" -#include "type.h" -#include "race.h" -#include "chan.h" -#include "defs_GOOS_GOARCH.h" -#include "os_GOOS.h" diff --git a/src/runtime/go_tls.h b/src/runtime/go_tls.h new file mode 100644 index 0000000000..6a707cf1e8 --- /dev/null +++ b/src/runtime/go_tls.h @@ -0,0 +1,22 @@ +// Copyright 2014 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. + +#ifdef GOARCH_arm +#define LR R14 +#endif + +#ifdef GOARCH_amd64 +#define get_tls(r) MOVQ TLS, r +#define g(r) 0(r)(TLS*1) +#endif + +#ifdef GOARCH_amd64p32 +#define get_tls(r) MOVL TLS, r +#define g(r) 0(r)(TLS*1) +#endif + +#ifdef GOARCH_386 +#define get_tls(r) MOVL TLS, r +#define g(r) 0(r)(TLS*1) +#endif |
