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