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