diff --git a/include/sirit/sirit.h b/include/sirit/sirit.h index c4ae703..698e6e0 100644 --- a/include/sirit/sirit.h +++ b/include/sirit/sirit.h @@ -292,6 +292,9 @@ class Module { /// Unsigned-integer division of Operand 1 divided by Operand 2. Id OpUDiv(Id result_type, Id operand_1, Id operand_2); + /// Floating-point division of Operand 1 divided by Operand 2. + Id OpFDiv(Id result_type, Id operand_1, Id operand_2); + /// Integer addition of Operand 1 and Operand 2. Id OpIAdd(Id result_type, Id operand_1, Id operand_2); diff --git a/src/insts/arithmetic.cpp b/src/insts/arithmetic.cpp index f002b0f..5cedb2c 100644 --- a/src/insts/arithmetic.cpp +++ b/src/insts/arithmetic.cpp @@ -29,6 +29,7 @@ namespace Sirit { DEFINE_UNARY(OpFNegate, spv::Op::OpFNegate); DEFINE_BINARY(OpUDiv, spv::Op::OpUDiv) +DEFINE_BINARY(OpFDiv, spv::Op::OpFDiv) DEFINE_BINARY(OpIAdd, spv::Op::OpIAdd) } // namespace Sirit \ No newline at end of file