zyfeier opened a new pull request, #21637:
URL: https://github.com/apache/nuttx/pull/21637

   ## Summary
   
     * Why: toolchains for riscv/x86_64/sim/arm64 provide the __int128
       extension, but NuttX has no standard int128_t/uint128_t typedefs, so
       applications cannot use 128-bit integer types portably.
     * What: add int128_t and uint128_t, gated on __SIZEOF_INT128__, in the
       types.h of the architectures whose toolchains support the extension.
     * How: each supporting arch typedefs _int128_t/_uint128_t from
       __int128/unsigned __int128 under __SIZEOF_INT128__ and defines
       __INT128_DEFINED; include/stdint.h then exposes int128_t/uint128_t
       under __INT128_DEFINED. 32-bit architectures (e.g. TriCore) are
       unaffected since the macro is undefined there.
   
   ## Impact
   
     * Is new feature added? Is existing feature changed? YES - new
       int128_t/uint128_t standard typedefs.
     * Impact on user (will user need to adapt to change)? NO
     * Impact on build (will build process change)? NO
     * Impact on hardware (will arch(s) / board(s) / driver(s) change)? NO -
       header-only additions.
     * Impact on documentation (is update required / provided)? NO
     * Impact on security (any sort of implications)? NO
     * Impact on compatibility (backward/forward/interoperability)? NO
   
   ## Testing
   
     I confirm that changes are verified on local setup and works as intended:
     * Build Host(s): Linux x86_64, gcc (sim, __SIZEOF_INT128__ defined)
       and tricore-elf-gcc 11.3.1 (32-bit, __SIZEOF_INT128__ undefined)
     * Target(s): sim:nsh (typedefs active), triboard_tc4x9_com:nsh
       (typedefs inactive, regression)
   
     The sim build was booted and ostest ran to completion with
     "ostest_main: Exiting with status 0" and no panics or assertions. A
     128-bit multiply/shift snippet building on the new typedefs compiles
     and prints the expected value against the sim include tree.
   
     Testing logs (sim:nsh):
   
     ```
     LD: nuttx
     ```
   
     Testing logs (triboard_tc4x9_com:nsh):
   
     ```
     LD: nuttx
     ```
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to