1 # RUN: llvm-mc %s -triple=mipsel-unknown-linux -show-encoding -mcpu=mips32r2 | \
3 # Check that the assembler can handle the documented syntax
4 # for jumps and branches.
5 #------------------------------------------------------------------------------
7 #------------------------------------------------------------------------------
8 # CHECK: b 1332 # encoding: [0x4d,0x01,0x00,0x10]
9 # CHECK: nop # encoding: [0x00,0x00,0x00,0x00]
10 # CHECK: bc1f 1332 # encoding: [0x4d,0x01,0x00,0x45]
11 # CHECK: nop # encoding: [0x00,0x00,0x00,0x00]
12 # CHECK: bc1t 1332 # encoding: [0x4d,0x01,0x01,0x45]
13 # CHECK: nop # encoding: [0x00,0x00,0x00,0x00]
14 # CHECK: beq $9, $6, 1332 # encoding: [0x4d,0x01,0x26,0x11]
15 # CHECK: nop # encoding: [0x00,0x00,0x00,0x00]
16 # CHECK: bgez $6, 1332 # encoding: [0x4d,0x01,0xc1,0x04]
17 # CHECK: nop # encoding: [0x00,0x00,0x00,0x00]
18 # CHECK: bgezal $6, 1332 # encoding: [0x4d,0x01,0xd1,0x04]
19 # CHECK: nop # encoding: [0x00,0x00,0x00,0x00]
20 # CHECK: bgtz $6, 1332 # encoding: [0x4d,0x01,0xc0,0x1c]
21 # CHECK: nop # encoding: [0x00,0x00,0x00,0x00]
22 # CHECK: blez $6, 1332 # encoding: [0x4d,0x01,0xc0,0x18]
23 # CHECK: nop # encoding: [0x00,0x00,0x00,0x00]
24 # CHECK: bne $9, $6, 1332 # encoding: [0x4d,0x01,0x26,0x15]
25 # CHECK: nop # encoding: [0x00,0x00,0x00,0x00]
26 # CHECK: bal 1332 # encoding: [0x4d,0x01,0x11,0x04]
27 # CHECK: nop # encoding: [0x00,0x00,0x00,0x00]
53 #------------------------------------------------------------------------------
55 #------------------------------------------------------------------------------
56 # CHECK: j 1328 # encoding: [0x4c,0x01,0x00,0x08]
57 # CHECK: nop # encoding: [0x00,0x00,0x00,0x00]
58 # CHECK: jal 1328 # encoding: [0x4c,0x01,0x00,0x0c]
59 # CHECK: nop # encoding: [0x00,0x00,0x00,0x00]
60 # CHECK: jalr $6 # encoding: [0x09,0xf8,0xc0,0x00]
61 # CHECK: nop # encoding: [0x00,0x00,0x00,0x00]
62 # CHECK: jalr $25 # encoding: [0x09,0xf8,0x20,0x03]
63 # CHECK: nop # encoding: [0x00,0x00,0x00,0x00]
64 # CHECK: jalr $10, $11 # encoding: [0x09,0x50,0x60,0x01]
65 # CHECK: nop # encoding: [0x00,0x00,0x00,0x00]
66 # CHECK: jr $7 # encoding: [0x08,0x00,0xe0,0x00]
67 # CHECK: nop # encoding: [0x00,0x00,0x00,0x00]
68 # CHECK: jr $7 # encoding: [0x08,0x00,0xe0,0x00]
69 # CHECK: nop # encoding: [0x00,0x00,0x00,0x00]
70 # CHECK: jalr $25 # encoding: [0x09,0xf8,0x20,0x03]
71 # CHECK: nop # encoding: [0x00,0x00,0x00,0x00]
72 # CHECK: jalr $4, $25 # encoding: [0x09,0x20,0x20,0x03]
73 # CHECK: nop # encoding: [0x00,0x00,0x00,0x00]