1 // RUN
: llvm-mc
-filetype
=obj
-triple mipsel-unknown-linux
%s
-o
- | llvm-readobj
-r | FileCheck
%s
3 // Check that the appropriate relocations were created.
4 // For the xgot case we want to see R_MIPS_
[GOT|CALL
]_
[HI|LO
]16.
6 // CHECK
: Relocations
[
7 // CHECK
: 0x0 R_MIPS_HI16 _gp_disp
8 // CHECK
: 0x4 R_MIPS_LO16 _gp_disp
9 // CHECK
: 0x14 R_MIPS_GOT_HI16 ext_1
10 // CHECK
: 0x1C R_MIPS_GOT_LO16 ext_1
11 // CHECK
: 0x24 R_MIPS_CALL_HI16 printf
12 // CHECK
: 0x30 R_MIPS_CALL_LO16 printf
13 // CHECK
: 0x2C R_MIPS_GOT16 $
.str
14 // CHECK
: 0x38 R_MIPS_LO16 $
.str
19 .section .mdebug.abi32,"",@progbits
20 .file "/home/espindola/llvm/llvm/test/MC/Mips/xgot.ll"
36 addiu $
2, $
2, %lo
(_gp_disp
)
38 sw $ra
, 20($sp
) # 4-byte Folded Spill
40 lui $
1, %got_hi
(ext_1
)
42 lw $
1, %got_lo
(ext_1
)($
1)
44 lui $
1, %call_hi
(printf
)
46 lw $
2, %got
($
.str)($gp)
47 lw $
25, %call_lo
(printf
)($
1)
49 addiu $
4, $
2, %lo
($
.str)
50 lw $ra
, 20($sp
) # 4-byte Folded Reload
58 .size fill, ($tmp0)-fill
60 .type $.str,@object # @.str
61 .section .rodata.str1.1,"aMS",@progbits,1
63 .asciz "ext_1=%d, i=%d\n"