Module Name: src Committed By: matt Date: Fri Dec 11 20:33:08 UTC 2009
Modified Files: src/gnu/dist/gcc4/gcc/config/mips [matt-nb5-mips64]: netbsd.h src/sys/arch/mips/include [matt-nb5-mips64]: ansi.h int_fmtio.h int_types.h src/usr.bin/xlint [matt-nb5-mips64]: Makefile.inc Log Message: Unless we are in O32, use long int for size_t/ptrdiff_t/intptr_t. This allows N32 and N64 use both use the same type. To generate a diff of this commit: cvs rdiff -u -r1.1.1.1.32.4 -r1.1.1.1.32.5 \ src/gnu/dist/gcc4/gcc/config/mips/netbsd.h cvs rdiff -u -r1.23 -r1.23.38.1 src/sys/arch/mips/include/ansi.h cvs rdiff -u -r1.4 -r1.4.18.1 src/sys/arch/mips/include/int_fmtio.h cvs rdiff -u -r1.10 -r1.10.96.1 src/sys/arch/mips/include/int_types.h cvs rdiff -u -r1.9 -r1.9.48.1 src/usr.bin/xlint/Makefile.inc Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/gnu/dist/gcc4/gcc/config/mips/netbsd.h diff -u src/gnu/dist/gcc4/gcc/config/mips/netbsd.h:1.1.1.1.32.4 src/gnu/dist/gcc4/gcc/config/mips/netbsd.h:1.1.1.1.32.5 --- src/gnu/dist/gcc4/gcc/config/mips/netbsd.h:1.1.1.1.32.4 Sat Sep 5 03:26:20 2009 +++ src/gnu/dist/gcc4/gcc/config/mips/netbsd.h Fri Dec 11 20:33:07 2009 @@ -246,6 +246,14 @@ /* Make gcc agree with <machine/ansi.h> */ +#undef SIZE_TYPE +#define SIZE_TYPE ((POINTER_SIZE == 64 || TARGET_NEWABI) \ + ? "long unsigned int" : "unsigned int") + +#undef PTRDIFF_TYPE +#define PTRDIFF_TYPE ((POINTER_SIZE == 64 || TARGET_NEWABI) \ + ? "long int" : "int") + #undef WCHAR_TYPE #define WCHAR_TYPE "int" Index: src/sys/arch/mips/include/ansi.h diff -u src/sys/arch/mips/include/ansi.h:1.23 src/sys/arch/mips/include/ansi.h:1.23.38.1 --- src/sys/arch/mips/include/ansi.h:1.23 Wed Oct 17 19:55:36 2007 +++ src/sys/arch/mips/include/ansi.h Fri Dec 11 20:33:08 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: ansi.h,v 1.23 2007/10/17 19:55:36 garbled Exp $ */ +/* $NetBSD: ansi.h,v 1.23.38.1 2009/12/11 20:33:08 matt Exp $ */ /*- * Copyright (c) 1990, 1993 @@ -47,7 +47,7 @@ * #endif */ #define _BSD_CLOCK_T_ unsigned long /* clock() */ -#ifdef _LP64 +#ifndef __mips_o32 #define _BSD_PTRDIFF_T_ long /* ptr1 - ptr2 */ #define _BSD_SIZE_T_ unsigned long /* sizeof() */ #define _BSD_SSIZE_T_ long /* byte count or error */ @@ -57,7 +57,7 @@ #define _BSD_SIZE_T_ unsigned int /* sizeof() */ #define _BSD_SSIZE_T_ int /* byte count or error */ #define _BSD_TIME_T_ long /* time() */ -#endif /* _LP64 */ +#endif /* !__mips_o32 */ #if __GNUC_PREREQ__(3, 0) #define _BSD_VA_LIST_ __builtin_va_list /* GCC builtin type */ #else Index: src/sys/arch/mips/include/int_fmtio.h diff -u src/sys/arch/mips/include/int_fmtio.h:1.4 src/sys/arch/mips/include/int_fmtio.h:1.4.18.1 --- src/sys/arch/mips/include/int_fmtio.h:1.4 Mon Apr 28 20:23:28 2008 +++ src/sys/arch/mips/include/int_fmtio.h Fri Dec 11 20:33:08 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: int_fmtio.h,v 1.4 2008/04/28 20:23:28 martin Exp $ */ +/* $NetBSD: int_fmtio.h,v 1.4.18.1 2009/12/11 20:33:08 matt Exp $ */ /*- * Copyright (c) 2001 The NetBSD Foundation, Inc. @@ -64,9 +64,12 @@ #endif #ifdef _LP64 #define PRIdMAX "ld" /* intmax_t */ -#define PRIdPTR "ld" /* intptr_t */ #else #define PRIdMAX "lld" /* intmax_t */ +#endif +#ifndef __mips_o32 +#define PRIdPTR "ld" /* intptr_t */ +#else #define PRIdPTR "d" /* intptr_t */ #endif @@ -92,10 +95,13 @@ #ifdef _LP64 #define PRIiFAST64 "li" /* int_fast64_t */ #define PRIiMAX "li" /* intmax_t */ -#define PRIiPTR "li" /* intptr_t */ #else #define PRIiFAST64 "lli" /* int_fast64_t */ #define PRIiMAX "lli" /* intmax_t */ +#endif +#ifndef __mips_o32 +#define PRIiPTR "li" /* intptr_t */ +#else #define PRIiPTR "i" /* intptr_t */ #endif @@ -123,11 +129,14 @@ #ifdef _LP64 #define PRIoFAST64 "lo" /* uint_fast64_t */ #define PRIoMAX "lo" /* uintmax_t */ -#define PRIoPTR "lo" /* uintptr_t */ #else #define PRIoFAST64 "llo" /* uint_fast64_t */ #define PRIoMAX "llo" /* uintmax_t */ -#define PRIoPTR "o" /* uintptr_t */ +#endif +#ifndef __mips_o32 +#define PRIoPTR "lo" /* intptr_t */ +#else +#define PRIoPTR "o" /* intptr_t */ #endif #define PRIu8 "u" /* uint8_t */ @@ -152,11 +161,14 @@ #ifdef _LP64 #define PRIuFAST64 "lu" /* uint_fast64_t */ #define PRIuMAX "lu" /* uintmax_t */ -#define PRIuPTR "lu" /* uintptr_t */ #else #define PRIuFAST64 "llu" /* uint_fast64_t */ #define PRIuMAX "llu" /* uintmax_t */ -#define PRIuPTR "u" /* uintptr_t */ +#endif +#ifndef __mips_o32 +#define PRIuPTR "lu" /* intptr_t */ +#else +#define PRIuPTR "u" /* intptr_t */ #endif #define PRIx8 "x" /* uint8_t */ @@ -181,10 +193,13 @@ #ifdef _LP64 #define PRIxFAST64 "lx" /* uint_fast64_t */ #define PRIxMAX "lx" /* uintmax_t */ -#define PRIxPTR "lx" /* uintptr_t */ #else #define PRIxFAST64 "llx" /* uint_fast64_t */ #define PRIxMAX "llx" /* uintmax_t */ +#endif +#ifndef __mips_o32 +#define PRIxPTR "lx" /* uintptr_t */ +#else #define PRIxPTR "x" /* uintptr_t */ #endif @@ -210,10 +225,13 @@ #ifdef _LP64 #define PRIXFAST64 "lX" /* uint_fast64_t */ #define PRIXMAX "lX" /* uintmax_t */ -#define PRIXPTR "lX" /* uintptr_t */ #else #define PRIXFAST64 "llX" /* uint_fast64_t */ #define PRIXMAX "llX" /* uintmax_t */ +#endif +#ifndef __mips_o32 +#define PRIXPTR "lX" /* uintptr_t */ +#else #define PRIXPTR "X" /* uintptr_t */ #endif @@ -241,11 +259,14 @@ #ifdef _LP64 #define SCNdFAST64 "ld" /* int_fast64_t */ #define SCNdMAX "ld" /* intmax_t */ -#define SCNdPTR "ld" /* intptr_t */ #else #define SCNdFAST64 "lld" /* int_fast64_t */ #define SCNdMAX "lld" /* intmax_t */ -#define SCNdPTR "d" /* intptr_t */ +#endif +#ifndef __mips_o32 +#define SCNdPTR "ld" /* uintptr_t */ +#else +#define SCNdPTR "d" /* uintptr_t */ #endif #define SCNi8 "hhi" /* int8_t */ @@ -270,11 +291,14 @@ #ifdef _LP64 #define SCNiFAST64 "li" /* int_fast64_t */ #define SCNiMAX "li" /* intmax_t */ -#define SCNiPTR "li" /* intptr_t */ #else #define SCNiFAST64 "lli" /* int_fast64_t */ #define SCNiMAX "lli" /* intmax_t */ -#define SCNiPTR "i" /* intptr_t */ +#endif +#ifndef __mips_o32 +#define SCNiPTR "li" /* uintptr_t */ +#else +#define SCNiPTR "i" /* uintptr_t */ #endif /* fscanf macros for unsigned integers */ @@ -301,10 +325,13 @@ #ifdef _LP64 #define SCNoFAST64 "lo" /* uint_fast64_t */ #define SCNoMAX "lo" /* uintmax_t */ -#define SCNoPTR "lo" /* uintptr_t */ #else #define SCNoFAST64 "llo" /* uint_fast64_t */ #define SCNoMAX "llo" /* uintmax_t */ +#endif +#ifndef __mips_o32 +#define SCNoPTR "lo" /* uintptr_t */ +#else #define SCNoPTR "o" /* uintptr_t */ #endif @@ -330,10 +357,13 @@ #ifdef _LP64 #define SCNuFAST64 "lu" /* uint_fast64_t */ #define SCNuMAX "lu" /* uintmax_t */ -#define SCNuPTR "lu" /* uintptr_t */ #else #define SCNuFAST64 "llu" /* uint_fast64_t */ #define SCNuMAX "llu" /* uintmax_t */ +#endif +#ifndef __mips_o32 +#define SCNuPTR "lu" /* uintptr_t */ +#else #define SCNuPTR "u" /* uintptr_t */ #endif @@ -359,10 +389,13 @@ #ifdef _LP64 #define SCNxFAST64 "lx" /* uint_fast64_t */ #define SCNxMAX "lx" /* uintmax_t */ -#define SCNxPTR "lx" /* uintptr_t */ #else #define SCNxFAST64 "llx" /* uint_fast64_t */ #define SCNxMAX "llx" /* uintmax_t */ +#endif +#ifndef __mips_o32 +#define SCNxPTR "lx" /* uintptr_t */ +#else #define SCNxPTR "x" /* uintptr_t */ #endif Index: src/sys/arch/mips/include/int_types.h diff -u src/sys/arch/mips/include/int_types.h:1.10 src/sys/arch/mips/include/int_types.h:1.10.96.1 --- src/sys/arch/mips/include/int_types.h:1.10 Sat Dec 24 20:07:19 2005 +++ src/sys/arch/mips/include/int_types.h Fri Dec 11 20:33:08 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: int_types.h,v 1.10 2005/12/24 20:07:19 perry Exp $ */ +/* $NetBSD: int_types.h,v 1.10.96.1 2009/12/11 20:33:08 matt Exp $ */ /*- * Copyright (c) 1992, 1993 @@ -68,7 +68,7 @@ /* 7.18.1.4 Integer types capable of holding object pointers */ -#ifdef _LP64 +#ifndef __mips_o32 typedef long int __intptr_t; typedef unsigned long int __uintptr_t; #else Index: src/usr.bin/xlint/Makefile.inc diff -u src/usr.bin/xlint/Makefile.inc:1.9 src/usr.bin/xlint/Makefile.inc:1.9.48.1 --- src/usr.bin/xlint/Makefile.inc:1.9 Mon Feb 4 08:37:37 2002 +++ src/usr.bin/xlint/Makefile.inc Fri Dec 11 20:33:08 2009 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.inc,v 1.9 2002/02/04 08:37:37 thorpej Exp $ +# $NetBSD: Makefile.inc,v 1.9.48.1 2009/12/11 20:33:08 matt Exp $ .include <bsd.own.mk> @@ -9,6 +9,8 @@ # on the m68000), so we special case the directory name here. .if ${MACHINE_ARCH} == "m68000" ARCHSUBDIR= m68000 +.elif ${MACHINE_ARCH} == "mips64eb" || ${MACHINE_ARCH} == "mips64el" +ARCHSUBDIR= mips64 .else ARCHSUBDIR= ${MACHINE_CPU} .endif