-
Notifications
You must be signed in to change notification settings - Fork 14.3k
[feature][riscv] handle target address calculation in llvm-objdump disassembly for riscv #144620
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Open
arjunUpatel
wants to merge
14
commits into
llvm:main
Choose a base branch
from
arjunUpatel:riscv-address-resolution
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+280
−34
Open
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
52ebb65
Remove changes affecting non-RISCV targets
arjunUpatel 49f276e
Update test output to match previous functionality
arjunUpatel 5e1cf12
Add support for zclsd and zilsd extensions + tests
arjunUpatel 11c50dc
Pass subtargetinfo as function argument
arjunUpatel 2241583
Run clang format
arjunUpatel 7635b70
Remove precanned binaries from tests and invoke clang during tests
arjunUpatel 9dff558
Fix typo
arjunUpatel b738bf1
Enable address resolution for load/store instructions relative to zer…
arjunUpatel 9361828
Edit comments to follow LLVM coding style
arjunUpatel e942f63
Use llvm-mc over clang for compilation in tests
arjunUpatel 86d6bd5
Update comments
arjunUpatel 1e1a37c
Differentiate comments in tests from llvm-lit directives
arjunUpatel b2a8928
Merge evaluateInstruction into evaluateBranch
arjunUpatel 6034372
Run clang format
arjunUpatel 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
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
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
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,2 @@ | ||
if "RISCV" not in config.targets_to_build: | ||
config.unsupported = True |
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,32 @@ | ||
# RUN: llvm-mc -riscv-add-build-attributes -triple=riscv32 -filetype=obj -mattr=+zclsd,+zilsd %s -o %t | ||
# RUN: llvm-objdump -d %t | FileCheck %s | ||
|
||
# CHECK: 00000000 <_start>: | ||
# CHECK-NEXT 0: 00000517 auipc a0, 0x0 | ||
# CHECK-NEXT 4: 0559 addi a0, a0, 0x16 <target> | ||
# CHECK-NEXT 6: 00000517 auipc a0, 0x0 | ||
# CHECK-NEXT a: 6910 ld a2, 0x10(a0) <target> | ||
# CHECK-NEXT c: 00000517 auipc a0, 0x0 | ||
# CHECK-NEXT 10: 00c53523 sd a2, 0xa(a0) <target> | ||
# CHECK-NEXT 14: 0000 unimp | ||
|
||
## The structure of this test file is similar to that of riscv64-ar-coverage | ||
## with the major difference being that these tests are focused on instructions | ||
## for 32 bit architecture. | ||
|
||
.global _start | ||
.text | ||
_start: | ||
auipc a0, 0x0 | ||
addi a0, a0, 0x16 ## addi -- behavior changes with different architectures. | ||
|
||
## Test Zclsd and Zilsd instructions respectively | ||
auipc a0, 0x0 | ||
c.ld a2, 0x10(a0) | ||
|
||
auipc a0, 0x0 | ||
sd a2, 0xa(a0) | ||
|
||
.skip 0x2 | ||
target: | ||
ret: |
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.
What does "ar-coverage" mean in these test file names?
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.