github.com/4ad/go@v0.0.0-20161219182952-69a12818b605/src/runtime/internal/atomic/atomic_sparc64.s (about)

     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  #include "textflag.h"
     6  #include "asm_sparc64.h"
     7  
     8  // uint32 runtime∕internal∕atomic·Load(uint32 volatile* addr)
     9  TEXT ·Load(SB),NOSPLIT,$0-12
    10  	MOVD	ptr+0(FP), I1
    11  	MEM_SYNC
    12  	LDUW	(I1), I1
    13  	MEM_SYNC
    14  	MOVUW	I1, ret+8(FP)
    15  	RET
    16  
    17  // uint64 runtime∕internal∕atomic·Load64(uint64 volatile* addr)
    18  TEXT ·Load64(SB),NOSPLIT,$0-16
    19  	MOVD	ptr+0(FP), I1
    20  	MEM_SYNC
    21  	LDD	(I1), I1
    22  	MEM_SYNC
    23  	MOVD	I1, ret+8(FP)
    24  	RET
    25  
    26  // void *runtime∕internal∕atomic·Loadp(void *volatile *addr)
    27  TEXT ·Loadp(SB),NOSPLIT|NOFRAME,$0-16
    28  	JMP	runtime∕internal∕atomic·Load64(SB)