Blame sysdeps/powerpc/sysdep.h

Packit 6c4009
/* Copyright (C) 1999-2018 Free Software Foundation, Inc.
Packit 6c4009
   This file is part of the GNU C Library.
Packit 6c4009
Packit 6c4009
   The GNU C Library is free software; you can redistribute it and/or
Packit 6c4009
   modify it under the terms of the GNU Lesser General Public
Packit 6c4009
   License as published by the Free Software Foundation; either
Packit 6c4009
   version 2.1 of the License, or (at your option) any later version.
Packit 6c4009
Packit 6c4009
   The GNU C Library is distributed in the hope that it will be useful,
Packit 6c4009
   but WITHOUT ANY WARRANTY; without even the implied warranty of
Packit 6c4009
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
Packit 6c4009
   Lesser General Public License for more details.
Packit 6c4009
Packit 6c4009
   You should have received a copy of the GNU Lesser General Public
Packit 6c4009
   License along with the GNU C Library; if not, see
Packit 6c4009
   <http://www.gnu.org/licenses/>.  */
Packit 6c4009
Packit 6c4009
/*
Packit 6c4009
 * Powerpc Feature masks for the Aux Vector Hardware Capabilities (AT_HWCAP).
Packit 6c4009
 * This entry is copied to _dl_hwcap or rtld_global._dl_hwcap during startup.
Packit 6c4009
 */
Packit 6c4009
#define _SYSDEPS_SYSDEP_H 1
Packit 6c4009
#include <bits/hwcap.h>
Packit 6c4009
Packit 6c4009
#define PPC_FEATURE_970 (PPC_FEATURE_POWER4 + PPC_FEATURE_HAS_ALTIVEC)
Packit 6c4009
Packit 6c4009
#ifdef __ASSEMBLER__
Packit 6c4009
Packit 6c4009
/* Symbolic names for the registers.  The only portable way to write asm
Packit 6c4009
   code is to use number but this produces really unreadable code.
Packit 6c4009
   Therefore these symbolic names.  */
