mirror of
https://github.com/golang/go
synced 2024-11-20 07:34:40 -07:00
6acd5a65b2
References to FP must now have a symbol. Change-Id: I3f06b99cc48cbd4ccd6f23f2e4b0830af40f7f3d Reviewed-on: https://go-review.googlesource.com/5281 Reviewed-by: Russ Cox <rsc@golang.org>
41 lines
870 B
ArmAsm
41 lines
870 B
ArmAsm
// Copyright 2014 The Go Authors. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style
|
|
// license that can be found in the LICENSE file.
|
|
|
|
// +build ppc64 ppc64le
|
|
|
|
#include "textflag.h"
|
|
|
|
// uint32 runtime·atomicload(uint32 volatile* addr)
|
|
TEXT ·atomicload(SB),NOSPLIT,$-8-12
|
|
MOVD addr+0(FP), R3
|
|
SYNC
|
|
MOVWZ 0(R3), R3
|
|
CMPW R3, R3, CR7
|
|
BC 4, 30, 1(PC) // bne- cr7,0x4
|
|
ISYNC
|
|
MOVW R3, ret+8(FP)
|
|
RETURN
|
|
|
|
// uint64 runtime·atomicload64(uint64 volatile* addr)
|
|
TEXT ·atomicload64(SB),NOSPLIT,$-8-16
|
|
MOVD addr+0(FP), R3
|
|
SYNC
|
|
MOVD 0(R3), R3
|
|
CMP R3, R3, CR7
|
|
BC 4, 30, 1(PC) // bne- cr7,0x4
|
|
ISYNC
|
|
MOVD R3, ret+8(FP)
|
|
RETURN
|
|
|
|
// void *runtime·atomicloadp(void *volatile *addr)
|
|
TEXT ·atomicloadp(SB),NOSPLIT,$-8-16
|
|
MOVD addr+0(FP), R3
|
|
SYNC
|
|
MOVD 0(R3), R3
|
|
CMP R3, R3, CR7
|
|
BC 4, 30, 1(PC) // bne- cr7,0x4
|
|
ISYNC
|
|
MOVD R3, ret+8(FP)
|
|
RETURN
|