1 /* Copyright (C) 1999-2017 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>
27 #define PPC_FEATURE_970 (PPC_FEATURE_POWER4 + PPC_FEATURE_HAS_ALTIVEC)
31 /* Symbolic names for the registers. The only portable way to write asm
32 code is to use number but this produces really unreadable code.
33 Therefore these symbolic names. */
35 /* Integer registers. */
69 /* Floating-point registers. */
103 /* Condition code registers. */
113 /* Vector registers. */
149 /* The 32-bit words of a 64-bit dword are at these offsets in memory. */
150 #if defined __LITTLE_ENDIAN__ || defined _LITTLE_ENDIAN
158 /* The high 16-bit word of a 64-bit dword is at this offset in memory. */
159 #if defined __LITTLE_ENDIAN__ || defined _LITTLE_ENDIAN
165 /* This seems to always be the case on PPC. */
166 #define ALIGNARG(log2) log2
167 #define ASM_SIZE_DIRECTIVE(name) .size name,.-name
171 /* Linux kernel powerpc documentation [1] states issuing a syscall inside a
172 transaction is not recommended and may lead to undefined behavior. It
173 also states syscalls do not abort transactions. To avoid such traps,
174 we abort transaction just before syscalls.
176 [1] Documentation/powerpc/transactional_memory.txt [Syscalls] */
178 # define ABORT_TRANSACTION \
180 if (THREAD_GET_TM_CAPABLE ()) \
181 __libc_tabort (_ABORT_SYSCALL); \
184 # define ABORT_TRANSACTION
187 #endif /* __ASSEMBLER__ */