1*9880d681SAndroid Build Coastguard Worker# RUN: llvm-mc -triple hexagon -disassemble < %s | FileCheck %s 2*9880d681SAndroid Build Coastguard Worker# Hexagon Programmer's Reference Manual 11.4 J 3*9880d681SAndroid Build Coastguard Worker 4*9880d681SAndroid Build Coastguard Worker# Call subroutine 5*9880d681SAndroid Build Coastguard Worker0x22 0xc0 0x00 0x5a 6*9880d681SAndroid Build Coastguard Worker# CHECK: call 7*9880d681SAndroid Build Coastguard Worker0x22 0xc3 0x00 0x5d 8*9880d681SAndroid Build Coastguard Worker# CHECK: if (p3) call 9*9880d681SAndroid Build Coastguard Worker0x22 0xc3 0x20 0x5d 10*9880d681SAndroid Build Coastguard Worker# CHECK: if (!p3) call 11*9880d681SAndroid Build Coastguard Worker 12*9880d681SAndroid Build Coastguard Worker# Compare and jump 13*9880d681SAndroid Build Coastguard Worker0x00 0xc0 0x89 0x11 14*9880d681SAndroid Build Coastguard Worker# CHECK: p0 = cmp.eq(r17,#-1); if (p0.new) jump:nt 15*9880d681SAndroid Build Coastguard Worker0x00 0xc1 0x89 0x11 16*9880d681SAndroid Build Coastguard Worker# CHECK: p0 = cmp.gt(r17,#-1); if (p0.new) jump:nt 17*9880d681SAndroid Build Coastguard Worker0x00 0xc3 0x89 0x11 18*9880d681SAndroid Build Coastguard Worker# CHECK: p0 = tstbit(r17, #0); if (p0.new) jump:nt 19*9880d681SAndroid Build Coastguard Worker0x00 0xe0 0x89 0x11 20*9880d681SAndroid Build Coastguard Worker# CHECK: p0 = cmp.eq(r17,#-1); if (p0.new) jump:t 21*9880d681SAndroid Build Coastguard Worker0x00 0xe1 0x89 0x11 22*9880d681SAndroid Build Coastguard Worker# CHECK: p0 = cmp.gt(r17,#-1); if (p0.new) jump:t 23*9880d681SAndroid Build Coastguard Worker0x00 0xe3 0x89 0x11 24*9880d681SAndroid Build Coastguard Worker# CHECK: p0 = tstbit(r17, #0); if (p0.new) jump:t 25*9880d681SAndroid Build Coastguard Worker0x00 0xc0 0xc9 0x11 26*9880d681SAndroid Build Coastguard Worker# CHECK: p0 = cmp.eq(r17,#-1); if (!p0.new) jump:nt 27*9880d681SAndroid Build Coastguard Worker0x00 0xc1 0xc9 0x11 28*9880d681SAndroid Build Coastguard Worker# CHECK: p0 = cmp.gt(r17,#-1); if (!p0.new) jump:nt 29*9880d681SAndroid Build Coastguard Worker0x00 0xc3 0xc9 0x11 30*9880d681SAndroid Build Coastguard Worker# CHECK: p0 = tstbit(r17, #0); if (!p0.new) jump:nt 31*9880d681SAndroid Build Coastguard Worker0x00 0xe0 0xc9 0x11 32*9880d681SAndroid Build Coastguard Worker# CHECK: p0 = cmp.eq(r17,#-1); if (!p0.new) jump:t 33*9880d681SAndroid Build Coastguard Worker0x00 0xe1 0xc9 0x11 34*9880d681SAndroid Build Coastguard Worker# CHECK: p0 = cmp.gt(r17,#-1); if (!p0.new) jump:t 35*9880d681SAndroid Build Coastguard Worker0x00 0xe3 0xc9 0x11 36*9880d681SAndroid Build Coastguard Worker# CHECK: p0 = tstbit(r17, #0); if (!p0.new) jump:t 37*9880d681SAndroid Build Coastguard Worker0x00 0xd5 0x09 0x10 38*9880d681SAndroid Build Coastguard Worker# CHECK: p0 = cmp.eq(r17, #21); if (p0.new) jump:nt 39*9880d681SAndroid Build Coastguard Worker0x00 0xf5 0x09 0x10 40*9880d681SAndroid Build Coastguard Worker# CHECK: p0 = cmp.eq(r17, #21); if (p0.new) jump:t 41*9880d681SAndroid Build Coastguard Worker0x00 0xd5 0x49 0x10 42*9880d681SAndroid Build Coastguard Worker# CHECK: p0 = cmp.eq(r17, #21); if (!p0.new) jump:nt 43*9880d681SAndroid Build Coastguard Worker0x00 0xf5 0x49 0x10 44*9880d681SAndroid Build Coastguard Worker# CHECK: p0 = cmp.eq(r17, #21); if (!p0.new) jump:t 45*9880d681SAndroid Build Coastguard Worker0x00 0xd5 0x89 0x10 46*9880d681SAndroid Build Coastguard Worker# CHECK: p0 = cmp.gt(r17, #21); if (p0.new) jump:nt 47*9880d681SAndroid Build Coastguard Worker0x00 0xf5 0x89 0x10 48*9880d681SAndroid Build Coastguard Worker# CHECK: p0 = cmp.gt(r17, #21); if (p0.new) jump:t 49*9880d681SAndroid Build Coastguard Worker0x00 0xd5 0xc9 0x10 50*9880d681SAndroid Build Coastguard Worker# CHECK: p0 = cmp.gt(r17, #21); if (!p0.new) jump:nt 51*9880d681SAndroid Build Coastguard Worker0x00 0xf5 0xc9 0x10 52*9880d681SAndroid Build Coastguard Worker# CHECK: p0 = cmp.gt(r17, #21); if (!p0.new) jump:t 53*9880d681SAndroid Build Coastguard Worker0x00 0xd5 0x09 0x11 54*9880d681SAndroid Build Coastguard Worker# CHECK: p0 = cmp.gtu(r17, #21); if (p0.new) jump:nt 55*9880d681SAndroid Build Coastguard Worker0x00 0xf5 0x09 0x11 56*9880d681SAndroid Build Coastguard Worker# CHECK: p0 = cmp.gtu(r17, #21); if (p0.new) jump:t 57*9880d681SAndroid Build Coastguard Worker0x00 0xd5 0x49 0x11 58*9880d681SAndroid Build Coastguard Worker# CHECK: p0 = cmp.gtu(r17, #21); if (!p0.new) jump:nt 59*9880d681SAndroid Build Coastguard Worker0x00 0xf5 0x49 0x11 60*9880d681SAndroid Build Coastguard Worker# CHECK: p0 = cmp.gtu(r17, #21); if (!p0.new) jump:t 61*9880d681SAndroid Build Coastguard Worker0x00 0xc0 0x89 0x13 62*9880d681SAndroid Build Coastguard Worker# CHECK: p1 = cmp.eq(r17,#-1); if (p1.new) jump:nt 63*9880d681SAndroid Build Coastguard Worker0x00 0xc1 0x89 0x13 64*9880d681SAndroid Build Coastguard Worker# CHECK: p1 = cmp.gt(r17,#-1); if (p1.new) jump:nt 65*9880d681SAndroid Build Coastguard Worker0x00 0xc3 0x89 0x13 66*9880d681SAndroid Build Coastguard Worker# CHECK: p1 = tstbit(r17, #0); if (p1.new) jump:nt 67*9880d681SAndroid Build Coastguard Worker0x00 0xe0 0x89 0x13 68*9880d681SAndroid Build Coastguard Worker# CHECK: p1 = cmp.eq(r17,#-1); if (p1.new) jump:t 69*9880d681SAndroid Build Coastguard Worker0x00 0xe1 0x89 0x13 70*9880d681SAndroid Build Coastguard Worker# CHECK: p1 = cmp.gt(r17,#-1); if (p1.new) jump:t 71*9880d681SAndroid Build Coastguard Worker0x00 0xe3 0x89 0x13 72*9880d681SAndroid Build Coastguard Worker# CHECK: p1 = tstbit(r17, #0); if (p1.new) jump:t 73*9880d681SAndroid Build Coastguard Worker0x00 0xc0 0xc9 0x13 74*9880d681SAndroid Build Coastguard Worker# CHECK: p1 = cmp.eq(r17,#-1); if (!p1.new) jump:nt 75*9880d681SAndroid Build Coastguard Worker0x00 0xc1 0xc9 0x13 76*9880d681SAndroid Build Coastguard Worker# CHECK: p1 = cmp.gt(r17,#-1); if (!p1.new) jump:nt 77*9880d681SAndroid Build Coastguard Worker0x00 0xc3 0xc9 0x13 78*9880d681SAndroid Build Coastguard Worker# CHECK: p1 = tstbit(r17, #0); if (!p1.new) jump:nt 79*9880d681SAndroid Build Coastguard Worker0x00 0xe0 0xc9 0x13 80*9880d681SAndroid Build Coastguard Worker# CHECK: p1 = cmp.eq(r17,#-1); if (!p1.new) jump:t 81*9880d681SAndroid Build Coastguard Worker0x00 0xe1 0xc9 0x13 82*9880d681SAndroid Build Coastguard Worker# CHECK: p1 = cmp.gt(r17,#-1); if (!p1.new) jump:t 83*9880d681SAndroid Build Coastguard Worker0x00 0xe3 0xc9 0x13 84*9880d681SAndroid Build Coastguard Worker# CHECK: p1 = tstbit(r17, #0); if (!p1.new) jump:t 85*9880d681SAndroid Build Coastguard Worker0x00 0xd5 0x09 0x12 86*9880d681SAndroid Build Coastguard Worker# CHECK: p1 = cmp.eq(r17, #21); if (p1.new) jump:nt 87*9880d681SAndroid Build Coastguard Worker0x00 0xf5 0x09 0x12 88*9880d681SAndroid Build Coastguard Worker# CHECK: p1 = cmp.eq(r17, #21); if (p1.new) jump:t 89*9880d681SAndroid Build Coastguard Worker0x00 0xd5 0x49 0x12 90*9880d681SAndroid Build Coastguard Worker# CHECK: p1 = cmp.eq(r17, #21); if (!p1.new) jump:nt 91*9880d681SAndroid Build Coastguard Worker0x00 0xf5 0x49 0x12 92*9880d681SAndroid Build Coastguard Worker# CHECK: p1 = cmp.eq(r17, #21); if (!p1.new) jump:t 93*9880d681SAndroid Build Coastguard Worker0x00 0xd5 0x89 0x12 94*9880d681SAndroid Build Coastguard Worker# CHECK: p1 = cmp.gt(r17, #21); if (p1.new) jump:nt 95*9880d681SAndroid Build Coastguard Worker0x00 0xf5 0x89 0x12 96*9880d681SAndroid Build Coastguard Worker# CHECK: p1 = cmp.gt(r17, #21); if (p1.new) jump:t 97*9880d681SAndroid Build Coastguard Worker0x00 0xd5 0xc9 0x12 98*9880d681SAndroid Build Coastguard Worker# CHECK: p1 = cmp.gt(r17, #21); if (!p1.new) jump:nt 99*9880d681SAndroid Build Coastguard Worker0x00 0xf5 0xc9 0x12 100*9880d681SAndroid Build Coastguard Worker# CHECK: p1 = cmp.gt(r17, #21); if (!p1.new) jump:t 101*9880d681SAndroid Build Coastguard Worker0x00 0xd5 0x09 0x13 102*9880d681SAndroid Build Coastguard Worker# CHECK: p1 = cmp.gtu(r17, #21); if (p1.new) jump:nt 103*9880d681SAndroid Build Coastguard Worker0x00 0xf5 0x09 0x13 104*9880d681SAndroid Build Coastguard Worker# CHECK: p1 = cmp.gtu(r17, #21); if (p1.new) jump:t 105*9880d681SAndroid Build Coastguard Worker0x00 0xd5 0x49 0x13 106*9880d681SAndroid Build Coastguard Worker# CHECK: p1 = cmp.gtu(r17, #21); if (!p1.new) jump:nt 107*9880d681SAndroid Build Coastguard Worker0x00 0xf5 0x49 0x13 108*9880d681SAndroid Build Coastguard Worker# CHECK: p1 = cmp.gtu(r17, #21); if (!p1.new) jump:t 109*9880d681SAndroid Build Coastguard Worker0x00 0xcd 0x09 0x14 110*9880d681SAndroid Build Coastguard Worker# CHECK: p0 = cmp.eq(r17, r21); if (p0.new) jump:nt 111*9880d681SAndroid Build Coastguard Worker0x00 0xdd 0x09 0x14 112*9880d681SAndroid Build Coastguard Worker# CHECK: p1 = cmp.eq(r17, r21); if (p1.new) jump:nt 113*9880d681SAndroid Build Coastguard Worker0x00 0xed 0x09 0x14 114*9880d681SAndroid Build Coastguard Worker# CHECK: p0 = cmp.eq(r17, r21); if (p0.new) jump:t 115*9880d681SAndroid Build Coastguard Worker0x00 0xfd 0x09 0x14 116*9880d681SAndroid Build Coastguard Worker# CHECK: p1 = cmp.eq(r17, r21); if (p1.new) jump:t 117*9880d681SAndroid Build Coastguard Worker0x00 0xcd 0x49 0x14 118*9880d681SAndroid Build Coastguard Worker# CHECK: p0 = cmp.eq(r17, r21); if (!p0.new) jump:nt 119*9880d681SAndroid Build Coastguard Worker0x00 0xdd 0x49 0x14 120*9880d681SAndroid Build Coastguard Worker# CHECK: p1 = cmp.eq(r17, r21); if (!p1.new) jump:nt 121*9880d681SAndroid Build Coastguard Worker0x00 0xed 0x49 0x14 122*9880d681SAndroid Build Coastguard Worker# CHECK: p0 = cmp.eq(r17, r21); if (!p0.new) jump:t 123*9880d681SAndroid Build Coastguard Worker0x00 0xfd 0x49 0x14 124*9880d681SAndroid Build Coastguard Worker# CHECK: p1 = cmp.eq(r17, r21); if (!p1.new) jump:t 125*9880d681SAndroid Build Coastguard Worker0x00 0xcd 0x89 0x14 126*9880d681SAndroid Build Coastguard Worker# CHECK: p0 = cmp.gt(r17, r21); if (p0.new) jump:nt 127*9880d681SAndroid Build Coastguard Worker0x00 0xdd 0x89 0x14 128*9880d681SAndroid Build Coastguard Worker# CHECK: p1 = cmp.gt(r17, r21); if (p1.new) jump:nt 129*9880d681SAndroid Build Coastguard Worker0x00 0xed 0x89 0x14 130*9880d681SAndroid Build Coastguard Worker# CHECK: p0 = cmp.gt(r17, r21); if (p0.new) jump:t 131*9880d681SAndroid Build Coastguard Worker0x00 0xfd 0x89 0x14 132*9880d681SAndroid Build Coastguard Worker# CHECK: p1 = cmp.gt(r17, r21); if (p1.new) jump:t 133*9880d681SAndroid Build Coastguard Worker0x00 0xcd 0xc9 0x14 134*9880d681SAndroid Build Coastguard Worker# CHECK: p0 = cmp.gt(r17, r21); if (!p0.new) jump:nt 135*9880d681SAndroid Build Coastguard Worker0x00 0xdd 0xc9 0x14 136*9880d681SAndroid Build Coastguard Worker# CHECK: p1 = cmp.gt(r17, r21); if (!p1.new) jump:nt 137*9880d681SAndroid Build Coastguard Worker0x00 0xed 0xc9 0x14 138*9880d681SAndroid Build Coastguard Worker# CHECK: p0 = cmp.gt(r17, r21); if (!p0.new) jump:t 139*9880d681SAndroid Build Coastguard Worker0x00 0xfd 0xc9 0x14 140*9880d681SAndroid Build Coastguard Worker# CHECK: p1 = cmp.gt(r17, r21); if (!p1.new) jump:t 141*9880d681SAndroid Build Coastguard Worker0x00 0xcd 0x09 0x15 142*9880d681SAndroid Build Coastguard Worker# CHECK: p0 = cmp.gtu(r17, r21); if (p0.new) jump:nt 143*9880d681SAndroid Build Coastguard Worker0x00 0xdd 0x09 0x15 144*9880d681SAndroid Build Coastguard Worker# CHECK: p1 = cmp.gtu(r17, r21); if (p1.new) jump:nt 145*9880d681SAndroid Build Coastguard Worker0x00 0xed 0x09 0x15 146*9880d681SAndroid Build Coastguard Worker# CHECK: p0 = cmp.gtu(r17, r21); if (p0.new) jump:t 147*9880d681SAndroid Build Coastguard Worker0x00 0xfd 0x09 0x15 148*9880d681SAndroid Build Coastguard Worker# CHECK: p1 = cmp.gtu(r17, r21); if (p1.new) jump:t 149*9880d681SAndroid Build Coastguard Worker0x00 0xcd 0x49 0x15 150*9880d681SAndroid Build Coastguard Worker# CHECK: p0 = cmp.gtu(r17, r21); if (!p0.new) jump:nt 151*9880d681SAndroid Build Coastguard Worker0x00 0xdd 0x49 0x15 152*9880d681SAndroid Build Coastguard Worker# CHECK: p1 = cmp.gtu(r17, r21); if (!p1.new) jump:nt 153*9880d681SAndroid Build Coastguard Worker0x00 0xed 0x49 0x15 154*9880d681SAndroid Build Coastguard Worker# CHECK: p0 = cmp.gtu(r17, r21); if (!p0.new) jump:t 155*9880d681SAndroid Build Coastguard Worker0x00 0xfd 0x49 0x15 156*9880d681SAndroid Build Coastguard Worker# CHECK: p1 = cmp.gtu(r17, r21); if (!p1.new) jump:t 157*9880d681SAndroid Build Coastguard Worker 158*9880d681SAndroid Build Coastguard Worker# Jump to address 159*9880d681SAndroid Build Coastguard Worker0x22 0xc0 0x00 0x58 160*9880d681SAndroid Build Coastguard Worker# CHECK: jump 161*9880d681SAndroid Build Coastguard Worker0x22 0xc3 0x00 0x5c 162*9880d681SAndroid Build Coastguard Worker# CHECK: if (p3) jump 163*9880d681SAndroid Build Coastguard Worker0x22 0xc3 0x20 0x5c 164*9880d681SAndroid Build Coastguard Worker# CHECK: if (!p3) jump 165*9880d681SAndroid Build Coastguard Worker 166*9880d681SAndroid Build Coastguard Worker# Jump to address conditioned on new predicate 167*9880d681SAndroid Build Coastguard Worker0x03 0x40 0x45 0x85 0x00 0xcb 0x00 0x5c 168*9880d681SAndroid Build Coastguard Worker# CHECK: p3 = r5 169*9880d681SAndroid Build Coastguard Worker# CHECK-NEXT: if (p3.new) jump:nt 170*9880d681SAndroid Build Coastguard Worker0x03 0x40 0x45 0x85 0x00 0xdb 0x00 0x5c 171*9880d681SAndroid Build Coastguard Worker# CHECK: p3 = r5 172*9880d681SAndroid Build Coastguard Worker# CHECK-NEXT: if (p3.new) jump:t 173*9880d681SAndroid Build Coastguard Worker0x03 0x40 0x45 0x85 0x00 0xcb 0x20 0x5c 174*9880d681SAndroid Build Coastguard Worker# CHECK: p3 = r5 175*9880d681SAndroid Build Coastguard Worker# CHECK-NEXT: if (!p3.new) jump:nt 176*9880d681SAndroid Build Coastguard Worker0x03 0x40 0x45 0x85 0x00 0xdb 0x20 0x5c 177*9880d681SAndroid Build Coastguard Worker# CHECK: p3 = r5 178*9880d681SAndroid Build Coastguard Worker# CHECK-NEXT: if (!p3.new) jump:t 179*9880d681SAndroid Build Coastguard Worker 180*9880d681SAndroid Build Coastguard Worker# Jump to address conditioned on register value 181*9880d681SAndroid Build Coastguard Worker0x00 0xc0 0x11 0x61 182*9880d681SAndroid Build Coastguard Worker# CHECK: if (r17!=#0) jump:nt 183*9880d681SAndroid Build Coastguard Worker0x00 0xd0 0x11 0x61 184*9880d681SAndroid Build Coastguard Worker# CHECK: if (r17!=#0) jump:t 185*9880d681SAndroid Build Coastguard Worker0x00 0xc0 0x51 0x61 186*9880d681SAndroid Build Coastguard Worker# CHECK: if (r17>=#0) jump:nt 187*9880d681SAndroid Build Coastguard Worker0x00 0xd0 0x51 0x61 188*9880d681SAndroid Build Coastguard Worker# CHECK: if (r17>=#0) jump:t 189*9880d681SAndroid Build Coastguard Worker0x00 0xc0 0x91 0x61 190*9880d681SAndroid Build Coastguard Worker# CHECK: if (r17==#0) jump:nt 191*9880d681SAndroid Build Coastguard Worker0x00 0xd0 0x91 0x61 192*9880d681SAndroid Build Coastguard Worker# CHECK: if (r17==#0) jump:t 193*9880d681SAndroid Build Coastguard Worker0x00 0xc0 0xd1 0x61 194*9880d681SAndroid Build Coastguard Worker# CHECK: if (r17<=#0) jump:nt 195*9880d681SAndroid Build Coastguard Worker0x00 0xd0 0xd1 0x61 196*9880d681SAndroid Build Coastguard Worker# CHECK: if (r17<=#0) jump:t 197*9880d681SAndroid Build Coastguard Worker 198*9880d681SAndroid Build Coastguard Worker# Transfer and jump 199*9880d681SAndroid Build Coastguard Worker0x00 0xd5 0x09 0x16 200*9880d681SAndroid Build Coastguard Worker# CHECK: r17 = #21 ; jump 201*9880d681SAndroid Build Coastguard Worker0x00 0xc9 0x0d 0x17 202*9880d681SAndroid Build Coastguard Worker# CHECK: r17 = r21 ; jump 203