summaryrefslogtreecommitdiff
path: root/sys/arch/m88k/include/param.h
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2004-09-30 21:48:58 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2004-09-30 21:48:58 +0000
commit7c3ee3ebb6da78ff2aefcb237aea70a1d0fc2f40 (patch)
tree8ff9e88b5f7080b6bad1f96b4103154d7b1bef66 /sys/arch/m88k/include/param.h
parent7f2ae2b10eb947643499a0bcecfd336db623f653 (diff)
Introduce sparc-like CPU_ISFOO macros, to short-circuit evaluations when
compiling for one flavour only. This makes code slightly smaller on all m88k-based platforms (my roughly 1KB), and saves more than meets the eye on luna88k, which is m88100-based.
Diffstat (limited to 'sys/arch/m88k/include/param.h')
-rw-r--r--sys/arch/m88k/include/param.h15
1 files changed, 14 insertions, 1 deletions
diff --git a/sys/arch/m88k/include/param.h b/sys/arch/m88k/include/param.h
index 001c541d0b3..bc873673434 100644
--- a/sys/arch/m88k/include/param.h
+++ b/sys/arch/m88k/include/param.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: param.h,v 1.3 2004/08/09 20:53:04 miod Exp $ */
+/* $OpenBSD: param.h,v 1.4 2004/09/30 21:48:56 miod Exp $ */
/*
* Copyright (c) 1999 Steve Murphree, Jr.
* Copyright (c) 1988 University of Utah.
@@ -147,4 +147,17 @@ extern int cputyp;
#define CPU_88100 0x100
#define CPU_88110 0x110
+#ifdef M88100
+#ifdef M88110
+#define CPU_IS88100 (cputyp == CPU_88100)
+#define CPU_IS88110 (cputyp != CPU_88100)
+#else
+#define CPU_IS88100 1
+#define CPU_IS88110 0
+#endif
+#else
+#define CPU_IS88100 0
+#define CPU_IS88110 1
+#endif
+
#endif /* !_M88K_PARAM_H_ */