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

# Count leading
0x11 0xc0 0x54 0x88
# CHECK: r17 = clb(r21:20)
0x51 0xc0 0x54 0x88
# CHECK: r17 = cl0(r21:20)
0x91 0xc0 0x54 0x88
# CHECK: r17 = cl1(r21:20)
0x11 0xc0 0x74 0x88
# CHECK: r17 = normamt(r21:20)
0x51 0xd7 0x74 0x88
# CHECK: r17 = add(clb(r21:20),#23)
0x11 0xd7 0x35 0x8c
# CHECK: r17 = add(clb(r21),#23)
0x91 0xc0 0x15 0x8c
# CHECK: r17 = clb(r21)
0xb1 0xc0 0x15 0x8c
# CHECK: r17 = cl0(r21)
0xd1 0xc0 0x15 0x8c
# CHECK: r17 = cl1(r21)
0xf1 0xc0 0x15 0x8c
# CHECK: r17 = normamt(r21)

# Count population
0x71 0xc0 0x74 0x88
# CHECK: r17 = popcount(r21:20)

# Count trailing
0x51 0xc0 0xf4 0x88
# CHECK: r17 = ct0(r21:20)
0x91 0xc0 0xf4 0x88
# CHECK: r17 = ct1(r21:20)
0x91 0xc0 0x55 0x8c
# CHECK: r17 = ct0(r21)
0xb1 0xc0 0x55 0x8c
# CHECK: r17 = ct1(r21)

# Extract bitfield
0xf0 0xdf 0x54 0x81
# CHECK: r17:16 = extractu(r21:20,#31,#23)
0xf0 0xdf 0x54 0x8a
# CHECK: r17:16 = extract(r21:20,#31,#23)
0xf1 0xdf 0x55 0x8d
# CHECK: r17 = extractu(r21,#31,#23)
0xf1 0xdf 0xd5 0x8d
# CHECK: r17 = extract(r21,#31,#23)
0x10 0xde 0x14 0xc1
# CHECK: r17:16 = extractu(r21:20,r31:30)
0x90 0xde 0xd4 0xc1
# CHECK: r17:16 = extract(r21:20,r31:30)
0x11 0xde 0x15 0xc9
# CHECK: r17 = extractu(r21,r31:30)
0x51 0xde 0x15 0xc9
# CHECK: r17 = extract(r21,r31:30)

# Insert bitfield
0xf0 0xdf 0x54 0x83
# CHECK: r17:16 = insert(r21:20,#31,#23)
0xf1 0xdf 0x55 0x8f
# CHECK: r17 = insert(r21,#31,#23)
0x11 0xde 0x15 0xc8
# CHECK: r17 = insert(r21,r31:30)
0x10 0xde 0x14 0xca
# CHECK: r17:16 = insert(r21:20,r31:30)

# Interleave/deinterleave
0x90 0xc0 0xd4 0x80
# CHECK: r17:16 = deinterleave(r21:20)
0xb0 0xc0 0xd4 0x80
# CHECK: r17:16 = interleave(r21:20)

# Linear feedback-shift iteration
0xd0 0xde 0x94 0xc1
# CHECK: r17:16 = lfs(r21:20,r31:30)

# Masked parity
0x11 0xde 0x14 0xd0
# CHECK: r17 = parity(r21:20,r31:30)
0x11 0xdf 0xf5 0xd5
# CHECK: r17 = parity(r21,r31)

# Bit reverse
0xd0 0xc0 0xd4 0x80
# CHECK: r17:16 = brev(r21:20)
0xd1 0xc0 0x55 0x8c
# CHECK: r17 = brev(r21)

# Set/clear/toggle bit
0x11 0xdf 0xd5 0x8c
# CHECK: r17 = setbit(r21,#31)
0x31 0xdf 0xd5 0x8c
# CHECK: r17 = clrbit(r21,#31)
0x51 0xdf 0xd5 0x8c
# CHECK: r17 = togglebit(r21,#31)
0x11 0xdf 0x95 0xc6
# CHECK: r17 = setbit(r21,r31)
0x51 0xdf 0x95 0xc6
# CHECK: r17 = clrbit(r21,r31)
0x91 0xdf 0x95 0xc6
# CHECK: r17 = togglebit(r21,r31)

# Split bitfield
0x90 0xdf 0xd5 0x88
# CHECK: r17:16 = bitsplit(r21,#31)
0x10 0xdf 0x35 0xd4
# CHECK: r17:16 = bitsplit(r21,r31)

# Table index
0xf1 0xcd 0x15 0x87
# CHECK: r17 = tableidxb(r21,#7,#13):raw
0xf1 0xcd 0x55 0x87
# CHECK: r17 = tableidxh(r21,#7,#13):raw
0xf1 0xcd 0x95 0x87
# CHECK: r17 = tableidxw(r21,#7,#13):raw
0xf1 0xcd 0xd5 0x87
# CHECK: r17 = tableidxd(r21,#7,#13):raw