[llvm] 4a7e00d - [AIX][XCOFF] created a test case to verify the raw text section of xcoffobject file

via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 6 07:13:48 PST 2019


Author: diggerlin
Date: 2019-12-06T10:12:09-05:00
New Revision: 4a7e00df346561131a07db350643ec54113129a1

URL: https://github.com/llvm/llvm-project/commit/4a7e00df346561131a07db350643ec54113129a1
DIFF: https://github.com/llvm/llvm-project/commit/4a7e00df346561131a07db350643ec54113129a1.diff

LOG: [AIX][XCOFF] created a test case to verify the raw text section of xcoffobject file

SUMMARY:
in the patch https://reviews.llvm.org/D66969 . we need a test case to verify the out text section of the xcoffobject file is correct or not.

but we do not have llvm disassembly tools to dump the xcoffobjectfile . since we commit the patch https://reviews.llvm.org/D70255, we have tools for it. we create this test case for it.

Reviewers: daltenty,hubert.reinterpretcast,

Differential Revision: https://reviews.llvm.org/D70719

Added: 
    llvm/test/CodeGen/PowerPC/aix-xcoff-textdisassembly.ll

Modified: 
    

Removed: 
    


################################################################################
diff  --git a/llvm/test/CodeGen/PowerPC/aix-xcoff-textdisassembly.ll b/llvm/test/CodeGen/PowerPC/aix-xcoff-textdisassembly.ll
new file mode 100644
index 000000000000..d80a59ebd532
--- /dev/null
+++ b/llvm/test/CodeGen/PowerPC/aix-xcoff-textdisassembly.ll
@@ -0,0 +1,22 @@
+; RUN: llc -verify-machineinstrs -mcpu=pwr9 -mtriple powerpc-ibm-aix-xcoff -filetype=obj -o %t.o  < %s
+; RUN: llvm-objdump -D %t.o | FileCheck --check-prefix=CHECK %s
+
+define i32 @foo() #0 {
+entry:
+  ret i32 0
+}
+
+define i32 @foo1() #0 {
+entry:
+  ret i32 1
+}
+
+; CHECK:     Disassembly of section .text:{{[[:space:]] *}}
+; CHECK-NEXT:     00000000 .text:
+; CHECK-NEXT:        0: 38 60 00 00                   li 3, 0
+; CHECK-NEXT:        4: 4e 80 00 20                   blr
+; CHECK-NEXT:        8: 60 00 00 00                   nop
+; CHECK-NEXT:        c: 60 00 00 00                   nop
+; CHECK:     00000010 .foo1:
+; CHECK-NEXT:       10: 38 60 00 01                   li 3, 1
+; CHECK-NEXT:       14: 4e 80 00 20                   blr


        


More information about the llvm-commits mailing list