File: alu32_perm.txt

package info (click to toggle)
llvm-toolchain-19 1%3A19.1.7-3
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 1,998,520 kB
  • sloc: cpp: 6,951,680; ansic: 1,486,157; asm: 913,598; python: 232,024; f90: 80,126; objc: 75,281; lisp: 37,276; pascal: 16,990; sh: 10,009; ml: 5,058; perl: 4,724; awk: 3,523; makefile: 3,167; javascript: 2,504; xml: 892; fortran: 664; cs: 573
file content (40 lines) | stat: -rw-r--r-- 1,007 bytes parent folder | download | duplicates (34)
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
# RUN: llvm-mc -triple hexagon -disassemble < %s | FileCheck %s
# Hexagon Programmer's Reference Manual 11.1.2 ALU32/PERM

# Combine words in to doublewords
0x11 0xdf 0x95 0xf3
# CHECK: r17 = combine(r31.h,r21.h)
0x11 0xdf 0xb5 0xf3
# CHECK: r17 = combine(r31.h,r21.l)
0x11 0xdf 0xd5 0xf3
# CHECK: r17 = combine(r31.l,r21.h)
0x11 0xdf 0xf5 0xf3
# CHECK: r17 = combine(r31.l,r21.l)
0xb0 0xe2 0x0f 0x7c
# CHECK: r17:16 = combine(#21,#31)
0xb0 0xe2 0x3f 0x73
# CHECK: r17:16 = combine(#21,r31)
0xf0 0xe3 0x15 0x73
# CHECK: r17:16 = combine(r21,#31)
0x10 0xdf 0x15 0xf5
# CHECK: r17:16 = combine(r21,r31)

# Mux
0xf1 0xc3 0x75 0x73
# CHECK: r17 = mux(p3,r21,#31)
0xb1 0xc2 0xff 0x73
# CHECK: r17 = mux(p3,#21,r31)
0xb1 0xe2 0x8f 0x7b
# CHECK: r17 = mux(p3,#21,#31)
0x71 0xdf 0x15 0xf4
# CHECK: r17 = mux(p3,r21,r31)

# Shift word by 16
0x11 0xc0 0x15 0x70
# CHECK: r17 = aslh(r21)
0x11 0xc0 0x35 0x70
# CHECK: r17 = asrh(r21)

# Pack high and low halfwords
0x10 0xdf 0x95 0xf5
# CHECK: r17:16 = packhl(r21,r31)