Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch Add definitions for C99 fastest minimum-width integ...



details:   https://anonhg.NetBSD.org/src/rev/9df758c67546
branches:  trunk
changeset: 509107:9df758c67546
user:      kleink <kleink%NetBSD.org@localhost>
date:      Thu Apr 26 16:25:19 2001 +0000

description:
Add definitions for C99 fastest minimum-width integer types.

diffstat:

 sys/arch/alpha/include/int_fmtio.h       |   46 +++++++++-
 sys/arch/alpha/include/int_limits.h      |   21 ++++-
 sys/arch/alpha/include/int_mwgwtypes.h   |   18 +++-
 sys/arch/arm/include/int_fmtio.h         |   46 +++++++++-
 sys/arch/arm/include/int_limits.h        |   21 ++++-
 sys/arch/arm/include/int_mwgwtypes.h     |   18 +++-
 sys/arch/i386/include/int_fmtio.h        |   46 +++++++++-
 sys/arch/i386/include/int_limits.h       |   21 ++++-
 sys/arch/i386/include/int_mwgwtypes.h    |   19 +++-
 sys/arch/m68k/include/int_fmtio.h        |   46 +++++++++-
 sys/arch/m68k/include/int_limits.h       |   21 ++++-
 sys/arch/m68k/include/int_mwgwtypes.h    |   19 +++-
 sys/arch/mips/include/int_fmtio.h        |   46 +++++++++-
 sys/arch/mips/include/int_limits.h       |   21 ++++-
 sys/arch/mips/include/int_mwgwtypes.h    |   18 +++-
 sys/arch/pc532/include/int_fmtio.h       |   46 +++++++++-
 sys/arch/pc532/include/int_limits.h      |   21 ++++-
 sys/arch/pc532/include/int_mwgwtypes.h   |   19 +++-
 sys/arch/powerpc/include/int_fmtio.h     |   46 +++++++++-
 sys/arch/powerpc/include/int_limits.h    |   21 ++++-
 sys/arch/powerpc/include/int_mwgwtypes.h |   18 +++-
 sys/arch/sh3/include/int_fmtio.h         |   46 +++++++++-
 sys/arch/sh3/include/int_limits.h        |   21 ++++-
 sys/arch/sh3/include/int_mwgwtypes.h     |   18 +++-
 sys/arch/sparc/include/int_fmtio.h       |  145 ++++++++++++++++++++++++++++--
 sys/arch/sparc/include/int_limits.h      |   33 ++++++-
 sys/arch/sparc/include/int_mwgwtypes.h   |   24 ++++-
 sys/arch/sparc64/include/int_fmtio.h     |  145 ++++++++++++++++++++++++++++--
 sys/arch/sparc64/include/int_limits.h    |   33 ++++++-
 sys/arch/sparc64/include/int_mwgwtypes.h |   24 ++++-
 sys/arch/vax/include/int_fmtio.h         |   46 +++++++++-
 sys/arch/vax/include/int_limits.h        |   21 ++++-
 sys/arch/vax/include/int_mwgwtypes.h     |   19 +++-
 33 files changed, 1118 insertions(+), 55 deletions(-)

diffs (truncated from 2449 to 300 lines):

diff -r 0d6338ad6ac2 -r 9df758c67546 sys/arch/alpha/include/int_fmtio.h
--- a/sys/arch/alpha/include/int_fmtio.h        Thu Apr 26 15:52:00 2001 +0000
+++ b/sys/arch/alpha/include/int_fmtio.h        Thu Apr 26 16:25:19 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: int_fmtio.h,v 1.1 2001/04/15 17:13:04 kleink Exp $     */
+/*     $NetBSD: int_fmtio.h,v 1.2 2001/04/26 16:25:19 kleink Exp $     */
 
 /*-
  * Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -53,6 +53,10 @@
 #define        PRIdLEAST16     "d"     /* int_least16_t        */
 #define        PRIdLEAST32     "d"     /* int_least32_t        */
 #define        PRIdLEAST64     "ld"    /* int_least64_t        */
+#define        PRIdFAST8       "d"     /* int_fast8_t          */
+#define        PRIdFAST16      "d"     /* int_fast16_t         */
+#define        PRIdFAST32      "d"     /* int_fast32_t         */
+#define        PRIdFAST64      "ld"    /* int_fast64_t         */
 #define        PRIdMAX         "ld"    /* intmax_t             */
 #define        PRIdPTR         "ld"    /* intptr_t             */
 
