RFR: 8320500: [vectorapi] RISC-V: Optimize vector math operations with SLEEF [v8]
Hamlin Li
mli at openjdk.org
Fri Sep 27 07:09:42 UTC 2024
On Fri, 27 Sep 2024 02:22:58 GMT, Fei Yang <fyang at openjdk.org> wrote:
>> Hamlin Li has updated the pull request incrementally with one additional commit since the last revision:
>>
>> fix test macro
>
> src/jdk.incubator.vector/linux/native/libsleef/lib/vector_math_rvv.c line 51:
>
>> 49: // the dynamic rounding mode is always RNE.
>> 50:
>> 51: #ifdef DEBUG
>
> Question: Should we check for `NDEBUG` macro (A macro specified by C/C++ standard) here instead? I see checks for this macro in the original SLEEF code.
>
>
> #ifndef NDEBUG
> #define CHECK_FRM __asm__ __volatile__ ( \
> " frrm t0 \n\t" \
> " beqz t0, 2f \n\t" \
> " csrrw x0, cycle, x0 \n\t" \
> "2: \n\t" \
> : : : "memory" );
> #else
> #define CHECK_FRM
> #endif
`NDEBUG` is only used in sleefdp.c which is the original sleef code, and we don't use that file in jdk directly, in java.base module of jdk it uses `DEBUG` but not use `NDEBUG`.
Based on above information, I think `DEBUG` is better.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/21083#discussion_r1778114122
More information about the build-dev
mailing list