[obj2yaml] - Fix a comment. NFC.
[llvm-complete.git] / test / MC / Mips / micromips-jump-instructions.s
blobf8d4974de6cd3aa78dbe76fe1050ad1a490d373d
1 # RUN: llvm-mc %s -triple=mipsel -show-encoding -mattr=micromips \
2 # RUN: | FileCheck %s -check-prefix=CHECK-EL
3 # RUN: llvm-mc %s -triple=mips -show-encoding -mattr=micromips \
4 # RUN: | FileCheck %s -check-prefix=CHECK-EB
5 # Check that the assembler can handle the documented syntax
6 # for jump and branch instructions.
7 #------------------------------------------------------------------------------
8 # Jump instructions
9 #------------------------------------------------------------------------------
10 # Little endian
11 #------------------------------------------------------------------------------
12 # CHECK-EL: j 1328 # encoding: [0x00,0xd4,0x98,0x02]
13 # CHECK-EL: nop # encoding: [0x00,0x0c]
14 # CHECK-EL: jal 1328 # encoding: [0x00,0xf4,0x98,0x02]
15 # CHECK-EL: nop # encoding: [0x00,0x00,0x00,0x00]
16 # CHECK-EL: jalr $ra, $6 # encoding: [0xe6,0x03,0x3c,0x0f]
17 # CHECK-EL: nop # encoding: [0x00,0x00,0x00,0x00]
18 # CHECK-EL: jr $7 # encoding: [0x07,0x00,0x3c,0x0f]
19 # CHECK-EL: nop # encoding: [0x00,0x00,0x00,0x00]
20 # CHECK-EL: jr $7 # encoding: [0x07,0x00,0x3c,0x0f]
21 # CHECK-EL: nop # encoding: [0x00,0x00,0x00,0x00]
22 # CHECK-EL: jalx 1328 # encoding: [0x00,0xf0,0x4c,0x01]
23 # CHECK-EL: nop # encoding: [0x00,0x00,0x00,0x00]
24 # CHECK-EL: jals 1328 # encoding: [0x00,0x74,0x98,0x02]
25 # CHECK-EL: nop # encoding: [0x00,0x0c]
26 # CHECK-EL: jalrs $ra, $6 # encoding: [0xe6,0x03,0x3c,0x4f]
27 # CHECK-EL: nop # encoding: [0x00,0x0c]
28 # CHECK-EL: jalr $25 # encoding: [0xd9,0x45]
29 # CHECK-EL: nop # encoding: [0x00,0x00,0x00,0x00]
30 # CHECK-EL: jalr $4, $25 # encoding: [0x99,0x00,0x3c,0x0f]
31 # CHECK-EL: nop # encoding: [0x00,0x00,0x00,0x00]
32 #------------------------------------------------------------------------------
33 # Big endian
34 #------------------------------------------------------------------------------
35 # CHECK-EB: j 1328 # encoding: [0xd4,0x00,0x02,0x98]
36 # CHECK-EB: nop # encoding: [0x0c,0x00]
37 # CHECK-EB: jal 1328 # encoding: [0xf4,0x00,0x02,0x98]
38 # CHECK-EB: nop # encoding: [0x00,0x00,0x00,0x00]
39 # CHECK-EB: jalr $ra, $6 # encoding: [0x03,0xe6,0x0f,0x3c]
40 # CHECK-EB: nop # encoding: [0x00,0x00,0x00,0x00]
41 # CHECK-EB: jr $7 # encoding: [0x00,0x07,0x0f,0x3c]
42 # CHECK-EB: nop # encoding: [0x00,0x00,0x00,0x00]
43 # CHECK-EB: jr $7 # encoding: [0x00,0x07,0x0f,0x3c]
44 # CHECK-EB: nop # encoding: [0x00,0x00,0x00,0x00]
45 # CHECK-EB: jalx 1328 # encoding: [0xf0,0x00,0x01,0x4c]
46 # CHECK-EB: nop # encoding: [0x00,0x00,0x00,0x00]
47 # CHECK-EB: jals 1328 # encoding: [0x74,0x00,0x02,0x98]
48 # CHECK-EB: nop # encoding: [0x0c,0x00]
49 # CHECK-EB: jalrs $ra, $6 # encoding: [0x03,0xe6,0x4f,0x3c]
50 # CHECK-EB: nop # encoding: [0x0c,0x00]
51 # CHECK-EB: jalr $25 # encoding: [0x45,0xd9]
52 # CHECK-EB: nop # encoding: [0x00,0x00,0x00,0x00]
53 # CHECK-EB: jalr $4, $25 # encoding: [0x00,0x99,0x0f,0x3c]
54 # CHECK-EB: nop # encoding: [0x00,0x00,0x00,0x00]
56 j 1328
57 jal 1328
58 jalr $ra, $6
59 jr $7
60 j $7
61 jalx 1328
62 jals 1328
63 jalrs $ra, $6
64 jal $25
65 jal $4, $25