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
6 // RUN: llvm-mc -mcpu=mips32r2 -triple=mipsel-pc-linux -filetype=obj -relocation-model=static %s -o - \
7 // RUN: | llvm-objdump -disassemble -mattr +mips32r2 - \
13 .section .mdebug.abi32,"",@progbits
14 .file "/home/espindola/llvm/llvm/test/MC/Mips/mips_gprel16.ll"
18 .type testvar1,@function
29 // CHECK: lw ${{[0-9]+}}, 0($gp)
30 lw $1, %gp_rel(var1)($gp)
38 .size testvar1, ($tmp0)-testvar1
42 .type testvar2,@function
53 // CHECK: lw ${{[0-9]+}}, 4($gp)
54 lw $1, %gp_rel(var2)($gp)
62 .size testvar2, ($tmp1)-testvar2
64 .type var1,@object # @var1
67 .type var2,@object # @var2