1 ; DISABLE: llc -filetype=obj -mtriple mips-unknown-linux %s -o - | llvm-readobj -h -S --sd | FileCheck %s
5 ; Check that this is big endian.
8 ; CHECK: DataEncoding: BigEndian
12 ; Make sure that a section table (text) entry is correct.
17 ; CHECK-NEXT: Type: SHT_PROGBITS
18 ; CHECK-NEXT: Flags [ (0x6)
19 ; CHECK-NEXT: SHF_ALLOC
20 ; CHECK-NEXT: SHF_EXECINSTR
22 ; CHECK-NEXT: Address: 0x{{[0-9,A-F]+}}
23 ; CHECK-NEXT: Offset: 0x{{[0-9,A-F]+}}
24 ; CHECK-NEXT: Size: {{[0-9]+}}
27 ; CHECK-NEXT: AddressAlignment: 4
28 ; CHECK-NEXT: EntrySize: 0
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, ]*}}
36 ; ModuleID = '../br1.c'
37 target 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"
38 target triple = "mips-unknown-linux"
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"
44 define i32 @main() nounwind {
46 %0 = load i32, i32* @x, align 4
47 %tobool = icmp eq i32 %0, 0
48 br i1 %tobool, label %if.end, label %foo
50 if.end: ; preds = %entry
51 %puts = tail call i32 @puts(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @str, i32 0, i32 0))
54 foo: ; preds = %entry, %if.end
55 %puts2 = tail call i32 @puts(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @str2, i32 0, i32 0))
59 declare i32 @puts(i8* nocapture) nounwind