1; DISABLE: llc -filetype=obj -mtriple mips-unknown-linux %s -o - | llvm-readobj -h -S --sd | FileCheck %s 2; RUN: false 3; XFAIL: * 4 5; Check that this is big endian. 6; CHECK: ElfHeader { 7; CHECK: Ident { 8; CHECK: DataEncoding: BigEndian 9; CHECK: } 10; CHECK: } 11 12; Make sure that a section table (text) entry is correct. 13; CHECK: Sections [ 14; CHECK: Section { 15; CHECK: Index: 16; CHECK: Name: .text 17; CHECK-NEXT: Type: SHT_PROGBITS 18; CHECK-NEXT: Flags [ (0x6) 19; CHECK-NEXT: SHF_ALLOC 20; CHECK-NEXT: SHF_EXECINSTR 21; CHECK-NEXT: ] 22; CHECK-NEXT: Address: 0x{{[0-9,A-F]+}} 23; CHECK-NEXT: Offset: 0x{{[0-9,A-F]+}} 24; CHECK-NEXT: Size: {{[0-9]+}} 25; CHECK-NEXT: Link: 0 26; CHECK-NEXT: Info: 0 27; CHECK-NEXT: AddressAlignment: 4 28; CHECK-NEXT: EntrySize: 0 29 30; See that at least first 3 instructions are correct: GP prologue 31; CHECK-NEXT: SectionData ( 32; CHECK-NEXT: 0000: 3C1C0000 279C0000 0399E021 {{[0-9,A-F, ]*}} 33; CHECK: ) 34; CHECK: } 35 36; ModuleID = '../br1.c' 37target datalayout = "E-p:32:32:32-i1:8:8-i8:8:32-i16:16:32-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-n32" 38target triple = "mips-unknown-linux" 39 40@x = global i32 1, align 4 41@str = private unnamed_addr constant [4 x i8] c"goo\00" 42@str2 = private unnamed_addr constant [4 x i8] c"foo\00" 43 44define i32 @main() nounwind { 45entry: 46 %0 = load i32, i32* @x, align 4 47 %tobool = icmp eq i32 %0, 0 48 br i1 %tobool, label %if.end, label %foo 49 50if.end: ; preds = %entry 51 %puts = tail call i32 @puts(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @str, i32 0, i32 0)) 52 br label %foo 53 54foo: ; preds = %entry, %if.end 55 %puts2 = tail call i32 @puts(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @str2, i32 0, i32 0)) 56 ret i32 0 57} 58 59declare i32 @puts(i8* nocapture) nounwind 60 61