PERFORCE change 134383 for review
Olivier Houchard
cognet at FreeBSD.org
Tue Jan 29 09:16:06 PST 2008
http://perforce.freebsd.org/chv.cgi?CH=134383
Change 134383 by cognet at kanar on 2008/01/29 17:15:38
Do not define __NO_STRICT_ALIGNMENT, mips requires strict alignment.
Try to use types suitables for both 32 and 64 bits.
Approved by: mux (mentor)
Affected files ...
.. //depot/projects/mips2-jnpr/src/sys/mips/include/_bus.h#4 edit
.. //depot/projects/mips2-jnpr/src/sys/mips/include/_types.h#4 edit
Differences ...
==== //depot/projects/mips2-jnpr/src/sys/mips/include/_bus.h#4 (text+ko) ====
@@ -35,13 +35,13 @@
/*
* Bus address and size types
*/
-typedef uint32_t bus_addr_t;
-typedef uint32_t bus_size_t;
+typedef uintptr_t bus_addr_t;
+typedef uintptr_t bus_size_t;
/*
* Access methods for bus resources and address space.
*/
-typedef int bus_space_tag_t;
-typedef u_int bus_space_handle_t;
+typedef long bus_space_tag_t;
+typedef u_long bus_space_handle_t;
#endif /* MIPS_INCLUDE__BUS_H */
==== //depot/projects/mips2-jnpr/src/sys/mips/include/_types.h#4 (text+ko) ====
@@ -44,8 +44,6 @@
#error this file needs sys/cdefs.h as a prerequisite
#endif
-#define __NO_STRICT_ALIGNMENT
-
/*
* Basic types upon which most other types are built.
*/
@@ -56,6 +54,10 @@
typedef int __int32_t;
typedef unsigned int __uint32_t;
+#ifdef __mips64
+typedef long __int64_t;
+typedef unsigned long __uint64_t;
+#else
#if defined(lint)
/* LONGLONG */
typedef long long __int64_t;
@@ -70,13 +72,14 @@
/* LONGLONG */
typedef unsigned long long __uint64_t;
#endif
+#endif
/*
* Standard type definitions.
*/
typedef unsigned long __clock_t; /* clock()... */
typedef unsigned int __cpumask_t;
-typedef __int32_t __critical_t;
+typedef long __critical_t;
typedef double __double_t;
typedef double __float_t;
typedef long __intfptr_t;
@@ -90,16 +93,15 @@
typedef __int16_t __int_least16_t;
typedef __int32_t __int_least32_t;
typedef __int64_t __int_least64_t;
-typedef __int32_t __ptrdiff_t; /* ptr1 - ptr2 */
-typedef __int32_t __register_t;
-typedef __int32_t f_register_t;
-typedef __int32_t __segsz_t; /* segment size (in pages) */
-typedef __uint32_t __size_t; /* sizeof() */
-typedef __int32_t __ssize_t; /* byte count or error */
-typedef __int32_t __time_t; /* time()... */
+typedef long __ptrdiff_t; /* ptr1 - ptr2 */
+typedef long __register_t;
+typedef long __segsz_t; /* segment size (in pages) */
+typedef long __size_t; /* sizeof() */
+typedef long __ssize_t; /* byte count or error */
+typedef __int64_t __time_t; /* time()... */
typedef unsigned long __uintfptr_t;
typedef __uint64_t __uintmax_t;
-typedef __uint32_t __uintptr_t;
+typedef unsigned long __uintptr_t;
typedef __uint32_t __uint_fast8_t;
typedef __uint32_t __uint_fast16_t;
typedef __uint32_t __uint_fast32_t;
@@ -108,10 +110,10 @@
typedef __uint16_t __uint_least16_t;
typedef __uint32_t __uint_least32_t;
typedef __uint64_t __uint_least64_t;
-typedef __uint32_t __u_register_t;
-typedef __uint32_t __vm_offset_t;
+typedef unsigned long __u_register_t;
+typedef unsigned long __vm_offset_t;
typedef __int64_t __vm_ooffset_t;
-typedef __uint32_t __vm_paddr_t;
+typedef unsigned long __vm_paddr_t;
typedef __uint64_t __vm_pindex_t;
typedef unsigned long __vm_size_t;
More information about the p4-projects
mailing list