]> gitweb.factorcode.org Git - factor.git/blob - basis/compiler/cfg/intrinsics/simd/simd.factor
simd intrinsic implementation for v*high, v*hs+, vavg, and vsad
[factor.git] / basis / compiler / cfg / intrinsics / simd / simd.factor
1 ! Copyright (C) 2009 Slava Pestov, Joe Groff.
2 ! See http://factorcode.org/license.txt for BSD license.
3 USING: accessors alien alien.c-types byte-arrays fry
4 classes.algebra cpu.architecture kernel layouts math sequences
5 math.vectors math.vectors.simd.intrinsics
6 macros generalizations combinators combinators.short-circuit
7 arrays locals compiler.tree.propagation.info
8 compiler.cfg.builder.blocks
9 compiler.cfg.comparisons
10 compiler.cfg.stacks compiler.cfg.stacks.local compiler.cfg.hats
11 compiler.cfg.instructions compiler.cfg.registers
12 compiler.cfg.intrinsics
13 compiler.cfg.intrinsics.alien
14 compiler.cfg.intrinsics.simd.backend
15 specialized-arrays ;
16 FROM: alien.c-types => heap-size char short int longlong float double ;
17 SPECIALIZED-ARRAYS: char uchar short ushort int uint longlong ulonglong float double ;
18 IN: compiler.cfg.intrinsics.simd
19
20 ! compound vector ops
21
22 : sign-bit-mask ( rep -- byte-array )
23     signed-rep {
24         { char-16-rep [ uchar-array{
25             HEX: 80 HEX: 80 HEX: 80 HEX: 80
26             HEX: 80 HEX: 80 HEX: 80 HEX: 80
27             HEX: 80 HEX: 80 HEX: 80 HEX: 80
28             HEX: 80 HEX: 80 HEX: 80 HEX: 80
29         } underlying>> ] }
30         { short-8-rep [ ushort-array{
31             HEX: 8000 HEX: 8000 HEX: 8000 HEX: 8000
32             HEX: 8000 HEX: 8000 HEX: 8000 HEX: 8000
33         } underlying>> ] }
34         { int-4-rep [ uint-array{
35             HEX: 8000,0000 HEX: 8000,0000
36             HEX: 8000,0000 HEX: 8000,0000
37         } underlying>> ] }
38         { longlong-2-rep [ ulonglong-array{
39             HEX: 8000,0000,0000,0000
40             HEX: 8000,0000,0000,0000
41         } underlying>> ] }
42     } case ;
43
44 : ^load-neg-zero-vector ( rep -- dst )
45     {
46         { float-4-rep [ float-array{ -0.0 -0.0 -0.0 -0.0 } underlying>> ^^load-constant ] }
47         { double-2-rep [ double-array{ -0.0 -0.0 } underlying>> ^^load-constant ] }
48     } case ;
49
50 : ^load-add-sub-vector ( rep -- dst )
51     signed-rep {
52         { float-4-rep    [ float-array{ -0.0  0.0 -0.0  0.0 } underlying>> ^^load-constant ] }
53         { double-2-rep   [ double-array{ -0.0  0.0 } underlying>> ^^load-constant ] }
54         { char-16-rep    [ char-array{ -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 } underlying>> ^^load-constant ] }
55         { short-8-rep    [ short-array{ -1 0 -1 0 -1 0 -1 0 } underlying>> ^^load-constant ] }
56         { int-4-rep      [ int-array{ -1 0 -1 0 } underlying>> ^^load-constant ] }
57         { longlong-2-rep [ longlong-array{ -1 0 } underlying>> ^^load-constant ] }
58     } case ;
59
60 : ^load-half-vector ( rep -- dst )
61     {
62         { float-4-rep  [ float-array{  0.5 0.5 0.5 0.5 } underlying>> ^^load-constant ] }
63         { double-2-rep [ double-array{ 0.5 0.5 }         underlying>> ^^load-constant ] }
64     } case ;
65
66 : >variable-shuffle ( shuffle rep -- shuffle' )
67     rep-component-type heap-size
68     [ dup <repetition> >byte-array ]
69     [ iota >byte-array ] bi
70     '[ _ n*v _ v+ ] map concat ;
71
72 : ^load-immediate-shuffle ( shuffle rep -- dst )
73     >variable-shuffle ^^load-constant ;
74
75 :: ^blend-vector ( mask true false rep -- dst )
76     true mask rep ^^and-vector
77     mask false rep ^^andn-vector
78     rep ^^or-vector ;
79
80 : ^not-vector ( src rep -- dst )
81     {
82         [ ^^not-vector ]
83         [ [ ^^fill-vector ] [ ^^xor-vector ] bi ]
84     } v-vector-op ;
85
86 :: ^((compare-vector)) ( src1 src2 rep {cc,swap} -- dst )
87     {cc,swap} first2 :> ( cc swap? )
88     swap?
89     [ src2 src1 rep cc ^^compare-vector ]
90     [ src1 src2 rep cc ^^compare-vector ] if ;
91
92 :: ^(compare-vector) ( src1 src2 rep orig-cc -- dst )
93     rep orig-cc %compare-vector-ccs :> ( ccs not? )
94
95     ccs empty?
96     [ rep not? [ ^^fill-vector ] [ ^^zero-vector ] if ]
97     [
98         ccs unclip :> ( rest-ccs first-cc )
99         src1 src2 rep first-cc ^((compare-vector)) :> first-dst
100
101         rest-ccs first-dst
102         [ [ src1 src2 rep ] dip ^((compare-vector)) rep ^^or-vector ]
103         reduce
104
105         not? [ rep ^not-vector ] when
106     ] if ;
107
108 :: ^minmax-compare-vector ( src1 src2 rep cc -- dst )
109     cc order-cc {
110         { cc<  [ src1 src2 rep ^^max-vector src1 rep cc/= ^(compare-vector) ] }
111         { cc<= [ src1 src2 rep ^^min-vector src1 rep cc=  ^(compare-vector) ] }
112         { cc>  [ src1 src2 rep ^^min-vector src1 rep cc/= ^(compare-vector) ] }
113         { cc>= [ src1 src2 rep ^^max-vector src1 rep cc=  ^(compare-vector) ] }
114     } case ;
115
116 : ^compare-vector ( src1 src2 rep cc -- dst )
117     {
118         [ ^(compare-vector) ]
119         [ ^minmax-compare-vector ]
120         { unsigned-int-vector-rep [| src1 src2 rep cc |
121             rep sign-bit-mask ^^load-constant :> sign-bits
122             src1 sign-bits rep ^^xor-vector
123             src2 sign-bits rep ^^xor-vector
124             rep signed-rep cc ^(compare-vector)
125         ] }
126     } vv-cc-vector-op ;
127
128 : ^unpack-vector-head ( src rep -- dst )
129     {
130         [ ^^unpack-vector-head ]
131         { unsigned-int-vector-rep [ [ ^^zero-vector ] [ ^^merge-vector-head ] bi ] }
132         { signed-int-vector-rep [| src rep |
133             src src rep ^^merge-vector-head :> merged
134             rep rep-component-type heap-size 8 * :> bits
135             merged bits rep widen-vector-rep ^^shr-vector-imm
136         ] }
137         { signed-int-vector-rep [| src rep |
138             rep ^^zero-vector :> zero
139             zero src rep cc> ^compare-vector :> sign
140             src sign rep ^^merge-vector-head
141         ] }
142     } v-vector-op ;
143
144 : ^unpack-vector-tail ( src rep -- dst )
145     {
146         [ ^^unpack-vector-tail ]
147         [ [ ^^tail>head-vector ] [ ^^unpack-vector-head ] bi ]
148         { unsigned-int-vector-rep [ [ ^^zero-vector ] [ ^^merge-vector-tail ] bi ] }
149         { signed-int-vector-rep [| src rep |
150             src src rep ^^merge-vector-tail :> merged
151             rep rep-component-type heap-size 8 * :> bits
152             merged bits rep widen-vector-rep ^^shr-vector-imm
153         ] }
154         { signed-int-vector-rep [| src rep |
155             rep ^^zero-vector :> zero
156             zero src rep cc> ^compare-vector :> sign
157             src sign rep ^^merge-vector-tail
158         ] }
159     } v-vector-op ;
160
161 PREDICATE: fixnum-vector-rep < int-vector-rep
162     rep-component-type heap-size cell < ;
163
164 : ^(sum-vector-2) ( src rep -- dst )
165     {
166         [ dupd ^^horizontal-add-vector ]
167         [| src rep | 
168             src src rep ^^merge-vector-head :> head
169             src src rep ^^merge-vector-tail :> tail
170             head tail rep ^^add-vector
171         ]
172     } v-vector-op ;
173
174 : ^(sum-vector-4) ( src rep -- dst )
175     {
176         [
177             [ dupd ^^horizontal-add-vector ]
178             [ dupd ^^horizontal-add-vector ] bi
179         ]
180         [| src rep | 
181             src src rep ^^merge-vector-head :> head
182             src src rep ^^merge-vector-tail :> tail
183             head tail rep ^^add-vector :> src'
184
185             rep widen-vector-rep :> rep'
186             src' src' rep' ^^merge-vector-head :> head'
187             src' src' rep' ^^merge-vector-tail :> tail'
188             head' tail' rep ^^add-vector
189         ]
190     } v-vector-op ;
191
192 : ^(sum-vector-8) ( src rep -- dst )
193     {
194         [
195             [ dupd ^^horizontal-add-vector ]
196             [ dupd ^^horizontal-add-vector ]
197             [ dupd ^^horizontal-add-vector ] tri
198         ]
199         [| src rep | 
200             src src rep ^^merge-vector-head :> head
201             src src rep ^^merge-vector-tail :> tail
202             head tail rep ^^add-vector :> src'
203
204             rep widen-vector-rep :> rep'
205             src' src' rep' ^^merge-vector-head :> head'
206             src' src' rep' ^^merge-vector-tail :> tail'
207             head' tail' rep ^^add-vector :> src''
208
209             rep' widen-vector-rep :> rep''
210             src'' src'' rep'' ^^merge-vector-head :> head''
211             src'' src'' rep'' ^^merge-vector-tail :> tail''
212             head'' tail'' rep ^^add-vector
213         ]
214     } v-vector-op ;
215
216 : ^(sum-vector-16) ( src rep -- dst )
217     {
218         [
219             {
220                 [ dupd ^^horizontal-add-vector ]
221                 [ dupd ^^horizontal-add-vector ]
222                 [ dupd ^^horizontal-add-vector ]
223                 [ dupd ^^horizontal-add-vector ]
224             } cleave
225         ]
226         [| src rep | 
227             src src rep ^^merge-vector-head :> head
228             src src rep ^^merge-vector-tail :> tail
229             head tail rep ^^add-vector :> src'
230
231             rep widen-vector-rep :> rep'
232             src' src' rep' ^^merge-vector-head :> head'
233             src' src' rep' ^^merge-vector-tail :> tail'
234             head' tail' rep ^^add-vector :> src''
235
236             rep' widen-vector-rep :> rep''
237             src'' src'' rep'' ^^merge-vector-head :> head''
238             src'' src'' rep'' ^^merge-vector-tail :> tail''
239             head'' tail'' rep ^^add-vector :> src'''
240
241             rep'' widen-vector-rep :> rep'''
242             src''' src''' rep''' ^^merge-vector-head :> head'''
243             src''' src''' rep''' ^^merge-vector-tail :> tail'''
244             head''' tail''' rep ^^add-vector
245         ]
246     } v-vector-op ;
247
248 : ^(sum-vector) ( src rep -- dst )
249     [
250         dup rep-length {
251             {  2 [ ^(sum-vector-2) ] }
252             {  4 [ ^(sum-vector-4) ] }
253             {  8 [ ^(sum-vector-8) ] }
254             { 16 [ ^(sum-vector-16) ] }
255         } case
256     ] [ ^^vector>scalar ] bi ;
257
258 : ^sum-vector ( src rep -- dst )
259     {
260         { float-vector-rep [ ^(sum-vector) ] }
261         { fixnum-vector-rep [| src rep |
262             src rep ^unpack-vector-head :> head
263             src rep ^unpack-vector-tail :> tail
264             rep widen-vector-rep :> wide-rep
265             head tail wide-rep ^^add-vector wide-rep
266             ^(sum-vector)
267         ] }
268     } v-vector-op ;
269
270 : shuffle? ( obj -- ? ) { [ array? ] [ [ integer? ] all? ] } 1&& ;
271
272 : ^shuffle-vector-imm ( src1 shuffle rep -- dst )
273     [ rep-length 0 pad-tail ] keep {
274         [ ^^shuffle-vector-imm ]
275         [ [ ^load-immediate-shuffle ] [ ^^shuffle-vector ] bi ]
276     } vl-vector-op ;
277
278 : ^broadcast-vector ( src n rep -- dst )
279     [ rep-length swap <array> ] keep
280     ^shuffle-vector-imm ;
281
282 : ^with-vector ( src rep -- dst )
283     [ ^^scalar>vector ] keep [ 0 ] dip ^broadcast-vector ;
284
285 : ^select-vector ( src n rep -- dst )
286     [ ^broadcast-vector ] keep ^^vector>scalar ;
287
288 ! intrinsic emitters
289
290 : emit-simd-v+ ( node -- )
291     {
292         [ ^^add-vector ]
293     } emit-vv-vector-op ;
294
295 : emit-simd-v- ( node -- )
296     {
297         [ ^^sub-vector ]
298     } emit-vv-vector-op ;
299
300 : emit-simd-vneg ( node -- )
301     {
302         { float-vector-rep [ [ ^load-neg-zero-vector swap ] [ ^^sub-vector ] bi ] }
303         { int-vector-rep   [ [ ^^zero-vector         swap ] [ ^^sub-vector ] bi ] }
304     } emit-v-vector-op ;
305
306 : emit-simd-v+- ( node -- )
307     {
308         [ ^^add-sub-vector ]
309         { float-vector-rep [| src1 src2 rep |
310             rep ^load-add-sub-vector :> signs
311             src2 signs rep ^^xor-vector :> src2'
312             src1 src2' rep ^^add-vector
313         ] }
314         { int-vector-rep   [| src1 src2 rep |
315             rep ^load-add-sub-vector :> signs
316             src2  signs rep ^^xor-vector :> src2'
317             src2' signs rep ^^sub-vector :> src2''
318             src1 src2'' rep ^^add-vector
319         ] }
320     } emit-vv-vector-op ;
321
322 : emit-simd-vs+ ( node -- )
323     {
324         { float-vector-rep [ ^^add-vector ] }
325         { int-vector-rep [ ^^saturated-add-vector ] }
326     } emit-vv-vector-op ;
327
328 : emit-simd-vs- ( node -- )
329     {
330         { float-vector-rep [ ^^sub-vector ] }
331         { int-vector-rep [ ^^saturated-sub-vector ] }
332     } emit-vv-vector-op ;
333
334 : emit-simd-vs* ( node -- )
335     {
336         { float-vector-rep [ ^^mul-vector ] }
337         { int-vector-rep [ ^^saturated-mul-vector ] }
338     } emit-vv-vector-op ;
339
340 : emit-simd-v* ( node -- )
341     {
342         [ ^^mul-vector ]
343     } emit-vv-vector-op ;
344
345 : emit-simd-v*high ( node -- )
346     {
347         [ ^^mul-high-vector ]
348     } emit-vv-vector-op ;
349
350 : emit-simd-v*hs+ ( node -- )
351     {
352         [ ^^mul-horizontal-add-vector ]
353     } emit-vv-vector-op ;
354
355 : emit-simd-v/ ( node -- )
356     {
357         [ ^^div-vector ]
358     } emit-vv-vector-op ;
359
360 : emit-simd-vmin ( node -- )
361     {
362         [ ^^min-vector ]
363         [
364             [ cc< ^compare-vector ]
365             [ ^blend-vector ] 3bi
366         ]
367     } emit-vv-vector-op ;
368
369 : emit-simd-vmax ( node -- )
370     {
371         [ ^^max-vector ]
372         [
373             [ cc> ^compare-vector ]
374             [ ^blend-vector ] 3bi
375         ]
376     } emit-vv-vector-op ;
377
378 : emit-simd-vavg ( node -- )
379     {
380         [ ^^avg-vector ]
381         { float-vector-rep [| src1 src2 rep |
382             src1 src2 rep ^^add-vector
383             rep ^load-half-vector rep ^^mul-vector
384         ] }
385     } emit-vv-vector-op ;
386
387 : emit-simd-v. ( node -- )
388     {
389         [ ^^dot-vector ]
390         { float-vector-rep [ [ ^^mul-vector ] [ ^sum-vector ] bi ] }
391     } emit-vv-vector-op ;
392
393 : emit-simd-vsad ( node -- )
394     {
395         [ [ ^^sad-vector ] [ widen-vector-rep ^^vector>scalar ] bi ]
396     } emit-vv-vector-op ;
397
398 : emit-simd-vsqrt ( node -- )
399     {
400         [ ^^sqrt-vector ]
401     } emit-v-vector-op ;
402
403 : emit-simd-sum ( node -- )
404     {
405         [ ^sum-vector ]
406     } emit-v-vector-op ;
407
408 : emit-simd-vabs ( node -- )
409     {
410         { unsigned-int-vector-rep [ drop ] }
411         [ ^^abs-vector ]
412         { float-vector-rep [ [ ^load-neg-zero-vector ] [ swapd ^^andn-vector ] bi ] }
413         { int-vector-rep [| src rep |
414             rep ^^zero-vector :> zero
415             zero src rep ^^sub-vector :> -src
416             zero src rep cc> ^compare-vector :> sign
417             sign -src src rep ^blend-vector
418         ] }
419     } emit-v-vector-op ;
420
421 : emit-simd-vand ( node -- )
422     {
423         [ ^^and-vector ]
424     } emit-vv-vector-op ;
425
426 : emit-simd-vandn ( node -- )
427     {
428         [ ^^andn-vector ]
429     } emit-vv-vector-op ;
430
431 : emit-simd-vor ( node -- )
432     {
433         [ ^^or-vector ]
434     } emit-vv-vector-op ;
435
436 : emit-simd-vxor ( node -- )
437     {
438         [ ^^xor-vector ]
439     } emit-vv-vector-op ;
440
441 : emit-simd-vnot ( node -- )
442     {
443         [ ^not-vector ]
444     } emit-v-vector-op ;
445
446 : emit-simd-vlshift ( node -- )
447     {
448         [ ^^shl-vector ]
449     } {
450         [ ^^shl-vector-imm ]
451     } [ integer? ] emit-vv-or-vl-vector-op ;
452
453 : emit-simd-vrshift ( node -- )
454     {
455         [ ^^shr-vector ]
456     } {
457         [ ^^shr-vector-imm ]
458     } [ integer? ] emit-vv-or-vl-vector-op ;
459
460 : emit-simd-hlshift ( node -- )
461     {
462         [ ^^horizontal-shl-vector-imm ]
463     } [ integer? ] emit-vl-vector-op ;
464
465 : emit-simd-hrshift ( node -- )
466     {
467         [ ^^horizontal-shr-vector-imm ]
468     } [ integer? ] emit-vl-vector-op ;
469
470 : emit-simd-vshuffle-elements ( node -- )
471     {
472         [ ^shuffle-vector-imm ]
473     } [ shuffle? ] emit-vl-vector-op ;
474
475 : emit-simd-vshuffle-bytes ( node -- )
476     {
477         [ ^^shuffle-vector ]
478     } emit-vv-vector-op ;
479
480 : emit-simd-vmerge-head ( node -- )
481     {
482         [ ^^merge-vector-head ]
483     } emit-vv-vector-op ;
484
485 : emit-simd-vmerge-tail ( node -- )
486     {
487         [ ^^merge-vector-tail ]
488     } emit-vv-vector-op ;
489
490 : emit-simd-v<= ( node -- )
491     {
492         [ cc<= ^compare-vector ]
493     } emit-vv-vector-op ;
494 : emit-simd-v< ( node -- )
495     {
496         [ cc< ^compare-vector ]
497     } emit-vv-vector-op ;
498 : emit-simd-v= ( node -- )
499     {
500         [ cc=  ^compare-vector ]
501     } emit-vv-vector-op ;
502 : emit-simd-v> ( node -- )
503     {
504         [ cc>  ^compare-vector ]
505     } emit-vv-vector-op ;
506 : emit-simd-v>= ( node -- )
507     {
508         [ cc>= ^compare-vector ]
509     } emit-vv-vector-op ;
510 : emit-simd-vunordered? ( node -- )
511     {
512         [ cc/<>= ^compare-vector ]
513     } emit-vv-vector-op ;
514
515 : emit-simd-vany? ( node -- )
516     {
517         [ vcc-any ^^test-vector ]
518     } emit-v-vector-op ;
519 : emit-simd-vall? ( node -- )
520     {
521         [ vcc-all ^^test-vector ]
522     } emit-v-vector-op ;
523 : emit-simd-vnone? ( node -- )
524     {
525         [ vcc-none ^^test-vector ]
526     } emit-v-vector-op ;
527
528 : emit-simd-v>float ( node -- )
529     {
530         { float-vector-rep [ drop ] }
531         { int-vector-rep [ ^^integer>float-vector ] }
532     } emit-v-vector-op ;
533
534 : emit-simd-v>integer ( node -- )
535     {
536         { float-vector-rep [ ^^float>integer-vector ] }
537         { int-vector-rep [ drop ] }
538     } emit-v-vector-op ;
539
540 : emit-simd-vpack-signed ( node -- )
541     {
542         [ ^^signed-pack-vector ]
543     } emit-vv-vector-op ;
544
545 : emit-simd-vpack-unsigned ( node -- )
546     {
547         [ ^^unsigned-pack-vector ]
548     } emit-vv-vector-op ;
549
550 : emit-simd-vunpack-head ( node -- )
551     {
552         [ ^unpack-vector-head ]
553     } emit-v-vector-op ;
554
555 : emit-simd-vunpack-tail ( node -- )
556     {
557         [ ^unpack-vector-tail ]
558     } emit-v-vector-op ;
559
560 : emit-simd-with ( node -- )
561     {
562         { fixnum-vector-rep [ ^with-vector ] }
563         { float-vector-rep  [ ^with-vector ] }
564     } emit-v-vector-op ;
565
566 : emit-simd-gather-2 ( node -- )
567     {
568         { fixnum-vector-rep [ ^^gather-vector-2 ] }
569         { float-vector-rep  [ ^^gather-vector-2 ] }
570     } emit-vv-vector-op ;
571
572 : emit-simd-gather-4 ( node -- )
573     {
574         { fixnum-vector-rep [ ^^gather-vector-4 ] }
575         { float-vector-rep  [ ^^gather-vector-4 ] }
576     } emit-vvvv-vector-op ;
577
578 : emit-simd-select ( node -- )
579     {
580         { fixnum-vector-rep [ ^select-vector ] }
581         { float-vector-rep  [ ^select-vector ] }
582     } [ integer? ] emit-vl-vector-op ;
583
584 : emit-alien-vector ( node -- )
585     dup [
586         '[
587             ds-drop prepare-alien-getter
588             _ ^^alien-vector ds-push
589         ]
590         [ inline-alien-getter? ] inline-alien
591     ] with { [ %alien-vector-reps member? ] } if-literals-match ;
592
593 : emit-set-alien-vector ( node -- )
594     dup [
595         '[
596             ds-drop prepare-alien-setter ds-pop
597             _ ##set-alien-vector
598         ]
599         [ byte-array inline-alien-setter? ]
600         inline-alien
601     ] with { [ %alien-vector-reps member? ] } if-literals-match ;
602
603 : enable-simd ( -- )
604     {
605         { (simd-v+)                [ emit-simd-v+                  ] }
606         { (simd-v-)                [ emit-simd-v-                  ] }
607         { (simd-vneg)              [ emit-simd-vneg                ] }
608         { (simd-v+-)               [ emit-simd-v+-                 ] }
609         { (simd-vs+)               [ emit-simd-vs+                 ] }
610         { (simd-vs-)               [ emit-simd-vs-                 ] }
611         { (simd-vs*)               [ emit-simd-vs*                 ] }
612         { (simd-v*)                [ emit-simd-v*                  ] }
613         { (simd-v*high)            [ emit-simd-v*high              ] }
614         { (simd-v*hs+)             [ emit-simd-v*hs+               ] }
615         { (simd-v/)                [ emit-simd-v/                  ] }
616         { (simd-vmin)              [ emit-simd-vmin                ] }
617         { (simd-vmax)              [ emit-simd-vmax                ] }
618         { (simd-vavg)              [ emit-simd-vavg                ] }
619         { (simd-v.)                [ emit-simd-v.                  ] }
620         { (simd-vsad)              [ emit-simd-vsad                ] }
621         { (simd-vsqrt)             [ emit-simd-vsqrt               ] }
622         { (simd-sum)               [ emit-simd-sum                 ] }
623         { (simd-vabs)              [ emit-simd-vabs                ] }
624         { (simd-vbitand)           [ emit-simd-vand                ] }
625         { (simd-vbitandn)          [ emit-simd-vandn               ] }
626         { (simd-vbitor)            [ emit-simd-vor                 ] }
627         { (simd-vbitxor)           [ emit-simd-vxor                ] }
628         { (simd-vbitnot)           [ emit-simd-vnot                ] }
629         { (simd-vand)              [ emit-simd-vand                ] }
630         { (simd-vandn)             [ emit-simd-vandn               ] }
631         { (simd-vor)               [ emit-simd-vor                 ] }
632         { (simd-vxor)              [ emit-simd-vxor                ] }
633         { (simd-vnot)              [ emit-simd-vnot                ] }
634         { (simd-vlshift)           [ emit-simd-vlshift             ] }
635         { (simd-vrshift)           [ emit-simd-vrshift             ] }
636         { (simd-hlshift)           [ emit-simd-hlshift             ] }
637         { (simd-hrshift)           [ emit-simd-hrshift             ] }
638         { (simd-vshuffle-elements) [ emit-simd-vshuffle-elements   ] }
639         { (simd-vshuffle-bytes)    [ emit-simd-vshuffle-bytes      ] }
640         { (simd-vmerge-head)       [ emit-simd-vmerge-head         ] }
641         { (simd-vmerge-tail)       [ emit-simd-vmerge-tail         ] }
642         { (simd-v<=)               [ emit-simd-v<=                 ] }
643         { (simd-v<)                [ emit-simd-v<                  ] }
644         { (simd-v=)                [ emit-simd-v=                  ] }
645         { (simd-v>)                [ emit-simd-v>                  ] }
646         { (simd-v>=)               [ emit-simd-v>=                 ] }
647         { (simd-vunordered?)       [ emit-simd-vunordered?         ] }
648         { (simd-vany?)             [ emit-simd-vany?               ] }
649         { (simd-vall?)             [ emit-simd-vall?               ] }
650         { (simd-vnone?)            [ emit-simd-vnone?              ] }
651         { (simd-v>float)           [ emit-simd-v>float             ] }
652         { (simd-v>integer)         [ emit-simd-v>integer           ] }
653         { (simd-vpack-signed)      [ emit-simd-vpack-signed        ] }
654         { (simd-vpack-unsigned)    [ emit-simd-vpack-unsigned      ] }
655         { (simd-vunpack-head)      [ emit-simd-vunpack-head        ] }
656         { (simd-vunpack-tail)      [ emit-simd-vunpack-tail        ] }
657         { (simd-with)              [ emit-simd-with                ] }
658         { (simd-gather-2)          [ emit-simd-gather-2            ] }
659         { (simd-gather-4)          [ emit-simd-gather-4            ] }
660         { (simd-select)            [ emit-simd-select              ] }
661         { alien-vector             [ emit-alien-vector             ] }
662         { set-alien-vector         [ emit-set-alien-vector         ] }
663     } enable-intrinsics ;
664
665 enable-simd