]>
git.proxmox.com Git - mirror_spl-debian.git/blob - include/sys/isa_defs.h
1 /*****************************************************************************\
2 * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC.
3 * Copyright (C) 2007 The Regents of the University of California.
4 * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER).
5 * Written by Brian Behlendorf <behlendorf1@llnl.gov>.
8 * This file is part of the SPL, Solaris Porting Layer.
9 * For details, see <http://zfsonlinux.org/>.
11 * The SPL is free software; you can redistribute it and/or modify it
12 * under the terms of the GNU General Public License as published by the
13 * Free Software Foundation; either version 2 of the License, or (at your
14 * option) any later version.
16 * The SPL is distributed in the hope that it will be useful, but WITHOUT
17 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21 * You should have received a copy of the GNU General Public License along
22 * with the SPL. If not, see <http://www.gnu.org/licenses/>.
23 \*****************************************************************************/
25 #ifndef _SPL_ISA_DEFS_H
26 #define _SPL_ISA_DEFS_H
28 /* x86_64 arch specific defines */
29 #if defined(__x86_64) || defined(__x86_64__)
31 #if !defined(__x86_64)
47 /* i386 arch specific defines */
48 #elif defined(__i386) || defined(__i386__)
62 /* powerpc (ppc64) arch specific defines */
63 #elif defined(__powerpc) || defined(__powerpc__)
65 #if !defined(__powerpc)
69 #if !defined(__powerpc__)
77 /* arm arch specific defines */
78 #elif defined(__arm) || defined(__arm__) || defined(__aarch64__)
88 #if defined(__ARMEL__) || defined(__AARCH64EL__)
89 #define _LITTLE_ENDIAN
94 /* sparc arch specific defines */
95 #elif defined(__sparc) || defined(__sparc__)
101 #if !defined(__sparc__)
106 #define _SUNOS_VTOC_16
108 /* sparc64 arch specific defines */
109 #elif defined(__sparc64) || defined(__sparc64__)
111 #if !defined(__sparc64)
115 #if !defined(__sparc64__)
120 #define _SUNOS_VTOC_16
122 #else /* Currently x86_64, i386, arm, powerpc, and sparc are supported */
123 #error "Unsupported ISA type"
126 #if defined(_ILP32) && defined(_LP64)
127 #error "Both _ILP32 and _LP64 are defined"
130 #include <sys/byteorder.h>
132 #if defined(__LITTLE_ENDIAN) && !defined(_LITTLE_ENDIAN)
133 #define _LITTLE_ENDIAN __LITTLE_ENDIAN
136 #if defined(__BIG_ENDIAN) && !defined(_BIG_ENDIAN)
137 #define _BIG_ENDIAN __BIG_ENDIAN
140 #if defined(_LITTLE_ENDIAN) && defined(_BIG_ENDIAN)
141 #error "Both _LITTLE_ENDIAN and _BIG_ENDIAN are defined"
144 #if !defined(_LITTLE_ENDIAN) && !defined(_BIG_ENDIAN)
145 #error "Neither _LITTLE_ENDIAN or _BIG_ENDIAN are defined"
148 #endif /* _SPL_ISA_DEFS_H */