On 30/12/2025 14:50, Andrew Cooper wrote:
> muldiv64() has 7 users across all architectures, and is limited to time
> handling functions.  Therefore, move it's declaration out of lib.h into a
> dedicated header.
> 
> Rename the library function to generic_muldiv64(), as x86 is going to provide
> an arch_muldiv64() in a subsequent change.
> 
> Explain what the function does, including the limitations; x86's version will
> suffer a divide error rather than truncate the result to 64 bits.
> 
> Annotate it with attr_const, not that this allows the optimiser to improve any
> of Xen's current users.  Add one selftest to check the internal precision,
> putting it in bitops.c for want of any better place to locate it.
> 
> Signed-off-by: Andrew Cooper <[email protected]>
For Arm:
Acked-by: Michal Orzel <[email protected]>

~Michal


Reply via email to