reference, declarationdefinition
definition → references, declarations, derived classes, virtual overrides
reference to multiple definitions → definitions
unreferenced
    1
    2
    3
    4
    5
    6
    7
    8
    9
   10
   11
   12
   13
   14
   15
   16
   17
   18
   19
   20
   21
   22
   23
   24
   25
   26
   27
   28
   29
   30
   31
   32
   33
   34
   35
   36
   37
   38
   39
   40
   41
   42
   43
   44
   45
   46
   47
   48
   49
   50
   51
   52
   53
   54
   55
   56
   57
   58
   59
   60
   61
   62
   63
   64
   65
   66
   67
   68
   69
   70
   71
   72
   73
   74
   75
   76
   77
   78
   79
   80
   81
   82
   83
   84
   85
   86
   87
   88
   89
   90
   91
   92
   93
   94
   95
   96
   97
   98
   99
  100
  101
  102
  103
  104
  105
  106
  107
  108
  109
  110
  111
  112
  113
  114
  115
  116
  117
  118
  119
  120
  121
  122
  123
  124
  125
  126
  127
  128
  129
  130
  131
  132
  133
  134
  135
  136
  137
  138
  139
  140
  141
  142
  143
  144
  145
  146
  147
  148
  149
  150
  151
  152
  153
  154
  155
  156
  157
  158
  159
  160
  161
  162
  163
  164
  165
  166
  167
  168
  169
  170
  171
  172
  173
  174
  175
  176
  177
  178
  179
  180
  181
  182
  183
  184
  185
  186
  187
  188
  189
  190
  191
  192
  193
  194
  195
  196
  197
  198
  199
  200
  201
  202
  203
  204
  205
  206
  207
  208
  209
  210
  211
  212
  213
  214
  215
  216
  217
  218
  219
  220
  221
  222
  223
  224
  225
  226
  227
  228
  229
  230
  231
  232
  233
  234
  235
  236
  237
  238
  239
  240
  241
  242
  243
  244
  245
  246
  247
  248
  249
  250
  251
  252
  253
  254
  255
  256
  257
  258
  259
  260
  261
  262
  263
  264
  265
  266
  267
  268
  269
  270
  271
  272
  273
  274
  275
  276
  277
  278
  279
  280
  281
  282
  283
  284
  285
  286
  287
  288
  289
  290
  291
  292
  293
  294
  295
  296
  297
  298
  299
  300
  301
  302
  303
  304
  305
  306
  307
  308
  309
  310
  311
  312
  313
  314
  315
  316
  317
  318
  319
  320
  321
  322
  323
  324
  325
  326
  327
  328
  329
  330
  331
  332
  333
  334
  335
  336
  337
  338
  339
  340
  341
  342
  343
  344
  345
  346
  347
  348
  349
  350
  351
  352
  353
  354
  355
  356
  357
  358
  359
  360
  361
  362
  363
  364
  365
  366
  367
  368
  369
  370
  371
  372
  373
  374
  375
  376
  377
  378
  379
  380
  381
  382
  383
  384
  385
  386
  387
  388
  389
  390
  391
  392
  393
  394
  395
# RUN: llvm-mc -triple=hexagon -disassemble < %s | FileCheck %s
# Hexagon Programmer's Reference Manual 11.10.1 XTYPE/ALU

# Absolute value doubleword
0xd0 0xc0 0x94 0x80
# CHECK: r17:16 = abs(r21:20)
0x91 0xc0 0x95 0x8c
# CHECK: r17 = abs(r21)
0xb1 0xc0 0x95 0x8c
# CHECK: r17 = abs(r21):sat

# Add and accumulate
0xff 0xd1 0x35 0xdb
# CHECK: r17 = add(r21,add(r31,#23))
0xff 0xd1 0xb5 0xdb
# CHECK: r17 = add(r21,sub(#23,r31))
0xf1 0xc2 0x15 0xe2
# CHECK: r17 += add(r21,#23)
0xf1 0xc2 0x95 0xe2
# CHECK: r17 -= add(r21,#23)
0x31 0xdf 0x15 0xef
# CHECK: r17 += add(r21,r31)
0x31 0xdf 0x95 0xef
# CHECK: r17 -= add(r21,r31)