@@ -64,6 +68,10 @@
 #define        PRIiLEAST16     "i"     /* int_least16_t        */
 #define        PRIiLEAST32     "i"     /* int_least32_t        */
 #define        PRIiLEAST64     "li"    /* int_least64_t        */
+#define        PRIiFAST8       "i"     /* int_fast8_t          */
+#define        PRIiFAST16      "i"     /* int_fast16_t         */
+#define        PRIiFAST32      "i"     /* int_fast32_t         */
+#define        PRIiFAST64      "li"    /* int_fast64_t         */
 #define        PRIiMAX         "li"    /* intmax_t             */
 #define        PRIiPTR         "li"    /* intptr_t             */
 
@@ -77,6 +85,10 @@
 #define        PRIoLEAST16     "o"     /* uint_least16_t       */
 #define        PRIoLEAST32     "o"     /* uint_least32_t       */
 #define        PRIoLEAST64     "lo"    /* uint_least64_t       */
+#define        PRIoFAST8       "o"     /* uint_fast8_t         */
+#define        PRIoFAST16      "o"     /* uint_fast16_t        */
+#define        PRIoFAST32      "o"     /* uint_fast32_t        */
+#define        PRIoFAST64      "lo"    /* uint_fast64_t        */
 #define        PRIoMAX         "lo"    /* uintmax_t            */
 #define        PRIoPTR         "lo"    /* uintptr_t            */
 
@@ -88,6 +100,10 @@
 #define        PRIuLEAST16     "u"     /* uint_least16_t       */
 #define        PRIuLEAST32     "u"     /* uint_least32_t       */
 #define        PRIuLEAST64     "lu"    /* uint_least64_t       */
+#define        PRIuFAST8       "u"     /* uint_fast8_t         */
+#define        PRIuFAST16      "u"     /* uint_fast16_t        */
+#define        PRIuFAST32      "u"     /* uint_fast32_t        */
+#define        PRIuFAST64      "lu"    /* uint_fast64_t        */
 #define        PRIuMAX         "lu"    /* uintmax_t            */
 #define        PRIuPTR         "lu"    /* uintptr_t            */
 
@@ -99,6 +115,10 @@
 #define        PRIxLEAST16     "x"     /* uint_least16_t       */
 #define        PRIxLEAST32     "x"     /* uint_least32_t       */
 #define        PRIxLEAST64     "lx"    /* uint_least64_t       */
+#define        PRIxFAST8       "x"     /* uint_fast8_t         */
+#define        PRIxFAST16      "x"     /* uint_fast16_t        */
+#define        PRIxFAST32      "x"     /* uint_fast32_t        */
+#define        PRIxFAST64      "lx"    /* uint_fast64_t        */
 #define        PRIxMAX         "lx"    /* uintmax_t            */
 #define        PRIxPTR         "lx"    /* uintptr_t            */
 
@@ -110,6 +130,10 @@
 #define        PRIXLEAST16     "X"     /* uint_least16_t       */
 #define        PRIXLEAST32     "X"     /* uint_least32_t       */
 #define        PRIXLEAST64     "lX"    /* uint_least64_t       */
+#define        PRIXFAST8       "X"     /* uint_fast8_t         */
+#define        PRIXFAST16      "X"     /* uint_fast16_t        */
+#define        PRIXFAST32      "X"     /* uint_fast32_t        */
+#define        PRIXFAST64      "lX"    /* uint_fast64_t        */
 #define        PRIXMAX         "lX"    /* uintmax_t            */
 #define        PRIXPTR         "lX"    /* uintptr_t            */
 
@@ -123,6 +147,10 @@
 #define        SCNdLEAST16     "hd"    /* int_least16_t        */
 #define        SCNdLEAST32     "d"     /* int_least32_t        */
 #define        SCNdLEAST64     "ld"    /* int_least64_t        */
+#define        SCNdFAST8       "d"     /* int_fast8_t          */
+#define        SCNdFAST16      "d"     /* int_fast16_t         */
+#define        SCNdFAST32      "d"     /* int_fast32_t         */
+#define        SCNdFAST64      "ld"    /* int_fast64_t         */
 #define        SCNdMAX         "ld"    /* intmax_t             */
 #define        SCNdPTR         "ld"    /* intptr_t             */
 
@@ -134,6 +162,10 @@
 #define        SCNiLEAST16     "hi"    /* int_least16_t        */
 #define        SCNiLEAST32     "i"     /* int_least32_t        */
 #define        SCNiLEAST64     "li"    /* int_least64_t        */
