84 lines · plain
1; This tests ELF EFLAGS setting with direct object.2; When the assembler is ready a .s file for it will3; be created.4 5; Non-shared (static) is the absence of pic and or cpic.6 7; EF_MIPS_NOREORDER (0x00000001) is always on by default currently8; EF_MIPS_PIC (0x00000002)9; EF_MIPS_CPIC (0x00000004) - See note below10; EF_MIPS_ABI2 (0x00000020) - n32 not tested yet11; EF_MIPS_ARCH_32 (0x50000000)12; EF_MIPS_ARCH_64 (0x60000000)13; EF_MIPS_ARCH_32R2 (0x70000000)14; EF_MIPS_ARCH_64R2 (0x80000000)15 16; Note that EF_MIPS_CPIC is set by -mabicalls which is the default on Linux17 18; RUN: llc -mtriple mipsel-unknown-linux -mcpu=mips32 -relocation-model=static %s -o - | FileCheck -check-prefix=CHECK-LE32 %s19; RUN: llc -mtriple mipsel-unknown-linux -mcpu=mips32 %s -o - | FileCheck -check-prefix=CHECK-LE32_PIC %s20; RUN: llc -mtriple mipsel-unknown-linux -mcpu=mips32r2 -relocation-model=static %s -o - | FileCheck -check-prefix=CHECK-LE32R2 %s21; RUN: llc -mtriple mipsel-unknown-linux -mcpu=mips32r2 %s -o - | FileCheck -check-prefix=CHECK-LE32R2_PIC %s22; RUN: llc -mtriple mipsel-unknown-linux -mcpu=mips32r2 -mattr=+micromips -relocation-model=static %s -o - | FileCheck -check-prefix=CHECK-LE32R2-MICROMIPS %s23; RUN: llc -mtriple mipsel-unknown-linux -mcpu=mips32r2 -mattr=+micromips %s -o - | FileCheck -check-prefix=CHECK-LE32R2-MICROMIPS_PIC %s24 25; RUN: llc -mtriple mipsel-unknown-linux -mcpu=mips4 -target-abi n64 -relocation-model=static %s -o - | FileCheck -check-prefix=CHECK-LE64 %s26; RUN: llc -mtriple mipsel-unknown-linux -mcpu=mips4 -target-abi n64 -relocation-model=pic %s -o - | FileCheck -check-prefix=CHECK-LE64_PIC %s27 28; RUN: llc -mtriple mipsel-unknown-linux -mcpu=mips64 -target-abi n64 -relocation-model=static %s -o - | FileCheck -check-prefix=CHECK-LE64 %s29; RUN: llc -mtriple mipsel-unknown-linux -mcpu=mips64 -target-abi n64 -relocation-model=pic %s -o - | FileCheck -check-prefix=CHECK-LE64_PIC %s30; RUN: llc -mtriple mipsel-unknown-linux -mcpu=mips64r2 -target-abi n64 -relocation-model=static %s -o - | FileCheck -check-prefix=CHECK-LE64R2 %s31; RUN: llc -mtriple mipsel-unknown-linux -mcpu=mips64r2 -target-abi n64 -relocation-model=pic %s -o - | FileCheck -check-prefix=CHECK-LE64R2_PIC %s32 33; RUN: llc -mtriple mipsel-unknown-linux -mcpu=mips32r2 -mattr=+mips16 -relocation-model=pic %s -o - | FileCheck -check-prefix=CHECK-LE32R2-MIPS16 %s34 35; 32(R1) bit with NO_REORDER and static36; CHECK-LE32: .abicalls37; CHECK-LE32: .option pic038; CHECK-LE32: .set noreorder39;40; 32(R1) bit with NO_REORDER and PIC41; CHECK-LE32_PIC: .abicalls42; CHECK-LE32_PIC: .set noreorder43;44; 32R2 bit with NO_REORDER and static45; CHECK-LE32R2: .abicalls46; CHECK-LE32R2: .option pic047; CHECK-LE32R2: .set noreorder48;49; 32R2 bit with NO_REORDER and PIC50; CHECK-LE32R2_PIC: .abicalls51; CHECK-LE32R2_PIC: .set noreorder52;53; 32R2 bit MICROMIPS with NO_REORDER and static54; CHECK-LE32R2-MICROMIPS: .abicalls55; CHECK-LE32R2-MICROMIPS: .option pic056; CHECK-LE32R2-MICROMIPS: .set micromips57;58; 32R2 bit MICROMIPS with NO_REORDER and PIC59; CHECK-LE32R2-MICROMIPS_PIC: .abicalls60; CHECK-LE32R2-MICROMIPS_PIC: .set micromips61;62; 64(R1) bit with NO_REORDER and static63; CHECK-LE64: .set noreorder64;65; 64(R1) bit with NO_REORDER and PIC66; CHECK-LE64_PIC: .abicalls67; CHECK-LE64_PIC: .set noreorder68;69; 64R2 bit with NO_REORDER and static70; CHECK-LE64R2: .set noreorder71;72; 64R2 bit with NO_REORDER and PIC73; CHECK-LE64R2_PIC: .abicalls74; CHECK-LE64R2_PIC: .set noreorder75;76; 32R2 bit MIPS16 with PIC77; CHECK-LE32R2-MIPS16: .abicalls78; CHECK-LE32R2-MIPS16: .set mips1679 80define i32 @main() nounwind {81entry:82 ret i32 083}84