Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/riscv/include fix for riscv32.



details:   https://anonhg.NetBSD.org/src/rev/43d5bdcec537
branches:  trunk
changeset: 450545:43d5bdcec537
user:      mrg <mrg%NetBSD.org@localhost>
date:      Wed Apr 17 11:01:19 2019 +0000

description:
fix for riscv32.

diffstat:

 sys/arch/riscv/include/int_fmtio.h |  60 +++++++++++++++++++++++++------------
 1 files changed, 41 insertions(+), 19 deletions(-)

diffs (181 lines):

diff -r 3d3d68685987 -r 43d5bdcec537 sys/arch/riscv/include/int_fmtio.h
--- a/sys/arch/riscv/include/int_fmtio.h        Wed Apr 17 10:07:00 2019 +0000
+++ b/sys/arch/riscv/include/int_fmtio.h        Wed Apr 17 11:01:19 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: int_fmtio.h,v 1.3 2019/04/16 07:08:52 maya Exp $       */
+/*     $NetBSD: int_fmtio.h,v 1.4 2019/04/17 11:01:19 mrg Exp $        */
 
 /*-
  * Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -53,11 +53,13 @@
 #define        PRIdLEAST32     "d"     /* int_least32_t        */
 #ifdef _LP64
 #define        PRIdLEAST64     "ld"    /* int_least64_t        */
+#define        PRIdFAST8       "d"     /* int_fast8_t          */
+#define        PRIdFAST16      "d"     /* int_fast16_t         */
 #else
 #define        PRIdLEAST64     "lld"   /* int_least64_t        */
-#endif
 #define        PRIdFAST8       "hhd"   /* int_fast8_t          */
 #define        PRIdFAST16      "hd"    /* int_fast16_t         */
+#endif
 #define        PRIdFAST32      "d"     /* int_fast32_t         */
 #ifdef _LP64
 #define        PRIdFAST64      "ld"    /* int_fast64_t         */
@@ -81,11 +83,13 @@
 #define        PRIiLEAST32     "i"     /* int_least32_t        */
 #ifdef _LP64
 #define        PRIiLEAST64     "li"    /* int_least64_t        */
+#define        PRIiFAST8       "i"     /* int_fast8_t          */
+#define        PRIiFAST16      "i"     /* int_fast16_t         */
 #else
 #define        PRIiLEAST64     "lli"   /* int_least64_t        */
-#endif
 #define        PRIiFAST8       "hhi"   /* int_fast8_t          */
 #define        PRIiFAST16      "hi"    /* int_fast16_t         */
+#endif
 #define        PRIiFAST32      "i"     /* int_fast32_t         */
 #ifdef _LP64
 #define        PRIiFAST64      "li"    /* int_fast64_t         */
@@ -111,11 +115,13 @@
 #define        PRIoLEAST32     "ho"    /* uint_least32_t       */
 #ifdef _LP64
 #define        PRIoLEAST64     "lo"    /* uint_least64_t       */
+#define        PRIoFAST8       "o"     /* uint_fast8_t         */
+#define        PRIoFAST16      "o"     /* uint_fast16_t        */
 #else
 #define        PRIoLEAST64     "llo"   /* uint_least64_t       */
-#endif
 #define        PRIoFAST8       "hho"   /* uint_fast8_t         */
 #define        PRIoFAST16      "ho"    /* uint_fast16_t        */
+#endif
 #define        PRIoFAST32      "o"     /* uint_fast32_t        */
 #ifdef _LP64
 #define        PRIoFAST64      "lo"    /* uint_fast64_t        */
@@ -139,11 +145,13 @@
 #define        PRIuLEAST32     "u"     /* uint_least32_t       */
 #ifdef _LP64
 #define        PRIuLEAST64     "lu"    /* uint_least64_t       */
+#define        PRIuFAST8       "u"     /* uint_fast8_t         */
+#define        PRIuFAST16      "u"     /* uint_fast16_t        */
 #else
 #define        PRIuLEAST64     "llu"   /* uint_least64_t       */
-#endif
 #define        PRIuFAST8       "hhu"   /* uint_fast8_t         */
 #define        PRIuFAST16      "hu"    /* uint_fast16_t        */
+#endif
 #define        PRIuFAST32      "u"     /* uint_fast32_t        */
 #ifdef _LP64
 #define        PRIuFAST64      "lu"    /* uint_fast64_t        */
@@ -167,11 +175,13 @@
 #define        PRIxLEAST32     "x"     /* uint_least32_t       */
 #ifdef _LP64
 #define        PRIxLEAST64     "lx"    /* uint_least64_t       */
+#define        PRIxFAST8       "x"     /* uint_fast8_t         */
+#define        PRIxFAST16      "x"     /* uint_fast16_t        */
 #else
 #define        PRIxLEAST64     "llx"   /* uint_least64_t       */
+#define        PRIxFAST8       "hhx"   /* uint_fast8_t         */
+#define        PRIxFAST16      "hx"    /* uint_fast16_t        */
 #endif
-#define        PRIxFAST8       "x"     /* uint_fast8_t         */
-#define        PRIxFAST16      "x"     /* uint_fast16_t        */
 #define        PRIxFAST32      "x"     /* uint_fast32_t        */
 #ifdef _LP64
 #define        PRIxFAST64      "lx"    /* uint_fast64_t        */
@@ -195,11 +205,13 @@
 #define        PRIXLEAST32     "X"     /* uint_least32_t       */
 #ifdef _LP64
 #define        PRIXLEAST64     "lX"    /* uint_least64_t       */
