Skip to content
Commit a5c53d25 authored by Nicolas Pitre's avatar Nicolas Pitre Committed by Andrew Boie
Browse files

lib/os/prf.c: let the compiler optimize _ldiv5() on 64-bit architectures



The compiler doesn't need help here.

For example, gcc creates this on Aarch64:

_ldiv5:
        ldr     x1, [x0]
        mov     x2, -3689348814741910324
        movk    x2, 0xcccd, lsl 0
        add     x1, x1, 2
        umulh   x1, x1, x2
        lsr     x1, x1, 2
        str     x1, [x0]
        ret

Signed-off-by: default avatarNicolas Pitre <npitre@baylibre.com>
parent 822dfbd0
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment