2020-10-27 13:48:42 +00:00
|
|
|
.macro red16 r,rs=0,x=12
|
2019-09-10 10:45:01 +01:00
|
|
|
vpmulhw %ymm1,%ymm\r,%ymm\x
|
2020-10-27 13:48:42 +00:00
|
|
|
.if \rs
|
|
|
|
vpmulhrsw %ymm\rs,%ymm\x,%ymm\x
|
|
|
|
.else
|
2019-09-10 10:45:01 +01:00
|
|
|
vpsraw $10,%ymm\x,%ymm\x
|
2020-10-27 13:48:42 +00:00
|
|
|
.endif
|
2019-09-10 10:45:01 +01:00
|
|
|
vpmullw %ymm0,%ymm\x,%ymm\x
|
|
|
|
vpsubw %ymm\x,%ymm\r,%ymm\r
|
|
|
|
.endm
|
|
|
|
|
2020-07-31 07:17:42 +01:00
|
|
|
.macro csubq r,x=12
|
2019-09-10 10:45:01 +01:00
|
|
|
vpsubw %ymm0,%ymm\r,%ymm\r
|
|
|
|
vpsraw $15,%ymm\r,%ymm\x
|
|
|
|
vpand %ymm0,%ymm\x,%ymm\x
|
|
|
|
vpaddw %ymm\x,%ymm\r,%ymm\r
|
|
|
|
.endm
|
|
|
|
|
2020-07-31 07:17:42 +01:00
|
|
|
.macro caddq r,x=12
|
2019-09-10 10:45:01 +01:00
|
|
|
vpsraw $15,%ymm\r,%ymm\x
|
|
|
|
vpand %ymm0,%ymm\x,%ymm\x
|
|
|
|
vpaddw %ymm\x,%ymm\r,%ymm\r
|
|
|
|
.endm
|
|
|
|
|
2020-07-31 07:17:42 +01:00
|
|
|
.macro fqmulprecomp al,ah,b,x=12
|
2019-09-10 10:45:01 +01:00
|
|
|
vpmullw %ymm\al,%ymm\b,%ymm\x
|
|
|
|
vpmulhw %ymm\ah,%ymm\b,%ymm\b
|
|
|
|
vpmulhw %ymm0,%ymm\x,%ymm\x
|
|
|
|
vpsubw %ymm\x,%ymm\b,%ymm\b
|
|
|
|
.endm
|