18dffb485Schristos /* Low level support for x86 (i386 and x86-64), shared between gdbserver 28dffb485Schristos and IPA. 38dffb485Schristos 4*64f917f5Schristos Copyright (C) 2016-2024 Free Software Foundation, Inc. 58dffb485Schristos 68dffb485Schristos This file is part of GDB. 78dffb485Schristos 88dffb485Schristos This program is free software; you can redistribute it and/or modify 98dffb485Schristos it under the terms of the GNU General Public License as published by 108dffb485Schristos the Free Software Foundation; either version 3 of the License, or 118dffb485Schristos (at your option) any later version. 128dffb485Schristos 138dffb485Schristos This program is distributed in the hope that it will be useful, 148dffb485Schristos but WITHOUT ANY WARRANTY; without even the implied warranty of 158dffb485Schristos MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 168dffb485Schristos GNU General Public License for more details. 178dffb485Schristos 188dffb485Schristos You should have received a copy of the GNU General Public License 198dffb485Schristos along with this program. If not, see <http://www.gnu.org/licenses/>. */ 208dffb485Schristos 218dffb485Schristos #ifndef GDBSERVER_LINUX_X86_TDESC_H 228dffb485Schristos #define GDBSERVER_LINUX_X86_TDESC_H 238dffb485Schristos 248dffb485Schristos /* Note: since IPA obviously knows what ABI it's running on (i386 vs x86_64 258dffb485Schristos vs x32), it's sufficient to pass only the register set here. This, 268dffb485Schristos together with the ABI known at IPA compile time, maps to a tdesc. */ 278dffb485Schristos 288dffb485Schristos enum x86_linux_tdesc { 298dffb485Schristos X86_TDESC_MMX = 0, 308dffb485Schristos X86_TDESC_SSE = 1, 318dffb485Schristos X86_TDESC_AVX = 2, 328dffb485Schristos X86_TDESC_MPX = 3, 338dffb485Schristos X86_TDESC_AVX_MPX = 4, 348dffb485Schristos X86_TDESC_AVX_AVX512 = 5, 358dffb485Schristos X86_TDESC_AVX_MPX_AVX512_PKU = 6, 368dffb485Schristos X86_TDESC_LAST = 7, 378dffb485Schristos }; 388dffb485Schristos 398dffb485Schristos #if defined __i386__ || !defined IN_PROCESS_AGENT 408dffb485Schristos int i386_get_ipa_tdesc_idx (const struct target_desc *tdesc); 418dffb485Schristos #endif 428dffb485Schristos 438dffb485Schristos #if defined __x86_64__ && !defined IN_PROCESS_AGENT 448dffb485Schristos int amd64_get_ipa_tdesc_idx (const struct target_desc *tdesc); 458dffb485Schristos #endif 468dffb485Schristos 478dffb485Schristos const struct target_desc *i386_get_ipa_tdesc (int idx); 488dffb485Schristos 498dffb485Schristos #ifdef __x86_64__ 508dffb485Schristos const struct target_desc *amd64_linux_read_description (uint64_t xcr0, 518dffb485Schristos bool is_x32); 528dffb485Schristos #endif 538dffb485Schristos 548dffb485Schristos const struct target_desc *i386_linux_read_description (uint64_t xcr0); 558dffb485Schristos 568dffb485Schristos #endif /* GDBSERVER_LINUX_X86_TDESC_H */ 57