Commit | Line | Data |
---|---|---|
ae91f625 MK |
1 | /* Low level support for x86 (i386 and x86-64), shared between gdbserver |
2 | and IPA. | |
3 | ||
61baf725 | 4 | Copyright (C) 2016-2017 Free Software Foundation, Inc. |
ae91f625 MK |
5 | |
6 | This file is part of GDB. | |
7 | ||
8 | This program is free software; you can redistribute it and/or modify | |
9 | it under the terms of the GNU General Public License as published by | |
10 | the Free Software Foundation; either version 3 of the License, or | |
11 | (at your option) any later version. | |
12 | ||
13 | This program is distributed in the hope that it will be useful, | |
14 | but WITHOUT ANY WARRANTY; without even the implied warranty of | |
15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
16 | GNU General Public License for more details. | |
17 | ||
18 | You should have received a copy of the GNU General Public License | |
19 | along with this program. If not, see <http://www.gnu.org/licenses/>. */ | |
20 | ||
21 | /* Note: since IPA obviously knows what ABI it's running on (i386 vs x86_64 | |
22 | vs x32), it's sufficient to pass only the register set here. This, | |
23 | together with the ABI known at IPA compile time, maps to a tdesc. */ | |
24 | ||
25 | enum x86_linux_tdesc { | |
26 | X86_TDESC_MMX = 0, | |
27 | X86_TDESC_SSE = 1, | |
28 | X86_TDESC_AVX = 2, | |
29 | X86_TDESC_MPX = 3, | |
2b863f51 | 30 | X86_TDESC_AVX_MPX = 4, |
a1fa17ee | 31 | X86_TDESC_AVX_AVX512 = 5, |
51547df6 | 32 | X86_TDESC_AVX_MPX_AVX512_PKU = 6, |
f49ff000 | 33 | X86_TDESC_LAST = 7, |
ae91f625 MK |
34 | }; |
35 | ||
36 | #ifdef __x86_64__ | |
37 | ||
38 | #if defined __LP64__ || !defined IN_PROCESS_AGENT | |
39 | /* Defined in auto-generated file amd64-linux.c. */ | |
40 | void init_registers_amd64_linux (void); | |
41 | extern const struct target_desc *tdesc_amd64_linux; | |
42 | ||
43 | /* Defined in auto-generated file amd64-avx-linux.c. */ | |
44 | void init_registers_amd64_avx_linux (void); | |
45 | extern const struct target_desc *tdesc_amd64_avx_linux; | |
46 | ||
a1fa17ee MS |
47 | /* Defined in auto-generated file amd64-avx-avx512-linux.c. */ |
48 | void init_registers_amd64_avx_avx512_linux (void); | |
49 | extern const struct target_desc *tdesc_amd64_avx_avx512_linux; | |
50 | ||
51547df6 MS |
51 | /* Defined in auto-generated file amd64-avx-mpx-avx512-pku-linux.c. */ |
52 | void init_registers_amd64_avx_mpx_avx512_pku_linux (void); | |
53 | extern const struct target_desc *tdesc_amd64_avx_mpx_avx512_pku_linux; | |
ae91f625 | 54 | |
2b863f51 WT |
55 | /* Defined in auto-generated file amd64-avx-mpx-linux.c. */ |
56 | void init_registers_amd64_avx_mpx_linux (void); | |
57 | extern const struct target_desc *tdesc_amd64_avx_mpx_linux; | |
58 | ||
ae91f625 MK |
59 | /* Defined in auto-generated file amd64-mpx-linux.c. */ |
60 | void init_registers_amd64_mpx_linux (void); | |
61 | extern const struct target_desc *tdesc_amd64_mpx_linux; | |
62 | #endif | |
63 | ||
64 | #if defined __ILP32__ || !defined IN_PROCESS_AGENT | |
65 | /* Defined in auto-generated file x32-linux.c. */ | |
66 | void init_registers_x32_linux (void); | |
67 | extern const struct target_desc *tdesc_x32_linux; | |
68 | ||
69 | /* Defined in auto-generated file x32-avx-linux.c. */ | |
70 | void init_registers_x32_avx_linux (void); | |
71 | extern const struct target_desc *tdesc_x32_avx_linux; | |
72 | ||
a1fa17ee MS |
73 | /* Defined in auto-generated file x32-avx-avx512-linux.c. */ |
74 | void init_registers_x32_avx_avx512_linux (void); | |
75 | extern const struct target_desc *tdesc_x32_avx_avx512_linux; | |
ae91f625 MK |
76 | #endif |
77 | ||
78 | #endif | |
79 | ||
80 | #if defined __i386__ || !defined IN_PROCESS_AGENT | |
f49ff000 YQ |
81 | int i386_get_ipa_tdesc_idx (const struct target_desc *tdesc); |
82 | #endif | |
a1fa17ee | 83 | |
f49ff000 | 84 | const struct target_desc *i386_linux_read_description (uint64_t xcr0); |
ae91f625 | 85 | |
f49ff000 | 86 | void initialize_low_tdesc (); |