GDBserver

linux-x86-tdesc.h
Go to the documentation of this file.
1 /* Low level support for x86 (i386 and x86-64), shared between gdbserver
2 and IPA.
3
4 Copyright (C) 2016-2018 Free Software Foundation, Inc.
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,
30 X86_TDESC_AVX_MPX = 4,
31 X86_TDESC_AVX_AVX512 = 5,
32 X86_TDESC_AVX_MPX_AVX512_PKU = 6,
33 X86_TDESC_LAST = 7,
34 };
35
36 #if defined __i386__ || !defined IN_PROCESS_AGENT
37 int i386_get_ipa_tdesc_idx (const struct target_desc *tdesc);
38 #endif
39
40 #if defined __x86_64__ && !defined IN_PROCESS_AGENT
41 int amd64_get_ipa_tdesc_idx (const struct target_desc *tdesc);
42 #endif
43
44 const struct target_desc *i386_get_ipa_tdesc (int idx);
45
46 #ifdef __x86_64__
47 const struct target_desc *amd64_linux_read_description (uint64_t xcr0,
48 bool is_x32);
49 #endif
50
51 const struct target_desc *i386_linux_read_description (uint64_t xcr0);
52
53 void initialize_low_tdesc ();
X86_TDESC_AVX
Definition: linux-x86-tdesc.h:28
i386_linux_read_description
const struct target_desc * i386_linux_read_description(uint64_t xcr0)
Definition: linux-x86-tdesc.c:78
X86_TDESC_MMX
Definition: linux-x86-tdesc.h:26
i386_get_ipa_tdesc
const struct target_desc * i386_get_ipa_tdesc(int idx)
i386_get_ipa_tdesc_idx
int i386_get_ipa_tdesc_idx(const struct target_desc *tdesc)
Definition: linux-x86-tdesc.c:142
X86_TDESC_AVX_MPX_AVX512_PKU
Definition: linux-x86-tdesc.h:32
X86_TDESC_AVX_MPX
Definition: linux-x86-tdesc.h:30
X86_TDESC_MPX
Definition: linux-x86-tdesc.h:29
initialize_low_tdesc
void initialize_low_tdesc()
Definition: linux-aarch64-tdesc-selftest.c:39
X86_TDESC_LAST
Definition: linux-x86-tdesc.h:33
X86_TDESC_SSE
Definition: linux-x86-tdesc.h:27
target_desc
Definition: tdesc.h:33
x86_linux_tdesc
x86_linux_tdesc
Definition: linux-x86-tdesc.h:25
X86_TDESC_AVX_AVX512
Definition: linux-x86-tdesc.h:31