move &~ to base.singeli
This commit is contained in:
parent
d02a0e43d8
commit
7d1fcf2c3a
@ -167,6 +167,8 @@ def widen{...x} = assert{'widen not supported', show{...x}}
|
|||||||
def narrow{...x} = assert{'narrow not supported', show{...x}}
|
def narrow{...x} = assert{'narrow not supported', show{...x}}
|
||||||
def unord{...x} = assert{'unord not supported', show{...x}}
|
def unord{...x} = assert{'unord not supported', show{...x}}
|
||||||
|
|
||||||
|
def andnot{a, b & anyNum{a} & anyNum{b}} = a & ~b
|
||||||
|
oper &~ andnot infix none 35
|
||||||
def widen{T, x:X & T==X} = x
|
def widen{T, x:X & T==X} = x
|
||||||
def narrow{T, x:X & T==eltype{X}} = x
|
def narrow{T, x:X & T==eltype{X}} = x
|
||||||
def undefPromote{T, x:X & T==X} = T~~x
|
def undefPromote{T, x:X & T==X} = T~~x
|
||||||
|
|||||||
@ -7,8 +7,6 @@ include './mask'
|
|||||||
include './bitops'
|
include './bitops'
|
||||||
include 'util/tup'
|
include 'util/tup'
|
||||||
|
|
||||||
oper &~ andnot infix none 35
|
|
||||||
|
|
||||||
# def:T - masked original content
|
# def:T - masked original content
|
||||||
# b:B - pointer to data to index; if width{B}<elwidth{T}, padding bytes are garbage read after wanted position
|
# b:B - pointer to data to index; if width{B}<elwidth{T}, padding bytes are garbage read after wanted position
|
||||||
# idx - actual (unscaled) index list
|
# idx - actual (unscaled) index list
|
||||||
@ -158,7 +156,7 @@ fn avx2_select_bool128(w0:*void, x0:*void, r0:*void, wl:u64, xl:u64) : u1 = {
|
|||||||
b := VI~~make{[32]u8, 1 << (iota{32} & 7)}
|
b := VI~~make{[32]u8, 1 << (iota{32} & 7)}
|
||||||
maskedLoop{32, wl, {i, M} => {
|
maskedLoop{32, wl, {i, M} => {
|
||||||
cw:= wrapChk{load{w, i}, VI,xlf, M}
|
cw:= wrapChk{load{w, i}, VI,xlf, M}
|
||||||
byte:= sel{[16]i8, x, VI~~(([8]u32~~andnot{cw, low})>>3)}
|
byte:= sel{[16]i8, x, VI~~(([8]u32~~(cw&~low))>>3)}
|
||||||
mask:= sel{[16]i8, b, cw & low}
|
mask:= sel{[16]i8, b, cw & low}
|
||||||
store{r, i, homMask{(mask & byte) == mask}}
|
store{r, i, homMask{(mask & byte) == mask}}
|
||||||
}}
|
}}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user