1 /* Copyright (C) 1999-2015 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.
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.
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.
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/>. */
19 * Powerpc Feature masks for the Aux Vector Hardware Capabilities (AT_HWCAP).
20 * This entry is copied to _dl_hwcap or rtld_global._dl_hwcap during startup.
22 #define _SYSDEPS_SYSDEP_H 1
23 #include <bits/hwcap.h>
24 #ifdef ENABLE_LOCK_ELISION
29 #define PPC_FEATURE_970 (PPC_FEATURE_POWER4 + PPC_FEATURE_HAS_ALTIVEC)
33 /* Symbolic names for the registers. The only portable way to write asm
34 code is to use number but this produces really unreadable code.
35 Therefore these symbolic names. */
37 /* Integer registers. */
71 /* Floating-point registers. */
105 /* Condition code registers. */
115 /* Vector registers. */
151 /* The 32-bit words of a 64-bit dword are at these offsets in memory. */
152 #if defined __LITTLE_ENDIAN__ || defined _LITTLE_ENDIAN
160 /* The high 16-bit word of a 64-bit dword is at this offset in memory. */
161 #if defined __LITTLE_ENDIAN__ || defined _LITTLE_ENDIAN
167 /* This seems to always be the case on PPC. */
168 #define ALIGNARG(log2) log2
169 #define ASM_SIZE_DIRECTIVE(name) .size name,.-name
173 /* Linux kernel powerpc documentation [1] states issuing a syscall inside a
174 transaction is not recommended and may lead to undefined behavior. It
175 also states syscalls do not abort transactions. To avoid such traps,
176 we abort transaction just before syscalls.
178 [1] Documentation/powerpc/transactional_memory.txt [Syscalls] */
179 #if !IS_IN(rtld) && defined (ENABLE_LOCK_ELISION)
180 # define ABORT_TRANSACTION \
182 if (THREAD_GET_TM_CAPABLE ()) \
183 __builtin_tabort (_ABORT_SYSCALL); \
186 # define ABORT_TRANSACTION
189 #endif /* __ASSEMBLER__ */