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
92254d44
Commit
92254d44
authored
Aug 12, 2013
by
Dmitriy Vyukov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
runtime: fix ARM assembly formatting
R=golang-dev, bradfitz CC=golang-dev
https://golang.org/cl/12702048
parent
8b789e17
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
19 deletions
+19
-19
src/pkg/runtime/asm_arm.s
src/pkg/runtime/asm_arm.s
+12
-12
src/pkg/runtime/sys_linux_arm.s
src/pkg/runtime/sys_linux_arm.s
+3
-3
src/pkg/sync/atomic/asm_linux_arm.s
src/pkg/sync/atomic/asm_linux_arm.s
+4
-4
No files found.
src/pkg/runtime/asm_arm.s
View file @
92254d44
...
...
@@ -81,19 +81,19 @@ GLOBL runtime·main·f(SB),RODATA,$4
TEXT
runtime
·
breakpoint
(
SB
),
NOSPLIT
,$0-0
//
gdb
won
't skip this breakpoint instruction automatically,
//
so
you
must
manually
"set
$pc
+=4"
to
skip
it
and
continue
.
WORD
$
0xe1200071
//
BKPT
0x0001
WORD
$
0xe1200071
//
BKPT
0x0001
RET
GLOBL
runtime
·
goarm
(
SB
),
$
4
TEXT
runtime
·
asminit
(
SB
),
NOSPLIT
,$0-0
//
disable
runfast
(
flush
-
to
-
zero
)
mode
of
vfp
if
runtime
.
goarm
>
5
MOVW
runtime
·
goarm
(
SB
),
R11
CMP
$
5
,
R11
BLE
4
(
PC
)
WORD
$
0xeef1ba10
//
vmrs
r11
,
fpscr
BIC
$
(
1
<<
24
),
R11
WORD
$
0xeee1ba10
//
vmsr
fpscr
,
r11
MOVW
runtime
·
goarm
(
SB
),
R11
CMP
$
5
,
R11
BLE
4
(
PC
)
WORD
$
0xeef1ba10
//
vmrs
r11
,
fpscr
BIC
$
(
1
<<
24
),
R11
WORD
$
0xeee1ba10
//
vmsr
fpscr
,
r11
RET
/*
...
...
@@ -448,7 +448,7 @@ TEXT runtime·cgocallback_gofunc(SB),NOSPLIT,$8-12
//
the
linker
analysis
by
using
an
indirect
call
.
MOVW
m
,
savedm
-
4
(
SP
)
CMP
$
0
,
m
B.NE
havem
B.NE
havem
MOVW
$runtime
·
needm
(
SB
),
R0
BL
(
R0
)
...
...
@@ -566,11 +566,11 @@ TEXT runtime·armcas(SB),NOSPLIT,$0-12
MOVW
new
+
8
(
FP
),
R3
casl
:
LDREX
(
R1
),
R0
CMP
R0
,
R2
BNE
casfail
CMP
R0
,
R2
BNE
casfail
STREX
R3
,
(
R1
),
R0
CMP
$
0
,
R0
BNE
casl
CMP
$
0
,
R0
BNE
casl
MOVW
$
1
,
R0
RET
casfail
:
...
...
src/pkg/runtime/sys_linux_arm.s
View file @
92254d44
...
...
@@ -371,7 +371,7 @@ casagain:
MOVW
new
+
8
(
FP
),
R1
BL
cas
<>(
SB
)
BCC
cascheck
MOVW
$
1
,
R0
MOVW
$
1
,
R0
RET
cascheck
:
//
Kernel
lies
; double-check.
...
...
@@ -380,7 +380,7 @@ cascheck:
MOVW
0
(
R2
),
R3
CMP
R0
,
R3
BEQ
casagain
MOVW
$
0
,
R0
MOVW
$
0
,
R0
RET
TEXT
runtime
·
casp
(
SB
),
NOSPLIT
,$0
...
...
@@ -439,5 +439,5 @@ TEXT runtime·closeonexec(SB),NOSPLIT,$0
MOVW
$
2
,
R1
//
F_SETFD
MOVW
$
1
,
R2
//
FD_CLOEXEC
MOVW
$SYS_fcntl
,
R7
SWI
$
0
SWI
$
0
RET
src/pkg/sync/atomic/asm_linux_arm.s
View file @
92254d44
...
...
@@ -35,7 +35,7 @@ TEXT ·CompareAndSwapUint32(SB),NOSPLIT,$0
MOVW
old
+
4
(
FP
),
R0
casagain
:
MOVW
new
+
8
(
FP
),
R1
BL
cas
<>(
SB
)
BL
cas
<>(
SB
)
BCC
cascheck
MOVW
$
1
,
R0
casret
:
...
...
@@ -88,7 +88,7 @@ TEXT kernelCAS64<>(SB),NOSPLIT,$0
MOVW
R1
,
(
R1
)
MOVW
$
4
(
FP
),
R0
//
oldval
MOVW
$
12
(
FP
),
R1
//
newval
BL
cas64
<>(
SB
)
BL
cas64
<>(
SB
)
MOVW.CS
$
1
,
R0
//
C
is
set
if
the
kernel
has
changed
*
ptr
MOVW.CC
$
0
,
R0
MOVW
R0
,
20
(
FP
)
...
...
@@ -124,7 +124,7 @@ TEXT setupAndCallCAS64<>(SB),NOSPLIT,$-4
MOVW.CS
R1
,
PC
MOVB
runtime
·
armArch
(
SB
),
R0
//
LDREXD
,
STREXD
only
present
on
ARMv6K
or
higher
CMP
$
6
,
R0
//
TODO
(
minux
)
:
how
to
differentiate
ARMv6
with
ARMv6K
?
CMP
$
6
,
R0
//
TODO
(
minux
)
:
how
to
differentiate
ARMv6
with
ARMv6K
?
MOVW.CS
$·
armCompareAndSwapUint64
(
SB
),
R1
MOVW.CS
R1
,
armCAS64
(
SB
)
MOVW.CS
R1
,
PC
...
...
@@ -140,7 +140,7 @@ TEXT ·CompareAndSwapUint64(SB),NOSPLIT,$-4
MOVW
armCAS64
(
SB
),
R0
CMP
$
0
,
R0
MOVW.NE
R0
,
PC
B
setupAndCallCAS64
<>(
SB
)
B
setupAndCallCAS64
<>(
SB
)
TEXT
·
AddInt64
(
SB
),
NOSPLIT
,$0
B
·
addUint64
(
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