NativeAOT/Windows/Arm64: Add TLS inline support#104282
NativeAOT/Windows/Arm64: Add TLS inline support#104282kunalspathak merged 13 commits intodotnet:mainfrom
Conversation
hack to test some fixes almost trhere fix assert Some comments and revert sample Program some renaming Revert changes for IF_DI_1E format IF_DI_2A code: Format emitIns_Add_Add_Tls_Reloc Fixed the code in IF_DI_2A
|
Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch |
|
@dotnet/jit-contrib |
src/coreclr/tools/Common/Compiler/DependencyAnalysis/Relocation.cs
Outdated
Show resolved
Hide resolved
|
I forgot to update the guid. Will do it once i see some superpmi diff runs for JIT arm64, because I changed a code in lowering. |
jakobbotsch
left a comment
There was a problem hiding this comment.
JIT side LGTM with some nits.
src/coreclr/tools/Common/Compiler/DependencyAnalysis/Relocation.cs
Outdated
Show resolved
Hide resolved
| const ushort IMAGE_REL_ARM64_PAGEBASE_REL21 = 4; | ||
| const ushort IMAGE_REL_ARM64_PAGEOFFSET_12A = 6; | ||
| const ushort IMAGE_REL_ARM64_SECREL_HIGH12A = 0xA; | ||
| const ushort IMAGE_REL_ARM64_SECREL_LOW12L = 0xB; |
There was a problem hiding this comment.
Nit: some constants here match values from RelocType and some match the actual platform-specific values (for the ease of disassembling?).
If that is a case, then maybe always use platform-specific values?
I.E. IMAGE_REL_ARM64_TLSDESC_CALL would match R_AARCH64_TLSDESC_CALL, which is 0x239
Or the other way - just use RelocType values for all?
There was a problem hiding this comment.
Does not need to be addressed in this change since the inconsistency is already there.
There was a problem hiding this comment.
yeah, probably will not include in this PR.
…n.cs Co-authored-by: Jan Kotas <jkotas@microsoft.com>
The relocation for TLS variable is done by emitting a pair of
addinstructions in the following format:The relocations are recorded as follows:
The final disassembly looks like:
Contributes to #79521