summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen/PowerPC/aix-xcoff-basic.ll
diff options
context:
space:
mode:
authorSean Fertile <sfertile@ca.ibm.com>2019-07-09 19:21:01 +0000
committerSean Fertile <sfertile@ca.ibm.com>2019-07-09 19:21:01 +0000
commitf09d54ed2a75b62960b35258136435d7c8d418e1 (patch)
tree5f727b7c433f9026cf64e6ec03d25e11d306994d /llvm/test/CodeGen/PowerPC/aix-xcoff-basic.ll
parent294f37561ab155e363be0fca5fa43528d8b29d18 (diff)
downloadbcm5719-llvm-f09d54ed2a75b62960b35258136435d7c8d418e1.tar.gz
bcm5719-llvm-f09d54ed2a75b62960b35258136435d7c8d418e1.zip
Boilerplate for producing XCOFF object files from the PowerPC backend.
Stubs out a number of the classes needed to produce a new object file format (XCOFF) for the powerpc-aix target. For testing input is an empty module which produces an object file with just a file header. Differential Revision: https://reviews.llvm.org/D61694 llvm-svn: 365541
Diffstat (limited to 'llvm/test/CodeGen/PowerPC/aix-xcoff-basic.ll')
-rw-r--r--llvm/test/CodeGen/PowerPC/aix-xcoff-basic.ll37
1 files changed, 37 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/PowerPC/aix-xcoff-basic.ll b/llvm/test/CodeGen/PowerPC/aix-xcoff-basic.ll
new file mode 100644
index 00000000000..9d20fd7b113
--- /dev/null
+++ b/llvm/test/CodeGen/PowerPC/aix-xcoff-basic.ll
@@ -0,0 +1,37 @@
+; RUN: llc -mtriple powerpc-ibm-aix-xcoff -filetype=obj -o %t.o < %s
+; RUN: llvm-readobj --file-headers %t.o | FileCheck %s
+
+; RUN: not llc -mtriple powerpc64-ibm-aix-xcoff -filetype=obj < %s 2>&1 | \
+; RUN: FileCheck --check-prefix=64BIT %s
+
+; RUN: llc -mtriple powerpc-ibm-aix-xcoff < %s | \
+; RUN: FileCheck --check-prefix=ASM %s
+
+; RUN: llc -mtriple powerpc64-ibm-aix-xcoff < %s | \
+; RUN: FileCheck --check-prefix=ASM %s
+
+target datalayout = "E-m:e-p:32:32-i64:64-n32"
+target triple = "powerpc-unknown-aix"
+
+; NOTE: The object file output and the assembly file output do not describe the
+; same abstract XCOFF content due to the limited amount of functionality
+; implemented.
+
+; CHECK: Format: aixcoff-rs6000
+; CHECK-NEXT: Arch: powerpc
+; CHECK-NEXT: AddressSize: 32bit
+; CHECK-NEXT: FileHeader {
+; CHECK-NEXT: Magic: 0x1DF
+; CHECK-NEXT: NumberOfSections: 0
+; CHECK-NEXT: TimeStamp: None (0x0)
+; CHECK-NEXT: SymbolTableOffset: 0x0
+; CHECK-NEXT: SymbolTableEntries: 0
+; CHECK-NEXT: OptionalHeaderSize: 0x0
+; CHECK-NEXT: Flags: 0x0
+; CHECK-NEXT: }
+
+; 64BIT: LLVM ERROR: 64-bit XCOFF object files are not supported yet.
+
+; The csect does not need to be present, but LLVM's default behavior when
+; emitting asm is to start the file with the .text section.
+; ASM: .csect .text[PR]
OpenPOWER on IntegriCloud