summaryrefslogtreecommitdiff
path: root/src/runtime/tls_arm.s
diff options
context:
space:
mode:
Diffstat (limited to 'src/runtime/tls_arm.s')
-rw-r--r--src/runtime/tls_arm.s13
1 files changed, 0 insertions, 13 deletions
diff --git a/src/runtime/tls_arm.s b/src/runtime/tls_arm.s
index 350089abc6..bed7891368 100644
--- a/src/runtime/tls_arm.s
+++ b/src/runtime/tls_arm.s
@@ -33,11 +33,6 @@
// runtime.mcall assumes this function only clobbers R0 and R11.
// Returns with g in R0.
TEXT runtime·save_g(SB),NOSPLIT|NOFRAME,$0
-#ifdef GOOS_nacl
- // nothing to do as nacl/arm does not use TLS at all.
- MOVW g, R0 // preserve R0 across call to setg<>
- RET
-#else
// If the host does not support MRC the linker will replace it with
// a call to runtime.read_tls_fallback which jumps to __kuser_get_tls.
// The replacement function saves LR in R11 over the call to read_tls_fallback.
@@ -48,16 +43,11 @@ TEXT runtime·save_g(SB),NOSPLIT|NOFRAME,$0
MOVW g, 0(R0)
MOVW g, R0 // preserve R0 across call to setg<>
RET
-#endif
// load_g loads the g register from pthread-provided
// thread-local memory, for use after calling externally compiled
// ARM code that overwrote those registers.
TEXT runtime·load_g(SB),NOSPLIT,$0
-#ifdef GOOS_nacl
- // nothing to do as nacl/arm does not use TLS at all.
- RET
-#else
// See save_g
MRC 15, 0, R0, C13, C0, 3 // fetch TLS base pointer
BIC $3, R0 // Darwin/ARM might return unaligned pointer
@@ -65,7 +55,6 @@ TEXT runtime·load_g(SB),NOSPLIT,$0
ADD R11, R0
MOVW 0(R0), g
RET
-#endif
// This is called from rt0_go, which runs on the system stack
// using the initial stack allocated by the OS.
@@ -78,7 +67,6 @@ TEXT runtime·load_g(SB),NOSPLIT,$0
// Declare a dummy word ($4, not $0) to make sure the
// frame is 8 bytes and stays 8-byte-aligned.
TEXT runtime·_initcgo(SB),NOSPLIT,$4
-#ifndef GOOS_nacl
// if there is an _cgo_init, call it.
MOVW _cgo_init(SB), R4
CMP $0, R4
@@ -93,7 +81,6 @@ TEXT runtime·_initcgo(SB),NOSPLIT,$4
MOVW $setg_gcc<>(SB), R1 // arg 1: setg
MOVW g, R0 // arg 0: G
BL (R4) // will clobber R0-R3
-#endif
nocgo:
RET