fix return value of overflowed dyadic arith

This commit is contained in:
dzaima 2023-06-23 11:55:12 +03:00
parent 5f43bf16b3
commit 7618dce2f3

View File

@ -135,7 +135,7 @@ def arithProcess{F, run, overflow, M, is, cw, cx, TY} = {
def {values, checks} = flip{each{{w1, x1} => run{F, M, w1, x1}, cw, cx}}
def ctype = tupsel{0,tupsel{0,checks}}
assert{tree_fold{&, each{{c}=>match{ctype, tupsel{0,c}}, checks}}}
if (rare{runChecks{ctype, checks, M}}) overflow{tupsel{0, is}}
if (rare{runChecks{ctype, checks, M}}) overflow{tupsel{0,is}*vcount{TY}}
each{{c} => TY~~c, values}
}