1 !sum
2 # Integers
3 # ShiftAll*
4 - go: ShiftAllLeft
5 asm: "VPSLL[WDQ]"
6 in:
7 - &any
8 go: $t
9 - &vecAsScalar64
10 go: "Uint.*"
11 treatLikeAScalarOfSize: 64
12 out:
13 - *any
14 - go: ShiftAllRight
15 signed: false
16 asm: "VPSRL[WDQ]"
17 in:
18 - &uint
19 go: $t
20 base: uint
21 - *vecAsScalar64
22 out:
23 - *uint
24 - go: ShiftAllRight
25 signed: true
26 asm: "VPSRA[WDQ]"
27 in:
28 - &int
29 go: $t
30 base: int
31 - *vecAsScalar64
32 out:
33 - *int
34
35 - go: shiftAllLeftConst
36 asm: "VPSLL[WDQ]"
37 in:
38 - *any
39 - &imm
40 class: immediate
41 immOffset: 0
42 out:
43 - *any
44 - go: shiftAllRightConst
45 asm: "VPSRL[WDQ]"
46 in:
47 - *int
48 - *imm
49 out:
50 - *int
51 - go: shiftAllRightConst
52 asm: "VPSRA[WDQ]"
53 in:
54 - *uint
55 - *imm
56 out:
57 - *uint
58
59 # Shift* (variable)
60 - go: ShiftLeft
61 asm: "VPSLLV[WD]"
62 in:
63 - *any
64 - *any
65 out:
66 - *any
67 # XED data of VPSLLVQ marks the element bits 32 which is off to the actual semantic, we need to overwrite
68 # it to 64.
69 - go: ShiftLeft
70 asm: "VPSLLVQ"
71 in:
72 - &anyOverwriteElemBits
73 go: $t
74 overwriteElementBits: 64
75 - *anyOverwriteElemBits
76 out:
77 - *anyOverwriteElemBits
78 - go: ShiftRight
79 signed: false
80 asm: "VPSRLV[WD]"
81 in:
82 - *uint
83 - *uint
84 out:
85 - *uint
86 # XED data of VPSRLVQ needs the same overwrite as VPSLLVQ.
87 - go: ShiftRight
88 signed: false
89 asm: "VPSRLVQ"
90 in:
91 - &uintOverwriteElemBits
92 go: $t
93 base: uint
94 overwriteElementBits: 64
95 - *uintOverwriteElemBits
96 out:
97 - *uintOverwriteElemBits
98 - go: ShiftRight
99 signed: true
100 asm: "VPSRAV[WDQ]"
101 in:
102 - *int
103 - *int
104 out:
105 - *int
106
107 # Rotate
108 - go: RotateAllLeft
109 asm: "VPROL[DQ]"
110 in:
111 - *any
112 - &pureImm
113 class: immediate
114 immOffset: 0
115 name: shift
116 out:
117 - *any
118 - go: RotateAllRight
119 asm: "VPROR[DQ]"
120 in:
121 - *any
122 - *pureImm
123 out:
124 - *any
125 - go: RotateLeft
126 asm: "VPROLV[DQ]"
127 in:
128 - *any
129 - *any
130 out:
131 - *any
132 - go: RotateRight
133 asm: "VPRORV[DQ]"
134 in:
135 - *any
136 - *any
137 out:
138 - *any
139
140 # Bizzare shifts.
141 - go: ShiftAllLeftConcat
142 asm: "VPSHLD[WDQ]"
143 in:
144 - *any
145 - *any
146 - *pureImm
147 out:
148 - *any
149 - go: ShiftAllRightConcat
150 asm: "VPSHRD[WDQ]"
151 in:
152 - *any
153 - *any
154 - *pureImm
155 out:
156 - *any
157 - go: ShiftLeftConcat
158 asm: "VPSHLDV[WDQ]"
159 in:
160 - *any
161 - *any
162 - *any
163 out:
164 - *any
165 - go: ShiftRightConcat
166 asm: "VPSHRDV[WDQ]"
167 in:
168 - *any
169 - *any
170 - *any
171 out:
172 - *any
173
View as plain text