blob: 1d7a18866c503047666331ddd0f87262f3f2d0bc [file] [log] [blame]
Jack Carterc1b17ed2013-01-18 21:20:38 +00001 ; RUN: llc -filetype=obj -march=mips64el -mcpu=mips64 %s -o - \
2 ; RUN: | elf-dump --dump-section-data | FileCheck --check-prefix=CHECK_64 %s
3 ; RUN: llc -filetype=obj -march=mipsel -mcpu=mips32 %s -o - \
4 ; RUN: | elf-dump --dump-section-data | FileCheck --check-prefix=CHECK_32 %s
5
6; Check for register information sections.
7;
8
9@str = private unnamed_addr constant [12 x i8] c"hello world\00"
10
11define i32 @main() nounwind {
12entry:
13; Check that the appropriate relocations were created.
14
15; check for .MIPS.options
16; CHECK_64: (('sh_name', 0x{{[0-9|a-f]+}}) # '.MIPS.options'
17; CHECK_64-NEXT: ('sh_type', 0x7000000d)
18; CHECK_64-NEXT: ('sh_flags', 0x0000000008000002)
19
20; check for .reginfo
21; CHECK_32: (('sh_name', 0x{{[0-9|a-f]+}}) # '.reginfo'
22; CHECK_32-NEXT: ('sh_type', 0x70000006)
23; CHECK_32-NEXT: ('sh_flags', 0x00000002)
24
25
26 %puts = tail call i32 @puts(i8* getelementptr inbounds ([12 x i8]* @str, i64 0, i64 0))
27 ret i32 0
28
29}
30declare i32 @puts(i8* nocapture) nounwind
31