Handbook
Glossary
emit-simd-v*hs+ ( node -- )
Vocabulary
compiler
.
cfg
.
intrinsics
.
simd
Inputs
node
an
object
Outputs
None
Definition
USING:
alien.c-types
byte-arrays
compiler.cfg.comparisons
compiler.cfg.hats
compiler.cfg.intrinsics.simd.backend
cpu.architecture
kernel
locals.backend
math
sequences
;
IN:
compiler.cfg.intrinsics.simd
:
emit-simd-v*hs+
( node -- )
{
[
3
load-locals
-2
get-local
-1
get-local
0
get-local
^^mul-horizontal-add-vector
load-local
-1
get-local
short-8-rep
eq?
0
get-local
[
load-local
int-4-rep
sign-bit-mask
^^load-literal
load-local
-1
get-local
-1
get-local
0
get-local
int-4-rep
cc=
^compare-vector
int-4-rep
^^xor-vector
2
drop-locals
]
curry
0
get-local
[
load-local
0
get-local
1
drop-locals
]
curry
if
4
drop-locals
]
[
3
load-locals
0
get-local
{
char-16-rep
uchar-16-rep
}
member?
[
uchar-16-rep
char-16-rep
]
0
get-local
[
load-local
0
get-local
0
get-local
1
drop-locals
]
curry
if
2
load-locals
0
get-local
widen-vector-rep
load-local
-5
get-local
-2
get-local
^unpack-vector-head
-4
get-local
-1
get-local
^unpack-vector-head
0
get-local
^^mul-vector
load-local
-6
get-local
-3
get-local
^unpack-vector-tail
-5
get-local
-2
get-local
^unpack-vector-tail
-1
get-local
^^mul-vector
load-local
-2
get-local
rep-length
<iota>
[
2
*
]
map
load-local
-2
get-local
-1
get-local
0
get-local
-3
get-local
^shuffle-2-vectors-imm
-2
get-local
-1
get-local
0
get-local
[
1
+
]
map
-3
get-local
^shuffle-2-vectors-imm
-3
get-local
^^saturated-add-vector
load-local
-4
get-local
unsigned-int-vector-rep?
-4
get-local
0
get-local
[
2
load-locals
-1
get-local
rep-component-type
heap-size
load-local
16
<iota>
0
get-local
[
load-local
0
get-local
mod
0
get-local
1
-
=
127 255
?
1
drop-locals
]
curry
map
>byte-array
^^load-literal
load-local
-2
get-local
0
get-local
-3
get-local
cc>
^compare-vector
0
get-local
-2
get-local
-3
get-local
^blend-vector
4
drop-locals
]
curry
curry
0
get-local
[
load-local
0
get-local
1
drop-locals
]
curry
if
10
drop-locals
]
}
emit-vv-vector-op
;