# Add doublewords
0xf0 0xde 0x14 0xd3
# CHECK: r17:16 = add(r21:20,r31:30)
0xb0 0xde 0x74 0xd3
# CHECK: r17:16 = add(r21:20,r31:30):sat
0xd0 0xde 0x74 0xd3
# CHECK: r17:16 = add(r21:20,r31:30):raw:lo
0xf0 0xde 0x74 0xd3
# CHECK: r17:16 = add(r21:20,r31:30):raw:hi

# Add halfword
0x11 0xd5 0x1f 0xd5
# CHECK: r17 = add(r21.l,r31.l)
0x51 0xd5 0x1f 0xd5
# CHECK: r17 = add(r21.l,r31.h)
0x91 0xd5 0x1f 0xd5
# CHECK: r17 = add(r21.l,r31.l):sat
0xd1 0xd5 0x1f 0xd5
# CHECK: r17 = add(r21.l,r31.h):sat
0x11 0xd5 0x5f 0xd5
# CHECK: r17 = add(r21.l,r31.l):<<16
0x31 0xd5 0x5f 0xd5
# CHECK: r17 = add(r21.l,r31.h):<<16
0x51 0xd5 0x5f 0xd5
# CHECK: r17 = add(r21.h,r31.l):<<16
0x71 0xd5 0x5f 0xd5
# CHECK: r17 = add(r21.h,r31.h):<<16
0x91 0xd5 0x5f 0xd5
# CHECK: r17 = add(r21.l,r31.l):sat:<<16
0xb1 0xd5 0x5f 0xd5
# CHECK: r17 = add(r21.l,r31.h):sat:<<16
0xd1 0xd5 0x5f 0xd5
# CHECK: r17 = add(r21.h,r31.l):sat:<<16
0xf1 0xd5 0x5f 0xd5
# CHECK: r17 = add(r21.h,r31.h):sat:<<16

# Add or subtract doublewords with carry
0x70 0xde 0xd4 0xc2
# CHECK: r17:16 = add(r21:20,r31:30,p3):carry
0x70 0xde 0xf4 0xc2
# CHECK: r17:16 = sub(r21:20,r31:30,p3):carry

# Logical doublewords
0x90 0xc0 0x94 0x80
# CHECK: r17:16 = not(r21:20)
0x10 0xde 0xf4 0xd3
# CHECK: r17:16 = and(r21:20,r31:30)
0x30 0xd4 0xfe 0xd3
# CHECK: r17:16 = and(r21:20,~r31:30)
0x50 0xde 0xf4 0xd3
# CHECK: r17:16 = or(r21:20,r31:30)
0x70 0xd4 0xfe 0xd3
# CHECK: r17:16 = or(r21:20,~r31:30)
0x90 0xde 0xf4 0xd3
# CHECK: r17:16 = xor(r21:20,r31:30)

# Logical-logical doublewords
0x10 0xde 0x94 0xca
# CHECK: r17:16 ^= xor(r21:20,r31:30)

# Logical-logical words
0xf1 0xc3 0x15 0xda
# CHECK: r17 |= and(r21,#31)
0xf5 0xc3 0x51 0xda
# CHECK: r17 = or(r21,and(r17,#31))
0xf1 0xc3 0x95 0xda
# CHECK: r17 |= or(r21,#31)
0x11 0xdf 0x35 0xef
# CHECK: r17 |= and(r21,~r31)
0x31 0xdf 0x35 0xef
# CHECK: r17 &= and(r21,~r31)
0x51 0xdf 0x35 0xef
# CHECK: r17 ^= and(r21,~r31)
0x11 0xdf 0x55 0xef
# CHECK: r17 &= and(r21,r31)
0x31 0xdf 0x55 0xef
# CHECK: r17 &= or(r21,r31)
0x51 0xdf 0x55 0xef
# CHECK: r17 &= xor(r21,r31)
0x71 0xdf 0x55 0xef
# CHECK: r17 |= and(r21,r31)
0x71 0xdf 0x95 0xef
# CHECK: r17 ^= xor(r21,r31)
0x11 0xdf 0xd5 0xef
# CHECK: r17 |= or(r21,r31)
0x31 0xdf 0xd5 0xef
# CHECK: r17 |= xor(r21,r31)
0x51 0xdf 0xd5 0xef
# CHECK: r17 ^= and(r21,r31)
0x71 0xdf 0xd5 0xef
# CHECK: r17 ^= or(r21,r31)

