File tree Expand file tree Collapse file tree 2 files changed +16
-0
lines changed
Expand file tree Collapse file tree 2 files changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -474,6 +474,20 @@ x = __builtin_muluh(a, b)
474474```
475475Calculates the upper 32 bits of the 64 bit product of (unsigned) integers ` a ` and ` b ` .
476476
477+ ### MULDIV64
478+
479+ ```
480+ x = _muldiv64(a, b, d)
481+ ```
482+ Takes three 32 bit unsigned values. Calculates the 64 bit result ` a * b ` , then divides by ` d ` .
483+
484+ ### ONES
485+
486+ ```
487+ x = _ones(y)
488+ ```
489+ Counts the number of bits set in the 32 bit integer ` y ` .
490+
477491### PARITY
478492
479493```
Original file line number Diff line number Diff line change @@ -142,6 +142,8 @@ uint32_t _rnd(void);
142142int _clz (uint32_t val ); /* count leading zeros */
143143int _encod (uint32_t val ); /* Spin encode operator */
144144uint32_t _isqrt (uint32_t val ); /* Spin integer square root */
145+ uint32_t _muldiv64 (uint32_t m1 , uint32_t m2 , uint32_t d ); /* calculate m1*m2 / d */
146+ uint32_t _ones (uint32_t n ); /* count one bits set */
145147
146148/* counter related functions */
147149uint32_t _cnt (void );
You can’t perform that action at this time.
0 commit comments