-
Notifications
You must be signed in to change notification settings - Fork 5.3k
[NativeAOT] Inline TLS access for linux/arm64 #97910
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
Changes from 20 commits
936faff
531ec41
85b3c98
d5d2aa6
ea4b214
db02c45
349167b
da88ed4
70d53bd
3edff40
4c927e2
9daf11e
9830590
259df0b
7de3d03
adf64f5
4e3bad8
92f4eb6
6916004
19de2ae
1bc76ce
2e0a7f4
b7a43f9
8af209f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -368,6 +368,21 @@ int LinearScan::BuildCall(GenTreeCall* call) | |
|
|
||
| if (ctrlExpr != nullptr) | ||
| { | ||
| #ifdef TARGET_ARM64 | ||
| if (compiler->IsTargetAbi(CORINFO_NATIVEAOT_ABI) && TargetOS::IsUnix && (call->gtArgs.CountArgs() == 0) && | ||
| ctrlExpr->IsTlsIconHandle()) | ||
| { | ||
| // For NativeAOT linux/arm64, we generate the needed code as part of | ||
| // call node because the generated code has to be in specific format | ||
| // that linker can patch. As such, the code needs specific registers | ||
| // that we will attach to this node to guarantee that they are available | ||
| // during generating this node. | ||
| assert(call->gtFlags & GTF_TLS_GET_ADDR); | ||
| newRefPosition(REG_R0, currentLoc, RefTypeFixedReg, nullptr, genRegMask(REG_R0)); | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do these have to be R0/R1/R2 for the linker, or is this just a choice you've made to make things simpler? Or is it the case that since the ultimate expansion has a call these choices don't add new constraints?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| newRefPosition(REG_R1, currentLoc, RefTypeFixedReg, nullptr, genRegMask(REG_R1)); | ||
| ctrlExprCandidates = genRegMask(REG_R2); | ||
| } | ||
| #endif | ||
| BuildUse(ctrlExpr, ctrlExprCandidates); | ||
| srcCount++; | ||
| } | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.