# Maximum words
0x11 0xdf 0xd5 0xd5
# CHECK: r17 = max(r21,r31)
0x91 0xdf 0xd5 0xd5
# CHECK: r17 = maxu(r21,r31)

# Maximum doublewords
0x90 0xde 0xd4 0xd3
# CHECK: r17:16 = max(r21:20,r31:30)
0xb0 0xde 0xd4 0xd3
# CHECK: r17:16 = maxu(r21:20,r31:30)

# Minimum words
0x11 0xd5 0xbf 0xd5
# CHECK: r17 = min(r21,r31)
0x91 0xd5 0xbf 0xd5
# CHECK: r17 = minu(r21,r31)

# Minimum doublewords
0xd0 0xd4 0xbe 0xd3
# CHECK: r17:16 = min(r21:20,r31:30)
0xf0 0xd4 0xbe 0xd3
# CHECK: r17:16 = minu(r21:20,r31:30)

# Module wrap
0xf1 0xdf 0xf5 0xd3
# CHECK: r17 = modwrap(r21,r31)

# Negate
0xb0 0xc0 0x94 0x80
# CHECK: r17:16 = neg(r21:20)
0xd1 0xc0 0x95 0x8c
# CHECK: r17 = neg(r21):sat

# Round
0x31 0xc0 0xd4 0x88
# CHECK: r17 = round(r21:20):sat
0x11 0xdf 0xf5 0x8c
# CHECK: r17 = cround(r21,#31)
0x91 0xdf 0xf5 0x8c
# CHECK: r17 = round(r21,#31)
0xd1 0xdf 0xf5 0x8c
# CHECK: r17 = round(r21,#31):sat
0x11 0xdf 0xd5 0xc6
# CHECK: r17 = cround(r21,r31)
0x91 0xdf 0xd5 0xc6
# CHECK: r17 = round(r21,r31)
0xd1 0xdf 0xd5 0xc6
# CHECK: r17 = round(r21,r31):sat

# Subtract doublewords
0xf0 0xd4 0x3e 0xd3
# CHECK: r17:16 = sub(r21:20,r31:30)

# Subtract and accumulate words
0x71 0xd5 0x1f 0xef
# CHECK: r17 += sub(r21,r31)

# Subtract halfword
0x11 0xd5 0x3f 0xd5
# CHECK: r17 = sub(r21.l,r31.l)
0x51 0xd5 0x3f 0xd5
# CHECK: r17 = sub(r21.l,r31.h)
0x91 0xd5 0x3f 0xd5
# CHECK: r17 = sub(r21.l,r31.l):sat
0xd1 0xd5 0x3f 0xd5
# CHECK: r17 = sub(r21.l,r31.h):sat
0x11 0xd5 0x7f 0xd5
# CHECK: r17 = sub(r21.l,r31.l):<<16
0x31 0xd5 0x7f 0xd5
# CHECK: r17 = sub(r21.l,r31.h):<<16
0x51 0xd5 0x7f 0xd5
# CHECK: r17 = sub(r21.h,r31.l):<<16
0x71 0xd5 0x7f 0xd5
# CHECK: r17 = sub(r21.h,r31.h):<<16
0x91 0xd5 0x7f 0xd5
# CHECK: r17 = sub(r21.l,r31.l):sat:<<16
0xb1 0xd5 0x7f 0xd5
# CHECK: r17 = sub(r21.l,r31.h):sat:<<16
0xd1 0xd5 0x7f 0xd5
# CHECK: r17 = sub(r21.h,r31.l):sat:<<16
0xf1 0xd5 0x7f 0xd5
# CHECK: r17 = sub(r21.h,r31.h):sat:<<16

# Sign extend word to doubleword
0x10 0xc0 0x55 0x84
# CHECK: r17:16 = sxtw(r21)

# Vector absolute value halfwords
0x90 0xc0 0x54 0x80
# CHECK: r17:16 = vabsh(r21:20)
0xb0 0xc0 0x54 0x80
# CHECK: r17:16 = vabsh(r21:20):sat

