github.com/geraldss/go/src@v0.0.0-20210511222824-ac7d0ebfc235/runtime/internal/atomic/atomic_mips64x.s (about) 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 // +build mips64 mips64le 6 7 #include "textflag.h" 8 9 #define SYNC WORD $0xf 10 11 // uint32 runtime∕internal∕atomic·Load(uint32 volatile* ptr) 12 TEXT ·Load(SB),NOSPLIT|NOFRAME,$0-12 13 MOVV ptr+0(FP), R1 14 SYNC 15 MOVWU 0(R1), R1 16 SYNC 17 MOVW R1, ret+8(FP) 18 RET 19 20 // uint8 runtime∕internal∕atomic·Load8(uint8 volatile* ptr) 21 TEXT ·Load8(SB),NOSPLIT|NOFRAME,$0-9 22 MOVV ptr+0(FP), R1 23 SYNC 24 MOVBU 0(R1), R1 25 SYNC 26 MOVB R1, ret+8(FP) 27 RET 28 29 // uint64 runtime∕internal∕atomic·Load64(uint64 volatile* ptr) 30 TEXT ·Load64(SB),NOSPLIT|NOFRAME,$0-16 31 MOVV ptr+0(FP), R1 32 SYNC 33 MOVV 0(R1), R1 34 SYNC 35 MOVV R1, ret+8(FP) 36 RET 37 38 // void *runtime∕internal∕atomic·Loadp(void *volatile *ptr) 39 TEXT ·Loadp(SB),NOSPLIT|NOFRAME,$0-16 40 MOVV ptr+0(FP), R1 41 SYNC 42 MOVV 0(R1), R1 43 SYNC 44 MOVV R1, ret+8(FP) 45 RET 46 47 // uint32 runtime∕internal∕atomic·LoadAcq(uint32 volatile* ptr) 48 TEXT ·LoadAcq(SB),NOSPLIT|NOFRAME,$0-12 49 JMP atomic·Load(SB) 50 51 // uint64 runtime∕internal∕atomic·LoadAcq64(uint64 volatile* ptr) 52 TEXT ·LoadAcq64(SB),NOSPLIT|NOFRAME,$0-16 53 JMP atomic·Load64(SB) 54 55 // uintptr runtime∕internal∕atomic·LoadAcquintptr(uintptr volatile* ptr) 56 TEXT ·LoadAcquintptr(SB),NOSPLIT|NOFRAME,$0-16 57 JMP atomic·Load64(SB)