]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/arch/ppc-linux-common.h
Update copyright year range in header of all files managed by GDB
[thirdparty/binutils-gdb.git] / gdb / arch / ppc-linux-common.h
CommitLineData
bd64614e
PFC
1/* Common target dependent code for GNU/Linux on PPC systems.
2
1d506c26 3 Copyright (C) 2018-2024 Free Software Foundation, Inc.
bd64614e
PFC
4
5 This file is part of GDB.
6
7 This program is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 3 of the License, or
10 (at your option) any later version.
11
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
16
17 You should have received a copy of the GNU General Public License
18 along with this program. If not, see <http://www.gnu.org/licenses/>. */
19
20#ifndef ARCH_PPC_LINUX_COMMON_H
21#define ARCH_PPC_LINUX_COMMON_H
22
23struct target_desc;
24
d078308a
PFC
25/* The core file VMX regset has 34 16-byte fields (32 16-byte vector
26 registers, plus two fields containing 4-byte registers, VSCR and
27 VRSAVE), while the ptrace calls return or read 33 16-byte fields
28 plus a 4-byte field for VRSAVE. For simplicity we use the longer
29 length for both cases. */
30#define PPC_LINUX_SIZEOF_VRREGSET 544
31
32#define PPC_LINUX_SIZEOF_VSXREGSET 256
7ca18ed6
EBM
33#define PPC_LINUX_SIZEOF_PPRREGSET 8
34#define PPC_LINUX_SIZEOF_DSCRREGSET 8
f2cf6173 35#define PPC_LINUX_SIZEOF_TARREGSET 8
232bfb86
EBM
36#define PPC_LINUX_SIZEOF_EBBREGSET (3*8)
37#define PPC_LINUX_SIZEOF_PMUREGSET (5*8)
8d619c01
EBM
38#define PPC_LINUX_SIZEOF_TM_SPRREGSET (3*8)
39#define PPC32_LINUX_SIZEOF_CGPRREGSET (48*4)
40#define PPC64_LINUX_SIZEOF_CGPRREGSET (48*8)
41#define PPC_LINUX_SIZEOF_CFPRREGSET (32*8+8)
42#define PPC_LINUX_SIZEOF_CVMXREGSET (34*16)
43#define PPC_LINUX_SIZEOF_CVSXREGSET (32*8)
44#define PPC_LINUX_SIZEOF_CPPRREGSET 8
45#define PPC_LINUX_SIZEOF_CDSCRREGSET 8
46#define PPC_LINUX_SIZEOF_CTARREGSET 8
d078308a 47
bd64614e 48/* Check if the hwcap auxv entry indicates that isa205 is supported. */
0ec848ad 49bool ppc_linux_has_isa205 (CORE_ADDR hwcap);
bd64614e
PFC
50
51/* Features used to determine the target description. */
52struct ppc_linux_features
53{
54 unsigned int wordsize;
55 bool altivec;
56 bool vsx;
57 bool isa205;
7ca18ed6 58 bool ppr_dscr;
f2cf6173 59 bool isa207;
8d619c01 60 bool htm;
bd64614e
PFC
61};
62
63/* Base value for ppc_linux_features variables. */
64const struct ppc_linux_features ppc_linux_no_features = {
65 0,
66 false,
67 false,
68 false,
69 false,
7ca18ed6 70 false,
f2cf6173 71 false,
bd64614e
PFC
72};
73
74/* Return a target description that matches FEATURES. */
75const struct target_desc * ppc_linux_match_description
76(struct ppc_linux_features features);
77
78#endif /* ARCH_PPC_LINUX_COMMON_H */