Home | History | Annotate | Download | only in Mips
      1 # RUN: llvm-mc -triple=mipsel-unknown-linux -mcpu=mips32r6 -relocation-model=pic -code-model=small -filetype=obj -o %T/test_ELF_O32R6.o %s
      2 # RUN: llc -mtriple=mipsel-unknown-linux -mcpu=mips32r6 -relocation-model=pic -filetype=obj -o %T/test_ELF_ExternalFunction_O32R6.o %S/Inputs/ExternalFunction.ll
      3 # RUN: llvm-rtdyld -triple=mipsel-unknown-linux -mcpu=mips32r6 -verify -map-section test_ELF_O32R6.o,.text=0x1000 -map-section test_ELF_ExternalFunction_O32R6.o,.text=0x10000 -check=%s %/T/test_ELF_O32R6.o %T/test_ELF_ExternalFunction_O32R6.o
      4 
      5 # RUN: llvm-mc -triple=mips-unknown-linux -mcpu=mips32r6 -relocation-model=pic -code-model=small -filetype=obj -o %T/test_ELF_O32R6.o %s
      6 # RUN: llc -mtriple=mips-unknown-linux -mcpu=mips32r6 -relocation-model=pic -filetype=obj -o %T/test_ELF_ExternalFunction_O32R6.o %S/Inputs/ExternalFunction.ll
      7 # RUN: llvm-rtdyld -triple=mips-unknown-linux -mcpu=mips32r6 -verify -map-section test_ELF_O32R6.o,.text=0x1000 -map-section test_ELF_ExternalFunction_O32R6.o,.text=0x10000 -check=%s %/T/test_ELF_O32R6.o %T/test_ELF_ExternalFunction_O32R6.o
      8 
      9 	.text
     10 	.abicalls
     11 	.nan	2008
     12 	.text
     13 	.set	nomicromips
     14 	.set	nomips16
     15 	.set	noreorder
     16 	.set	nomacro
     17 	.set	noat
     18 
     19 	.align	3
     20 	.globl	bar
     21 	.type	bar,@function
     22 
     23 bar:
     24 # Test R_MIPS_PC19_S2 relocation.
     25 # rtdyld-check:  decode_operand(R_MIPS_PC19_S2, 1)[20:0] = (foo - R_MIPS_PC19_S2)[20:0]
     26 R_MIPS_PC19_S2:
     27 	lwpc $6,foo
     28 
     29 # Test R_MIPS_PC21_S2 relocation.
     30 # rtdyld-check:  decode_operand(R_MIPS_PC21_S2, 1)[22:0] = (foo - next_pc(R_MIPS_PC21_S2))[22:0]
     31 R_MIPS_PC21_S2:
     32 	bnezc	$5,foo
     33 
     34 # Test R_MIPS_PC26_S2 relocation.
     35 # rtdyld-check:  decode_operand(R_MIPS_PC26_S2, 0)[27:0] = (foo - next_pc(R_MIPS_PC26_S2))[27:0]
     36 R_MIPS_PC26_S2:
     37 	balc	foo
     38 
     39 # Test R_MIPS_PCHI16 relocation.
     40 # rtdyld-check:  decode_operand(R_MIPS_PCHI16, 1)[15:0] = (foo - R_MIPS_PCHI16 + 0x8000)[31:16]
     41 R_MIPS_PCHI16:
     42 	aluipc $5, %pcrel_hi(foo)
     43 
     44 # Test R_MIPS_PCLO16 relocation.
     45 # rtdyld-check:  decode_operand(R_MIPS_PCLO16, 2)[15:0] = (foo - R_MIPS_PCLO16)[15:0]
     46 R_MIPS_PCLO16:
     47 	addiu  $5, $5, %pcrel_lo(foo)
     48 
     49 	.size	bar, .-bar
     50