mirror of
https://github.com/golang/go
synced 2024-11-23 17:50:06 -07:00
runtime/internal/atomic: unify sys_*_arm.s on non-linux
Updates #23778. Change-Id: I80e57a15b6e3bbc2e25ea186399ff0e360fc5c21 Reviewed-on: https://go-review.googlesource.com/93635 Run-TryBot: Cherry Zhang <cherryyz@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Austin Clements <austin@google.com>
This commit is contained in:
parent
a90fc6d2d4
commit
97124af99a
@ -1,11 +0,0 @@
|
||||
// Copyright 2015 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.
|
||||
|
||||
#include "textflag.h"
|
||||
|
||||
TEXT runtime∕internal∕atomic·Cas(SB),NOSPLIT,$0
|
||||
B runtime∕internal∕atomic·armcas(SB)
|
||||
|
||||
TEXT runtime∕internal∕atomic·Casp1(SB),NOSPLIT,$0
|
||||
B runtime∕internal∕atomic·Cas(SB)
|
@ -1,13 +0,0 @@
|
||||
// Copyright 2015 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.
|
||||
|
||||
#include "textflag.h"
|
||||
|
||||
// This is only valid for ARMv6+, however, NaCl/ARM is only defined
|
||||
// for ARMv7A anyway.
|
||||
TEXT runtime∕internal∕atomic·Cas(SB),NOSPLIT,$0
|
||||
B runtime∕internal∕atomic·armcas(SB)
|
||||
|
||||
TEXT runtime∕internal∕atomic·Casp1(SB),NOSPLIT,$0
|
||||
B runtime∕internal∕atomic·Cas(SB)
|
@ -1,21 +0,0 @@
|
||||
// Copyright 2015 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.
|
||||
|
||||
#include "textflag.h"
|
||||
|
||||
// TODO(minux): this is only valid for ARMv6+
|
||||
// bool Armcas(int32 *val, int32 old, int32 new)
|
||||
// Atomically:
|
||||
// if(*val == old){
|
||||
// *val = new;
|
||||
// return 1;
|
||||
// }else
|
||||
// return 0;
|
||||
TEXT runtime∕internal∕atomic·Cas(SB),NOSPLIT,$0
|
||||
B runtime∕internal∕atomic·armcas(SB)
|
||||
|
||||
TEXT runtime∕internal∕atomic·Casp1(SB),NOSPLIT,$0
|
||||
B runtime∕internal∕atomic·Cas(SB)
|
||||
|
||||
|
@ -2,6 +2,8 @@
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
// +build !linux,arm
|
||||
|
||||
#include "textflag.h"
|
||||
|
||||
// TODO(minux): this is only valid for ARMv6+
|
||||
@ -12,8 +14,8 @@
|
||||
// return 1;
|
||||
// }else
|
||||
// return 0;
|
||||
TEXT runtime∕internal∕atomic·Cas(SB),NOSPLIT,$0
|
||||
B runtime∕internal∕atomic·armcas(SB)
|
||||
TEXT ·Cas(SB),NOSPLIT,$0
|
||||
JMP ·armcas(SB)
|
||||
|
||||
TEXT runtime∕internal∕atomic·Casp1(SB),NOSPLIT,$0
|
||||
B runtime∕internal∕atomic·Cas(SB)
|
||||
TEXT ·Casp1(SB),NOSPLIT,$0
|
||||
JMP ·Cas(SB)
|
@ -1,11 +0,0 @@
|
||||
// Copyright 2015 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.
|
||||
|
||||
#include "textflag.h"
|
||||
|
||||
TEXT runtime∕internal∕atomic·Cas(SB),NOSPLIT,$0
|
||||
B runtime∕internal∕atomic·armcas(SB)
|
||||
|
||||
TEXT runtime∕internal∕atomic·Casp1(SB),NOSPLIT,$0
|
||||
B runtime∕internal∕atomic·Cas(SB)
|
@ -1,11 +0,0 @@
|
||||
// Copyright 2015 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.
|
||||
|
||||
#include "textflag.h"
|
||||
|
||||
TEXT runtime∕internal∕atomic·Cas(SB),NOSPLIT,$0
|
||||
B runtime∕internal∕atomic·armcas(SB)
|
||||
|
||||
TEXT runtime∕internal∕atomic·Casp1(SB),NOSPLIT,$0
|
||||
B runtime∕internal∕atomic·Cas(SB)
|
Loading…
Reference in New Issue
Block a user