2 ;; Test we can infer the e_machine value EM_PPC/EM_PPC64 from a bitcode file.
4 ; RUN: split-file %s %t
5 ; RUN: llvm-as %t/32le.ll -o %t/32le.o
6 ; RUN: ld.lld %t/32le.o -o %t/32le
7 ; RUN: llvm-readobj -h %t/32le | FileCheck %s --check-prefix=LE32
9 ; RUN: llvm-as %t/32be.ll -o %t/32be.o
10 ; RUN: ld.lld %t/32be.o -o %t/32be
11 ; RUN: llvm-readobj -h %t/32be | FileCheck %s --check-prefix=BE32
13 ; RUN: llvm-as %t/64.ll -o %t/64.o
14 ; RUN: ld.lld %t/64.o -o %t/64
15 ; RUN: llvm-readobj -h %t/64 | FileCheck %s --check-prefix=LE64
18 ; LE32: DataEncoding: LittleEndian
19 ; LE32: Machine: EM_PPC (
22 ; BE32: DataEncoding: BigEndian
23 ; BE32: Machine: EM_PPC (
26 ; LE64: DataEncoding: LittleEndian
27 ; LE64: Machine: EM_PPC64
30 target datalayout = "e-m:e-p:32:32-Fn32-i64:64-n32"
31 target triple = "powerpcle-pc-freebsd"
33 define void @_start() {
38 target datalayout = "E-m:e-p:32:32-Fn32-i64:64-n32"
39 target triple = "powerpc-unknown-linux-gnu"
41 define void @_start() {
46 target datalayout = "e-m:e-Fn32-i64:64-n32:64-S128-v256:256:256-v512:512:512"
47 target triple = "powerpc64le-unknown-linux-gnu"
49 define void @_start() {