Shenghou Ma | d0b62d8 | 2015-04-03 04:37:22 -0400 | [diff] [blame] | 1 | // 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 Ma | 4a71b91 | 2015-04-10 22:14:43 -0400 | [diff] [blame] | 7 | #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 Ma | d0b62d8 | 2015-04-03 04:37:22 -0400 | [diff] [blame] | 14 | #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 |