2 ;; Test we can infer the e_machine value EM_ARM from a bitcode file.
4 ; RUN: split-file %s %t
6 ; RUN: llvm-as %t/arm.ll -o %t/arm.o
7 ; RUN: ld.lld %t/arm.o -o %t/arm
8 ; RUN: llvm-readobj -h %t/arm | FileCheck %s --check-prefix=ARM
9 ; RUN: llvm-as %t/armeb.ll -o %t/armeb.o
10 ; RUN: ld.lld %t/armeb.o -o %t/armeb
11 ; RUN: llvm-readobj -h %t/armeb | FileCheck %s --check-prefix=ARMEB
13 ; RUN: llvm-as %t/thumb.ll -o %t/thumb.o
14 ; RUN: ld.lld %t/thumb.o -o %t/thumb
15 ; RUN: llvm-readobj -h %t/thumb | FileCheck %s --check-prefix=THUMB
16 ; RUN: llvm-as %t/thumbeb.ll -o %t/thumbeb.o
17 ; RUN: ld.lld %t/thumbeb.o -o %t/thumbeb
18 ; RUN: llvm-readobj -h %t/thumbeb | FileCheck %s --check-prefix=THUMBEB
21 ; ARM: DataEncoding: LittleEndian
22 ; ARM: Machine: EM_ARM (
23 ; ARMEB: Class: 32-bit
24 ; ARMEB: DataEncoding: BigEndian
25 ; ARMEB: Machine: EM_ARM (
27 ; THUMB: Class: 32-bit
28 ; THUMB: DataEncoding: LittleEndian
29 ; THUMB: Machine: EM_ARM (
30 ; THUMBEB: Class: 32-bit
31 ; THUMBEB: DataEncoding: BigEndian
32 ; THUMBEB: Machine: EM_ARM (
35 target datalayout = "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64"
36 target triple = "armv7-linux-musleabi"
38 define void @_start() {
43 target datalayout = "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64"
44 target triple = "thumbv8m.base-none-unknown-gnueabi"
46 define void @_start() {
51 target datalayout = "E-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64"
52 target triple = "armebv7-unknown-linux-musleabi"
54 define void @_start() {
59 target datalayout = "E-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64"
60 target triple = "thumbebv8m.base-none-unknown-gnueabi"
62 define void @_start() {