1 // RUN: llvm-mc -filetype=obj -triple=mips64el-pc-linux -mcpu=mips64 %s -o - \
2 // RUN: | llvm-readobj -r \
4 // RUN: llvm-mc -filetype=obj -triple=mips64-pc-linux -mcpu=mips64 %s -o - \
5 // RUN: | llvm-readobj -r \
8 // Check that the appropriate relocations were created.
10 // R_MIPS_GPREL32/R_MIPS_64/R_MIPS_NONE
11 // CHECK: Relocations [
12 // CHECK: Section ({{[a-z0-9]+}}) .rela.rodata {
13 // CHECK-NEXT: 0x{{[0-9,A-F]+}} R_MIPS_GPREL32/R_MIPS_64/R_MIPS_NONE
14 // CHECK-NEXT: 0x{{[0-9,A-F]+}} R_MIPS_GPREL32/R_MIPS_64/R_MIPS_NONE
15 // CHECK-NEXT: 0x{{[0-9,A-F]+}} R_MIPS_GPREL32/R_MIPS_64/R_MIPS_NONE
16 // CHECK-NEXT: 0x{{[0-9,A-F]+}} R_MIPS_GPREL32/R_MIPS_64/R_MIPS_NONE
22 .section .mdebug.abi64,"",@progbits
23 .file "/home/espindola/llvm/llvm/test/MC/Mips/elf-gprel-32-64.ll"
38 lui $1, %hi(%neg(%gp_rel(test)))
48 daddiu $1, $2, %lo(%neg(%gp_rel(test)))
53 ld $4, %got_page($JTI0_0)($1)
55 ld $3, %got_ofst($JTI0_0)($3)
76 .size test, ($tmp0)-test
77 .section .rodata,"a",@progbits