1# RUN: llvm-mc %s -triple=mipsel-unknown-linux -show-encoding \
2# RUN: -mattr=micromips | FileCheck %s -check-prefix=CHECK-FIXUP
3# RUN: llvm-mc %s -filetype=obj -triple=mipsel-unknown-linux \
4# RUN: -mattr=micromips | llvm-readobj -r \
5# RUN: | FileCheck %s -check-prefix=CHECK-ELF
6#------------------------------------------------------------------------------
7# Check that the assembler can handle the documented syntax
8# for relocations.
9#------------------------------------------------------------------------------
10# CHECK-FIXUP: foo:
11# CHECK-FIXUP:   jal bar # encoding: [A,0xf4'A',A,0b000000AA]
12# CHECK-FIXUP:           #   fixup A - offset: 0,
13# CHECK-FIXUP:               value: bar, kind: fixup_MICROMIPS_26_S1
14# CHECK-FIXUP:   nop     # encoding: [0x00,0x00,0x00,0x00]
15#------------------------------------------------------------------------------
16# Check that the appropriate relocations were created.
17#------------------------------------------------------------------------------
18# CHECK-ELF: Relocations [
19# CHECK-ELF:     0x{{[0-9,A-F]+}} R_MICROMIPS_26_S1
20# CHECK-ELF: ]
21
22foo:
23  jal bar
24