Skip to content
Snippets Groups Projects
Unverified Commit 6d9e07fa authored by Evgeniy Kramsakov's avatar Evgeniy Kramsakov Committed by Evgeniy Kramsakov
Browse files

[*] fix decr_128 and add missing decr_256

parent 953da009
No related branches found
No related tags found
1 merge request!897hotfix-6925
Pipeline #18698 failed with stage
in 3 minutes and 56 seconds
......@@ -317,11 +317,11 @@ static inline void DECR_128(uint128_t* a_128_bit){
(*a_128_bit)--;
#else
if (a_128_bit->lo == 0) {
a_128_bit->hi--;
}
a_128_bit->lo--;
if(a_128_bit->hi == 0)
{
a_128_bit->hi--;
}
#endif
}
......@@ -343,6 +343,20 @@ static inline void INCR_256(uint256_t* a_256_bit){
#endif
}
static inline void DECR_256(uint256_t* a_256_bit) {
#ifdef DAP_GLOBAL_IS_INT128
if (a_256_bit->lo == 0) {
a_256_bit->hi--;
}
a_256_bit->lo--;
#else
if(EQUAL_128(a_256_bit->lo, uin128_0)) {
DECR_128(&a_256_bit->hi);
}
DECR_128(&a_256_bit->lo);
#endif
}
static inline int SUM_64_64(uint64_t a_64_bit,uint64_t b_64_bit,uint64_t* c_64_bit )
{
int overflow_flag;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment