1 # RUN: llvm-mc -triple=hexagon -disassemble < %s | FileCheck %s 2 # Hexagon Programmer's Reference Manual 11.10.7 XTYPE/PRED 3 4 # Bounds check 5 0x83 0xf4 0x10 0xd2 6 # CHECK: p3 = boundscheck(r17:16, r21:20):raw:lo 7 0xa3 0xf4 0x10 0xd2 8 # CHECK: p3 = boundscheck(r17:16, r21:20):raw:hi 9 10 # Compare byte 11 0x43 0xd5 0xd1 0xc7 12 # CHECK: p3 = cmpb.gt(r17, r21) 13 0xc3 0xd5 0xd1 0xc7 14 # CHECK: p3 = cmpb.eq(r17, r21) 15 0xe3 0xd5 0xd1 0xc7 16 # CHECK: p3 = cmpb.gtu(r17, r21) 17 0xa3 0xc2 0x11 0xdd 18 # CHECK: p3 = cmpb.eq(r17, #21) 19 0xa3 0xc2 0x31 0xdd 20 # CHECK: p3 = cmpb.gt(r17, #21) 21 0xa3 0xc2 0x51 0xdd 22 # CHECK: p3 = cmpb.gtu(r17, #21) 23 24 # Compare half 25 0x63 0xd5 0xd1 0xc7 26 # CHECK: p3 = cmph.eq(r17, r21) 27 0x83 0xd5 0xd1 0xc7 28 # CHECK: p3 = cmph.gt(r17, r21) 29 0xa3 0xd5 0xd1 0xc7 30 # CHECK: p3 = cmph.gtu(r17, r21) 31 0xab 0xc2 0x11 0xdd 32 # CHECK: p3 = cmph.eq(r17, #21) 33 0xab 0xc2 0x31 0xdd 34 # CHECK: p3 = cmph.gt(r17, #21) 35 0xab 0xc2 0x51 0xdd 36 # CHECK: p3 = cmph.gtu(r17, #21) 37 38 # Compare doublewords 39 0x03 0xde 0x94 0xd2 40 # CHECK: p3 = cmp.eq(r21:20, r31:30) 41 0x43 0xde 0x94 0xd2 42 # CHECK: p3 = cmp.gt(r21:20, r31:30) 43 0x83 0xde 0x94 0xd2 44 # CHECK: p3 = cmp.gtu(r21:20, r31:30) 45 46 # Compare bitmask 47 0x03 0xd5 0x91 0x85 48 # CHECK: p3 = bitsclr(r17, #21) 49 0x03 0xd5 0xb1 0x85 50 # CHECK: p3 = !bitsclr(r17, #21) 51 0x03 0xd5 0x51 0xc7 52 # CHECK: p3 = bitsset(r17, r21) 53 0x03 0xd5 0x71 0xc7 54 # CHECK: p3 = !bitsset(r17, r21) 55 0x03 0xd5 0x91 0xc7 56 # CHECK: p3 = bitsclr(r17, r21) 57 0x03 0xd5 0xb1 0xc7 58 # CHECK: p3 = !bitsclr(r17, r21) 59 60 # mask generate from predicate 61 0x10 0xc3 0x00 0x86 62 # CHECK: r17:16 = mask(p3) 63 64 # Check for TLB match 65 0x63 0xf5 0x10 0xd2 66 # CHECK: p3 = tlbmatch(r17:16, r21) 67 68 # Predicate Transfer 69 0x03 0xc0 0x45 0x85 70 # CHECK: p3 = r5 71 0x05 0xc0 0x43 0x89 72 # CHECK: r5 = p3 73 74 # Test bit 75 0x03 0xd5 0x11 0x85 76 # CHECK: p3 = tstbit(r17, #21) 77 0x03 0xd5 0x31 0x85 78 # CHECK: p3 = !tstbit(r17, #21) 79 0x03 0xd5 0x11 0xc7 80 # CHECK: p3 = tstbit(r17, r21) 81 0x03 0xd5 0x31 0xc7 82 # CHECK: p3 = !tstbit(r17, r21) 83 84 # Vector compare halfwords 85 0x63 0xde 0x14 0xd2 86 # CHECK: p3 = vcmph.eq(r21:20, r31:30) 87 0x83 0xde 0x14 0xd2 88 # CHECK: p3 = vcmph.gt(r21:20, r31:30) 89 0xa3 0xde 0x14 0xd2 90 # CHECK: p3 = vcmph.gtu(r21:20, r31:30) 91 0xeb 0xc3 0x14 0xdc 92 # CHECK: p3 = vcmph.eq(r21:20, #31) 93 0xeb 0xc3 0x34 0xdc 94 # CHECK: p3 = vcmph.gt(r21:20, #31) 95 0xeb 0xc3 0x54 0xdc 96 # CHECK: p3 = vcmph.gtu(r21:20, #31) 97 98 # Vector compare bytes for any match 99 0x03 0xfe 0x14 0xd2 100 # CHECK: p3 = any8(vcmpb.eq(r21:20, r31:30)) 101 102 # Vector compare bytes 103 0x63 0xde 0x14 0xd2 104 # CHECK: p3 = vcmph.eq(r21:20, r31:30) 105 0x83 0xde 0x14 0xd2 106 # CHECK: p3 = vcmph.gt(r21:20, r31:30) 107 0xa3 0xde 0x14 0xd2 108 # CHECK: p3 = vcmph.gtu(r21:20, r31:30) 109 0xeb 0xc3 0x14 0xdc 110 # CHECK: p3 = vcmph.eq(r21:20, #31) 111 0xeb 0xc3 0x34 0xdc 112 # CHECK: p3 = vcmph.gt(r21:20, #31) 113 0xeb 0xc3 0x54 0xdc 114 # CHECK: p3 = vcmph.gtu(r21:20, #31) 115 116 # Vector compare words 117 0x03 0xde 0x14 0xd2 118 # CHECK: p3 = vcmpw.eq(r21:20, r31:30) 119 0x23 0xde 0x14 0xd2 120 # CHECK: p3 = vcmpw.gt(r21:20, r31:30) 121 0x43 0xde 0x14 0xd2 122 # CHECK: p3 = vcmpw.gtu(r21:20, r31:30) 123 0xf3 0xc3 0x14 0xdc 124 # CHECK: p3 = vcmpw.eq(r21:20, #31) 125 0xf3 0xc3 0x34 0xdc 126 # CHECK: p3 = vcmpw.gt(r21:20, #31) 127 0xf3 0xc3 0x54 0xdc 128 # CHECK: p3 = vcmpw.gtu(r21:20, #31) 129 130 # Viterbi pack even and odd predicate bits 131 0x11 0xc2 0x03 0x89 132 # CHECK: r17 = vitpack(p3, p2) 133 134 # Vector mux 135 0x70 0xde 0x14 0xd1 136 # CHECK: r17:16 = vmux(p3, r21:20, r31:30) 137