Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.bin/xlint Define FLOAT_SIZE, DOUBLE_SIZE, LDOUBLE_SIZE, ...
details: https://anonhg.NetBSD.org/src/rev/1665a1689ec6
branches: trunk
changeset: 521410:1665a1689ec6
user: thorpej <thorpej%NetBSD.org@localhost>
date: Wed Jan 30 06:54:56 2002 +0000
description:
Define FLOAT_SIZE, DOUBLE_SIZE, LDOUBLE_SIZE, and ENUM_SIZE in
target-specific headers, and use the definitions when initializing
the type table.
diffstat:
usr.bin/xlint/arch/alpha/targparam.h | 8 +++++++-
usr.bin/xlint/arch/arm/targparam.h | 13 ++++++++++++-
usr.bin/xlint/arch/i386/targparam.h | 8 +++++++-
usr.bin/xlint/arch/m68k/targparam.h | 8 +++++++-
usr.bin/xlint/arch/mips/targparam.h | 8 +++++++-
usr.bin/xlint/arch/ns32k/targparam.h | 8 +++++++-
usr.bin/xlint/arch/powerpc/targparam.h | 8 +++++++-
usr.bin/xlint/arch/sh3/targparam.h | 8 +++++++-
usr.bin/xlint/arch/sparc/targparam.h | 8 +++++++-
usr.bin/xlint/arch/sparc64/targparam.h | 8 +++++++-
usr.bin/xlint/arch/vax/targparam.h | 8 +++++++-
usr.bin/xlint/arch/x86_64/targparam.h | 8 +++++++-
usr.bin/xlint/common/inittyp.c | 12 ++++++------
13 files changed, 95 insertions(+), 18 deletions(-)
diffs (277 lines):
diff -r 9ed442b75102 -r 1665a1689ec6 usr.bin/xlint/arch/alpha/targparam.h
--- a/usr.bin/xlint/arch/alpha/targparam.h Wed Jan 30 06:54:55 2002 +0000
+++ b/usr.bin/xlint/arch/alpha/targparam.h Wed Jan 30 06:54:56 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: targparam.h,v 1.1 2002/01/18 20:39:18 thorpej Exp $ */
+/* $NetBSD: targparam.h,v 1.2 2002/01/30 06:54:56 thorpej Exp $ */
/*
* Copyright (c) 1994, 1995 Jochen Pohl
@@ -45,3 +45,9 @@
#define PTRDIFF_IS_LONG 1
#define SIZEOF_IS_ULONG 1
+
+#define FLOAT_SIZE (4 * CHAR_BIT)
+#define DOUBLE_SIZE (8 * CHAR_BIT)
+#define LDOUBLE_SIZE (8 * CHAR_BIT)
+
+#define ENUM_SIZE (4 * CHAR_BIT)
diff -r 9ed442b75102 -r 1665a1689ec6 usr.bin/xlint/arch/arm/targparam.h
--- a/usr.bin/xlint/arch/arm/targparam.h Wed Jan 30 06:54:55 2002 +0000
+++ b/usr.bin/xlint/arch/arm/targparam.h Wed Jan 30 06:54:56 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: targparam.h,v 1.1 2002/01/18 20:39:19 thorpej Exp $ */
+/* $NetBSD: targparam.h,v 1.2 2002/01/30 06:54:57 thorpej Exp $ */
/*
* Copyright (c) 1994, 1995 Jochen Pohl
@@ -50,3 +50,14 @@
#define PTRDIFF_IS_LONG 0
#define SIZEOF_IS_ULONG 0
#endif
+
+#define FLOAT_SIZE (4 * CHAR_BIT)
+#define DOUBLE_SIZE (8 * CHAR_BIT)
+#define LDOUBLE_SIZE (8 * CHAR_BIT)
+
+#if defined(TARGET_OBJFMT_ELF)
+/* XXX ARM ELF ABI says packed enums -- variable size! */
+#define ENUM_SIZE (4 * CHAR_BIT)
+#else
+#define ENUM_SIZE (4 * CHAR_BIT)
+#endif
diff -r 9ed442b75102 -r 1665a1689ec6 usr.bin/xlint/arch/i386/targparam.h
--- a/usr.bin/xlint/arch/i386/targparam.h Wed Jan 30 06:54:55 2002 +0000
+++ b/usr.bin/xlint/arch/i386/targparam.h Wed Jan 30 06:54:56 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: targparam.h,v 1.1 2002/01/18 20:39:19 thorpej Exp $ */
+/* $NetBSD: targparam.h,v 1.2 2002/01/30 06:54:58 thorpej Exp $ */
/*
* Copyright (c) 1994, 1995 Jochen Pohl
@@ -45,3 +45,9 @@
#define PTRDIFF_IS_LONG 0
#define SIZEOF_IS_ULONG 0
+
+#define FLOAT_SIZE (4 * CHAR_BIT)
+#define DOUBLE_SIZE (8 * CHAR_BIT)
+#define LDOUBLE_SIZE (12 * CHAR_BIT)
+
+#define ENUM_SIZE (4 * CHAR_BIT)
diff -r 9ed442b75102 -r 1665a1689ec6 usr.bin/xlint/arch/m68k/targparam.h
--- a/usr.bin/xlint/arch/m68k/targparam.h Wed Jan 30 06:54:55 2002 +0000
+++ b/usr.bin/xlint/arch/m68k/targparam.h Wed Jan 30 06:54:56 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: targparam.h,v 1.1 2002/01/18 20:39:19 thorpej Exp $ */
+/* $NetBSD: targparam.h,v 1.2 2002/01/30 06:54:58 thorpej Exp $ */
/*
* Copyright (c) 1994, 1995 Jochen Pohl
@@ -45,3 +45,9 @@
#define PTRDIFF_IS_LONG 0
#define SIZEOF_IS_ULONG 0
+
+#define FLOAT_SIZE (4 * CHAR_BIT)
+#define DOUBLE_SIZE (8 * CHAR_BIT)
+#define LDOUBLE_SIZE (12 * CHAR_BIT)
+
+#define ENUM_SIZE (4 * CHAR_BIT)
diff -r 9ed442b75102 -r 1665a1689ec6 usr.bin/xlint/arch/mips/targparam.h
--- a/usr.bin/xlint/arch/mips/targparam.h Wed Jan 30 06:54:55 2002 +0000
+++ b/usr.bin/xlint/arch/mips/targparam.h Wed Jan 30 06:54:56 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: targparam.h,v 1.1 2002/01/18 20:39:19 thorpej Exp $ */
+/* $NetBSD: targparam.h,v 1.2 2002/01/30 06:54:59 thorpej Exp $ */
/*
* Copyright (c) 1994, 1995 Jochen Pohl
@@ -45,3 +45,9 @@
#define PTRDIFF_IS_LONG 0
#define SIZEOF_IS_ULONG 0
+
+#define FLOAT_SIZE (4 * CHAR_BIT)
+#define DOUBLE_SIZE (8 * CHAR_BIT)
+#define LDOUBLE_SIZE (8 * CHAR_BIT)
+
+#define ENUM_SIZE (4 * CHAR_BIT)
diff -r 9ed442b75102 -r 1665a1689ec6 usr.bin/xlint/arch/ns32k/targparam.h
--- a/usr.bin/xlint/arch/ns32k/targparam.h Wed Jan 30 06:54:55 2002 +0000
+++ b/usr.bin/xlint/arch/ns32k/targparam.h Wed Jan 30 06:54:56 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: targparam.h,v 1.1 2002/01/18 20:39:20 thorpej Exp $ */
+/* $NetBSD: targparam.h,v 1.2 2002/01/30 06:54:59 thorpej Exp $ */
/*
* Copyright (c) 1994, 1995 Jochen Pohl
@@ -45,3 +45,9 @@
#define PTRDIFF_IS_LONG 0
#define SIZEOF_IS_ULONG 0
+
+#define FLOAT_SIZE (4 * CHAR_BIT)
+#define DOUBLE_SIZE (8 * CHAR_BIT)
+#define LDOUBLE_SIZE (12 * CHAR_BIT) /* XXX double-check */
+
+#define ENUM_SIZE (4 * CHAR_BIT)
diff -r 9ed442b75102 -r 1665a1689ec6 usr.bin/xlint/arch/powerpc/targparam.h
--- a/usr.bin/xlint/arch/powerpc/targparam.h Wed Jan 30 06:54:55 2002 +0000
+++ b/usr.bin/xlint/arch/powerpc/targparam.h Wed Jan 30 06:54:56 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: targparam.h,v 1.1 2002/01/18 20:39:20 thorpej Exp $ */
+/* $NetBSD: targparam.h,v 1.2 2002/01/30 06:54:59 thorpej Exp $ */
/*
* Copyright (c) 1994, 1995 Jochen Pohl
@@ -45,3 +45,9 @@
#define PTRDIFF_IS_LONG 0
#define SIZEOF_IS_ULONG 0
+
+#define FLOAT_SIZE (4 * CHAR_BIT)
+#define DOUBLE_SIZE (8 * CHAR_BIT)
+#define LDOUBLE_SIZE (8 * CHAR_BIT)
+
+#define ENUM_SIZE (4 * CHAR_BIT)
diff -r 9ed442b75102 -r 1665a1689ec6 usr.bin/xlint/arch/sh3/targparam.h
--- a/usr.bin/xlint/arch/sh3/targparam.h Wed Jan 30 06:54:55 2002 +0000
+++ b/usr.bin/xlint/arch/sh3/targparam.h Wed Jan 30 06:54:56 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: targparam.h,v 1.1 2002/01/18 20:39:20 thorpej Exp $ */
+/* $NetBSD: targparam.h,v 1.2 2002/01/30 06:55:00 thorpej Exp $ */
/*
* Copyright (c) 1994, 1995 Jochen Pohl
@@ -45,3 +45,9 @@
#define PTRDIFF_IS_LONG 0
#define SIZEOF_IS_ULONG 0
+
+#define FLOAT_SIZE (4 * CHAR_BIT)
+#define DOUBLE_SIZE (8 * CHAR_BIT)
+#define LDOUBLE_SIZE (8 * CHAR_BIT)
+
+#define ENUM_SIZE (4 * CHAR_BIT)
diff -r 9ed442b75102 -r 1665a1689ec6 usr.bin/xlint/arch/sparc/targparam.h
--- a/usr.bin/xlint/arch/sparc/targparam.h Wed Jan 30 06:54:55 2002 +0000
+++ b/usr.bin/xlint/arch/sparc/targparam.h Wed Jan 30 06:54:56 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: targparam.h,v 1.1 2002/01/18 20:39:21 thorpej Exp $ */
+/* $NetBSD: targparam.h,v 1.2 2002/01/30 06:55:00 thorpej Exp $ */
/*
* Copyright (c) 1994, 1995 Jochen Pohl
@@ -45,3 +45,9 @@
#define PTRDIFF_IS_LONG 1
#define SIZEOF_IS_ULONG 1
+
+#define FLOAT_SIZE (4 * CHAR_BIT)
+#define DOUBLE_SIZE (8 * CHAR_BIT)
+#define LDOUBLE_SIZE (8 * CHAR_BIT)
+
+#define ENUM_SIZE (4 * CHAR_BIT)
diff -r 9ed442b75102 -r 1665a1689ec6 usr.bin/xlint/arch/sparc64/targparam.h
--- a/usr.bin/xlint/arch/sparc64/targparam.h Wed Jan 30 06:54:55 2002 +0000
+++ b/usr.bin/xlint/arch/sparc64/targparam.h Wed Jan 30 06:54:56 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: targparam.h,v 1.1 2002/01/18 20:39:21 thorpej Exp $ */
+/* $NetBSD: targparam.h,v 1.2 2002/01/30 06:55:00 thorpej Exp $ */
/*
* Copyright (c) 1994, 1995 Jochen Pohl
@@ -45,3 +45,9 @@
#define PTRDIFF_IS_LONG 1
#define SIZEOF_IS_ULONG 1
+
+#define FLOAT_SIZE (4 * CHAR_BIT)
+#deifne DOUBLE_SIZE (8 * CHAR_BIT)
+#define LDOUBLE_SIZE (16 * CHAR_BIT)
+
+#define ENUM_SIZE (4 * CHAR_BIT)
diff -r 9ed442b75102 -r 1665a1689ec6 usr.bin/xlint/arch/vax/targparam.h
--- a/usr.bin/xlint/arch/vax/targparam.h Wed Jan 30 06:54:55 2002 +0000
+++ b/usr.bin/xlint/arch/vax/targparam.h Wed Jan 30 06:54:56 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: targparam.h,v 1.1 2002/01/18 20:39:22 thorpej Exp $ */
+/* $NetBSD: targparam.h,v 1.2 2002/01/30 06:55:01 thorpej Exp $ */
/*
* Copyright (c) 1994, 1995 Jochen Pohl
@@ -45,3 +45,9 @@
#define PTRDIFF_IS_LONG 0
#define SIZEOF_IS_ULONG 0
+
+#define FLOAT_SIZE (4 * CHAR_BIT)
+#define DOUBLE_SIZE (8 * CHAR_BIT)
+#define LDOUBLE_SIZE (8 * CHAR_BIT)
+
+#define ENUM_SIZE (4 * CHAR_BIT)
diff -r 9ed442b75102 -r 1665a1689ec6 usr.bin/xlint/arch/x86_64/targparam.h
--- a/usr.bin/xlint/arch/x86_64/targparam.h Wed Jan 30 06:54:55 2002 +0000
+++ b/usr.bin/xlint/arch/x86_64/targparam.h Wed Jan 30 06:54:56 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: targparam.h,v 1.1 2002/01/18 20:39:22 thorpej Exp $ */
+/* $NetBSD: targparam.h,v 1.2 2002/01/30 06:55:02 thorpej Exp $ */
/*
* Copyright (c) 1994, 1995 Jochen Pohl
@@ -45,3 +45,9 @@
#define PTRDIFF_IS_LONG 1
#define SIZEOF_IS_ULONG 1
+
+#define FLOAT_SIZE (4 * CHAR_BIT)
+#define DOUBLE_SIZE (8 * CHAR_BIT)
+#define LDOUBLE_SIZE (16 * CHAR_BIT)
+
+#define ENUM_SIZE (4 * CHAR_BIT)
diff -r 9ed442b75102 -r 1665a1689ec6 usr.bin/xlint/common/inittyp.c
--- a/usr.bin/xlint/common/inittyp.c Wed Jan 30 06:54:55 2002 +0000
+++ b/usr.bin/xlint/common/inittyp.c Wed Jan 30 06:54:56 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: inittyp.c,v 1.2 2002/01/21 19:49:51 tv Exp $ */
+/* $NetBSD: inittyp.c,v 1.3 2002/01/30 06:55:02 thorpej Exp $ */
/*
* Copyright (c) 1994, 1995 Jochen Pohl
@@ -33,7 +33,7 @@
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: inittyp.c,v 1.2 2002/01/21 19:49:51 tv Exp $");
+__RCSID("$NetBSD: inittyp.c,v 1.3 2002/01/30 06:55:02 thorpej Exp $");
#endif
#include <ctype.h>
@@ -92,13 +92,13 @@
{ UQUAD, { QUAD_SIZE, 8 * CHAR_BIT,
QUAD, UQUAD,
1, 1, 0, 1, 1, "unsigned long long" } },
- { FLOAT, { sizeof (float) * CHAR_BIT, 4 * CHAR_BIT,
+ { FLOAT, { FLOAT_SIZE, 4 * CHAR_BIT,
FLOAT, FLOAT,
0, 0, 1, 1, 1, "float" } },
- { DOUBLE, { sizeof (double) * CHAR_BIT, 8 * CHAR_BIT,
+ { DOUBLE, { DOUBLE_SIZE, 8 * CHAR_BIT,
DOUBLE, DOUBLE,
0, 0, 1, 1, 1, "double" } },
- { LDOUBLE, { sizeof (ldbl_t) * CHAR_BIT, 10 * CHAR_BIT,
+ { LDOUBLE, { LDOUBLE_SIZE, 10 * CHAR_BIT,
LDOUBLE, LDOUBLE,
0, 0, 1, 1, 1, "long double" } },
{ VOID, { -1, -1,
@@ -110,7 +110,7 @@
{ UNION, { -1, -1,
UNION, UNION,
0, 0, 0, 0, 0, "union" } },
- { ENUM, { sizeof (int) * CHAR_BIT, 3 * CHAR_BIT,
+ { ENUM, { ENUM_SIZE, 3 * CHAR_BIT,
ENUM, ENUM,
1, 0, 0, 1, 1, "enum" } },
{ PTR, { PTR_SIZE, 4 * CHAR_BIT,
Home |
Main Index |
Thread Index |
Old Index