Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/corert.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPetr Bred <bredpetr@gmail.com>2017-07-03 19:24:13 +0300
committerJan Kotas <jkotas@microsoft.com>2017-07-03 19:24:13 +0300
commit8345e61491258854d4b1e7424db013b448436c51 (patch)
treeb0b35222565153e6191ffd79283c6596fd7d3c02 /src/Native/Runtime/unix
parenta8531bb64e6634a4b645ee0ca60b30a93067d293 (diff)
Fix RhpPInvoke asm helper for arm (#4021)
- correct access to tls global variable in arm thumb Signed-off-by: Petr Bred <bredpetr@gmail.com>
Diffstat (limited to 'src/Native/Runtime/unix')
-rw-r--r--src/Native/Runtime/unix/unixasmmacrosarm.inc15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/Native/Runtime/unix/unixasmmacrosarm.inc b/src/Native/Runtime/unix/unixasmmacrosarm.inc
index 01b20bc2f..32e269c9e 100644
--- a/src/Native/Runtime/unix/unixasmmacrosarm.inc
+++ b/src/Native/Runtime/unix/unixasmmacrosarm.inc
@@ -170,3 +170,18 @@ C_FUNC(\Name):
bl C_FUNC(NYI_Assert)
.endm
#endif
+
+// thumb with PIC version
+.macro INLINE_GET_TLS_VAR Var
+ ldr r0, 2f
+1:
+ add r0, pc, r0
+ bl __tls_get_addr(PLT)
+2:
+ .4byte \Var(TLSGD) + (. - 1b - 4)
+.endm
+
+.macro INLINE_GETTHREAD
+ // Inlined version of call C_FUNC(RhpGetThread)
+ INLINE_GET_TLS_VAR tls_CurrentThread
+.endm