Source-Changes-HG archive

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

[src/trunk]: src/usr.bin/xlint/common Add constants that describe the target'...



details:   https://anonhg.NetBSD.org/src/rev/3a9f2bfc194a
branches:  trunk
changeset: 522513:3a9f2bfc194a
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Wed Feb 20 16:10:34 2002 +0000

description:
Add constants that describe the target's max/min INT, UINT, LONG, ULONG,
QUAD, and UQUAD values.

diffstat:

 usr.bin/xlint/common/ilp32.h |  14 +++++++++++++-
 usr.bin/xlint/common/lp64.h  |  14 +++++++++++++-
 2 files changed, 26 insertions(+), 2 deletions(-)

diffs (50 lines):

diff -r 2288cf56e509 -r 3a9f2bfc194a usr.bin/xlint/common/ilp32.h
--- a/usr.bin/xlint/common/ilp32.h      Wed Feb 20 11:57:10 2002 +0000
+++ b/usr.bin/xlint/common/ilp32.h      Wed Feb 20 16:10:34 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ilp32.h,v 1.1 2002/01/18 20:39:23 thorpej Exp $        */
+/*     $NetBSD: ilp32.h,v 1.2 2002/02/20 16:10:34 thorpej Exp $        */
 
 /*
  * Copyright (c) 2001 Wasabi Systems, Inc.
@@ -45,3 +45,15 @@
 #define        LONG_SIZE       (4 * CHAR_BIT)
 #define        QUAD_SIZE       (8 * CHAR_BIT)
 #define        PTR_SIZE        (4 * CHAR_BIT)
+
+#define        TARG_INT_MAX    ((int32_t) (((uint32_t) -1) >> 1))
+#define        TARG_INT_MIN    ((-TARG_INT_MAX) - 1)
+#define        TARG_UINT_MAX   ((uint32_t) -1)
+
+#define        TARG_LONG_MAX   TARG_INT_MAX
+#define        TARG_LONG_MIN   TARG_INT_MIN
+#define        TARG_ULONG_MAX  TARG_UINT_MAX
+
+#define        TARG_QUAD_MAX   ((int64_t) (((uint64_t) -1) >> 1))
+#define        TARG_QUAD_MIN   ((-TARG_QUAD_MAX) - 1)
+#define        TARG_UQUAD_MAX  ((uint64_t) -1)
diff -r 2288cf56e509 -r 3a9f2bfc194a usr.bin/xlint/common/lp64.h
--- a/usr.bin/xlint/common/lp64.h       Wed Feb 20 11:57:10 2002 +0000
+++ b/usr.bin/xlint/common/lp64.h       Wed Feb 20 16:10:34 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: lp64.h,v 1.1 2002/01/18 20:39:23 thorpej Exp $ */
+/*     $NetBSD: lp64.h,v 1.2 2002/02/20 16:10:34 thorpej Exp $ */
 
 /*
  * Copyright (c) 2001 Wasabi Systems, Inc.
@@ -45,3 +45,15 @@
 #define        LONG_SIZE       (8 * CHAR_BIT)
 #define        QUAD_SIZE       (8 * CHAR_BIT)
 #define        PTR_SIZE        (8 * CHAR_BIT)
+
+#define        TARG_INT_MAX    ((int32_t) (((uint32_t) -1) >> 1))
+#define        TARG_INT_MIN    ((-TARG_INT_MAX) - 1)
+#define        TARG_UINT_MAX   ((uint32_t) -1)
+
+#define        TARG_QUAD_MAX   ((int64_t) (((uint64_t) -1) >> 1))
+#define        TARG_QUAD_MIN   ((-TARG_QUAD_MAX) - 1)
+#define        TARG_UQUAD_MAX  ((uint64_t) -1)
+
+#define        TARG_LONG_MAX   TARG_QUAD_MAX
+#define        TARG_LONG_MIN   TARG_QUAD_MIN
+#define        TARG_ULONG_MAX  TARG_UQUAD_MAX



Home | Main Index | Thread Index | Old Index