Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

libutils: util.h: fix the GENMASK_32(h, l) macro for been used in assembly file #6798

Merged
merged 1 commit into from
May 8, 2024

Commits on May 8, 2024

  1. libutils: util.h: fix the GENMASK_32(h, l) macro

    The macro has a problem when it is used in an assembly file:
    .e.g ".word GENMASK_32(15, 8)" will be compiled to ".word 0xffffff00"
    
    The issue is caused by the compiler always treating ~0 as a 64-bit
    value. Fix it by replacing '~UINT32_C(0)' with 'UINT32_C(0xffffffff)'.
    
    Signed-off-by: Tony Han <tony.han@microchip.com>
    Acked-by: Etienne Carriere <etienne.carriere@foss.st.com>
    Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
    TonyHan11 committed May 8, 2024
    Configuration menu
    Copy the full SHA
    6c20491 View commit details
    Browse the repository at this point in the history