Skip to content

Commit ec9d8e2

Browse files
pamauryluismarques
authored andcommitted
[device,base] document policy regarding 64-bit division
Signed-off-by: Amaury Pouly <amaury.pouly@opentitan.org>
1 parent 14401d8 commit ec9d8e2

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

sw/device/lib/base/README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,9 @@ This subtree provides headers and libraries known collectively as `libbase`, whi
99

1010
In general, a library exposing general utilities for working close to the hardware should live in this subtree: for example, a library providing `memcpy` and related symbols.
1111
A library for talking to a particular peripheral, like a UART port, is a non-example.
12+
13+
## Policy regarding 64-bit division
14+
15+
`libbase` does not provide the `__divdi3` and `__udivdi3` (signed/unsigned 64-bit division) symbols.
16+
The rationale is that users of the library may have different needs when it comes to the trade-off between the size and speed of the implementation.
17+
Instead, `libbase` provides `udiv64_slow` which is a relatively slow but compact unsigned 64-bit division.

0 commit comments

Comments
 (0)