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
4d8b1feb
Commit
4d8b1feb
authored
Feb 13, 2013
by
Shenghou Ma
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sync/atomic: support NetBSD/ARM (ARM11 or above)
R=golang-dev, rsc, dave CC=golang-dev
https://golang.org/cl/7287044
parent
83116977
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
89 additions
and
0 deletions
+89
-0
src/pkg/sync/atomic/asm_netbsd_arm.s
src/pkg/sync/atomic/asm_netbsd_arm.s
+89
-0
No files found.
src/pkg/sync/atomic/asm_netbsd_arm.s
0 → 100644
View file @
4d8b1feb
//
Copyright
2013
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
.
//
NetBSD
/
ARM
atomic
operations
.
//
TODO
(
minux
):
this
only
supports
ARMv6K
or
higher
.
TEXT
·
CompareAndSwapInt32
(
SB
),7,$0
B
·
CompareAndSwapUint32
(
SB
)
TEXT
·
CompareAndSwapUint32
(
SB
),7,$0
B
·
armCompareAndSwapUint32
(
SB
)
TEXT
·
CompareAndSwapUintptr
(
SB
),7,$0
B
·
CompareAndSwapUint32
(
SB
)
TEXT
·
CompareAndSwapPointer
(
SB
),7,$0
B
·
CompareAndSwapUint32
(
SB
)
TEXT
·
AddInt32
(
SB
),7,$0
B
·
AddUint32
(
SB
)
TEXT
·
AddUint32
(
SB
),7,$0
B
·
armAddUint32
(
SB
)
TEXT
·
AddUintptr
(
SB
),7,$0
B
·
AddUint32
(
SB
)
TEXT
·
CompareAndSwapInt64
(
SB
),7,$0
B
·
CompareAndSwapUint64
(
SB
)
TEXT
·
CompareAndSwapUint64
(
SB
),7,$-4
B
·
armCompareAndSwapUint64
(
SB
)
TEXT
·
AddInt64
(
SB
),7,$0
B
·
addUint64
(
SB
)
TEXT
·
AddUint64
(
SB
),7,$0
B
·
addUint64
(
SB
)
TEXT
·
LoadInt32
(
SB
),7,$0
B
·
LoadUint32
(
SB
)
TEXT
·
LoadUint32
(
SB
),7,$0
MOVW
addr
+
0
(
FP
),
R1
load32loop
:
LDREX
(
R1
),
R2
//
loads
R2
STREX
R2
,
(
R1
),
R0
//
stores
R2
CMP
$
0
,
R0
BNE
load32loop
MOVW
R2
,
val
+
4
(
FP
)
RET
TEXT
·
LoadInt64
(
SB
),7,$0
B
·
loadUint64
(
SB
)
TEXT
·
LoadUint64
(
SB
),7,$0
B
·
loadUint64
(
SB
)
TEXT
·
LoadUintptr
(
SB
),7,$0
B
·
LoadUint32
(
SB
)
TEXT
·
LoadPointer
(
SB
),7,$0
B
·
LoadUint32
(
SB
)
TEXT
·
StoreInt32
(
SB
),7,$0
B
·
StoreUint32
(
SB
)
TEXT
·
StoreUint32
(
SB
),7,$0
MOVW
addr
+
0
(
FP
),
R1
MOVW
val
+
4
(
FP
),
R2
storeloop
:
LDREX
(
R1
),
R4
//
loads
R4
STREX
R2
,
(
R1
),
R0
//
stores
R2
CMP
$
0
,
R0
BNE
storeloop
RET
TEXT
·
StoreInt64
(
SB
),7,$0
B
·
storeUint64
(
SB
)
TEXT
·
StoreUint64
(
SB
),7,$0
B
·
storeUint64
(
SB
)
TEXT
·
StoreUintptr
(
SB
),7,$0
B
·
StoreUint32
(
SB
)
TEXT
·
StorePointer
(
SB
),7,$0
B
·
StoreUint32
(
SB
)
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