diff options
| author | Josh Bleecher Snyder <josharian@gmail.com> | 2016-07-11 16:05:57 -0700 |
|---|---|---|
| committer | Josh Bleecher Snyder <josharian@gmail.com> | 2016-08-25 18:52:31 +0000 |
| commit | 71ab9fa312f8266379dbb358b9ee9303cde7bd6b (patch) | |
| tree | e7d1a1343a70fb7bf3c26b5d2b5df99623b66515 /src/runtime/internal | |
| parent | 6af7639ae147689cbabd06287bf4ff15a4dfd896 (diff) | |
| download | go-71ab9fa312f8266379dbb358b9ee9303cde7bd6b.tar.xz | |
all: fix assembly vet issues
Add missing function prototypes.
Fix function prototypes.
Use FP references instead of SP references.
Fix variable names.
Update comments.
Clean up whitespace. (Not for vet.)
All fairly minor fixes to make vet happy.
Updates #11041
Change-Id: Ifab2cdf235ff61cdc226ab1d84b8467b5ac9446c
Reviewed-on: https://go-review.googlesource.com/27713
Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Diffstat (limited to 'src/runtime/internal')
| -rw-r--r-- | src/runtime/internal/atomic/asm_386.s | 2 | ||||
| -rw-r--r-- | src/runtime/internal/atomic/asm_amd64.s | 2 | ||||
| -rw-r--r-- | src/runtime/internal/atomic/asm_amd64p32.s | 2 | ||||
| -rw-r--r-- | src/runtime/internal/atomic/asm_arm.s | 2 | ||||
| -rw-r--r-- | src/runtime/internal/atomic/asm_arm64.s | 2 | ||||
| -rw-r--r-- | src/runtime/internal/atomic/atomic_arm.go | 3 | ||||
| -rw-r--r-- | src/runtime/internal/atomic/atomic_ppc64x.s | 12 |
7 files changed, 14 insertions, 11 deletions
diff --git a/src/runtime/internal/atomic/asm_386.s b/src/runtime/internal/atomic/asm_386.s index 357d830289..631f122350 100644 --- a/src/runtime/internal/atomic/asm_386.s +++ b/src/runtime/internal/atomic/asm_386.s @@ -61,7 +61,7 @@ TEXT runtime∕internal∕atomic·Cas64(SB), NOSPLIT, $0-21 SETEQ ret+20(FP) RET -// bool Casp(void **p, void *old, void *new) +// bool Casp1(void **p, void *old, void *new) // Atomically: // if(*p == old){ // *p = new; diff --git a/src/runtime/internal/atomic/asm_amd64.s b/src/runtime/internal/atomic/asm_amd64.s index 0001d2301c..32dbbf763d 100644 --- a/src/runtime/internal/atomic/asm_amd64.s +++ b/src/runtime/internal/atomic/asm_amd64.s @@ -55,7 +55,7 @@ TEXT runtime∕internal∕atomic·Loadint64(SB), NOSPLIT, $0-16 TEXT runtime∕internal∕atomic·Xaddint64(SB), NOSPLIT, $0-24 JMP runtime∕internal∕atomic·Xadd64(SB) -// bool Casp(void **val, void *old, void *new) +// bool Casp1(void **val, void *old, void *new) // Atomically: // if(*val == old){ // *val = new; diff --git a/src/runtime/internal/atomic/asm_amd64p32.s b/src/runtime/internal/atomic/asm_amd64p32.s index 22c707c325..87f7a079ca 100644 --- a/src/runtime/internal/atomic/asm_amd64p32.s +++ b/src/runtime/internal/atomic/asm_amd64p32.s @@ -55,7 +55,7 @@ TEXT runtime∕internal∕atomic·Cas64(SB), NOSPLIT, $0-25 SETEQ ret+24(FP) RET -// bool Casp(void **val, void *old, void *new) +// bool Casp1(void **val, void *old, void *new) // Atomically: // if(*val == old){ // *val = new; diff --git a/src/runtime/internal/atomic/asm_arm.s b/src/runtime/internal/atomic/asm_arm.s index 12da22390d..5e2380e07b 100644 --- a/src/runtime/internal/atomic/asm_arm.s +++ b/src/runtime/internal/atomic/asm_arm.s @@ -19,7 +19,7 @@ // B runtime∕internal∕atomic·armcas(SB) // TEXT runtime∕internal∕atomic·armcas(SB),NOSPLIT,$0-13 - MOVW valptr+0(FP), R1 + MOVW ptr+0(FP), R1 MOVW old+4(FP), R2 MOVW new+8(FP), R3 casl: diff --git a/src/runtime/internal/atomic/asm_arm64.s b/src/runtime/internal/atomic/asm_arm64.s index 929bf7189c..b6af632efa 100644 --- a/src/runtime/internal/atomic/asm_arm64.s +++ b/src/runtime/internal/atomic/asm_arm64.s @@ -47,7 +47,7 @@ TEXT runtime∕internal∕atomic·Loadint64(SB), NOSPLIT, $0-16 TEXT runtime∕internal∕atomic·Xaddint64(SB), NOSPLIT, $0-24 B runtime∕internal∕atomic·Xadd64(SB) -// bool Casp(void **val, void *old, void *new) +// bool Casp1(void **val, void *old, void *new) // Atomically: // if(*val == old){ // *val = new; diff --git a/src/runtime/internal/atomic/atomic_arm.go b/src/runtime/internal/atomic/atomic_arm.go index 244237df4d..211f52663b 100644 --- a/src/runtime/internal/atomic/atomic_arm.go +++ b/src/runtime/internal/atomic/atomic_arm.go @@ -181,3 +181,6 @@ func And8(addr *uint8, v uint8) { } } } + +//go:nosplit +func armcas(ptr *uint32, old, new uint32) bool diff --git a/src/runtime/internal/atomic/atomic_ppc64x.s b/src/runtime/internal/atomic/atomic_ppc64x.s index 1a7537ed33..c9c2d1fc0c 100644 --- a/src/runtime/internal/atomic/atomic_ppc64x.s +++ b/src/runtime/internal/atomic/atomic_ppc64x.s @@ -6,9 +6,9 @@ #include "textflag.h" -// uint32 runtime∕internal∕atomic·Load(uint32 volatile* addr) +// uint32 runtime∕internal∕atomic·Load(uint32 volatile* ptr) TEXT ·Load(SB),NOSPLIT|NOFRAME,$-8-12 - MOVD addr+0(FP), R3 + MOVD ptr+0(FP), R3 SYNC MOVWZ 0(R3), R3 CMPW R3, R3, CR7 @@ -17,9 +17,9 @@ TEXT ·Load(SB),NOSPLIT|NOFRAME,$-8-12 MOVW R3, ret+8(FP) RET -// uint64 runtime∕internal∕atomic·Load64(uint64 volatile* addr) +// uint64 runtime∕internal∕atomic·Load64(uint64 volatile* ptr) TEXT ·Load64(SB),NOSPLIT|NOFRAME,$-8-16 - MOVD addr+0(FP), R3 + MOVD ptr+0(FP), R3 SYNC MOVD 0(R3), R3 CMP R3, R3, CR7 @@ -28,9 +28,9 @@ TEXT ·Load64(SB),NOSPLIT|NOFRAME,$-8-16 MOVD R3, ret+8(FP) RET -// void *runtime∕internal∕atomic·Loadp(void *volatile *addr) +// void *runtime∕internal∕atomic·Loadp(void *volatile *ptr) TEXT ·Loadp(SB),NOSPLIT|NOFRAME,$-8-16 - MOVD addr+0(FP), R3 + MOVD ptr+0(FP), R3 SYNC MOVD 0(R3), R3 CMP R3, R3, CR7 |
