-
Notifications
You must be signed in to change notification settings - Fork 14.3k
[XCOFF] Use RLDs to print branches even without -r #74342
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
14 commits
Select commit
Hold shift + click to select a range
4d255c7
[XCOFF] Use RLDs to print branches even without -r
stephenpeckham 0a61e37
Fix formatting
stephenpeckham 1c78f36
Formattting
stephenpeckham da8a060
Update tests and fix failures.
stephenpeckham 99f657d
Fix formatting
stephenpeckham 9943b60
Formatting
stephenpeckham 940dde9
Fix typo in test case
stephenpeckham 781d2b3
Updated based on review comments
stephenpeckham f73a29f
Fix formatting
stephenpeckham a489e45
Add -r to llvm-objdump invocation
stephenpeckham c21ef76
Handle fixed-up relocations
stephenpeckham f7fe35f
Formatting
stephenpeckham 56fff34
Merge branch 'main' into peckham/useRel
stephenpeckham a28bd2b
Fix merge error
stephenpeckham 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -456,7 +456,7 @@ declare i32 @bar(i32) | |
; SYM-NEXT: ] | ||
|
||
|
||
; DIS: {{.*}}aix-xcoff-reloc.ll.tmp.o: file format aixcoff-rs6000 | ||
; DIS: : file format aixcoff-rs6000 | ||
; DIS: Disassembly of section .text: | ||
; DIS: 00000000 <.foo>: | ||
; DIS-NEXT: 0: 7c 08 02 a6 mflr 0 | ||
|
@@ -495,7 +495,7 @@ declare i32 @bar(i32) | |
; DIS: 00000084 <globalB>: | ||
; DIS-NEXT: 84: 00 00 00 44 <unknown> | ||
|
||
; DIS_REL: {{.*}}aix-xcoff-reloc.ll.tmp.o: file format aixcoff-rs6000 | ||
; DIS_REL: : file format aixcoff-rs6000 | ||
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. ditto |
||
; DIS_REL: RELOCATION RECORDS FOR [.text]: | ||
; DIS_REL-NEXT: OFFSET TYPE VALUE | ||
; DIS_REL-NEXT: 00000010 R_RBR .bar | ||
|
@@ -515,7 +515,7 @@ declare i32 @bar(i32) | |
; DIS64-NEXT: 4: f8 21 ff 91 stdu 1, -112(1) | ||
; DIS64-NEXT: 8: 38 60 00 01 li 3, 1 | ||
; DIS64-NEXT: c: f8 01 00 80 std 0, 128(1) | ||
; DIS64-NEXT: 10: 4b ff ff f1 bl 0x0 <.foo> | ||
; DIS64-NEXT: 10: 4b ff ff f1 bl 0x0 <.bar> | ||
; DIS64-NEXT: 14: 60 00 00 00 nop | ||
; DIS64-NEXT: 18: e8 82 00 00 ld 4, 0(2) | ||
; DIS64-NEXT: 1c: e8 a2 00 08 ld 5, 8(2) | ||
|
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
65 changes: 65 additions & 0 deletions
65
llvm/test/tools/llvm-objdump/XCOFF/disassemble-symbolize-operands2.ll
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,65 @@ | ||
; RUN: llc -mtriple=powerpc-ibm-aix-xcoff %s -filetype=obj -o %t | ||
; RUN: llvm-objdump %t -r -d --symbolize-operands --no-show-raw-insn \ | ||
; RUN: | FileCheck %s | ||
|
||
; CHECK-LABEL: <.a>: | ||
;; No <L0> should appear | ||
; CHECK-NEXT: 0: mflr 0 | ||
; CHECK-NEXT: 4: stwu 1, -64(1) | ||
; CHECK-NEXT: 8: lwz 3, 0(2) | ||
; CHECK-NEXT:0000000a: R_TOC var | ||
; CHECK-NEXT: c: stw 0, 72(1) | ||
; CHECK-NEXT: 10: lwz 3, 0(3) | ||
; CHECK-NEXT: 14: bl 0x4c <.b> | ||
; CHECK-NEXT: 18: nop | ||
; CHECK-NEXT: 1c: li 3, 1 | ||
; CHECK-NEXT: 20: bl 0x0 <.c> | ||
; CHECK-NEXT:00000020: R_RBR .c | ||
|
||
; CHECK-LABEL: <.b>: | ||
; CHECK-NEXT: 4c: mflr 0 | ||
; CHECK-NEXT: 50: stwu 1, -64(1) | ||
; CHECK-NEXT: 54: cmplwi 3, 1 | ||
; CHECK-NEXT: 58: stw 0, 72(1) | ||
; CHECK-NEXT: 5c: stw 3, 60(1) | ||
; CHECK-NEXT: 60: bf 2, 0x6c <L0> | ||
; CHECK-NEXT: 64: bl 0x0 <.a> | ||
; CHECK-NEXT: 68: nop | ||
; CHECK-NEXT:<L0>: | ||
; CHECK-NEXT: 6c: li 3, 2 | ||
; CHECK-NEXT: 70: bl 0x0 <.c> | ||
; CHECK-NEXT:00000070: R_RBR .c | ||
|
||
target triple = "powerpc-ibm-aix7.2.0.0" | ||
|
||
@var = external global i32, align 4 | ||
|
||
; Function Attrs: noinline nounwind optnone | ||
define i32 @a() { | ||
entry: | ||
%0 = load i32, ptr @var, align 4 | ||
%call = call i32 @b(i32 noundef %0) | ||
%call1 = call i32 @c(i32 noundef 1) | ||
ret i32 %call1 | ||
} | ||
|
||
; Function Attrs: noinline nounwind optnone | ||
define i32 @b(i32 noundef %x) { | ||
entry: | ||
%x.addr = alloca i32, align 4 | ||
store i32 %x, ptr %x.addr, align 4 | ||
%0 = load i32, ptr %x.addr, align 4 | ||
%cmp = icmp eq i32 %0, 1 | ||
br i1 %cmp, label %if.then, label %if.end | ||
|
||
if.then: ; preds = %entry | ||
%call = call i32 @a() | ||
br label %if.end | ||
|
||
if.end: ; preds = %if.then, %entry | ||
%call1 = call i32 @c(i32 noundef 2) | ||
ret i32 %call1 | ||
} | ||
|
||
declare i32 @c(i32 noundef) | ||
|
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
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.
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.
change content of the line checking on purpose?
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.
When the temporary object file name is encoded in the FileCheck patterns, you're prevented from running commands by hand during development. For example, I frequently create an object file first, then run
llvm-objdump ... | FileCheck ...
to see if the test passes.
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.
you can change to DIS: {{.*}} : file format aixcoff-rs6000.