Convert llc -filetype=obj test.
[oota-llvm.git] / test / MC / Mips / mips_gprel16.s
1 // This addresses bug 14456. We were not writing
2 // out the addend to the gprel16 relocation. The
3 // addend is stored in the instruction immediate
4 // field.
5
6 // RUN: llvm-mc -mcpu=mips32r2 -triple=mipsel-pc-linux -filetype=obj -relocation-model=static %s -o - \
7 // RUN: | llvm-objdump -disassemble -mattr +mips32r2 - \
8 // RUN: | FileCheck %s
9
10         .text
11         .abicalls
12         .option pic0
13         .section        .mdebug.abi32,"",@progbits
14         .file   "/home/espindola/llvm/llvm/test/MC/Mips/mips_gprel16.ll"
15         .text
16         .globl  testvar1
17         .align  2
18         .type   testvar1,@function
19         .set    nomips16
20         .ent    testvar1
21 testvar1:                               # @testvar1
22         .frame  $sp,0,$ra
23         .mask   0x00000000,0
24         .fmask  0x00000000,0
25         .set    noreorder
26         .set    nomacro
27         .set    noat
28 # BB#0:                                 # %entry
29 // CHECK: lw ${{[0-9]+}}, 0($gp)
30         lw      $1, %gp_rel(var1)($gp)
31         jr      $ra
32         sltu    $2, $zero, $1
33         .set    at
34         .set    macro
35         .set    reorder
36         .end    testvar1
37 $tmp0:
38         .size   testvar1, ($tmp0)-testvar1
39
40         .globl  testvar2
41         .align  2
42         .type   testvar2,@function
43         .set    nomips16
44         .ent    testvar2
45 testvar2:                               # @testvar2
46         .frame  $sp,0,$ra
47         .mask   0x00000000,0
48         .fmask  0x00000000,0
49         .set    noreorder
50         .set    nomacro
51         .set    noat
52 # BB#0:                                 # %entry
53 // CHECK: lw ${{[0-9]+}}, 4($gp)
54         lw      $1, %gp_rel(var2)($gp)
55         jr      $ra
56         sltu    $2, $zero, $1
57         .set    at
58         .set    macro
59         .set    reorder
60         .end    testvar2
61 $tmp1:
62         .size   testvar2, ($tmp1)-testvar2
63
64         .type   var1,@object            # @var1
65         .local  var1
66         .comm   var1,4,4
67         .type   var2,@object            # @var2
68         .local  var2
69         .comm   var2,4,4
70