# Vector absolute value words
0xd0 0xc0 0x54 0x80
# CHECK: r17:16 = vabsw(r21:20)
0xf0 0xc0 0x54 0x80
# CHECK: r17:16 = vabsw(r21:20):sat

# Vector absolute difference halfwords
0x10 0xd4 0x7e 0xe8
# CHECK: r17:16 = vabsdiffh(r21:20,r31:30)

# Vector absolute difference words
0x10 0xd4 0x3e 0xe8
# CHECK: r17:16 = vabsdiffw(r21:20,r31:30)

# Vector add halfwords
0x50 0xde 0x14 0xd3
# CHECK: r17:16 = vaddh(r21:20,r31:30)
0x70 0xde 0x14 0xd3
# CHECK: r17:16 = vaddh(r21:20,r31:30):sat
0x90 0xde 0x14 0xd3
# CHECK: r17:16 = vadduh(r21:20,r31:30):sat

# Vector add halfwords with saturate and pack to unsigned bytes
0x31 0xde 0x54 0xc1
# CHECK: r17 = vaddhub(r21:20,r31:30):sat

# Vector reduce add unsigned bytes
0x30 0xde 0x54 0xe8
# CHECK: r17:16 = vraddub(r21:20,r31:30)
0x30 0xde 0x54 0xea
# CHECK: r17:16 += vraddub(r21:20,r31:30)

# Vector reduce add halfwords
0x31 0xde 0x14 0xe9
# CHECK: r17 = vradduh(r21:20,r31:30)
0xf1 0xde 0x34 0xe9
# CHECK: r17 = vraddh(r21:20,r31:30)

# Vector add bytes
0x10 0xde 0x14 0xd3
# CHECK: r17:16 = vaddub(r21:20,r31:30)
0x30 0xde 0x14 0xd3
# CHECK: r17:16 = vaddub(r21:20,r31:30):sat

# Vector add words
0xb0 0xde 0x14 0xd3
# CHECK: r17:16 = vaddw(r21:20,r31:30)
0xd0 0xde 0x14 0xd3
# CHECK: r17:16 = vaddw(r21:20,r31:30):sat

# Vector average halfwords
0x50 0xde 0x54 0xd3
# CHECK: r17:16 = vavgh(r21:20,r31:30)
0x70 0xde 0x54 0xd3
# CHECK: r17:16 = vavgh(r21:20,r31:30):rnd
0x90 0xde 0x54 0xd3
# CHECK: r17:16 = vavgh(r21:20,r31:30):crnd
0xb0 0xde 0x54 0xd3
# CHECK: r17:16 = vavguh(r21:20,r31:30)
0xd0 0xde 0x54 0xd3
# CHECK: r17:16 = vavguh(r21:20,r31:30):rnd
0x10 0xd4 0x9e 0xd3
# CHECK: r17:16 = vnavgh(r21:20,r31:30)
0x30 0xd4 0x9e 0xd3
# CHECK: r17:16 = vnavgh(r21:20,r31:30):rnd:sat
0x50 0xd4 0x9e 0xd3
# CHECK: r17:16 = vnavgh(r21:20,r31:30):crnd:sat

# Vector average unsigned bytes
0x10 0xde 0x54 0xd3
# CHECK: r17:16 = vavgub(r21:20,r31:30)
0x30 0xde 0x54 0xd3
# CHECK: r17:16 = vavgub(r21:20,r31:30):rnd

# Vector average words
0x10 0xde 0x74 0xd3
# CHECK: r17:16 = vavgw(r21:20,r31:30)
0x30 0xde 0x74 0xd3
# CHECK: r17:16 = vavgw(r21:20,r31:30):rnd
0x50 0xde 0x74 0xd3
# CHECK: r17:16 = vavgw(r21:20,r31:30):crnd
0x70 0xde 0x74 0xd3
# CHECK: r17:16 = vavguw(r21:20,r31:30)
0x90 0xde 0x74 0xd3
# CHECK: r17:16 = vavguw(r21:20,r31:30):rnd
0x70 0xd4 0x9e 0xd3
# CHECK: r17:16 = vnavgw(r21:20,r31:30)
0x90 0xd4 0x9e 0xd3
# CHECK: r17:16 = vnavgw(r21:20,r31:30):rnd:sat
0xd0 0xd4 0x9e 0xd3
# CHECK: r17:16 = vnavgw(r21:20,r31:30):crnd:sat

