-
Notifications
You must be signed in to change notification settings - Fork 4.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NativeAOT/Windows/Arm64: Add TLS inline support #104282
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
JIT side LGTM with some nits.
src/coreclr/tools/Common/Compiler/DependencyAnalysis/Relocation.cs
Outdated
Show resolved
Hide resolved
@@ -3909,6 +3909,8 @@ private static RelocType GetRelocType(TargetArchitecture targetArchitecture, ush | |||
const ushort IMAGE_REL_ARM64_BRANCH26 = 3; | |||
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does not need to be addressed in this change since the inconsistency is already there.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah, probably will not include in this PR.
…n.cs Co-authored-by: Jan Kotas <jkotas@microsoft.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!! Thanks!!
The relocation for TLS variable is done by emitting a pair of
add
instructions in the following format:The relocations are recorded as follows:
The final disassembly looks like:
Contributes to #79521