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 #------------------------------------------------------------------------------
9 #------------------------------------------------------------------------------
11 #------------------------------------------------------------------------------
12 # CHECK-EL: j 1328 # encoding: [0x00,0xd4,0x98,0x02]
13 # CHECK-EL: nop # encoding: [0x00,0x00,0x00,0x00]
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: jals 1328 # encoding: [0x00,0x74,0x98,0x02]
23 # CHECK-EL: nop # encoding: [0x00,0x0c]
24 # CHECK-EL: jalrs $ra, $6 # encoding: [0xe6,0x03,0x3c,0x4f]
25 # CHECK-EL: nop # encoding: [0x00,0x0c]
26 #------------------------------------------------------------------------------
28 #------------------------------------------------------------------------------
29 # CHECK-EB: j 1328 # encoding: [0xd4,0x00,0x02,0x98]
30 # CHECK-EB: nop # encoding: [0x00,0x00,0x00,0x00]
31 # CHECK-EB: jal 1328 # encoding: [0xf4,0x00,0x02,0x98]
32 # CHECK-EB: nop # encoding: [0x00,0x00,0x00,0x00]
33 # CHECK-EB: jalr $ra, $6 # encoding: [0x03,0xe6,0x0f,0x3c]
34 # CHECK-EB: nop # encoding: [0x00,0x00,0x00,0x00]
35 # CHECK-EB: jr $7 # encoding: [0x00,0x07,0x0f,0x3c]
36 # CHECK-EB: nop # encoding: [0x00,0x00,0x00,0x00]
37 # CHECK-EB: jr $7 # encoding: [0x00,0x07,0x0f,0x3c]
38 # CHECK-EB: nop # encoding: [0x00,0x00,0x00,0x00]
39 # CHECK-EB: jals 1328 # encoding: [0x74,0x00,0x02,0x98]
40 # CHECK-EB: nop # encoding: [0x0c,0x00]
41 # CHECK-EB: jalrs $ra, $6 # encoding: [0x03,0xe6,0x4f,0x3c]
42 # CHECK-EB: nop # encoding: [0x0c,0x00]