Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(851)

Side by Side Diff: src/pkg/runtime/asm_tls_android_arm.s

Issue 106380043: code review 106380043: cmd/go, cmd/ld, runtime, os/user: TLS emultion for android (Closed)
Patch Set: diff -r 86b431eeb5c2 https://code.google.com/p/go Created 11 years, 5 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2014 The Go Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style
3 // license that can be found in the LICENSE file.
4
5 #include "zasm_GOOS_GOARCH.h"
minux 2014/07/02 04:21:14 isn't asm_tls_android_arm.s too long? I think tls_
crawshaw 2014/07/02 14:57:22 Done. Both merged into tls_arm.s.
6 #include "funcdata.h"
7 #include "../../cmd/ld/textflag.h"
8
9 // On android, runtime.tlsg is a normal variable.
10 // TLS offset is computed in x_cgo_inittls.
11 // See asm_tls_arm.h.
12
13 TEXT runtime·save_g(SB),NOSPLIT,$0
14 MRC 15, 0, R0, C13, C0, 3 // fetch TLS base pointer
15 MOVW runtime·tlsg(SB), R11
16 ADD R11, R0
17 MOVW g, 0(R0)
minux 2014/07/02 04:21:14 MOVW g, R11<<0(R0) instead of ADD and MOVW. same b
crawshaw 2014/07/02 14:57:22 Done.
18 RET
19
20 TEXT runtime·load_g(SB),NOSPLIT,$0
21 MRC 15, 0, R0, C13, C0, 3 // fetch TLS base pointer
22 MOVW runtime·tlsg(SB), R11
23 ADD R11, R0
24 MOVW 0(R0), g
25 RET
OLDNEW

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b