[mips] XFAIL ELF_O32_PIC_relocations.s for big-endian mips
[oota-llvm.git] / test / ExecutionEngine / RuntimeDyld / Mips / ELF_O32_PIC_relocations.s
1 # RUN: llvm-mc -triple=mipsel-unknown-linux -relocation-model=pic -code-model=small -filetype=obj -o %T/test_ELF_O32.o %s
2 # RUN: llc -mtriple=mipsel-unknown-linux -relocation-model=pic -filetype=obj -o %T/test_ELF_ExternalFunction_O32.o %S/Inputs/ExternalFunction.ll
3 # RUN: llvm-rtdyld -triple=mipsel-unknown-linux -verify -map-section test_ELF_O32.o,.text=0x1000 -map-section test_ELF_ExternalFunction_O32.o,.text=0x10000 -check=%s %T/test_ELF_O32.o %T/test_ELF_ExternalFunction_O32.o
4 # There are endian awareness bugs in the O32 support.
5 # XFAIL: mips-
6
7         .data
8 # rtdyld-check: *{4}R_MIPS_32 = foo
9 R_MIPS_32:
10         .word foo
11 # rtdyld-check: *{4}(R_MIPS_32+4) = foo
12         .4byte foo
13 # rtdyld-check: *{4}(R_MIPS_PC32) = foo - R_MIPS_PC32
14 R_MIPS_PC32:
15         .word foo-.
16 # rtdyld-check: *{4}(R_MIPS_PC32 + 4) = foo - tmp1
17 tmp1:
18         .4byte foo-tmp1
19
20         .text
21         .abicalls
22         .nan    legacy
23         .text
24         .set    nomicromips
25         .set    nomips16
26         .set    noreorder
27         .set    nomacro
28         .set    noat
29
30         .align  3
31         .globl  bar
32         .type   bar,@function
33 bar:
34 # rtdyld-check:  decode_operand(R_MIPS_26, 0)[27:0] = stub_addr(test_ELF_O32.o, .text, foo)[27:0]
35 # rtdyld-check:  decode_operand(R_MIPS_26, 0)[1:0] = 0
36 R_MIPS_26:
37         j   foo
38         nop
39
40 # rtdyld-check:  decode_operand(R_MIPS_HI16, 1)[15:0] = foo[31:16]
41 R_MIPS_HI16:
42         lui     $1, %hi(foo)
43
44 # rtdyld-check:  decode_operand(R_MIPS_LO16, 1)[15:0] = foo[15:0]
45 R_MIPS_LO16:
46         lui     $1, %lo(foo)
47
48         .size   bar, .-bar