]> rtime.felk.cvut.cz Git - l4.git/blob - l4/pkg/l4re-core/uclibc/lib/contrib/uclibc/libc/sysdeps/linux/powerpc/sysdep.h
Update
[l4.git] / l4 / pkg / l4re-core / uclibc / lib / contrib / uclibc / libc / sysdeps / linux / powerpc / sysdep.h
1 /* Copyright (C) 1999, 2001, 2002, 2006 Free Software Foundation, Inc.
2    This file is part of the GNU C Library.
3
4    The GNU C Library is free software; you can redistribute it and/or
5    modify it under the terms of the GNU Lesser General Public
6    License as published by the Free Software Foundation; either
7    version 2.1 of the License, or (at your option) any later version.
8
9    The GNU C Library is distributed in the hope that it will be useful,
10    but WITHOUT ANY WARRANTY; without even the implied warranty of
11    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12    Lesser General Public License for more details.
13
14    You should have received a copy of the GNU Lesser General Public
15    License along with the GNU C Library; if not, see
16    <http://www.gnu.org/licenses/>.  */
17
18 #include <common/sysdep.h>
19
20 /* 
21  * Powerpc Feature masks for the Aux Vector Hardware Capabilities (AT_HWCAP). 
22  * This entry is copied to _dl_hwcap or rtld_global._dl_hwcap during startup.
23  * The following must match the kernels linux/asm/cputable.h.  
24  */
25 #define PPC_FEATURE_32                  0x80000000 /* 32-bit mode. */
26 #define PPC_FEATURE_64                  0x40000000 /* 64-bit mode. */
27 #define PPC_FEATURE_601_INSTR           0x20000000 /* 601 chip, Old POWER ISA.  */
28 #define PPC_FEATURE_HAS_ALTIVEC         0x10000000 /* SIMD/Vector Unit.  */
29 #define PPC_FEATURE_HAS_FPU             0x08000000 /* Floating Point Unit.  */
30 #define PPC_FEATURE_HAS_MMU             0x04000000 /* Memory Management Unit.  */
31 #define PPC_FEATURE_HAS_4xxMAC          0x02000000 /* 4xx Multiply Accumulator.  */
32 #define PPC_FEATURE_UNIFIED_CACHE       0x01000000 /* Unified I/D cache.  */
33 #define PPC_FEATURE_HAS_SPE             0x00800000 /* Signal Processing ext.  */
34 #define PPC_FEATURE_HAS_EFP_SINGLE      0x00400000 /* SPE Float.  */
35 #define PPC_FEATURE_HAS_EFP_DOUBLE      0x00200000 /* SPE Double.  */
36 #define PPC_FEATURE_NO_TB               0x00100000 /* 601/403gx have no timebase */
37 #define PPC_FEATURE_POWER4              0x00080000 /* POWER4 ISA 2.00 */
38 #define PPC_FEATURE_POWER5              0x00040000 /* POWER5 ISA 2.02 */
39 #define PPC_FEATURE_POWER5_PLUS         0x00020000 /* POWER5+ ISA 2.03 */
40 #define PPC_FEATURE_CELL_BE             0x00010000 /* CELL Broadband Engine */
41 #define PPC_FEATURE_BOOKE               0x00008000
42 #define PPC_FEATURE_SMT                 0x00004000 /* Simultaneous Multi-Threading */
43 #define PPC_FEATURE_ICACHE_SNOOP        0x00002000
44 #define PPC_FEATURE_ARCH_2_05           0x00001000 /* ISA 2.05 */
45 #define PPC_FEATURE_PA6T                0x00000800 /* PA Semi 6T Core */
46 #define PPC_FEATURE_HAS_DFP             0x00000400 /* Decimal FP Unit */
47 #define PPC_FEATURE_POWER6_EXT          0x00000200 /* P6 + mffgpr/mftgpr */
48 #define PPC_FEATURE_ARCH_2_06           0x00000100 /* ISA 2.06 */
49 #define PPC_FEATURE_HAS_VSX             0x00000080 /* P7 Vector Extension.  */
50 #define PPC_FEATURE_970 (PPC_FEATURE_POWER4 + PPC_FEATURE_HAS_ALTIVEC)
51
52 #ifdef __ASSEMBLER__
53
54 /* Symbolic names for the registers.  The only portable way to write asm
55    code is to use number but this produces really unreadable code.
56    Therefore these symbolic names.  */
57
58 /* Integer registers.  */
59 #define r0      0
60 #define r1      1
61 #define r2      2
62 #define r3      3
63 #define r4      4
64 #define r5      5
65 #define r6      6
66 #define r7      7
67 #define r8      8
68 #define r9      9
69 #define r10     10
70 #define r11     11
71 #define r12     12
72 #define r13     13
73 #define r14     14
74 #define r15     15
75 #define r16     16
76 #define r17     17
77 #define r18     18
78 #define r19     19
79 #define r20     20
80 #define r21     21
81 #define r22     22
82 #define r23     23
83 #define r24     24
84 #define r25     25
85 #define r26     26
86 #define r27     27
87 #define r28     28
88 #define r29     29
89 #define r30     30
90 #define r31     31
91
92 /* Floating-point registers.  */
93 #define fp0     0
94 #define fp1     1
95 #define fp2     2
96 #define fp3     3
97 #define fp4     4
98 #define fp5     5
99 #define fp6     6
100 #define fp7     7
101 #define fp8     8
102 #define fp9     9
103 #define fp10    10
104 #define fp11    11
105 #define fp12    12
106 #define fp13    13
107 #define fp14    14
108 #define fp15    15
109 #define fp16    16
110 #define fp17    17
111 #define fp18    18
112 #define fp19    19
113 #define fp20    20
114 #define fp21    21
115 #define fp22    22
116 #define fp23    23
117 #define fp24    24
118 #define fp25    25
119 #define fp26    26
120 #define fp27    27
121 #define fp28    28
122 #define fp29    29
123 #define fp30    30
124 #define fp31    31
125
126 /* Condition code registers.  */
127 #define cr0     0
128 #define cr1     1
129 #define cr2     2
130 #define cr3     3
131 #define cr4     4
132 #define cr5     5
133 #define cr6     6
134 #define cr7     7
135
136 /* Vector registers. */
137 #define v0      0
138 #define v1      1
139 #define v2      2
140 #define v3      3
141 #define v4      4
142 #define v5      5
143 #define v6      6
144 #define v7      7
145 #define v8      8
146 #define v9      9
147 #define v10     10
148 #define v11     11
149 #define v12     12
150 #define v13     13
151 #define v14     14
152 #define v15     15
153 #define v16     16
154 #define v17     17
155 #define v18     18
156 #define v19     19
157 #define v20     20
158 #define v21     21
159 #define v22     22
160 #define v23     23
161 #define v24     24
162 #define v25     25
163 #define v26     26
164 #define v27     27
165 #define v28     28
166 #define v29     29
167 #define v30     30
168 #define v31     31
169
170 #define VRSAVE  256
171
172
173 #ifdef __ELF__
174
175 /* This seems to always be the case on PPC.  */
176 #define ALIGNARG(log2) log2
177 /* For ELF we need the `.type' directive to make shared libs work right.  */
178 #define ASM_TYPE_DIRECTIVE(name,typearg) .type name,typearg;
179 #define ASM_SIZE_DIRECTIVE(name) .size name,.-name
180
181 /* In ELF C symbols are asm symbols.  */
182 #undef  NO_UNDERSCORES
183 #define NO_UNDERSCORES
184
185 #endif /* __ELF__ */
186
187 # include <sys/syscall.h>
188 # if defined(__powerpc64__)
189 #  include "powerpc64/sysdep.h"
190 # else
191 #  include "powerpc32/sysdep.h"
192 # endif
193
194 #endif  /* __ASSEMBLER__ */
195