From 414fc4dbd28d8fe48f735a0c389db8a234f733c0 Mon Sep 17 00:00:00 2001 From: ReinUsesLisp Date: Sat, 25 Apr 2020 21:54:10 -0300 Subject: [PATCH] arithmetic: Add IAddCarry --- include/sirit/sirit.h | 3 +++ src/instructions/arithmetic.cpp | 1 + 2 files changed, 4 insertions(+) diff --git a/include/sirit/sirit.h b/include/sirit/sirit.h index a0ff027..d9e9a8c 100644 --- a/include/sirit/sirit.h +++ b/include/sirit/sirit.h @@ -596,6 +596,9 @@ public: /// Floating-point reminder operation of Operand 1 modulo Operand 2. Id OpFRem(Id result_type, Id operand_1, Id operand_2); + /// Result is the unsigned integer addition of Operand 1 and Operand 2, including its carry. + Id OpIAddCarry(Id result_type, Id operand_1, Id operand_2); + // Extensions /// Execute an instruction in an imported set of extended instructions. diff --git a/src/instructions/arithmetic.cpp b/src/instructions/arithmetic.cpp index 29e6404..4cc1cf0 100644 --- a/src/instructions/arithmetic.cpp +++ b/src/instructions/arithmetic.cpp @@ -52,5 +52,6 @@ DEFINE_BINARY(OpSMod, spv::Op::OpSMod) DEFINE_BINARY(OpFMod, spv::Op::OpFMod) DEFINE_BINARY(OpSRem, spv::Op::OpSRem) DEFINE_BINARY(OpFRem, spv::Op::OpFRem) +DEFINE_BINARY(OpIAddCarry, spv::Op::OpIAddCarry) } // namespace Sirit