-
Notifications
You must be signed in to change notification settings - Fork 14.7k
[DirectX][objdump] Add support for printing signatures #152531
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
llvm-beanz
merged 4 commits into
llvm:main
from
llvm-beanz:cbieneman/objdump-signatures
Aug 12, 2025
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
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
167 changes: 167 additions & 0 deletions
167
llvm/test/tools/llvm-objdump/DXContainer/input-output-signatures.yaml
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,167 @@ | ||
# RUN: yaml2obj %s -o %t | ||
# RUN: llvm-objdump -p %t | FileCheck %s --match-full-lines --strict-whitespace | ||
|
||
# This test covers llvm-objdump printing private headers for the ISG1, OSG1, and | ||
# PSG1 "parts" of the DX container file format. The test uses a few absurdly | ||
# large values and long string names to ensure that the columns in the printed | ||
# table widen correctly. | ||
|
||
--- !dxcontainer | ||
Header: | ||
Hash: [ 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, | ||
0x0, 0x0, 0x0, 0x0, 0x0, 0x0 ] | ||
Version: | ||
Major: 1 | ||
Minor: 0 | ||
FileSize: 630 | ||
PartCount: 3 | ||
PartOffsets: [ 64, 124, 184 ] | ||
Parts: | ||
- Name: ISG1 | ||
Size: 52 | ||
Signature: | ||
Parameters: | ||
- Stream: 0 | ||
Name: AAA_HSFoo | ||
Index: 4391238 # This value forces the index column to widen | ||
SystemValue: Undefined | ||
CompType: Float32 | ||
Register: 0 | ||
Mask: 7 | ||
ExclusiveMask: 2 | ||
MinPrecision: Default | ||
- Name: OSG1 | ||
Size: 52 | ||
Signature: | ||
Parameters: | ||
- Stream: 0 | ||
Name: SV_Position | ||
Index: 0 | ||
SystemValue: Position | ||
CompType: Float32 | ||
Register: 2147483647 # This value forces the register column to widen | ||
Mask: 15 | ||
ExclusiveMask: 0 | ||
MinPrecision: Default | ||
- Name: PSG1 | ||
Size: 402 | ||
Signature: | ||
Parameters: | ||
- Stream: 0 | ||
Name: SV_TessFactor | ||
Index: 0 | ||
SystemValue: FinalQuadEdgeTessfactor # The tessfactor forces the SysVal column to widen | ||
CompType: Float32 | ||
Register: 0 | ||
Mask: 8 | ||
ExclusiveMask: 8 | ||
MinPrecision: Default | ||
- Stream: 0 | ||
Name: BBB | ||
Index: 0 | ||
SystemValue: Undefined | ||
CompType: Float32 | ||
Register: 0 | ||
Mask: 7 | ||
ExclusiveMask: 0 | ||
MinPrecision: Default | ||
- Stream: 0 | ||
Name: SV_TessFactor | ||
Index: 1 | ||
SystemValue: FinalQuadEdgeTessfactor | ||
CompType: Float32 | ||
Register: 1 | ||
Mask: 8 | ||
ExclusiveMask: 8 | ||
MinPrecision: Default | ||
- Stream: 0 | ||
Name: BBB | ||
Index: 1 | ||
SystemValue: Undefined | ||
CompType: Float32 | ||
Register: 1 | ||
Mask: 7 | ||
ExclusiveMask: 0 | ||
MinPrecision: Default | ||
- Stream: 0 | ||
Name: SV_TessFactor | ||
Index: 2 | ||
SystemValue: FinalQuadEdgeTessfactor | ||
CompType: Float32 | ||
Register: 2 | ||
Mask: 8 | ||
ExclusiveMask: 8 | ||
MinPrecision: Default | ||
- Stream: 0 | ||
Name: BBB | ||
Index: 2 | ||
SystemValue: Undefined | ||
CompType: Float32 | ||
Register: 2 | ||
Mask: 7 | ||
ExclusiveMask: 0 | ||
MinPrecision: Default | ||
- Stream: 0 | ||
Name: SV_TessFactor | ||
Index: 3 | ||
SystemValue: FinalQuadEdgeTessfactor | ||
CompType: Float32 | ||
Register: 3 | ||
Mask: 8 | ||
ExclusiveMask: 8 | ||
MinPrecision: Default | ||
- Stream: 0 | ||
Name: SV_InsideTessFactor | ||
Index: 0 | ||
SystemValue: FinalQuadInsideTessfactor | ||
CompType: Float32 | ||
Register: 4 | ||
Mask: 8 | ||
ExclusiveMask: 0 | ||
MinPrecision: Default | ||
- Stream: 0 | ||
Name: SV_InsideTessFactor | ||
Index: 1 | ||
SystemValue: FinalQuadInsideTessfactor | ||
CompType: Float32 | ||
Register: 5 | ||
Mask: 8 | ||
ExclusiveMask: 0 | ||
MinPrecision: Default | ||
- Stream: 0 | ||
Name: AVeryLongStringThatWillForceWidening # This value forces name column to widen | ||
Index: 0 | ||
SystemValue: Undefined | ||
CompType: Float32 | ||
Register: 6 | ||
Mask: 15 | ||
ExclusiveMask: 4 | ||
MinPrecision: Default | ||
... | ||
|
||
# CHECK: ; Input signature: | ||
# CHECK-NEXT: ; | ||
# CHECK-NEXT: ; Name Index Mask Register SysValue Format Used | ||
# CHECK-NEXT: ; ------------------------ ------- ----- -------- ---------- ------- ----- | ||
# CHECK-NEXT: ; AAA_HSFoo 4391238 xyz 0 Undefined Float32 y | ||
|
||
# CHECK: ; Output signature: | ||
# CHECK-NEXT: ; | ||
# CHECK-NEXT: ; Name Index Mask Register SysValue Format Used | ||
# CHECK-NEXT: ; ------------------------ ----- ----- ---------- ---------- ------- ----- | ||
# CHECK-NEXT: ; SV_Position 0 xyzw 2147483647 Position Float32 | ||
|
||
# CHECK: ; Patch Constant signature: | ||
# CHECK-NEXT: ; | ||
# CHECK-NEXT: ; Name Index Mask Register SysValue Format Used | ||
# CHECK-NEXT: ; ------------------------------------ ----- ----- -------- ------------------------- ------- ----- | ||
# CHECK-NEXT: ; SV_TessFactor 0 w 0 FinalQuadEdgeTessfactor Float32 w | ||
# CHECK-NEXT: ; BBB 0 xyz 0 Undefined Float32 | ||
# CHECK-NEXT: ; SV_TessFactor 1 w 1 FinalQuadEdgeTessfactor Float32 w | ||
# CHECK-NEXT: ; BBB 1 xyz 1 Undefined Float32 | ||
# CHECK-NEXT: ; SV_TessFactor 2 w 2 FinalQuadEdgeTessfactor Float32 w | ||
# CHECK-NEXT: ; BBB 2 xyz 2 Undefined Float32 | ||
# CHECK-NEXT: ; SV_TessFactor 3 w 3 FinalQuadEdgeTessfactor Float32 w | ||
# CHECK-NEXT: ; SV_InsideTessFactor 0 w 4 FinalQuadInsideTessfactor Float32 | ||
# CHECK-NEXT: ; SV_InsideTessFactor 1 w 5 FinalQuadInsideTessfactor Float32 | ||
# CHECK-NEXT: ; AVeryLongStringThatWillForceWidening 0 xyzw 6 Undefined Float32 z |
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
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.
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: sorry, should have said: newer llvm-objdump tests tend to use
##
for comments to help distinguish them from RUN and CHECK lines.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.
Sorry I missed this before merging, will put up a commit to fix this momentarily.
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.
Posted: #153311