Commit | Line | Data |
---|---|---|
ae91f625 MK |
1 | /* Low level support for x86 (i386 and x86-64), shared between gdbserver |
2 | and IPA. | |
3 | ||
b811d2c2 | 4 | Copyright (C) 2016-2020 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 | ||
1a5c2598 TT |
21 | #ifndef GDBSERVER_LINUX_X86_TDESC_H |
22 | #define GDBSERVER_LINUX_X86_TDESC_H | |
23 | ||
ae91f625 MK |
24 | /* Note: since IPA obviously knows what ABI it's running on (i386 vs x86_64 |
25 | vs x32), it's sufficient to pass only the register set here. This, | |
26 | together with the ABI known at IPA compile time, maps to a tdesc. */ | |
27 | ||
28 | enum x86_linux_tdesc { | |
29 | X86_TDESC_MMX = 0, | |
30 | X86_TDESC_SSE = 1, | |
31 | X86_TDESC_AVX = 2, | |
32 | X86_TDESC_MPX = 3, | |
2b863f51 | 33 | X86_TDESC_AVX_MPX = 4, |
a1fa17ee | 34 | X86_TDESC_AVX_AVX512 = 5, |
51547df6 | 35 | X86_TDESC_AVX_MPX_AVX512_PKU = 6, |
f49ff000 | 36 | X86_TDESC_LAST = 7, |
ae91f625 MK |
37 | }; |
38 | ||
b4570e4b YQ |
39 | #if defined __i386__ || !defined IN_PROCESS_AGENT |
40 | int i386_get_ipa_tdesc_idx (const struct target_desc *tdesc); | |
ae91f625 MK |
41 | #endif |
42 | ||
b4570e4b YQ |
43 | #if defined __x86_64__ && !defined IN_PROCESS_AGENT |
44 | int amd64_get_ipa_tdesc_idx (const struct target_desc *tdesc); | |
ae91f625 MK |
45 | #endif |
46 | ||
b4570e4b | 47 | const struct target_desc *i386_get_ipa_tdesc (int idx); |
ae91f625 | 48 | |
b4570e4b YQ |
49 | #ifdef __x86_64__ |
50 | const struct target_desc *amd64_linux_read_description (uint64_t xcr0, | |
51 | bool is_x32); | |
f49ff000 | 52 | #endif |
a1fa17ee | 53 | |
f49ff000 | 54 | const struct target_desc *i386_linux_read_description (uint64_t xcr0); |
ae91f625 | 55 | |
1a5c2598 | 56 | #endif /* GDBSERVER_LINUX_X86_TDESC_H */ |