]>
git.proxmox.com Git - mirror_zfs.git/blob - lib/libspl/include/sys/isa_defs.h
4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 * or http://www.opensolaris.org/os/licensing.
10 * See the License for the specific language governing permissions
11 * and limitations under the License.
13 * When distributing Covered Code, include this CDDL HEADER in each
14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 * If applicable, add the following below this CDDL HEADER, with the
16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
23 * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
24 * Use is subject to license terms.
27 #ifndef _SYS_ISA_DEFS_H
28 #define _SYS_ISA_DEFS_H
34 /* x86_64 arch specific defines */
35 #if defined(__x86_64) || defined(__x86_64__)
37 #if !defined(__x86_64)
53 #if !defined(_LITTLE_ENDIAN)
54 #define _LITTLE_ENDIAN
57 #define _SUNOS_VTOC_16
59 /* i386 arch specific defines */
60 #elif defined(__i386) || defined(__i386__)
74 #if !defined(_LITTLE_ENDIAN)
75 #define _LITTLE_ENDIAN
78 #define _SUNOS_VTOC_16
80 /* powerpc arch specific defines */
81 #elif defined(__powerpc) || defined(__powerpc__) || defined(__powerpc64__)
83 #if !defined(__powerpc)
87 #if !defined(__powerpc__)
91 #if defined(__powerpc64__)
101 #define _SUNOS_VTOC_16
103 /* arm arch specific defines */
104 #elif defined(__arm) || defined(__arm__) || defined(__aarch64__)
110 #if !defined(__arm__)
114 #if defined(__aarch64__)
124 #if defined(__ARMEL__) || defined(__AARCH64EL__)
125 #define _LITTLE_ENDIAN
130 #define _SUNOS_VTOC_16
132 /* sparc arch specific defines */
133 #elif defined(__sparc) || defined(__sparc__) || defined(__sparc64__)
135 #if !defined(__sparc)
139 #if !defined(__sparc__)
144 #define _SUNOS_VTOC_16
146 #if defined(__sparc64__)
156 /* s390 arch specific defines */
157 #elif defined(__s390__)
158 #if defined(__s390x__)
169 #define _SUNOS_VTOC_16
171 /* MIPS arch specific defines */
172 #elif defined(__mips__)
174 #if defined(__MIPSEB__)
176 #elif defined(__MIPSEL__)
177 #define _LITTLE_ENDIAN
179 #error MIPS no endian specified
186 #define _SUNOS_VTOC_16
190 * Currently supported:
191 * x86_64, i386, arm, powerpc, s390, sparc, and mips
193 #error "Unsupported ISA type"
196 #if defined(_ILP32) && defined(_LP64)
197 #error "Both _ILP32 and _LP64 are defined"
200 #if !defined(_ILP32) && !defined(_LP64)
201 #error "Neither _ILP32 or _LP64 are defined"
204 #if defined(_LITTLE_ENDIAN) && defined(_BIG_ENDIAN)
205 #error "Both _LITTLE_ENDIAN and _BIG_ENDIAN are defined"
208 #if !defined(_LITTLE_ENDIAN) && !defined(_BIG_ENDIAN)
209 #error "Neither _LITTLE_ENDIAN nor _BIG_ENDIAN are defined"
216 #endif /* _SYS_ISA_DEFS_H */