Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ The .NET Foundation licenses this file to you under the MIT license.

<CrossCompileRid />
<CrossCompileRid Condition="!$(RuntimeIdentifier.EndsWith('-$(_hostArchitecture)'))">$(RuntimeIdentifier)</CrossCompileRid>
<CrossCompileRid Condition="'$(CrossCompileRid)' == '' and '$(_linuxLibcFlavor)' == 'bionic'">$(RuntimeIdentifier)</CrossCompileRid>

<CrossCompileArch />
<CrossCompileArch Condition="$(CrossCompileRid.EndsWith('-x64'))">x86_64</CrossCompileArch>
Expand Down
6 changes: 6 additions & 0 deletions src/coreclr/nativeaot/Runtime/amd64/InteropThunksHelpers.S
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,11 @@ LEAF_ENTRY RhCommonStub, _TEXT
alloc_stack SIZEOF_FP_REGS
SAVE_FLOAT_ARGUMENT_REGISTERS 0

#ifdef FEATURE_EMULATED_TLS
call C_FUNC(RhpGetThunkData)
#else
INLINE_GET_TLS_VAR tls_thunkData
#endif

RESTORE_FLOAT_ARGUMENT_REGISTERS 0
free_stack SIZEOF_FP_REGS
Expand All @@ -36,10 +40,12 @@ LEAF_ENTRY RhGetCommonStubAddress, _TEXT
LEAF_END RhGetCommonStubAddress, _TEXT


#ifndef FEATURE_EMULATED_TLS
LEAF_ENTRY RhGetCurrentThunkContext, _TEXT

INLINE_GET_TLS_VAR tls_thunkData

mov rax, qword ptr [rax]
ret
LEAF_END RhGetCurrentThunkContext, _TEXT
#endif //FEATURE_EMULATED_TLS
4 changes: 4 additions & 0 deletions src/coreclr/nativeaot/Runtime/unix/unixasmmacrosamd64.inc
Original file line number Diff line number Diff line change
Expand Up @@ -300,8 +300,12 @@ C_FUNC(\Name):


.macro INLINE_GETTHREAD
#ifdef FEATURE_EMULATED_TLS
call C_FUNC(RhpGetThread)
#else
// Inlined version of call C_FUNC(RhpGetThread)
INLINE_GET_TLS_VAR tls_CurrentThread
#endif
.endm

.macro INLINE_THREAD_UNHIJACK threadReg, trashReg1, trashReg2
Expand Down