forked from AbleOS/holey-bytes
fixing a bug with ITF selecting based of input instead of output type
Signed-off-by: Jakub Doka <jakub.doka2@gmail.com>
This commit is contained in:
parent
ef36e21475
commit
bfac81c807
|
@ -414,11 +414,9 @@ impl Nodes {
|
|||
&& op.cond_op(self[o].ty).is_none())
|
||||
}),
|
||||
Kind::BinOp { op: TokenKind::Mul } if node.ty.is_float() => {
|
||||
false
|
||||
&& node.outputs.iter().all(|&n| {
|
||||
self[n].kind == Kind::BinOp { op: TokenKind::Add }
|
||||
&& self[n].inputs[1] == nid
|
||||
})
|
||||
node.outputs.iter().all(|&n| {
|
||||
self[n].kind == Kind::BinOp { op: TokenKind::Add } && self[n].inputs[1] == nid
|
||||
})
|
||||
}
|
||||
Kind::BinOp { op: TokenKind::Add | TokenKind::Sub } => {
|
||||
(self.is_locked(node.inputs[1]) && !self[node.inputs[1]].ty.is_float())
|
||||
|
@ -624,7 +622,7 @@ impl TokenKind {
|
|||
(dst.simple_size(), src.simple_size()),
|
||||
(Some(4 | 8), Some(8))
|
||||
);
|
||||
[instrs::itf32, instrs::itf64][src_idx - 2]
|
||||
[instrs::itf32, instrs::itf64][dst.simple_size().unwrap().ilog2() as usize - 2]
|
||||
}
|
||||
Self::Number if src.is_float() && dst.is_integer() => {
|
||||
[|a, b| instrs::fti32(a, b, 1), |a, b| instrs::fti64(a, b, 1)][src_idx - 2]
|
||||
|
|
Loading…
Reference in a new issue