This is an automated email from the ASF dual-hosted git repository.

xiaoxiang781216 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git

commit 1e1be386717bac048e6b8449f11fc5c8ccae62cc
Author: buxiasen <[email protected]>
AuthorDate: Wed Feb 4 11:44:31 2026 +0800

    arch/int128_t: add _int128_t/_uint128_t base types
    
    Define _int128_t/_uint128_t and __INT128_DEFINED in the per-architecture
    types.h when the compiler provides __int128 (__SIZEOF_INT128__).  These
    are the implementation-reserved base names; no public typedefs are added
    to include/stdint.h, because uint128_t is not a standard name and would
    clash with third-party code that defines its own (e.g. vendored
    HACL/KrML code in apps).
    
    Assisted-By: mimo-v2.6-pro
    Co-authored-by: ouyangxiangzhen <[email protected]>
    Signed-off-by: buxiasen <[email protected]>
    Signed-off-by: ouyangxiangzhen <[email protected]>
---
 arch/arm64/include/types.h          | 6 ++++++
 arch/risc-v/include/types.h         | 6 ++++++
 arch/sim/include/types.h            | 6 ++++++
 arch/tricore/include/types.h        | 6 ++++++
 arch/x86_64/include/intel64/types.h | 6 ++++++
 arch/xtensa/include/types.h         | 6 ++++++
 6 files changed, 36 insertions(+)

diff --git a/arch/arm64/include/types.h b/arch/arm64/include/types.h
index d8e0f69e9d9..0931a70596f 100644
--- a/arch/arm64/include/types.h
+++ b/arch/arm64/include/types.h
@@ -68,6 +68,12 @@ typedef unsigned long      _uint64_t;
 typedef _int64_t           _intmax_t;
 typedef _uint64_t          _uintmax_t;
 
+#ifdef __SIZEOF_INT128__
+typedef  __int128          _int128_t;
+typedef unsigned __int128  _uint128_t;
+#  define __INT128_DEFINED
+#endif
+
 #if defined(__WCHAR_TYPE__)
 typedef __WCHAR_TYPE__     _wchar_t;
 #else
diff --git a/arch/risc-v/include/types.h b/arch/risc-v/include/types.h
index a42793b5be8..c7a5b0f6015 100644
--- a/arch/risc-v/include/types.h
+++ b/arch/risc-v/include/types.h
@@ -74,6 +74,12 @@ typedef unsigned long      _uint64_t;
 typedef _int64_t           _intmax_t;
 typedef _uint64_t          _uintmax_t;
 
+#ifdef __SIZEOF_INT128__
+typedef  __int128          _int128_t;
+typedef unsigned __int128  _uint128_t;
+#  define __INT128_DEFINED
+#endif
+
 #if defined(__WCHAR_TYPE__)
 typedef __WCHAR_TYPE__     _wchar_t;
 #else
diff --git a/arch/sim/include/types.h b/arch/sim/include/types.h
index 76ac26dbb61..35bb804fa8f 100644
--- a/arch/sim/include/types.h
+++ b/arch/sim/include/types.h
@@ -88,6 +88,12 @@ typedef _int64_t           _intmax_t;
 typedef _uint64_t          _uintmax_t;
 #endif
 
+#ifdef __SIZEOF_INT128__
+typedef  __int128          _int128_t;
+typedef unsigned __int128  _uint128_t;
+#  define __INT128_DEFINED
+#endif
+
 #if defined(__WCHAR_TYPE__)
 typedef __WCHAR_TYPE__     _wchar_t;
 #elif defined(_MSC_VER)
diff --git a/arch/tricore/include/types.h b/arch/tricore/include/types.h
index ff3a485987c..7933f8f87be 100644
--- a/arch/tricore/include/types.h
+++ b/arch/tricore/include/types.h
@@ -66,6 +66,12 @@ typedef unsigned long long _uint64_t;
 typedef _int64_t           _intmax_t;
 typedef _uint64_t          _uintmax_t;
 
+#ifdef __SIZEOF_INT128__
+typedef  __int128          _int128_t;
+typedef unsigned __int128  _uint128_t;
+#  define __INT128_DEFINED
+#endif
+
 #if defined(__WCHAR_TYPE__)
 typedef __WCHAR_TYPE__     _wchar_t;
 #else
diff --git a/arch/x86_64/include/intel64/types.h 
b/arch/x86_64/include/intel64/types.h
index f847e737fc0..7e584a2c9d9 100644
--- a/arch/x86_64/include/intel64/types.h
+++ b/arch/x86_64/include/intel64/types.h
@@ -67,6 +67,12 @@ typedef unsigned long      _uint64_t;
 typedef _int64_t           _intmax_t;
 typedef _uint64_t          _uintmax_t;
 
+#ifdef __SIZEOF_INT128__
+typedef  __int128          _int128_t;
+typedef unsigned __int128  _uint128_t;
+#  define __INT128_DEFINED
+#endif
+
 #if defined(__WCHAR_TYPE__)
 typedef __WCHAR_TYPE__     _wchar_t;
 #else
diff --git a/arch/xtensa/include/types.h b/arch/xtensa/include/types.h
index a319776eb30..7facf6f71e9 100644
--- a/arch/xtensa/include/types.h
+++ b/arch/xtensa/include/types.h
@@ -66,6 +66,12 @@ typedef unsigned long long _uint64_t;
 typedef _int64_t           _intmax_t;
 typedef _uint64_t          _uintmax_t;
 
+#ifdef __SIZEOF_INT128__
+typedef  __int128          _int128_t;
+typedef unsigned __int128  _uint128_t;
+#  define __INT128_DEFINED
+#endif
+
 #if defined(__WCHAR_TYPE__)
 typedef __WCHAR_TYPE__     _wchar_t;
 #else

Reply via email to