Black Lives Matter. Support the Equal Justice Initiative.

Text file src/runtime/tls_arm64.h

Documentation: runtime

     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_android
     6  #define TLS_linux
     7  #define TLSG_IS_VARIABLE
     8  #endif
     9  #ifdef GOOS_linux
    10  #define TLS_linux
    11  #endif
    12  #ifdef TLS_linux
    13  #define TPIDR TPIDR_EL0
    14  #define MRS_TPIDR_R0 WORD $0xd53bd040 // MRS TPIDR_EL0, R0
    15  #endif
    16  
    17  #ifdef GOOS_darwin
    18  #define TLS_darwin
    19  #endif
    20  #ifdef GOOS_ios
    21  #define TLS_darwin
    22  #endif
    23  #ifdef TLS_darwin
    24  #define TPIDR TPIDRRO_EL0
    25  #define TLSG_IS_VARIABLE
    26  #define MRS_TPIDR_R0 WORD $0xd53bd060 // MRS TPIDRRO_EL0, R0
    27  #endif
    28  
    29  #ifdef GOOS_freebsd
    30  #define TPIDR TPIDR_EL0
    31  #define MRS_TPIDR_R0 WORD $0xd53bd040 // MRS TPIDR_EL0, R0
    32  #endif
    33  
    34  #ifdef GOOS_netbsd
    35  #define TPIDR TPIDRRO_EL0
    36  #define MRS_TPIDR_R0 WORD $0xd53bd040 // MRS TPIDRRO_EL0, R0
    37  #endif
    38  
    39  #ifdef GOOS_openbsd
    40  #define TPIDR TPIDR_EL0
    41  #define MRS_TPIDR_R0 WORD $0xd53bd040 // MRS TPIDR_EL0, R0
    42  #endif
    43  
    44  #ifdef GOOS_windows
    45  #define TLS_windows
    46  #endif
    47  #ifdef TLS_windows
    48  #define TLSG_IS_VARIABLE
    49  #define MRS_TPIDR_R0 MOVD R18_PLATFORM, R0
    50  #endif
    51  
    52  // Define something that will break the build if
    53  // the GOOS is unknown.
    54  #ifndef MRS_TPIDR_R0
    55  #define MRS_TPIDR_R0 unknown_TLS_implementation_in_tls_arm64_h
    56  #endif
    57  

View as plain text