From c502cfd4b20f6c2ebfa96801af198852c1055f09 Mon Sep 17 00:00:00 2001 From: ReinUsesLisp Date: Sun, 4 Nov 2018 03:19:02 -0300 Subject: [PATCH] Add OpFDiv --- include/sirit/sirit.h | 3 +++ src/insts/arithmetic.cpp | 1 + 2 files changed, 4 insertions(+) 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