+#define        SCNiFAST8       "i"     /* int_fast8_t          */
+#define        SCNiFAST16      "i"     /* int_fast16_t         */
+#define        SCNiFAST32      "i"     /* int_fast32_t         */
+#define        SCNiFAST64      "li"    /* int_fast64_t         */
 #define        SCNiMAX         "li"    /* intmax_t             */
 #define        SCNiPTR         "li"    /* intptr_t             */
 
@@ -147,6 +179,10 @@
 #define        SCNoLEAST16     "ho"    /* uint_least16_t       */
 #define        SCNoLEAST32     "o"     /* uint_least32_t       */
 #define        SCNoLEAST64     "lo"    /* uint_least64_t       */
+#define        SCNoFAST8       "o"     /* uint_fast8_t         */
+#define        SCNoFAST16      "o"     /* uint_fast16_t        */
+#define        SCNoFAST32      "o"     /* uint_fast32_t        */
+#define        SCNoFAST64      "lo"    /* uint_fast64_t        */
 #define        SCNoMAX         "lo"    /* uintmax_t            */
 #define        SCNoPTR         "lo"    /* uintptr_t            */
 
@@ -158,6 +194,10 @@
 #define        SCNuLEAST16     "hu"    /* uint_least16_t       */
 #define        SCNuLEAST32     "u"     /* uint_least32_t       */
 #define        SCNuLEAST64     "lu"    /* uint_least64_t       */
+#define        SCNuFAST8       "u"     /* uint_fast8_t         */
+#define        SCNuFAST16      "u"     /* uint_fast16_t        */
+#define        SCNuFAST32      "u"     /* uint_fast32_t        */
+#define        SCNuFAST64      "lu"    /* uint_fast64_t        */
 #define        SCNuMAX         "lu"    /* uintmax_t            */
 #define        SCNuPTR         "lu"    /* uintptr_t            */
 
@@ -169,6 +209,10 @@
 #define        SCNxLEAST16     "hx"    /* uint_least16_t       */
 #define        SCNxLEAST32     "x"     /* uint_least32_t       */
 #define        SCNxLEAST64     "lx"    /* uint_least64_t       */
+#define        SCNxFAST8       "x"     /* uint_fast8_t         */
+#define        SCNxFAST16      "x"     /* uint_fast16_t        */
+#define        SCNxFAST32      "x"     /* uint_fast32_t        */
+#define        SCNxFAST64      "lx"    /* uint_fast64_t        */
 #define        SCNxMAX         "lx"    /* uintmax_t            */
 #define        SCNxPTR         "lx"    /* uintptr_t            */
 
diff -r 0d6338ad6ac2 -r 9df758c67546 sys/arch/alpha/include/int_limits.h
--- a/sys/arch/alpha/include/int_limits.h       Thu Apr 26 15:52:00 2001 +0000
+++ b/sys/arch/alpha/include/int_limits.h       Thu Apr 26 16:25:19 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: int_limits.h,v 1.1 2001/04/15 15:29:02 kleink Exp $    */
+/*     $NetBSD: int_limits.h,v 1.2 2001/04/26 16:25:19 kleink Exp $    */
 
 /*-
  * Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -83,6 +83,25 @@
 #define        UINT_LEAST32_MAX 0xffffffffU                    /* uint_least32_t */
 #define        UINT_LEAST64_MAX 0xffffffffffffffffUL           /* uint_least64_t */
 
+/* 7.18.2.3 Limits of fastest minimum-width integer types */
+ 
+/* minimum values of fastest minimum-width signed integer types */
+#define        INT_FAST8_MIN   (-0x7fffffff-1)                 /* int_fast8_t    */
+#define        INT_FAST16_MIN  (-0x7fffffff-1)                 /* int_fast16_t   */
+#define        INT_FAST32_MIN  (-0x7fffffff-1)                 /* int_fast32_t   */
+#define        INT_FAST64_MIN  (-0x7fffffffffffffffLL-1)       /* int_fast64_t   */
+
+/* maximum values of fastest minimum-width signed integer types */
+#define        INT_FAST8_MAX   0x7fffffff                      /* int_fast8_t    */
+#define        INT_FAST16_MAX  0x7fffffff                      /* int_fast16_t   */
+#define        INT_FAST32_MAX  0x7fffffff                      /* int_fast32_t   */
+#define        INT_FAST64_MAX  0x7fffffffffffffffLL            /* int_fast64_t   */
+
+/* maximum values of fastest minimum-width unsigned integer types */
+#define        UINT_FAST8_MAX  0xffffffffU                     /* uint_fast8_t   */
+#define        UINT_FAST16_MAX 0xffffffffU                     /* uint_fast16_t  */
+#define        UINT_FAST32_MAX 0xffffffffU                     /* uint_fast32_t  */
+#define        UINT_FAST64_MAX 0xffffffffffffffffULL           /* uint_fast64_t  */
 
 /* 7.18.2.4 Limits of integer types capable of holding object pointers */
 
