-
Notifications
You must be signed in to change notification settings - Fork 14.3k
[X86] Insert CALLSEQ when lowering GlobalTLSAddress for ELF targets #113706
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
Merged
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
c7acd5a
[X86] Insert CALLSEQ when lowering GlobalTLSAddress for ELF targets
ritter-x2a 1a33a3a
fixup! [X86] Insert CALLSEQ when lowering GlobalTLSAddress for ELF ta…
ritter-x2a 79abe3e
fixup! fixup! [X86] Insert CALLSEQ when lowering GlobalTLSAddress for…
ritter-x2a 879591a
fixup! fixup! fixup! [X86] Insert CALLSEQ when lowering GlobalTLSAddr…
ritter-x2a f4fa95b
fixup! fixup! fixup! fixup! [X86] Insert CALLSEQ when lowering Global…
ritter-x2a File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 5 | ||
; RUN: llc -mtriple=x86_64 -verify-machineinstrs -relocation-model=pic < %s | FileCheck %s | ||
|
||
; Passing a pointer to thread-local storage to a function can be problematic | ||
; since computing such addresses requires a function call that is introduced | ||
; very late in instruction selection. We need to ensure that we don't introduce | ||
; nested call sequence markers if this function call happens in a call sequence. | ||
|
||
@TLS = internal thread_local global i64 zeroinitializer, align 8 | ||
declare void @bar(ptr) | ||
define internal void @foo() { | ||
; CHECK-LABEL: foo: | ||
; CHECK: # %bb.0: | ||
; CHECK-NEXT: pushq %rbx | ||
; CHECK-NEXT: .cfi_def_cfa_offset 16 | ||
; CHECK-NEXT: .cfi_offset %rbx, -16 | ||
; CHECK-NEXT: leaq TLS@TLSLD(%rip), %rdi | ||
; CHECK-NEXT: callq __tls_get_addr@PLT | ||
; CHECK-NEXT: leaq TLS@DTPOFF(%rax), %rbx | ||
; CHECK-NEXT: movq %rbx, %rdi | ||
; CHECK-NEXT: callq bar@PLT | ||
; CHECK-NEXT: movq %rbx, %rdi | ||
; CHECK-NEXT: callq bar@PLT | ||
; CHECK-NEXT: popq %rbx | ||
; CHECK-NEXT: .cfi_def_cfa_offset 8 | ||
; CHECK-NEXT: retq | ||
call void @bar(ptr @TLS) | ||
call void @bar(ptr @TLS) | ||
ret void | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.