33 lines · plain
1; REQUIRES: riscv2;; Test we can infer the e_machine value EM_RISCV from a bitcode file.3 4; RUN: split-file %s %t5; RUN: llvm-as %t/32.ll -o %t/32.o6; RUN: ld.lld %t/32.o -o %t/327; RUN: llvm-readobj -h %t/32 | FileCheck %s --check-prefixes=CHECK,RV328 9; RUN: llvm-as %t/64.ll -o %t/64.o10; RUN: ld.lld %t/64.o -o %t/6411; RUN: llvm-readobj -h %t/64 | FileCheck %s --check-prefixes=CHECK,RV6412 13; RV32: Class: 32-bit14; RV64: Class: 64-bit15; CHECK: DataEncoding: LittleEndian16; CHECK: Machine: EM_RISCV17 18;--- 32.ll19target datalayout = "e-m:e-p:32:32-i64:64-n32-S128"20target triple = "riscv32-unknown-elf"21 22define void @_start() {23 ret void24}25 26;--- 64.ll27target datalayout = "e-m:e-p:64:64-i64:64-i128:128-n64-S128"28target triple = "riscv64-unknown-elf"29 30define void @_start() {31 ret void32}33