Skip to content

Commit 316e672

Browse files
committed
Update docs
1 parent 8a965ca commit 316e672

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

doc/c.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -474,6 +474,20 @@ x = __builtin_muluh(a, b)
474474
```
475475
Calculates 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
```

include/propeller2.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,8 @@ uint32_t _rnd(void);
142142
int _clz(uint32_t val); /* count leading zeros */
143143
int _encod(uint32_t val); /* Spin encode operator */
144144
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 */
145147

146148
/* counter related functions */
147149
uint32_t _cnt(void);

0 commit comments

Comments
 (0)