Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/powerpc/include belatedly fix constants for ppc64 (...



details:   https://anonhg.NetBSD.org/src/rev/3ce1fddb64de
branches:  trunk
changeset: 820776:3ce1fddb64de
user:      christos <christos%NetBSD.org@localhost>
date:      Sat Jan 14 21:33:09 2017 +0000

description:
belatedly fix constants for ppc64 (this does not define __arch64__ like sparc
does?)

diffstat:

 sys/arch/powerpc/include/param.h |  21 +++++++++++++++------
 1 files changed, 15 insertions(+), 6 deletions(-)

diffs (41 lines):

diff -r a2d065df6f36 -r 3ce1fddb64de sys/arch/powerpc/include/param.h
--- a/sys/arch/powerpc/include/param.h  Sat Jan 14 21:29:02 2017 +0000
+++ b/sys/arch/powerpc/include/param.h  Sat Jan 14 21:33:09 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: param.h,v 1.29 2013/01/29 15:47:16 kiyohara Exp $      */
+/*     $NetBSD: param.h,v 1.30 2017/01/14 21:33:09 christos Exp $      */
 
 /*-
  * Copyright (C) 1995, 1996 Wolfgang Solfrank.
@@ -41,17 +41,26 @@
 #endif
 
 /*
- * Machine dependent constants for PowerPC (32-bit only currently)
+ * Machine dependent constants for PowerPC
  * For userland regardless of port, force MACHINE to be "powerpc"
  */
 #ifndef _KERNEL
 #undef MACHINE
 #endif
-#ifndef MACHINE
-#define        MACHINE         "powerpc"
+
+#ifdef _LP64
+# ifndef MACHINE
+#  define      MACHINE         "powerpc64"
+# endif
+# define       MACHINE_ARCH    "powerpc64"
+# define       MID_MACHINE     MID_POWERPC64
+#else
+# ifndef MACHINE
+#  define      MACHINE         "powerpc"
+# endif
+# define       MACHINE_ARCH    "powerpc"
+# define       MID_MACHINE     MID_POWERPC
 #endif
-#define        MACHINE_ARCH    "powerpc"
-#define        MID_MACHINE     MID_POWERPC
 
 /* PowerPC-specific macro to align a stack pointer (downwards). */
 #define        STACK_ALIGNBYTES        (16 - 1)        /* AltiVec */



Home | Main Index | Thread Index | Old Index