...

Text file src/runtime/tls_mips64x.s

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//go:build mips64 || mips64le
     6
     7#include "go_asm.h"
     8#include "go_tls.h"
     9#include "funcdata.h"
    10#include "textflag.h"
    11
    12// If !iscgo, this is a no-op.
    13//
    14// NOTE: mcall() assumes this clobbers only R23 (REGTMP).
    15TEXT runtime·save_g(SB),NOSPLIT|NOFRAME,$0-0
    16	MOVB	runtime·iscgo(SB), R23
    17	BEQ	R23, nocgo
    18
    19	MOVV	R3, R23	// save R3
    20	MOVV	g, runtime·tls_g(SB) // TLS relocation clobbers R3
    21	MOVV	R23, R3	// restore R3
    22
    23nocgo:
    24	RET
    25
    26TEXT runtime·load_g(SB),NOSPLIT|NOFRAME,$0-0
    27	MOVV	runtime·tls_g(SB), g // TLS relocation clobbers R3
    28	RET
    29
    30GLOBL runtime·tls_g(SB), TLSBSS, $8

View as plain text