blob: d5676aba34f94d1072be38c6ae9c484a3e28bd5a [file] [log] [blame]
Shenghou Mad0b62d82015-04-03 04:37:22 -04001// Copyright 2015 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#ifdef GOOS_linux
6#define TPIDR TPIDR_EL0
Shenghou Ma4a71b912015-04-10 22:14:43 -04007#define MRS_TPIDR_R0 WORD $0xd53bd040 // MRS TPIDR_EL0, R0
8#endif
9
10#ifdef GOOS_darwin
11#define TPIDR TPIDRRO_EL0
12#define TLSG_IS_VARIABLE
13#define MRS_TPIDR_R0 WORD $0xd53bd060 // MRS TPIDRRO_EL0, R0
Shenghou Mad0b62d82015-04-03 04:37:22 -040014#endif
15
16// Define something that will break the build if
17// the GOOS is unknown.
18#ifndef TPIDR
19#define MRS_TPIDR_R0 TPIDR_UNKNOWN
20#endif