Packit 6c4009
Packit 6c4009
/* Integer registers.  */
Packit 6c4009
#define r0	0
Packit 6c4009
#define r1	1
Packit 6c4009
#define r2	2
Packit 6c4009
#define r3	3
Packit 6c4009
#define r4	4
Packit 6c4009
#define r5	5
Packit 6c4009
#define r6	6
Packit 6c4009
#define r7	7
Packit 6c4009
#define r8	8
Packit 6c4009
#define r9	9
Packit 6c4009
#define r10	10
Packit 6c4009
#define r11	11
Packit 6c4009
#define r12	12
Packit 6c4009
#define r13	13
Packit 6c4009
#define r14	14
Packit 6c4009
#define r15	15
Packit 6c4009
#define r16	16
Packit 6c4009
#define r17	17
Packit 6c4009
#define r18	18
Packit 6c4009
#define r19	19
Packit 6c4009
#define r20	20
Packit 6c4009
#define r21	21
Packit 6c4009
#define r22	22
Packit 6c4009
#define r23	23
Packit 6c4009
#define r24	24
Packit 6c4009
#define r25	25
Packit 6c4009
#define r26	26
Packit 6c4009
#define r27	27
Packit 6c4009
#define r28	28
Packit 6c4009
#define r29	29
Packit 6c4009
#define r30	30
Packit 6c4009
#define r31	31
Packit 6c4009
Packit 6c4009
/* Floating-point registers.  */
Packit 6c4009
#define fp0	0
Packit 6c4009
#define fp1	1
Packit 6c4009
#define fp2	2
Packit 6c4009
#define fp3	3
Packit 6c4009
#define fp4	4
Packit 6c4009
#define fp5	5
Packit 6c4009
#define fp6	6
Packit 6c4009
#define fp7	7
Packit 6c4009
#define fp8	8
Packit 6c4009
#define fp9	9
Packit 6c4009
#define fp10	10
Packit 6c4009
#define fp11	11
Packit 6c4009
#define fp12	12
Packit 6c4009
#define fp13	13
Packit 6c4009
#define fp14	14
Packit 6c4009
#define fp15	15
Packit 6c4009
#define fp16	16
Packit 6c4009
#define fp17	17
Packit 6c4009
#define fp18	18
Packit 6c4009
#define fp19	19
Packit 6c4009
#define fp20	20
Packit 6c4009
#define fp21	21
Packit 6c4009
#define fp22	22
Packit 6c4009
#define fp23	23
Packit 6c4009
#define fp24	24
Packit 6c4009
#define fp25	25
Packit 6c4009
#define fp26	26
Packit 6c4009
#define fp27	27
Packit 6c4009
#define fp28	28
Packit 6c4009
#define fp29	29
Packit 6c4009
#define fp30	30
Packit 6c4009
#define fp31	31
Packit 6c4009
Packit 6c4009
/* Condition code registers.  */
Packit 6c4009
#define cr0	0
Packit 6c4009
#define cr1	1
Packit 6c4009
#define cr2	2
Packit 6c4009
#define cr3	3
Packit 6c4009
#define cr4	4
Packit 6c4009
#define cr5	5
Packit 6c4009
#define cr6	6
Packit 6c4009
#define cr7	7
Packit 6c4009
Packit 6c4009
/* Vector registers. */
Packit 6c4009
#define v0	0
Packit 6c4009
#define v1	1
Packit 6c4009
#define v2	2
Packit 6c4009
#define v3	3
Packit 6c4009
#define v4	4
Packit 6c4009
#define v5	5
Packit 6c4009
#define v6	6
Packit 6c4009
#define v7	7
Packit 6c4009
#define v8	8
Packit 6c4009
#define v9	9
Packit 6c4009
#define v10	10
Packit 6c4009
#define v11	11
Packit 6c4009
#define v12	12
Packit 6c4009
#define v13	13
Packit 6c4009
#define v14	14
Packit 6c4009
#define v15	15
Packit 6c4009
#define v16	16
Packit 6c4009
#define v17	17
Packit 6c4009
#define v18	18
Packit 6c4009
#define v19	19
Packit 6c4009
#define v20	20
Packit 6c4009
#define v21	21
Packit 6c4009
#define v22	22
Packit 6c4009
#define v23	23
Packit 6c4009
#define v24	24
Packit 6c4009
#define v25	25
Packit 6c4009
#define v26	26
Packit 6c4009
#define v27	27
Packit 6c4009
#define v28	28
Packit 6c4009
#define v29	29
Packit 6c4009
#define v30	30
Packit 6c4009
#define v31	31
Packit 6c4009
Packit 6c4009
#define VRSAVE	256
Packit 6c4009
Packit 6c4009
/* The 32-bit words of a 64-bit dword are at these offsets in memory.  */
Packit 6c4009
#if defined __LITTLE_ENDIAN__ || defined _LITTLE_ENDIAN
Packit 6c4009
# define LOWORD 0
Packit 6c4009
# define HIWORD 4
Packit 6c4009
#else
Packit 6c4009
# define LOWORD 4
Packit 6c4009
# define HIWORD 0
Packit 6c4009
#endif
Packit 6c4009
Packit 6c4009
/* The high 16-bit word of a 64-bit dword is at this offset in memory.  */
Packit 6c4009
#if defined __LITTLE_ENDIAN__ || defined _LITTLE_ENDIAN
Packit 6c4009
# define HISHORT 6
Packit 6c4009
#else
Packit 6c4009
# define HISHORT 0
Packit 6c4009
#endif
Packit 6c4009
Packit 6c4009
/* This seems to always be the case on PPC.  */
Packit 6c4009
#define ALIGNARG(log2) log2
Packit 6c4009
#define ASM_SIZE_DIRECTIVE(name) .size name,.-name
Packit 6c4009
Packit 6c4009
#endif	/* __ASSEMBLER__ */