[obj2yaml] - Fix a comment. NFC.
[llvm-complete.git] / test / MC / Mips / micromips32r6 / relocations.s
blob615b445a0faad3aa70677c687d75552025356ae1
1 # RUN: llvm-mc %s -triple=mips-unknown-linux -show-encoding -mcpu=mips32r6 \
2 # RUN: -mattr=micromips | FileCheck %s -check-prefix=CHECK-FIXUP
3 # RUN: llvm-mc %s -filetype=obj -triple=mips-unknown-linux -mcpu=mips32r6 \
4 # RUN: -mattr=micromips | llvm-readobj -r | FileCheck %s -check-prefix=CHECK-ELF
5 #------------------------------------------------------------------------------
6 # Check that the assembler can handle the documented syntax for fixups.
7 #------------------------------------------------------------------------------
8 # CHECK-FIXUP: balc bar # encoding: [0b101101AA,A,A,A]
9 # CHECK-FIXUP: # fixup A - offset: 0,
10 # CHECK-FIXUP: value: bar-4, kind: fixup_MICROMIPS_PC26_S1
11 # CHECK-FIXUP: bc bar # encoding: [0b100101AA,A,A,A]
12 # CHECK-FIXUP: # fixup A - offset: 0,
13 # CHECK-FIXUP: value: bar-4, kind: fixup_MICROMIPS_PC26_S1
14 # CHECK-FIXUP: lapc $2, bar # encoding: [0x78,0b01000AAA,A,A]
15 # CHECK-FIXUP: # fixup A - offset: 0,
16 # CHECK-FIXUP: value: bar, kind: fixup_MICROMIPS_PC19_S2
17 # CHECK-FIXUP: lapc $2, bar # encoding: [0x78,0b01000AAA,A,A]
18 # CHECK-FIXUP: # fixup A - offset: 0,
19 # CHECK-FIXUP: value: bar, kind: fixup_MICROMIPS_PC19_S2
20 # CHECK-FIXUP: lwpc $2, bar # encoding: [0x78,0b01001AAA,A,A]
21 # CHECK-FIXUP: # fixup A - offset: 0,
22 # CHECK-FIXUP: value: bar, kind: fixup_MICROMIPS_PC19_S2
23 # CHECK-FIXUP: beqzc $3, bar # encoding: [0x80,0b011AAAAA,A,A]
24 # CHECK-FIXUP: # fixup A - offset: 0,
25 # CHECK-FIXUP: value: bar-4, kind: fixup_MICROMIPS_PC21_S1
26 # CHECK-FIXUP: bnezc $3, bar # encoding: [0xa0,0b011AAAAA,A,A]
27 # CHECK-FIXUP: # fixup A - offset: 0,
28 # CHECK-FIXUP: value: bar-4, kind: fixup_MICROMIPS_PC21_S1
29 # CHECK-FIXUP: jialc $5, bar # encoding: [0x80,0x05,A,A]
30 # CHECK-FIXUP: # fixup A - offset: 0,
31 # CHECK-FIXUP: value: bar, kind: fixup_MICROMIPS_LO16
32 # CHECK-FIXUP: jic $5, bar # encoding: [0xa0,0x05,A,A]
33 # CHECK-FIXUP: # fixup A - offset: 0,
34 # CHECK-FIXUP: value: bar, kind: fixup_MICROMIPS_LO16
35 #------------------------------------------------------------------------------
36 # Check that the appropriate relocations were created.
37 #------------------------------------------------------------------------------
38 # CHECK-ELF: Relocations [
39 # CHECK-ELF: 0x0 R_MICROMIPS_PC26_S1 bar 0x0
40 # CHECK-ELF: 0x4 R_MICROMIPS_PC26_S1 bar 0x0
41 # CHECK-ELF: 0x8 R_MICROMIPS_PC19_S2 bar 0x0
42 # CHECK-ELF: 0xC R_MICROMIPS_PC19_S2 bar 0x0
43 # CHECK-ELF: 0x10 R_MICROMIPS_PC19_S2 bar 0x0
44 # CHECK-ELF: 0x14 R_MICROMIPS_PC21_S1 bar 0x0
45 # CHECK-ELF: 0x18 R_MICROMIPS_PC21_S1 bar 0x0
46 # CHECK-ELF: 0x1C R_MICROMIPS_LO16 bar 0x0
47 # CHECK-ELF: 0x20 R_MICROMIPS_LO16 bar 0x0
48 # CHECK-ELF: ]
50 balc bar
51 bc bar
52 addiupc $2,bar
53 lapc $2,bar
54 lwpc $2,bar
55 beqzc $3, bar
56 bnezc $3, bar
57 jialc $5, bar
58 jic $5, bar