]>
Commit | Line | Data |
---|---|---|
1d506c26 | 1 | /* Copyright (C) 2022-2024 Free Software Foundation, Inc. |
ba60b963 LM |
2 | |
3 | This file is part of GDB. | |
4 | ||
5 | This program is free software; you can redistribute it and/or modify | |
6 | it under the terms of the GNU General Public License as published by | |
7 | the Free Software Foundation; either version 3 of the License, or | |
8 | (at your option) any later version. | |
9 | ||
10 | This program is distributed in the hope that it will be useful, | |
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of | |
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
13 | GNU General Public License for more details. | |
14 | ||
15 | You should have received a copy of the GNU General Public License | |
16 | along with this program. If not, see <http://www.gnu.org/licenses/>. */ | |
414d5848 JB |
17 | |
18 | #include "gdbsupport/tdesc.h" | |
19 | ||
ba60b963 LM |
20 | /* This function is NOT auto generated from xml. |
21 | ||
22 | Create the aarch64 description containing the TLS registers. TPIDR is | |
23 | always available, but TPIDR2 is only available on some systems. | |
24 | ||
25 | COUNT is the number of registers in this set. The minimum is 1. */ | |
26 | ||
414d5848 | 27 | static int |
ba60b963 | 28 | create_feature_aarch64_tls (struct target_desc *result, long regnum, int count) |
414d5848 | 29 | { |
ba60b963 LM |
30 | /* TPIDR is always present. */ |
31 | gdb_assert (count >= 1); | |
32 | ||
414d5848 JB |
33 | struct tdesc_feature *feature; |
34 | ||
35 | feature = tdesc_create_feature (result, "org.gnu.gdb.aarch64.tls"); | |
36 | tdesc_create_reg (feature, "tpidr", regnum++, 1, NULL, 64, "data_ptr"); | |
ba60b963 LM |
37 | |
38 | /* Add TPIDR2. */ | |
39 | if (count > 1) | |
40 | tdesc_create_reg (feature, "tpidr2", regnum++, 1, NULL, 64, "data_ptr"); | |
41 | ||
414d5848 JB |
42 | return regnum; |
43 | } |