Bump version to 19.1.0-rc3
[llvm-project.git] / llvm / test / ExecutionEngine / RuntimeDyld / Mips / ELF_N64R6_relocations.s
blob260b2dddddab76462ad82afa39a76fa42ee80684
1 # RUN: rm -rf %t && mkdir -p %t
2 # RUN: llvm-mc -triple=mips64el-unknown-linux -mcpu=mips64r6 -filetype=obj -o %t/test_ELF_N64R6.o %s
3 # RUN: llc -mtriple=mips64el-unknown-linux -mcpu=mips64r6 -filetype=obj -o %t/test_ELF_ExternalFunction_N64R6.o %S/Inputs/ExternalFunction.ll
4 # RUN: llvm-rtdyld -triple=mips64el-unknown-linux -mcpu=mips64r6 -verify -map-section test_ELF_N64R6.o,.text=0x1000 -map-section test_ELF_ExternalFunction_N64R6.o,.text=0x10000 -check=%s %t/test_ELF_N64R6.o %t/test_ELF_ExternalFunction_N64R6.o
6 # RUN: llvm-mc -triple=mips64-unknown-linux -mcpu=mips64r6 -filetype=obj -o %t/test_ELF_N64R6.o %s
7 # RUN: llc -mtriple=mips64-unknown-linux -mcpu=mips64r6 -filetype=obj -o %t/test_ELF_ExternalFunction_N64R6.o %S/Inputs/ExternalFunction.ll
8 # RUN: llvm-rtdyld -triple=mips64-unknown-linux -mcpu=mips64r6 -verify -map-section test_ELF_N64R6.o,.text=0x1000 -map-section test_ELF_ExternalFunction_N64R6.o,.text=0x10000 -check=%s %t/test_ELF_N64R6.o %t/test_ELF_ExternalFunction_N64R6.o
10 .text
11 .abicalls
12 .nan 2008
13 .text
14 .set nomicromips
15 .set nomips16
16 .set noreorder
17 .set nomacro
18 .set noat
20 .align 3
21 .globl bar
22 .type bar,@function
24 bar:
25 # Test R_MIPS_PC18_S3 relocation.
26 # rtdyld-check: decode_operand(R_MIPS_PC18_S3, 1)[20:0] = (foo - R_MIPS_PC18_S3)[20:0]
27 R_MIPS_PC18_S3:
28 ldpc $6,foo
30 # Test R_MIPS_PC19_S2 relocation.
31 # rtdyld-check: decode_operand(R_MIPS_PC19_S2, 1)[20:0] = (foo - R_MIPS_PC19_S2)[20:0]
32 R_MIPS_PC19_S2:
33 lwpc $6,foo
35 # Test R_MIPS_PC21_S2 relocation.
36 # rtdyld-check: decode_operand(R_MIPS_PC21_S2, 1)[22:0] = (foo - next_pc(R_MIPS_PC21_S2) + 0x04)[22:0]
37 R_MIPS_PC21_S2:
38 bnezc $5,foo
40 # Test R_MIPS_PC26_S2 relocation.
41 # rtdyld-check: decode_operand(R_MIPS_PC26_S2, 0)[27:0] = (foo - next_pc(R_MIPS_PC26_S2) + 0x04)[27:0]
42 R_MIPS_PC26_S2:
43 balc foo
45 # Test R_MIPS_PCHI16 relocation.
46 # rtdyld-check: decode_operand(R_MIPS_PCHI16, 1)[15:0] = (foo - R_MIPS_PCHI16 + 0x8000)[31:16]
47 R_MIPS_PCHI16:
48 aluipc $5, %pcrel_hi(foo)
50 # Test R_MIPS_PCLO16 relocation.
51 # rtdyld-check: decode_operand(R_MIPS_PCLO16, 2)[15:0] = (foo - R_MIPS_PCLO16)[15:0]
52 R_MIPS_PCLO16:
53 addiu $5, $5, %pcrel_lo(foo)
55 .size bar, .-bar