summaryrefslogtreecommitdiff
path: root/sys/arch/mips64
diff options
context:
space:
mode:
Diffstat (limited to 'sys/arch/mips64')
-rw-r--r--sys/arch/mips64/include/_types.h16
-rw-r--r--sys/arch/mips64/include/param.h13
2 files changed, 19 insertions, 10 deletions
diff --git a/sys/arch/mips64/include/_types.h b/sys/arch/mips64/include/_types.h
index 6b0cd50fc96..0d61a79b77b 100644
--- a/sys/arch/mips64/include/_types.h
+++ b/sys/arch/mips64/include/_types.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: _types.h,v 1.9 2011/09/08 02:47:13 guenther Exp $ */
+/* $OpenBSD: _types.h,v 1.10 2011/09/08 03:40:32 guenther Exp $ */
/*-
* Copyright (c) 1990, 1993
@@ -36,6 +36,20 @@
#define _MIPS64__TYPES_H_
/*
+ * _ALIGN(p) rounds p (pointer or byte index) up to a correctly-aligned
+ * value for all data types (int, long, ...). The result is an
+ * unsigned long and must be cast to any desired pointer type.
+ *
+ * _ALIGNED_POINTER is a boolean macro that checks whether an address
+ * is valid to fetch data elements of type t from on this architecture.
+ * This does not reflect the optimal alignment, just the possibility
+ * (within reasonable limits).
+ */
+#define _ALIGNBYTES 7
+#define _ALIGN(p) (((unsigned long)(p) + _ALIGNBYTES) & ~_ALIGNBYTES)
+#define _ALIGNED_POINTER(p,t) ((((unsigned long)(p)) & (sizeof(t) - 1)) == 0)
+
+/*
* We need to handle the various ISA levels for sizes.
*/
#define _MIPS_ISA_MIPS1 1 /* R2000/R3000 */
diff --git a/sys/arch/mips64/include/param.h b/sys/arch/mips64/include/param.h
index 4c87da6be83..3347a9042fe 100644
--- a/sys/arch/mips64/include/param.h
+++ b/sys/arch/mips64/include/param.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: param.h,v 1.29 2011/04/07 15:45:17 miod Exp $ */
+/* $OpenBSD: param.h,v 1.30 2011/09/08 03:40:32 guenther Exp $ */
/*
* Copyright (c) 1988 University of Utah.
@@ -44,14 +44,9 @@
#include <machine/cpu.h>
#endif
-/*
- * Round p (pointer or byte index) up to a correctly-aligned value for all
- * data types (int, long, ...). The result is u_long and must be cast to
- * any desired pointer type.
- */
-#define ALIGNBYTES 7
-#define ALIGN(p) (((u_long)(p) + ALIGNBYTES) &~ ALIGNBYTES)
-#define ALIGNED_POINTER(p, t) ((((u_long)(p)) & (sizeof (t) - 1)) == 0)
+#define ALIGNBYTES _ALIGNBYTES
+#define ALIGN(p) _ALIGN(p)
+#define ALIGNED_POINTER(p,t) _ALIGNED_POINTER(p,t)
#define PAGE_SIZE (1 << PAGE_SHIFT)
#define PAGE_MASK (PAGE_SIZE - 1)