35 lines · plain
1; REQUIRES: aarch642;; Test we can infer the e_machine value EM_AARCH64 from a bitcode file.3 4; RUN: split-file %s %t5; RUN: llvm-as %t/le.s -o %t/le.o6; RUN: ld.lld %t/le.o -o %t/le7; RUN: llvm-readobj -h %t/le | FileCheck %s --check-prefixes=CHECK,LE8 9; RUN: llvm-as %t/be.s -o %t/be.o10; RUN: ld.lld %t/be.o -o %t/be11; RUN: llvm-readobj -h %t/be | FileCheck %s --check-prefixes=CHECK,BE12 13; CHECK: Class: 64-bit14; LE: DataEncoding: LittleEndian15; BE: DataEncoding: BigEndian16; CHECK: Machine: EM_AARCH6417 18;--- le.s19target datalayout = "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128"20target triple = "aarch64-unknown-linux-gnu"21 22define void @_start() {23entry:24 ret void25}26 27;--- be.s28target datalayout = "E-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128"29target triple = "aarch64_be-unknown-linux-gnu"30 31define void @_start() {32entry:33 ret void34}35