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
%s
-o
- \
7 // RUN
: | llvm-objdump
-disassemble
- | FileCheck
%s
8 // RUN
: llvm-mc
-mcpu
=mips32r2
-triple
=mips-pc-linux
-filetype
=obj
%s
-o
- \
9 // RUN
: | llvm-objdump
-disassemble
- | FileCheck
%s
14 .section .mdebug.abi32,"",@progbits
15 .file "/home/espindola/llvm/llvm/test/MC/Mips/mips_gprel16.ll"
19 .type testvar1,@function
30 // CHECK
: lw $
{{[0-9]+}}, 0($gp
)
31 lw $
1, %gp_rel
(var1
)($gp
)
39 .size testvar1, ($tmp0)-testvar1
43 .type testvar2,@function
54 // CHECK
: lw $
{{[0-9]+}}, 4($gp
)
55 lw $
1, %gp_rel
(var2
)($gp
)
63 .size testvar2, ($tmp1)-testvar2
65 .type var1,@object # @var1
68 .type var2,@object # @var2