# Vector conditional negate
0x50 0xdf 0xd4 0xc3
# CHECK: r17:16 = vcnegh(r21:20,r31)

0xf0 0xff 0x34 0xcb
# CHECK: r17:16 += vrcnegh(r21:20,r31)

# Vector maximum bytes
0x10 0xd4 0xde 0xd3
# CHECK: r17:16 = vmaxub(r21:20,r31:30)
0xd0 0xd4 0xde 0xd3
# CHECK: r17:16 = vmaxb(r21:20,r31:30)

# Vector maximum halfwords
0x30 0xd4 0xde 0xd3
# CHECK: r17:16 = vmaxh(r21:20,r31:30)
0x50 0xd4 0xde 0xd3
# CHECK: r17:16 = vmaxuh(r21:20,r31:30)

# Vector reduce maximum halfwords
0x3f 0xd0 0x34 0xcb
# CHECK: r17:16 = vrmaxh(r21:20,r31)
0x3f 0xf0 0x34 0xcb
# CHECK: r17:16 = vrmaxuh(r21:20,r31)

# Vector reduce maximum words
0x5f 0xd0 0x34 0xcb
# CHECK: r17:16 = vrmaxw(r21:20,r31)
0x5f 0xf0 0x34 0xcb
# CHECK: r17:16 = vrmaxuw(r21:20,r31)

# Vector maximum words
0xb0 0xd4 0xbe 0xd3
# CHECK: r17:16 = vmaxuw(r21:20,r31:30)
0x70 0xd4 0xde 0xd3
# CHECK: r17:16 = vmaxw(r21:20,r31:30)

# Vector minimum bytes
0x10 0xd4 0xbe 0xd3
# CHECK: r17:16 = vminub(r21:20,r31:30)
0xf0 0xd4 0xde 0xd3
# CHECK: r17:16 = vminb(r21:20,r31:30)

# Vector minimum halfwords
0x30 0xd4 0xbe 0xd3
# CHECK: r17:16 = vminh(r21:20,r31:30)
0x50 0xd4 0xbe 0xd3
# CHECK: r17:16 = vminuh(r21:20,r31:30)

# Vector reduce minimum halfwords
0xbf 0xd0 0x34 0xcb
# CHECK: r17:16 = vrminh(r21:20,r31)
0xbf 0xf0 0x34 0xcb
# CHECK: r17:16 = vrminuh(r21:20,r31)

# Vector reduce minimum words
0xdf 0xd0 0x34 0xcb
# CHECK: r17:16 = vrminw(r21:20,r31)
0xdf 0xf0 0x34 0xcb
# CHECK: r17:16 = vrminuw(r21:20,r31)

# Vector minimum words
0x70 0xd4 0xbe 0xd3
# CHECK: r17:16 = vminw(r21:20,r31:30)
0x90 0xd4 0xbe 0xd3
# CHECK: r17:16 = vminuw(r21:20,r31:30)

# Vector sum of absolute differences unsigned bytes
0x50 0xde 0x54 0xe8
# CHECK: r17:16 = vrsadub(r21:20,r31:30)
0x50 0xde 0x54 0xea
# CHECK: r17:16 += vrsadub(r21:20,r31:30)

# Vector subtract halfwords
0x50 0xd4 0x3e 0xd3
# CHECK: r17:16 = vsubh(r21:20,r31:30)
0x70 0xd4 0x3e 0xd3
# CHECK: r17:16 = vsubh(r21:20,r31:30):sat
0x90 0xd4 0x3e 0xd3
# CHECK: r17:16 = vsubuh(r21:20,r31:30):sat

# Vector subtract bytes
0x10 0xd4 0x3e 0xd3
# CHECK: r17:16 = vsubub(r21:20,r31:30)
0x30 0xd4 0x3e 0xd3
# CHECK: r17:16 = vsubub(r21:20,r31:30):sat

# Vector subtract words
0xb0 0xd4 0x3e 0xd3
# CHECK: r17:16 = vsubw(r21:20,r31:30)
0xd0 0xd4 0x3e 0xd3
# CHECK: r17:16 = vsubw(r21:20,r31:30):sat