• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

stillwater-sc / universal / 24939331552
84%
master: 84%

Build:
Build:
LAST BUILD BRANCH: fix/issue-ci-ereal-regression-runtime
DEFAULT BRANCH: master
Ran 25 Apr 2026 08:17PM UTC
Jobs 1
Files 633
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

25 Apr 2026 07:55PM UTC coverage: 84.337% (+0.004%) from 84.333%
24939331552

push

github

web-flow
feat(internal): blockbinary mul/div/mod constexpr foundation (#760)

* feat(internal): blockbinary mul/div/mod constexpr foundation

PR #716 closed out the easy half of blockbinary constexpr work
(add/sub/shift/bitwise). The mul/div/mod path was deferred because the
multi-limb uint64_t-block fast-mul uses platform intrinsics (mul128,
addcarry) that are not constexpr on MSVC.

This PR completes the constexpr surface using the same pattern just
landed for integer<> in PR #757: std::is_constant_evaluated() dispatch
with a __uint128_t-based portable fallback (gcc/clang only) for the
uint64-limb mul, while keeping the intrinsic path at runtime for
performance.

blockbinary.hpp changes:
  - operator*= (FAST_MUL path): constexpr decoration; is_constant_evaluated
    dispatch wraps both the signed and unsigned bitsInBlock==64 branches;
    portable __uint128_t carry-propagation fallback gated on
    __SIZEOF_INT128__
  - operator*= (slow shift-and-add #else path): constexpr decoration
  - operator/=, operator%=: constexpr (single-block fast path was already
    constexpr-clean; multi-limb path goes through longdivision)
  - longdivision() and its forward decl: constexpr
  - msb(), to_sll(), roundingMode(), any(): constexpr
  - operator-() unary, operator~() (both overloads): constexpr
  - cross-template copy ctor and assign()/assignWithoutSignExtend():
    constexpr (required by urmul2 which calls blockbinary<N+1>(a))
  - free urmul, urmul2, uradd, ursub: constexpr
  - free operator*, operator/, operator%: constexpr

internal/blockbinary/api/constexpr.cpp:
  - Added "mul/div/mod (issue #759)" section covering:
    - single-block mul (uint8 limb)
    - multi-limb mul (uint8 and uint32 limbs)
    - uint64-limb __int128 carry path including a 2^32 * 2^32 = 2^64
      cross-limb carry test
    - single-block and multi-limb div/mod
    - free operator*, /, % constexpr wrappers
    - divide-by-zero defined behavior (returns zero, no UB)
    - uradd/ursub/urmul2 con... (continued)

95 of 103 new or added lines in 3 files covered. (92.23%)

3 existing lines in 1 file now uncovered.

45020 of 53381 relevant lines covered (84.34%)

6413875.33 hits per line

Uncovered Changes

Lines Coverage ∆ File
8
94.67
-1.41% include/sw/universal/internal/blockbinary/blockbinary.hpp

Coverage Regressions

Lines Coverage ∆ File
3
81.25
-0.22% include/sw/universal/number/posit1/specialized/posit_16_1.hpp
Jobs
ID Job ID Ran Files Coverage
1 24939331552.1 25 Apr 2026 08:17PM UTC 633
84.34
GitHub Action Run
Source Files on build 24939331552
  • Tree
  • List 633
  • Changed 4
  • Source Changed 3
  • Coverage Changed 4
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #24939331552
  • 651a0ba2 on github
  • Prev Build on main (#24934415493)
  • Next Build on main (#24942394888)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc