2015-04-03 02:37:22 -06:00
|
|
|
// Copyright 2015 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.
|
|
|
|
|
2015-10-27 17:46:49 -06:00
|
|
|
#ifdef GOOS_android
|
|
|
|
#define TLS_linux
|
2015-11-25 18:35:44 -07:00
|
|
|
#define TLSG_IS_VARIABLE
|
2015-10-27 17:46:49 -06:00
|
|
|
#endif
|
2015-04-03 02:37:22 -06:00
|
|
|
#ifdef GOOS_linux
|
2015-10-27 17:46:49 -06:00
|
|
|
#define TLS_linux
|
|
|
|
#endif
|
|
|
|
#ifdef TLS_linux
|
2015-04-03 02:37:22 -06:00
|
|
|
#define TPIDR TPIDR_EL0
|
2015-04-10 20:14:43 -06:00
|
|
|
#define MRS_TPIDR_R0 WORD $0xd53bd040 // MRS TPIDR_EL0, R0
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef GOOS_darwin
|
|
|
|
#define TPIDR TPIDRRO_EL0
|
|
|
|
#define TLSG_IS_VARIABLE
|
|
|
|
#define MRS_TPIDR_R0 WORD $0xd53bd060 // MRS TPIDRRO_EL0, R0
|
2015-04-03 02:37:22 -06:00
|
|
|
#endif
|
|
|
|
|
|
|
|
// Define something that will break the build if
|
|
|
|
// the GOOS is unknown.
|
|
|
|
#ifndef TPIDR
|
|
|
|
#define MRS_TPIDR_R0 TPIDR_UNKNOWN
|
|
|
|
#endif
|