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
# RUN: llvm-mc -triple=hexagon -disassemble < %s | FileCheck %s
# Hexagon Programmer's Reference Manual 11.10.3 XTYPE/COMPLEX

# Complex add/sub halfwords
0x90 0xde 0x54 0xc1
# CHECK: r17:16 = vxaddsubh(r21:20,r31:30):sat
0xd0 0xde 0x54 0xc1
# CHECK: r17:16 = vxsubaddh(r21:20,r31:30):sat
0x10 0xde 0xd4 0xc1
# CHECK: r17:16 = vxaddsubh(r21:20,r31:30):rnd:>>1:sat
0x50 0xde 0xd4 0xc1
# CHECK: r17:16 = vxsubaddh(r21:20,r31:30):rnd:>>1:sat

# Complex add/sub words
0x10 0xde 0x54 0xc1
# CHECK: r17:16 = vxaddsubw(r21:20,r31:30):sat
0x50 0xde 0x54 0xc1
# CHECK: r17:16 = vxsubaddw(r21:20,r31:30):sat

# Complex multiply
0xd0 0xdf 0x15 0xe5
# CHECK: r17:16 = cmpy(r21,r31):sat
0xd0 0xdf 0x95 0xe5
# CHECK: r17:16 = cmpy(r21,r31):<<1:sat
0xd0 0xdf 0x55 0xe5
# CHECK: r17:16 = cmpy(r21,r31*):sat
0xd0 0xdf 0xd5 0xe5
# CHECK: r17:16 = cmpy(r21,r31*):<<1:sat
0xd0 0xdf 0x15 0xe7
# CHECK: r17:16 += cmpy(r21,r31):sat
0xd0 0xdf 0x95 0xe7
# CHECK: r17:16 += cmpy(r21,r31):<<1:sat
0xf0 0xdf 0x15 0xe7
# CHECK: r17:16 -= cmpy(r21,r31):sat
0xf0 0xdf 0x95 0xe7
# CHECK: r17:16 -= cmpy(r21,r31):<<1:sat
0xd0 0xdf 0x55 0xe7
# CHECK: r17:16 += cmpy(r21,r31*):sat
0xd0 0xdf 0xd5 0xe7
# CHECK: r17:16 += cmpy(r21,r31*):<<1:sat
0xf0 0xdf 0x55 0xe7
# CHECK: r17:16 -= cmpy(r21,r31*):sat
0xf0 0xdf 0xd5 0xe7
# CHECK: r17:16 -= cmpy(r21,r31*):<<1:sat

# Complex multiply real or imaginary
0x30 0xdf 0x15 0xe5
# CHECK: r17:16 = cmpyi(r21,r31)
0x50 0xdf 0x15 0xe5
# CHECK: r17:16 = cmpyr(r21,r31)
0x30 0xdf 0x15 0xe7
# CHECK: r17:16 += cmpyi(r21,r31)
0x50 0xdf 0x15 0xe7
# CHECK: r17:16 += cmpyr(r21,r31)

# Complex multiply with round and pack
0xd1 0xdf 0x35 0xed
# CHECK: r17 = cmpy(r21,r31):rnd:sat
0xd1 0xdf 0xb5 0xed
# CHECK: r17 = cmpy(r21,r31):<<1:rnd:sat
0xd1 0xdf 0x75 0xed
# CHECK: r17 = cmpy(r21,r31*):rnd:sat
0xd1 0xdf 0xf5 0xed
# CHECK: r17 = cmpy(r21,r31*):<<1:rnd:sat

# Complex multiply 32x16
0x91 0xdf 0x14 0xc5
# CHECK: r17 = cmpyiwh(r21:20,r31):<<1:rnd:sat
0xb1 0xdf 0x14 0xc5
# CHECK: r17 = cmpyiwh(r21:20,r31*):<<1:rnd:sat
0xd1 0xdf 0x14 0xc5
# CHECK: r17 = cmpyrwh(r21:20,r31):<<1:rnd:sat
0xf1 0xdf 0x14 0xc5
# CHECK: r17 = cmpyrwh(r21:20,r31*):<<1:rnd:sat

# Vector complex multiply real or imaginary
0xd0 0xde 0x34 0xe8
# CHECK: r17:16 = vcmpyr(r21:20,r31:30):sat
0xd0 0xde 0xb4 0xe8
# CHECK: r17:16 = vcmpyr(r21:20,r31:30):<<1:sat
0xd0 0xde 0x54 0xe8
# CHECK: r17:16 = vcmpyi(r21:20,r31:30):sat
0xd0 0xde 0xd4 0xe8
# CHECK: r17:16 = vcmpyi(r21:20,r31:30):<<1:sat
0x90 0xde 0x34 0xea
# CHECK: r17:16 += vcmpyr(r21:20,r31:30):sat
0x90 0xde 0x54 0xea
# CHECK: r17:16 += vcmpyi(r21:20,r31:30):sat

# Vector complex conjugate
0xf0 0xc0 0x94 0x80
# CHECK: r17:16 = vconj(r21:20):sat

# Vector complex rotate
0x10 0xdf 0xd4 0xc3
# CHECK: r17:16 = vcrotate(r21:20,r31)

# Vector reduce complex multiply real or imaginary
0x10 0xde 0x14 0xe8
# CHECK: r17:16 = vrcmpyi(r21:20,r31:30)
0x30 0xde 0x14 0xe8
# CHECK: r17:16 = vrcmpyr(r21:20,r31:30)
0x10 0xde 0x54 0xe8
# CHECK: r17:16 = vrcmpyi(r21:20,r31:30*)
0x30 0xde 0x74 0xe8
# CHECK: r17:16 = vrcmpyr(r21:20,r31:30*)

# Vector reduce complex multiply by scalar
0x90 0xde 0xb4 0xe8
# CHECK: r17:16 = vrcmpys(r21:20,r31:30):<<1:sat:raw:hi
0x90 0xde 0xf4 0xe8
# CHECK: r17:16 = vrcmpys(r21:20,r31:30):<<1:sat:raw:lo
0x90 0xde 0xb4 0xea
# CHECK: r17:16 += vrcmpys(r21:20,r31:30):<<1:sat:raw:hi
0x90 0xde 0xf4 0xea
# CHECK: r17:16 += vrcmpys(r21:20,r31:30):<<1:sat:raw:lo

# Vector reduce complex multiply by scalar with round and pack
0xd1 0xde 0xb4 0xe9
# CHECK: r17 = vrcmpys(r21:20,r31:30):<<1:rnd:sat:raw:hi
0xf1 0xde 0xb4 0xe9
# CHECK: r17 = vrcmpys(r21:20,r31:30):<<1:rnd:sat:raw:lo

# Vector reduce complex rotate
0xf0 0xff 0xd4 0xc3
# CHECK: r17:16 = vrcrotate(r21:20,r31,#3)
0x30 0xff 0xb4 0xcb
# CHECK: r17:16 += vrcrotate(r21:20,r31,#3)