+#define        PRIXFAST8       "X"     /* uint_fast8_t         */
+#define        PRIXFAST16      "X"     /* uint_fast16_t        */
 #else
 #define        PRIXLEAST64     "llX"   /* uint_least64_t       */
+#define        PRIXFAST8       "hhX"   /* uint_fast8_t         */
+#define        PRIXFAST16      "hX"    /* uint_fast16_t        */
 #endif
-#define        PRIXFAST8       "X"     /* uint_fast8_t         */
-#define        PRIXFAST16      "X"     /* uint_fast16_t        */
 #define        PRIXFAST32      "X"     /* uint_fast32_t        */
 #ifdef _LP64
 #define        PRIXFAST64      "lX"    /* uint_fast64_t        */
@@ -225,11 +237,13 @@
 #define        SCNdLEAST32     "d"     /* int_least32_t        */
 #ifdef _LP64
 #define        SCNdLEAST64     "ld"    /* int_least64_t        */
+#define        SCNdFAST8       "d"     /* int_fast8_t          */
+#define        SCNdFAST16      "d"     /* int_fast16_t         */
 #else
 #define        SCNdLEAST64     "lld"   /* int_least64_t        */
+#define        SCNdFAST8       "hhd"   /* int_fast8_t          */
+#define        SCNdFAST16      "hd"    /* int_fast16_t         */
 #endif
-#define        SCNdFAST8       "d"     /* int_fast8_t          */
-#define        SCNdFAST16      "d"     /* int_fast16_t         */
 #define        SCNdFAST32      "d"     /* int_fast32_t         */
 #ifdef _LP64
 #define        SCNdFAST64      "ld"    /* int_fast64_t         */
@@ -253,11 +267,13 @@
 #define        SCNiLEAST32     "i"     /* int_least32_t        */
 #ifdef _LP64
 #define        SCNiLEAST64     "li"    /* int_least64_t        */
+#define        SCNiFAST8       "i"     /* int_fast8_t          */
+#define        SCNiFAST16      "i"     /* int_fast16_t         */
 #else
 #define        SCNiLEAST64     "lli"   /* int_least64_t        */
+#define        SCNiFAST8       "hhi"   /* int_fast8_t          */
+#define        SCNiFAST16      "hi"    /* int_fast16_t         */
 #endif
-#define        SCNiFAST8       "i"     /* int_fast8_t          */
-#define        SCNiFAST16      "i"     /* int_fast16_t         */
 #define        SCNiFAST32      "i"     /* int_fast32_t         */
 #ifdef _LP64
 #define        SCNiFAST64      "li"    /* int_fast64_t         */
@@ -283,11 +299,13 @@
 #define        SCNoLEAST32     "o"     /* uint_least32_t       */
 #ifdef _LP64
 #define        SCNoLEAST64     "lo"    /* uint_least64_t       */
+#define        SCNoFAST8       "o"     /* uint_fast8_t         */
+#define        SCNoFAST16      "o"     /* uint_fast16_t        */
 #else
 #define        SCNoLEAST64     "llo"   /* uint_least64_t       */
+#define        SCNoFAST8       "hho"   /* uint_fast8_t         */
+#define        SCNoFAST16      "ho"    /* uint_fast16_t        */
 #endif
-#define        SCNoFAST8       "o"     /* uint_fast8_t         */
-#define        SCNoFAST16      "o"     /* uint_fast16_t        */
 #define        SCNoFAST32      "o"     /* uint_fast32_t        */
 #ifdef _LP64
 #define        SCNoFAST64      "lo"    /* uint_fast64_t        */
@@ -311,11 +329,13 @@
 #define        SCNuLEAST32     "u"     /* uint_least32_t       */
 #ifdef _LP64
 #define        SCNuLEAST64     "lu"    /* uint_least64_t       */
+#define        SCNuFAST8       "u"     /* uint_fast8_t         */
+#define        SCNuFAST16      "u"     /* uint_fast16_t        */
 #else
 #define        SCNuLEAST64     "llu"   /* uint_least64_t       */
+#define        SCNuFAST8       "hhu"   /* uint_fast8_t         */
+#define        SCNuFAST16      "hu"    /* uint_fast16_t        */
 #endif
-#define        SCNuFAST8       "u"     /* uint_fast8_t         */
-#define        SCNuFAST16      "u"     /* uint_fast16_t        */
 #define        SCNuFAST32      "u"     /* uint_fast32_t        */
 #ifdef _LP64
 #define        SCNuFAST64      "lu"    /* uint_fast64_t        */
@@ -339,11 +359,13 @@
 #define        SCNxLEAST32     "x"     /* uint_least32_t       */
 #ifdef _LP64
 #define        SCNxLEAST64     "lx"    /* uint_least64_t       */
+#define        SCNxFAST8       "x"     /* uint_fast8_t         */
+#define        SCNxFAST16      "x"     /* uint_fast16_t        */
 #else
 #define        SCNxLEAST64     "llx"   /* uint_least64_t       */
+#define        SCNxFAST8       "hhx"   /* uint_fast8_t         */
+#define        SCNxFAST16      "hx"    /* uint_fast16_t        */
 #endif
-#define        SCNxFAST8       "x"     /* uint_fast8_t         */
-#define        SCNxFAST16      "x"     /* uint_fast16_t        */
 #define        SCNxFAST32      "x"     /* uint_fast32_t        */
 #ifdef _LP64
 #define        SCNxFAST64      "lx"    /* uint_fast64_t        */



Home | Main Index | Thread Index | Old Index