github.com/gocuntian/go@v0.0.0-20160610041250-fee02d270bf8/src/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,$-8-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 // uint64 runtime∕internal∕atomic·Load64(uint64 volatile* ptr) 21 TEXT ·Load64(SB),NOSPLIT,$-8-16 22 MOVV ptr+0(FP), R1 23 SYNC 24 MOVV 0(R1), R1 25 SYNC 26 MOVV R1, ret+8(FP) 27 RET 28 29 // void *runtime∕internal∕atomic·Loadp(void *volatile *ptr) 30 TEXT ·Loadp(SB),NOSPLIT,$-8-16 31 MOVV ptr+0(FP), R1 32 SYNC 33 MOVV 0(R1), R1 34 SYNC 35 MOVV R1, ret+8(FP) 36 RET