Black Lives Matter. Support the Equal Justice Initiative.

Text file src/runtime/tls_mipsx.s

Documentation: runtime

     1  // Copyright 2016 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  //go:build mips || mipsle
     6  // +build mips mipsle
     7  
     8  #include "go_asm.h"
     9  #include "go_tls.h"
    10  #include "funcdata.h"
    11  #include "textflag.h"
    12  
    13  // If !iscgo, this is a no-op.
    14  // NOTE: gogo asumes load_g only clobers g (R30) and REGTMP (R23)
    15  TEXT runtime·save_g(SB),NOSPLIT|NOFRAME,$0-0
    16  	MOVB	runtime·iscgo(SB), R23
    17  	BEQ	R23, nocgo
    18  
    19  	MOVW	R3, R23
    20  	MOVW	g, runtime·tls_g(SB) // TLS relocation clobbers R3
    21  	MOVW	R23, R3
    22  
    23  nocgo:
    24  	RET
    25  
    26  TEXT runtime·load_g(SB),NOSPLIT|NOFRAME,$0-0
    27  	MOVW	runtime·tls_g(SB), g // TLS relocation clobbers R3
    28  	RET
    29  
    30  GLOBL runtime·tls_g(SB), TLSBSS, $4
    31  

View as plain text