MCPcopy Create free account
hub / github.com/Bitcoin-ABC/bitcoin-abc / SubInt63Overflow

Function SubInt63Overflow

src/script/intmath.cpp:51–60  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

49}
50
51bool SubInt63Overflow(int64_t a, int64_t b, int64_t &result) {
52#if HAVE_DECL___BUILTIN_SSUBLL_OVERFLOW
53 if (__builtin_ssubll_overflow(a, b, (long long int *)&result)) {
54 return true;
55 }
56 return result == std::numeric_limits<int64_t>::min();
57#else
58 return SubInt63OverflowEmulated(a, b, result);
59#endif
60}

Callers 2

operator-Method · 0.85
CheckArithmeticFunction · 0.85

Calls 1

SubInt63OverflowEmulatedFunction · 0.85

Tested by 1

CheckArithmeticFunction · 0.68