summaryrefslogtreecommitdiff
path: root/sys/arch/sparc64/include
diff options
context:
space:
mode:
authorMarc Espie <espie@cvs.openbsd.org>2002-04-19 11:04:25 +0000
committerMarc Espie <espie@cvs.openbsd.org>2002-04-19 11:04:25 +0000
commitf2d8887e54e100b6d0d9ded608af1d773ce4cd9e (patch)
treed16979caaf4d8367d34bff234accd6b11dbbdf38 /sys/arch/sparc64/include
parent30b431b57dc3d2e1b2dcdb2e8d9c3eb37dff50e4 (diff)
remove some #ifdef __arch64__, after agreement: we only ever run sparc64
as a 64 bits arch. Tests by jason@ and art@
Diffstat (limited to 'sys/arch/sparc64/include')
-rw-r--r--sys/arch/sparc64/include/int_types.h11
-rw-r--r--sys/arch/sparc64/include/limits.h14
-rw-r--r--sys/arch/sparc64/include/stdarg.h50
-rw-r--r--sys/arch/sparc64/include/types.h16
4 files changed, 4 insertions, 87 deletions
diff --git a/sys/arch/sparc64/include/int_types.h b/sys/arch/sparc64/include/int_types.h
index 64c538b30ac..5e5d863ee6d 100644
--- a/sys/arch/sparc64/include/int_types.h
+++ b/sys/arch/sparc64/include/int_types.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: int_types.h,v 1.2 2001/09/26 17:32:19 deraadt Exp $ */
+/* $OpenBSD: int_types.h,v 1.3 2002/04/19 11:04:24 espie Exp $ */
/* $NetBSD: int_types.h,v 1.7 2001/04/28 15:41:33 kleink Exp $ */
/*
@@ -69,19 +69,10 @@ typedef __COMPILER_INT64__ int64_t;
typedef __COMPILER_UINT64__ uint64_t;
typedef __COMPILER_UINT64__ u_int64_t;
#else
-#ifdef __arch64__
/* 64-bit compiler */
typedef long long int int64_t;
typedef unsigned long long int uint64_t;
typedef unsigned long long int u_int64_t;
-#else
-/* 32-bit compiler */
-/* LONGLONG */
-typedef long long int int64_t;
-/* LONGLONG */
-typedef unsigned long long int uint64_t;
-typedef unsigned long long int u_int64_t;
-#endif
#endif /* !__COMPILER_INT64__ */
#define __BIT_TYPES_DEFINED__
diff --git a/sys/arch/sparc64/include/limits.h b/sys/arch/sparc64/include/limits.h
index 36feb097a3f..aedaf48bb5d 100644
--- a/sys/arch/sparc64/include/limits.h
+++ b/sys/arch/sparc64/include/limits.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: limits.h,v 1.2 2001/08/23 16:12:40 art Exp $ */
+/* $OpenBSD: limits.h,v 1.3 2002/04/19 11:04:24 espie Exp $ */
/* $NetBSD: limits.h,v 1.8 2000/08/08 22:31:14 tshiozak Exp $ */
/*
@@ -58,21 +58,13 @@
#define INT_MIN (-0x7fffffff-1) /* min value for an int */
/* Make sure _LP64 is defined if we have a 64-bit compiler */
-#if __arch64__||__sparcv9__
#ifndef _LP64
#define _LP64
#endif
-#endif
-#ifdef __arch64__
#define ULONG_MAX 0xffffffffffffffffUL /* max value for an unsigned long */
#define LONG_MAX 0x7fffffffffffffffL /* max value for a long */
#define LONG_MIN (-0x7fffffffffffffffL-1) /* min value for a long */
-#else
-#define ULONG_MAX 0xffffffffUL /* max value for an unsigned long */
-#define LONG_MAX 0x7fffffffL /* max value for a long */
-#define LONG_MIN (-0x7fffffffL-1) /* min value for a long */
-#endif
#if !defined(_ANSI_SOURCE)
#define SSIZE_MAX LONG_MAX /* max value for a ssize_t */
@@ -100,11 +92,7 @@
#if !defined(_ANSI_SOURCE) && !defined(_POSIX_C_SOURCE) || \
defined(_XOPEN_SOURCE)
-#ifdef __arch64__
#define LONG_BIT 64
-#else
-#define LONG_BIT 32
-#endif
#define WORD_BIT 32
#define DBL_DIG 15
diff --git a/sys/arch/sparc64/include/stdarg.h b/sys/arch/sparc64/include/stdarg.h
index a5beb86cbbe..0612ca74c9b 100644
--- a/sys/arch/sparc64/include/stdarg.h
+++ b/sys/arch/sparc64/include/stdarg.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: stdarg.h,v 1.1 2001/08/18 16:19:28 jason Exp $ */
+/* $OpenBSD: stdarg.h,v 1.2 2002/04/19 11:04:24 espie Exp $ */
/* $NetBSD: stdarg.h,v 1.11 2000/07/23 21:36:56 mycroft Exp $ */
/*
@@ -70,7 +70,6 @@ typedef _BSD_VA_LIST_ va_list;
#define va_end(ap)
-#ifdef __arch64__
/*
* For sparcv9 code.
*/
@@ -93,52 +92,5 @@ typedef _BSD_VA_LIST_ va_list;
(sizeof(type) <= 8 ? __va_arg8(ap, type) : \
(sizeof(type) <= 16 ? __va_arg16(ap, type) : \
*__va_arg8(ap, type *)))))
-#else
-/*
- * For sparcv8 code.
- */
-#define __va_size(type) \
- (((sizeof(type) + sizeof(long) - 1) / sizeof(long)) * sizeof(long))
-
-/*
- * va_arg picks up the next argument of type `type'. Appending an
- * asterisk to `type' must produce a pointer to `type' (i.e., `type'
- * may not be, e.g., `int (*)()').
- *
- * Gcc-2.x tries to use ldd/std for double and quad_t values, but Sun's
- * brain-damaged calling convention does not quad-align these. Thus, for
- * 8-byte arguments, we have to pick up the actual value four bytes at a
- * time, and use type punning (i.e., a union) to produce the result.
- * (We could also do this with a libc function, actually, by returning
- * 8 byte integers in %o0+%o1 and the same 8 bytes as a double in %f0+%f1.)
- *
- * Note: We don't declare __d with type `type', since in C++ the type might
- * have a constructor.
- */
-#if __GNUC__ < 2
-#define __extension__
-#endif
-
-#define __va_8byte(ap, type) \
- __extension__ ({ \
- union { char __d[sizeof(type)]; int __i[2]; } __va_u; \
- __va_u.__i[0] = ((int *)(void *)(ap))[0]; \
- __va_u.__i[1] = ((int *)(void *)(ap))[1]; \
- (ap) += 8; *(type *)(va_list)__va_u.__d; \
- })
-
-#define __va_arg(ap, type) \
- (*(type *)((ap) += __va_size(type), \
- (ap) - (sizeof(type) < sizeof(long) && \
- sizeof(type) != __va_size(type) ? \
- sizeof(type) : __va_size(type))))
-
-#define __RECORD_TYPE_CLASS 12
-#define va_arg(ap, type) \
- (__builtin_classify_type(*(type *)0) >= __RECORD_TYPE_CLASS ? \
- *__va_arg(ap, type *) : __va_size(type) == 8 ? \
- __va_8byte(ap, type) : __va_arg(ap, type))
-
-#endif
#endif /* !_SPARC64_STDARG_H_ */
diff --git a/sys/arch/sparc64/include/types.h b/sys/arch/sparc64/include/types.h
index 14c609c0734..33b87ee6d0b 100644
--- a/sys/arch/sparc64/include/types.h
+++ b/sys/arch/sparc64/include/types.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: types.h,v 1.2 2002/02/18 16:19:48 jason Exp $ */
+/* $OpenBSD: types.h,v 1.3 2002/04/19 11:04:24 espie Exp $ */
/* $NetBSD: types.h,v 1.17 2001/05/12 22:42:07 kleink Exp $ */
/*
@@ -60,26 +60,12 @@ typedef struct label_t {
/* The following are unsigned to prevent annoying sign extended pointers. */
typedef unsigned long int register_t;
typedef unsigned int register32_t;
-#ifdef __arch64__
typedef unsigned long int register64_t;
-#else
-/* LONGLONG */
-typedef unsigned long long int register64_t;
-#endif
#if !defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE)
typedef unsigned long int vaddr_t;
typedef vaddr_t vsize_t;
-#ifdef SUN4U
-#ifdef __arch64__
-typedef unsigned long int paddr_t;
-#else
-/* LONGLONG */
-typedef unsigned long long int paddr_t;
-#endif /* __arch64__ */
-#else
typedef unsigned long int paddr_t;
-#endif /* SUN4U */
typedef paddr_t psize_t;
#endif