diff -r 0d6338ad6ac2 -r 9df758c67546 sys/arch/alpha/include/int_mwgwtypes.h
--- a/sys/arch/alpha/include/int_mwgwtypes.h    Thu Apr 26 15:52:00 2001 +0000
+++ b/sys/arch/alpha/include/int_mwgwtypes.h    Thu Apr 26 16:25:19 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: int_mwgwtypes.h,v 1.1 2001/04/14 12:19:49 kleink Exp $ */
+/*     $NetBSD: int_mwgwtypes.h,v 1.2 2001/04/26 16:25:20 kleink Exp $ */
 
 /*-
  * Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -59,6 +59,22 @@
 typedef        unsigned long int       uint_least64_t;
 #endif
 
+/* 7.18.1.3 Fastest minimum-width integer types */
+typedef        int                        int_fast8_t;
+typedef        unsigned int              uint_fast8_t;
+typedef        int                       int_fast16_t;
+typedef        unsigned int             uint_fast16_t;
+typedef        int                       int_fast32_t;
+typedef        unsigned int             uint_fast32_t;
+#ifdef __COMPILER_INT64__
+typedef        __COMPILER_INT64__        int_fast64_t;
+typedef        __COMPILER_UINT64__      uint_fast64_t;
+#else
+/* LONGLONG */
+typedef        long long int             int_fast64_t;
+/* LONGLONG */
+typedef        unsigned long long int   uint_fast64_t;
+#endif
 
 /* 7.18.1.5 Greatest-width integer types */
 
diff -r 0d6338ad6ac2 -r 9df758c67546 sys/arch/arm/include/int_fmtio.h
--- a/sys/arch/arm/include/int_fmtio.h  Thu Apr 26 15:52:00 2001 +0000
+++ b/sys/arch/arm/include/int_fmtio.h  Thu Apr 26 16:25:19 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: int_fmtio.h,v 1.1 2001/04/15 17:13:06 kleink Exp $     */
+/*     $NetBSD: int_fmtio.h,v 1.2 2001/04/26 16:25:20 kleink Exp $     */
 
 /*-
  * Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -53,6 +53,10 @@
 #define        PRIdLEAST16     "d"     /* int_least16_t        */
 #define        PRIdLEAST32     "d"     /* int_least32_t        */
 #define        PRIdLEAST64     "lld"   /* int_least64_t        */
+#define        PRIdFAST8       "d"     /* int_fast8_t          */
+#define        PRIdFAST16      "d"     /* int_fast16_t         */
+#define        PRIdFAST32      "d"     /* int_fast32_t         */
+#define        PRIdFAST64      "lld"   /* int_fast64_t         */
 #define        PRIdMAX         "lld"   /* intmax_t             */
 #define        PRIdPTR         "d"     /* intptr_t             */
 
@@ -64,6 +68,10 @@
 #define        PRIiLEAST16     "i"     /* int_least16_t        */
 #define        PRIiLEAST32     "i"     /* int_least32_t        */
 #define        PRIiLEAST64     "lli"   /* int_least64_t        */
+#define        PRIiFAST8       "i"     /* int_fast8_t          */
+#define        PRIiFAST16      "i"     /* int_fast16_t         */
+#define        PRIiFAST32      "i"     /* int_fast32_t         */
+#define        PRIiFAST64      "lli"   /* int_fast64_t         */
 #define        PRIiMAX         "lli"   /* intmax_t             */
 #define        PRIiPTR         "i"     /* intptr_t             */
 
@@ -77,6 +85,10 @@
 #define        PRIoLEAST16     "o"     /* uint_least16_t       */
 #define        PRIoLEAST32     "o"     /* uint_least32_t       */
 #define        PRIoLEAST64     "llo"   /* uint_least64_t       */
