Home | History | Annotate | Download | only in instructions
      1 # RUN: llvm-mc -triple=hexagon -filetype=obj -o - %s | llvm-objdump -d - | FileCheck %s
      2 # Hexagon Programmer's Reference Manual 11.7.2 NV/ST
      3 
      4 # Store new-value byte
      5 # CHECK: 1f 40 7f 70
      6 # CHECK-NEXT: 82 f5 b1 3b
      7 { r31 = r31
      8   memb(r17 + r21<<#3) = r31.new }
      9 # CHECK: 1f 40 7f 70
     10 # CHECK-NEXT: 11 c2 a0 48
     11 { r31 = r31
     12   memb(#17) = r31.new }
     13 # CHECK: 1f 40 7f 70
     14 # CHECK-NEXT: 15 c2 b1 a1
     15 { r31 = r31
     16   memb(r17+#21) = r31.new }
     17 # CHECK: 1f 40 7f 70
     18 # CHECK-NEXT: 02 e2 b1 a9
     19 { r31 = r31
     20   memb(r17 ++ I:circ(m1)) = r31.new }
     21 # CHECK: 1f 40 7f 70
     22 # CHECK-NEXT: 28 e2 b1 a9
     23 { r31 = r31
     24   memb(r17 ++ #5:circ(m1)) = r31.new }
     25 # CHECK: 1f 40 7f 70
     26 # CHECK-NEXT: 28 c2 b1 ab
     27 { r31 = r31
     28   memb(r17++#5) = r31.new }
     29 # CHECK: 1f 40 7f 70
     30 # CHECK-NEXT: 00 e2 b1 ad
     31 { r31 = r31
     32   memb(r17++m1) = r31.new }
     33 # CHECK: 1f 40 7f 70
     34 # CHECK-NEXT: 00 e2 b1 af
     35 { r31 = r31
     36   memb(r17 ++ m1:brev) = r31.new }
     37 
     38 # Store new-value byte conditionally
     39 # CHECK: 1f 40 7f 70
     40 # CHECK-NEXT: e2 f5 b1 34
     41 { r31 = r31
     42   if (p3) memb(r17+r21<<#3) = r31.new }
     43 # CHECK: 1f 40 7f 70
     44 # CHECK-NEXT: e2 f5 b1 35
     45 { r31 = r31
     46   if (!p3) memb(r17+r21<<#3) = r31.new }
     47 # CHECK: 03 40 45 85
     48 # CHECK-NEXT: 1f 40 7f 70
     49 # CHECK-NEXT: e2 f5 b1 36
     50 { p3 = r5
     51   r31 = r31
     52   if (p3.new) memb(r17+r21<<#3) = r31.new }
     53 # CHECK: 03 40 45 85
     54 # CHECK-NEXT: 1f 40 7f 70
     55 # CHECK-NEXT: e2 f5 b1 37
     56 { p3 = r5
     57   r31 = r31
     58   if (!p3.new) memb(r17+r21<<#3) = r31.new }
     59 # CHECK: 1f 40 7f 70
     60 # CHECK-NEXT: ab c2 b1 40
     61 { r31 = r31
     62   if (p3) memb(r17+#21) = r31.new }
     63 # CHECK: 1f 40 7f 70
     64 # CHECK-NEXT: ab c2 b1 44
     65 { r31 = r31
     66   if (!p3) memb(r17+#21) = r31.new }
     67 # CHECK: 03 40 45 85
     68 # CHECK-NEXT: 1f 40 7f 70
     69 # CHECK-NEXT: ab c2 b1 42
     70 { p3 = r5
     71   r31 = r31
     72   if (p3.new) memb(r17+#21) = r31.new }
     73 # CHECK: 03 40 45 85
     74 # CHECK-NEXT: 1f 40 7f 70
     75 # CHECK-NEXT: ab c2 b1 46
     76 { p3 = r5
     77   r31 = r31
     78   if (!p3.new) memb(r17+#21) = r31.new }
     79 # CHECK: 1f 40 7f 70
     80 # CHECK-NEXT: 2b e2 b1 ab
     81 { r31 = r31
     82   if (p3) memb(r17++#5) = r31.new }
     83 # CHECK: 1f 40 7f 70
     84 # CHECK-NEXT: 2f e2 b1 ab
     85 { r31 = r31
     86   if (!p3) memb(r17++#5) = r31.new }
     87 # CHECK: 03 40 45 85
     88 # CHECK-NEXT: 1f 40 7f 70
     89 # CHECK-NEXT: ab e2 b1 ab
     90 { p3 = r5
     91   r31 = r31
     92   if (p3.new) memb(r17++#5) = r31.new }
     93 # CHECK: 03 40 45 85
     94 # CHECK-NEXT: 1f 40 7f 70
     95 # CHECK-NEXT: af e2 b1 ab
     96 { p3 = r5
     97   r31 = r31
     98   if (!p3.new) memb(r17++#5) = r31.new }
     99 
    100 # Store new-value halfword
    101 # CHECK: 1f 40 7f 70
    102 # CHECK-NEXT: 8a f5 b1 3b
    103 { r31 = r31
    104   memh(r17 + r21<<#3) = r31.new }
    105 # CHECK: 1f 40 7f 70
    106 # CHECK-NEXT: 15 ca a0 48
    107 { r31 = r31
    108   memh(#42) = r31.new }
    109 # CHECK: 1f 40 7f 70
    110 # CHECK-NEXT: 15 ca b1 a1
    111 { r31 = r31
    112   memh(r17+#42) = r31.new }
    113 # CHECK: 1f 40 7f 70
    114 # CHECK-NEXT: 02 ea b1 a9
    115 { r31 = r31
    116   memh(r17 ++ I:circ(m1)) = r31.new }
    117 # CHECK: 1f 40 7f 70
    118 # CHECK-NEXT: 28 ea b1 a9
    119 { r31 = r31
    120   memh(r17 ++ #10:circ(m1)) = r31.new }
    121 # CHECK: 1f 40 7f 70
    122 # CHECK-NEXT: 28 ca b1 ab
    123 { r31 = r31
    124   memh(r17++#10) = r31.new }
    125 # CHECK: 1f 40 7f 70
    126 # CHECK-NEXT: 00 ea b1 ad
    127 { r31 = r31
    128   memh(r17++m1) = r31.new }
    129 # CHECK: 1f 40 7f 70
    130 # CHECK-NEXT: 00 ea b1 af
    131 { r31 = r31
    132   memh(r17 ++ m1:brev) = r31.new }
    133 
    134 # Store new-value halfword conditionally
    135 # CHECK: 1f 40 7f 70
    136 # CHECK-NEXT: ea f5 b1 34
    137 { r31 = r31
    138   if (p3) memh(r17+r21<<#3) = r31.new }
    139 # CHECK: 1f 40 7f 70
    140 # CHECK-NEXT: ea f5 b1 35
    141 { r31 = r31
    142   if (!p3) memh(r17+r21<<#3) = r31.new }
    143 # CHECK: 03 40 45 85
    144 # CHECK-NEXT: 1f 40 7f 70
    145 # CHECK-NEXT: ea f5 b1 36
    146 { p3 = r5
    147   r31 = r31
    148   if (p3.new) memh(r17+r21<<#3) = r31.new }
    149 # CHECK: 03 40 45 85
    150 # CHECK-NEXT: 1f 40 7f 70
    151 # CHECK-NEXT: ea f5 b1 37
    152 { p3 = r5
    153   r31 = r31
    154   if (!p3.new) memh(r17+r21<<#3) = r31.new }
    155 # CHECK: 1f 40 7f 70
    156 # CHECK-NEXT: ab ca b1 40
    157 { r31 = r31
    158   if (p3) memh(r17+#42) = r31.new }
    159 # CHECK: 1f 40 7f 70
    160 # CHECK-NEXT: ab ca b1 44
    161 { r31 = r31
    162   if (!p3) memh(r17+#42) = r31.new }
    163 # CHECK: 03 40 45 85
    164 # CHECK-NEXT: 1f 40 7f 70
    165 # CHECK-NEXT: ab ca b1 42
    166 { p3 = r5
    167   r31 = r31
    168   if (p3.new) memh(r17+#42) = r31.new }
    169 # CHECK: 03 40 45 85
    170 # CHECK-NEXT: 1f 40 7f 70
    171 # CHECK-NEXT: ab ca b1 46
    172 { p3 = r5
    173   r31 = r31
    174   if (!p3.new) memh(r17+#42) = r31.new }
    175 # CHECK: 1f 40 7f 70
    176 # CHECK-NEXT: 2b ea b1 ab
    177 { r31 = r31
    178   if (p3) memh(r17++#10) = r31.new }
    179 # CHECK: 1f 40 7f 70
    180 # CHECK-NEXT: 2f ea b1 ab
    181 { r31 = r31
    182   if (!p3) memh(r17++#10) = r31.new }
    183 # CHECK: 03 40 45 85
    184 # CHECK-NEXT: 1f 40 7f 70
    185 # CHECK-NEXT: ab ea b1 ab
    186 { p3 = r5
    187   r31 = r31
    188   if (p3.new) memh(r17++#10) = r31.new }
    189 # CHECK: 03 40 45 85
    190 # CHECK-NEXT: 1f 40 7f 70
    191 # CHECK-NEXT: af ea b1 ab
    192 { p3 = r5
    193   r31 = r31
    194   if (!p3.new) memh(r17++#10) = r31.new }
    195 
    196 # Store new-value word
    197 # CHECK: 1f 40 7f 70
    198 # CHECK-NEXT: 92 f5 b1 3b
    199 { r31 = r31
    200   memw(r17 + r21<<#3) = r31.new }
    201 # CHECK: 1f 40 7f 70
    202 # CHECK-NEXT: 15 d2 a0 48
    203 { r31 = r31
    204   memw(#84) = r31.new }
    205 # CHECK: 1f 40 7f 70
    206 # CHECK-NEXT: 15 d2 b1 a1
    207 { r31 = r31
    208   memw(r17+#84) = r31.new }
    209 # CHECK: 1f 40 7f 70
    210 # CHECK-NEXT: 02 f2 b1 a9
    211 { r31 = r31
    212   memw(r17 ++ I:circ(m1)) = r31.new }
    213 # CHECK: 1f 40 7f 70
    214 # CHECK-NEXT: 28 f2 b1 a9
    215 { r31 = r31
    216   memw(r17 ++ #20:circ(m1)) = r31.new }
    217 # CHECK: 1f 40 7f 70
    218 # CHECK-NEXT: 28 d2 b1 ab
    219 { r31 = r31
    220   memw(r17++#20) = r31.new }
    221 # CHECK: 1f 40 7f 70
    222 # CHECK-NEXT: 00 f2 b1 ad
    223 { r31 = r31
    224   memw(r17++m1) = r31.new }
    225 # CHECK: 1f 40 7f 70
    226 # CHECK-NEXT: 00 f2 b1 af
    227 { r31 = r31
    228   memw(r17 ++ m1:brev) = r31.new }
    229 
    230 # Store new-value word conditionally
    231 # CHECK: 1f 40 7f 70
    232 # CHECK-NEXT: f2 f5 b1 34
    233 { r31 = r31
    234   if (p3) memw(r17+r21<<#3) = r31.new }
    235 # CHECK: 1f 40 7f 70
    236 # CHECK-NEXT: f2 f5 b1 35
    237 { r31 = r31
    238   if (!p3) memw(r17+r21<<#3) = r31.new }
    239 # CHECK: 03 40 45 85
    240 # CHECK-NEXT: 1f 40 7f 70
    241 # CHECK-NEXT: f2 f5 b1 36
    242 { p3 = r5
    243   r31 = r31
    244   if (p3.new) memw(r17+r21<<#3) = r31.new }
    245 # CHECK: 03 40 45 85
    246 # CHECK-NEXT: 1f 40 7f 70
    247 # CHECK-NEXT: f2 f5 b1 37
    248 { p3 = r5
    249   r31 = r31
    250   if (!p3.new) memw(r17+r21<<#3) = r31.new }
    251 # CHECK: 1f 40 7f 70
    252 # CHECK-NEXT: ab d2 b1 40
    253 { r31 = r31
    254   if (p3) memw(r17+#84) = r31.new }
    255 # CHECK: 1f 40 7f 70
    256 # CHECK-NEXT: ab d2 b1 44
    257 { r31 = r31
    258   if (!p3) memw(r17+#84) = r31.new }
    259 # CHECK: 03 40 45 85
    260 # CHECK-NEXT: 1f 40 7f 70
    261 # CHECK-NEXT: ab d2 b1 42
    262 { p3 = r5
    263   r31 = r31
    264   if (p3.new) memw(r17+#84) = r31.new }
    265 # CHECK: 03 40 45 85
    266 # CHECK-NEXT: 1f 40 7f 70
    267 # CHECK-NEXT: ab d2 b1 46
    268 { p3 = r5
    269   r31 = r31
    270   if (!p3.new) memw(r17+#84) = r31.new }
    271 # CHECK: 1f 40 7f 70
    272 # CHECK-NEXT: 2b f2 b1 ab
    273 { r31 = r31
    274   if (p3) memw(r17++#20) = r31.new }
    275 # CHECK: 1f 40 7f 70
    276 # CHECK-NEXT: 2f f2 b1 ab
    277 { r31 = r31
    278   if (!p3) memw(r17++#20) = r31.new }
    279 # CHECK: 03 40 45 85
    280 # CHECK-NEXT: 1f 40 7f 70
    281 # CHECK-NEXT: ab f2 b1 ab
    282 { p3 = r5
    283   r31 = r31
    284   if (p3.new) memw(r17++#20) = r31.new }
    285 # CHECK: 03 40 45 85
    286 # CHECK-NEXT: 1f 40 7f 70
    287 # CHECK-NEXT: af f2 b1 ab
    288 { p3 = r5
    289   r31 = r31
    290   if (!p3.new) memw(r17++#20) = r31.new }
    291