[PATCH] D71845: [AIX][XCOFF] add test for raw text section content and test section header
Digger via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Feb 20 08:48:27 PST 2020
DiggerLin updated this revision to Diff 245666.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D71845/new/
https://reviews.llvm.org/D71845
Files:
llvm/test/CodeGen/PowerPC/aix-return55.ll
Index: llvm/test/CodeGen/PowerPC/aix-return55.ll
===================================================================
--- llvm/test/CodeGen/PowerPC/aix-return55.ll
+++ llvm/test/CodeGen/PowerPC/aix-return55.ll
@@ -1,5 +1,9 @@
-; RUN: llc -mcpu=pwr9 -mtriple=powerpc-ibm-aix-xcoff -verify-machineinstrs < %s | FileCheck %s
+; RUN: llc -mcpu=pwr4 -mtriple=powerpc-ibm-aix-xcoff -verify-machineinstrs < %s | FileCheck %s
+; RUN: llc -mcpu=pwr4 -mtriple=powerpc-ibm-aix-xcoff -verify-machineinstrs -filetype=obj -o %t.o < %s
+; RUN: llvm-objdump -D %t.o | FileCheck --check-prefix=CHECKOBJ %s
+; RUN: llvm-readobj -sections %t.o | FileCheck --check-prefix=CHECKSECT %s
+ at strA = private unnamed_addr constant [14 x i8] c"hello world!\0A\00", align 1
define dso_local signext i32 @foo() {
entry:
@@ -9,3 +13,45 @@
; CHECK: blr
}
+;CHECKOBJ: 00000000 .text:
+;CHECKOBJ-NEXT: 0: 38 60 00 37 li 3, 55
+;CHECKOBJ-NEXT: 4: 4e 80 00 20 blr{{[[:space:]] *}}
+;CHECKOBJ-NEXT: 00000008 .rodata.str1.1:
+;CHECKOBJ-NEXT: 8: 68 65 6c 6c xori 5, 3, 27756
+;CHECKOBJ-NEXT: c: 6f 20 77 6f xoris 0, 25, 30575
+;CHECKOBJ-NEXT: 10: 72 6c 64 21 andi. 12, 19, 25633
+;CHECKOBJ-NEXT: 14: 0a 00 00 00 tdlti 0, 0{{[[:space:]] *}}
+;CHECKOBJ-NEXT: Disassembly of section .data:{{[[:space:]] *}}
+;CHECKOBJ-NEXT: 00000018 foo:
+;CHECKOBJ-NEXT: 18: 00 00 00 00 <unknown>
+;CHECKOBJ-NEXT: 1c: 00 00 00 24 <unknown>
+;CHECKOBJ-NEXT: 20: 00 00 00 00 <unknown>
+
+;CHECKSECT: Sections [
+;CHECKSECT-NEXT: Section {
+;CHECKSECT-NEXT: Index: 1
+;CHECKSECT-NEXT: Name: .text
+;CHECKSECT-NEXT: PhysicalAddress: 0x0
+;CHECKSECT-NEXT: VirtualAddress: 0x0
+;CHECKSECT-NEXT: Size: 0x18
+;CHECKSECT-NEXT: RawDataOffset: 0x64
+;CHECKSECT-NEXT: RelocationPointer: 0x0
+;CHECKSECT-NEXT: LineNumberPointer: 0x0
+;CHECKSECT-NEXT: NumberOfRelocations: 0
+;CHECKSECT-NEXT: NumberOfLineNumbers: 0
+;CHECKSECT-NEXT: Type: STYP_TEXT (0x20)
+;CHECKSECT-NEXT: }
+;CHECKSECT-NEXT: Section {
+;CHECKSECT-NEXT: Index: 2
+;CHECKSECT-NEXT: Name: .data
+;CHECKSECT-NEXT: PhysicalAddress: 0x18
+;CHECKSECT-NEXT: VirtualAddress: 0x18
+;CHECKSECT-NEXT: Size: 0xC
+;CHECKSECT-NEXT: RawDataOffset: 0x7C
+;CHECKSECT-NEXT: RelocationPointer: 0x88
+;CHECKSECT-NEXT: LineNumberPointer: 0x0
+;CHECKSECT-NEXT: NumberOfRelocations: 2
+;CHECKSECT-NEXT: NumberOfLineNumbers: 0
+;CHECKSECT-NEXT: Type: STYP_DATA (0x40)
+;CHECKSECT-NEXT: }
+;CHECKSECT-NEXT: ]
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D71845.245666.patch
Type: text/x-patch
Size: 2706 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200220/f90ab101/attachment.bin>
More information about the llvm-commits
mailing list