Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
go
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
go
Commits
883530c0
Commit
883530c0
authored
Aug 14, 2013
by
Russ Cox
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sync/atomic: fix new swap on arm linux
TBR=dvyukov CC=golang-dev
https://golang.org/cl/12920043
parent
72636eb5
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
2 deletions
+3
-2
src/pkg/sync/atomic/64bit_arm.go
src/pkg/sync/atomic/64bit_arm.go
+1
-1
src/pkg/sync/atomic/asm_linux_arm.s
src/pkg/sync/atomic/asm_linux_arm.s
+2
-1
No files found.
src/pkg/sync/atomic/64bit_arm.go
View file @
883530c0
...
...
@@ -37,7 +37,7 @@ func addUint64(val *uint64, delta uint64) (new uint64) {
func
swapUint64
(
addr
*
uint64
,
new
uint64
)
(
old
uint64
)
{
for
{
old
:
=
*
addr
old
=
*
addr
if
CompareAndSwapUint64
(
addr
,
old
,
new
)
{
break
}
...
...
src/pkg/sync/atomic/asm_linux_arm.s
View file @
883530c0
...
...
@@ -88,9 +88,10 @@ TEXT ·SwapUint32(SB),NOSPLIT,$0-12
MOVW
new
+
4
(
FP
),
R1
swaploop1
:
MOVW
0
(
R2
),
R0
MOVW
R0
,
R4
//
cas
smashes
R0
BL
cas
<>(
SB
)
BCC
swaploop1
MOVW
R
0
,
old
+
8
(
FP
)
MOVW
R
4
,
old
+
8
(
FP
)
RET
TEXT
·
SwapUintptr
(
SB
),
NOSPLIT
,$0
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment