brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.2 KiB · 1e4c888 Raw
26 lines · plain
1# RUN: llvm-mc %s -triple=mipsel-unknown-linux -show-encoding \2# RUN: -mattr=micromips | FileCheck %s -check-prefix=CHECK-FIXUP3# RUN: llvm-mc %s -filetype=obj -triple=mipsel-unknown-linux \4# RUN: -mattr=micromips | llvm-readobj -r - \5# RUN: | FileCheck %s -check-prefix=CHECK-ELF6#------------------------------------------------------------------------------7# Check that the assembler can handle the documented syntax8# for relocations.9#------------------------------------------------------------------------------10# CHECK-FIXUP: foo:11# CHECK-FIXUP:   addiu $2, $zero, 133212# CHECK-FIXUP:         # encoding: [0x40,0x30,0x34,0x05]13# CHECK-FIXUP:   j foo # encoding: [A,0xd4'A',A,0b000000AA]14# CHECK-FIXUP-NEXT:         #   fixup A - offset: 0, value: foo, kind: fixup_MICROMIPS_26_S115# CHECK-FIXUP-NEXT:   nop   # encoding: [0x00,0x0c]16#------------------------------------------------------------------------------17# Check that the appropriate relocations were created.18#------------------------------------------------------------------------------19# CHECK-ELF: Relocations [20# CHECK-ELF:     0x{{[0-9,A-F]+}} R_MICROMIPS_26_S121# CHECK-ELF: ]22 23foo:24  addiu $2, $0, 133225  j foo26