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)
474
474
```
475
475
Calculates the upper 32 bits of the 64 bit product of (unsigned) integers ` a ` and ` b ` .
476
476
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
+
477
491
### PARITY
478
492
479
493
```
Original file line number Diff line number Diff line change @@ -142,6 +142,8 @@ uint32_t _rnd(void);
142
142
int _clz (uint32_t val ); /* count leading zeros */
143
143
int _encod (uint32_t val ); /* Spin encode operator */
144
144
uint32_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 */
145
147
146
148
/* counter related functions */
147
149
uint32_t _cnt (void );
You can’t perform that action at this time.
0 commit comments