xref: /minix3/external/bsd/llvm/dist/llvm/test/MC/Mips/sym-offset.ll (revision f4a2713ac843a11c696ec80c0a5e3e5d80b4d338)
1*f4a2713aSLionel Sambuc; DISABLED: llc -filetype=obj -mtriple mipsel-unknown-linux %s -o - | llvm-readobj -s -sd | FileCheck %s
2*f4a2713aSLionel Sambuc; RUN: false
3*f4a2713aSLionel Sambuc; XFAIL: *
4*f4a2713aSLionel Sambuc
5*f4a2713aSLionel Sambuc; FIXME: use assembler instead of llc when it becomes available.
6*f4a2713aSLionel Sambuc
7*f4a2713aSLionel Sambuc@string1 = internal global [11 x i8] c"aaaaaaaaaa\00", align 1
8*f4a2713aSLionel Sambuc@string2 = internal global [10 x i8] c"aaaa\00bbbb\00", align 1
9*f4a2713aSLionel Sambuc
10*f4a2713aSLionel Sambucdefine i32 @foo1(i32 %n) nounwind readonly {
11*f4a2713aSLionel Sambucentry:
12*f4a2713aSLionel Sambuc; check that the immediate fields of lwl and lwr are three apart.
13*f4a2713aSLionel Sambuc; 8841000e        lwl     at,14(v0)
14*f4a2713aSLionel Sambuc; 9841000b        lwr     at,11(v0)
15*f4a2713aSLionel Sambuc
16*f4a2713aSLionel Sambuc; CHECK:          SectionData (
17*f4a2713aSLionel Sambuc; CHECK:            0000: 00001C3C 00009C27 21E09903 0000828F
18*f4a2713aSLionel Sambuc; CHECK-NEXT:       0010: 0E004188 0B004198
19*f4a2713aSLionel Sambuc
20*f4a2713aSLionel Sambuc  %call = tail call i32 @memcmp(i8* getelementptr inbounds ([11 x i8]* @string1, i32 0, i32 0), i8* getelementptr inbounds ([10 x i8]* @string2, i32 0, i32 0), i32 4) nounwind readonly
21*f4a2713aSLionel Sambuc  %cmp = icmp eq i32 %call, 0
22*f4a2713aSLionel Sambuc  %conv = zext i1 %cmp to i32
23*f4a2713aSLionel Sambuc  ret i32 %conv
24*f4a2713aSLionel Sambuc}
25*f4a2713aSLionel Sambuc
26*f4a2713aSLionel Sambucdeclare i32 @memcmp(i8* nocapture, i8* nocapture, i32) nounwind readonly
27