From 0d49f7b5fcbf5d5efad05dd4416574127bdd9dfd Mon Sep 17 00:00:00 2001 From: Russ Cox Date: Tue, 11 Nov 2014 01:29:05 -0500 Subject: [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 --- src/runtime/defs.c | 15 --------------- src/runtime/go_tls.h | 22 ++++++++++++++++++++++ 2 files changed, 22 insertions(+), 15 deletions(-) delete mode 100644 src/runtime/defs.c create mode 100644 src/runtime/go_tls.h (limited to 'src/runtime') 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 -- cgit v1.3