76 lines · plain
1# RUN: llvm-mc -triple mips-unknown-linux %s -show-encoding -target-abi=o32 \2# RUN: | FileCheck --check-prefixes=ASM,ASM-32 %s3# RUN: llvm-mc -triple mips64-unknown-linux %s -show-encoding -target-abi=n32 \4# RUN: | FileCheck --check-prefixes=ASM,ASM-64 %s5# RUN: llvm-mc -triple mips64-unknown-linux %s -show-encoding -target-abi=n64 \6# RUN: | FileCheck --check-prefixes=ASM,ASM-64 %s7# RUN: llvm-mc -triple mips-unknown-linux %s -show-encoding -target-abi=o32 \8# RUN: -filetype=obj | llvm-readobj -r - | FileCheck -check-prefix=OBJ-O32 %s9# RUN: llvm-mc -triple mips64-unknown-linux %s -show-encoding -target-abi=n32 \10# RUN: -filetype=obj | llvm-readobj -r - | FileCheck -check-prefix=OBJ-N32 %s11# RUN: llvm-mc -triple mips64-unknown-linux %s -show-encoding -target-abi=n64 \12# RUN: -filetype=obj | llvm-readobj -r - | FileCheck -check-prefix=OBJ-N64 %s13 14 .text15foo: # ASM-LABEL: foo:16 nop171:18 nop19 .reloc 1b, R_MIPS_NONE, foo # ASM-32: .reloc $tmp0, R_MIPS_NONE, foo20 # ASM-64: .reloc .Ltmp0, R_MIPS_NONE, foo21 nop22 .reloc 1f, R_MIPS_32, foo # ASM-32: .reloc $tmp1, R_MIPS_32, foo23 # ASM-64: .reloc .Ltmp1, R_MIPS_32, foo241:25 nop26 .reloc 1f, R_MIPS_CALL16, foo # ASM-32: .reloc $tmp2, R_MIPS_CALL16, foo27 # ASM-64: .reloc .Ltmp2, R_MIPS_CALL16, foo281:29 nop30 .reloc 2f, R_MIPS_GOT_DISP, foo # ASM-32: .reloc $tmp3, R_MIPS_GOT_DISP, foo31 # ASM-64: .reloc .Ltmp3, R_MIPS_GOT_DISP, foo32 nop33 34 .reloc 3f, R_MIPS_GOT_PAGE, foo # ASM-32: .reloc $tmp4, R_MIPS_GOT_PAGE, foo35 # ASM-64: .reloc .Ltmp4, R_MIPS_GOT_PAGE, foo36 nop37bar:38 nop392:40 nop413:42 nop43 .reloc bar, R_MIPS_GOT_OFST, foo # ASM: .reloc bar, R_MIPS_GOT_OFST, foo44 nop45 .reloc foo, R_MIPS_32, foo # ASM: .reloc foo, R_MIPS_32, foo46 nop471:48 nop49 50# OBJ-O32-LABEL: Relocations [51# OBJ-O32: 0x0 R_MIPS_32 .text52# OBJ-O32-NEXT: 0x4 R_MIPS_NONE .text53# OBJ-O32-NEXT: 0xC R_MIPS_32 .text54# OBJ-O32-NEXT: 0x10 R_MIPS_CALL16 foo55# OBJ-O32-NEXT: 0x1C R_MIPS_GOT_OFST .text56# OBJ-O32-NEXT: 0x20 R_MIPS_GOT_DISP foo57# OBJ-O32-NEXT: 0x24 R_MIPS_GOT_PAGE .text58 59# OBJ-N32-LABEL: Relocations [60# OBJ-N32: 0x4 R_MIPS_NONE .text61# OBJ-N32-NEXT: 0xC R_MIPS_32 .text62# OBJ-N32-NEXT: 0x10 R_MIPS_CALL16 foo63# OBJ-N32-NEXT: 0x20 R_MIPS_GOT_DISP foo64# OBJ-N32-NEXT: 0x24 R_MIPS_GOT_PAGE .text65# OBJ-N32-NEXT: 0x1C R_MIPS_GOT_OFST .text66# OBJ-N32-NEXT: 0x0 R_MIPS_32 .text67 68# OBJ-N64-LABEL: Relocations [69# OBJ-N64: 0x4 R_MIPS_NONE/R_MIPS_NONE/R_MIPS_NONE .text 0x070# OBJ-N64-NEXT: 0xC R_MIPS_32/R_MIPS_NONE/R_MIPS_NONE .text 0x071# OBJ-N64-NEXT: 0x10 R_MIPS_CALL16/R_MIPS_NONE/R_MIPS_NONE foo 0x072# OBJ-N64-NEXT: 0x20 R_MIPS_GOT_DISP/R_MIPS_NONE/R_MIPS_NONE foo 0x073# OBJ-N64-NEXT: 0x24 R_MIPS_GOT_PAGE/R_MIPS_NONE/R_MIPS_NONE .text 0x074# OBJ-N64-NEXT: 0x1C R_MIPS_GOT_OFST/R_MIPS_NONE/R_MIPS_NONE .text 0x075# OBJ-N64-NEXT: 0x0 R_MIPS_32/R_MIPS_NONE/R_MIPS_NONE .text 0x076