+#define        PRIoFAST8       "o"     /* uint_fast8_t         */
+#define        PRIoFAST16      "o"     /* uint_fast16_t        */
+#define        PRIoFAST32      "o"     /* uint_fast32_t        */
+#define        PRIoFAST64      "llo"   /* uint_fast64_t        */
 #define        PRIoMAX         "llo"   /* uintmax_t            */
 #define        PRIoPTR         "o"     /* uintptr_t            */
 
@@ -88,6 +100,10 @@
 #define        PRIuLEAST16     "u"     /* uint_least16_t       */
 #define        PRIuLEAST32     "u"     /* uint_least32_t       */
 #define        PRIuLEAST64     "llu"   /* uint_least64_t       */
+#define        PRIuFAST8       "u"     /* uint_fast8_t         */
+#define        PRIuFAST16      "u"     /* uint_fast16_t        */
+#define        PRIuFAST32      "u"     /* uint_fast32_t        */
+#define        PRIuFAST64      "llu"   /* uint_fast64_t        */
 #define        PRIuMAX         "llu"   /* uintmax_t            */
 #define        PRIuPTR         "u"     /* uintptr_t            */
 
@@ -99,6 +115,10 @@
 #define        PRIxLEAST16     "x"     /* uint_least16_t       */
 #define        PRIxLEAST32     "x"     /* uint_least32_t       */
 #define        PRIxLEAST64     "llx"   /* uint_least64_t       */
+#define        PRIxFAST8       "x"     /* uint_fast8_t         */
+#define        PRIxFAST16      "x"     /* uint_fast16_t        */
+#define        PRIxFAST32      "x"     /* uint_fast32_t        */
+#define        PRIxFAST64      "llx"   /* uint_fast64_t        */
 #define        PRIxMAX         "llx"   /* uintmax_t            */
 #define        PRIxPTR         "x"     /* uintptr_t            */
 
@@ -110,6 +130,10 @@
 #define        PRIXLEAST16     "X"     /* uint_least16_t       */
 #define        PRIXLEAST32     "X"     /* uint_least32_t       */
 #define        PRIXLEAST64     "llX"   /* uint_least64_t       */
+#define        PRIXFAST8       "X"     /* uint_fast8_t         */
+#define        PRIXFAST16      "X"     /* uint_fast16_t        */
+#define        PRIXFAST32      "X"     /* uint_fast32_t        */
+#define        PRIXFAST64      "llX"   /* uint_fast64_t        */
 #define        PRIXMAX         "llX"   /* uintmax_t            */
 #define        PRIXPTR         "X"     /* uintptr_t            */
 
@@ -123,6 +147,10 @@
 #define        SCNdLEAST16     "hd"    /* int_least16_t        */
 #define        SCNdLEAST32     "d"     /* int_least32_t        */
 #define        SCNdLEAST64     "lld"   /* int_least64_t        */
+#define        SCNdFAST8       "d"     /* int_fast8_t          */
+#define        SCNdFAST16      "d"     /* int_fast16_t         */
+#define        SCNdFAST32      "d"     /* int_fast32_t         */
+#define        SCNdFAST64      "lld"   /* int_fast64_t         */
 #define        SCNdMAX         "lld"   /* intmax_t             */
 #define        SCNdPTR         "d"     /* intptr_t             */
 
@@ -134,6 +162,10 @@
 #define        SCNiLEAST16     "hi"    /* int_least16_t        */
 #define        SCNiLEAST32     "i"     /* int_least32_t        */
 #define        SCNiLEAST64     "lli"   /* int_least64_t        */
+#define        SCNiFAST8       "i"     /* int_fast8_t          */
+#define        SCNiFAST16      "i"     /* int_fast16_t         */
+#define        SCNiFAST32      "i"     /* int_fast32_t         */
+#define        SCNiFAST64      "lli"   /* int_fast64_t         */
 #define        SCNiMAX         "lli"   /* intmax_t             */
 #define        SCNiPTR         "i"     /* intptr_t             */
 
@@ -147,6 +179,10 @@
 #define        SCNoLEAST16     "ho"    /* uint_least16_t       */
 #define        SCNoLEAST32     "o"     /* uint_least32_t       */
 #define        SCNoLEAST64     "llo"   /* uint_least64_t       */
+#define        SCNoFAST8       "o"     /* uint_fast8_t         */
+#define        SCNoFAST16      "o"     /* uint_fast16_t        */



Home | Main Index | Thread Index | Old Index