[spv-out] Add and implement bitwise_and

This commit is contained in:
Timo de Kort
2020-11-14 12:29:01 +01:00
committed by Dzmitry Malyshau
parent cbcdcf470f
commit d0de2faa73
2 changed files with 18 additions and 0 deletions

View File

@@ -696,6 +696,15 @@ pub(super) fn instruction_matrix_times_matrix(
// Bit Instructions
//
pub(super) fn instruction_bitwise_and(
result_type_id: Word,
id: Word,
operand_1: Word,
operand_2: Word,
) -> Instruction {
instruction_binary(Op::BitwiseAnd, result_type_id, id, operand_1, operand_2)
}
//
// Relational and Logical Instructions
//

View File

@@ -1214,6 +1214,15 @@ impl Writer {
},
_ => unreachable!(),
},
crate::BinaryOperator::And => (
super::instructions::instruction_bitwise_and(
left_result_type_id,
id,
left_id,
right_id,
),
left_lookup_ty,
),
_ => unimplemented!("{:?}", op),
};