binutils-gdb/gdb/gdbserver/linux-ppc-tdesc.h

102 lines
3.7 KiB
C
Raw Normal View History

gdbserver: Add powerpc fast tracepoint support. gdb/gdbserver/ChangeLog: 2016-03-31 Wei-cheng Wang <cole945@gmail.com> Marcin Kościelnicki <koriakin@0x04.net> PR/17221 * Makefile.in: Add powerpc-*-ipa.o * configure.srv: Add ipa_obj for powerpc*-linux. * linux-ppc-ipa.c: New file. * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h includes. (PPC_FIELD): New macro. (PPC_SEXT): New macro. (PPC_OP6): New macro. (PPC_BO): New macro. (PPC_LI): New macro. (PPC_BD): New macro. (init_registers_*): Move prototype to linux-ppc-tdesc.h. (tdesc_*): Move declaration to linux-ppc-tdesc.h. (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter. (ppc_get_thread_area): New function. (is_elfv2_inferior): New function. (gen_ds_form): New function. (GEN_STD): New macro. (GEN_STDU): New macro. (GEN_LD): New macro. (GEN_LDU): New macro. (gen_d_form): New function. (GEN_ADDI): New macro. (GEN_ADDIS): New macro. (GEN_LI): New macro. (GEN_LIS): New macro. (GEN_ORI): New macro. (GEN_ORIS): New macro. (GEN_LWZ): New macro. (GEN_STW): New macro. (GEN_STWU): New macro. (gen_xfx_form): New function. (GEN_MFSPR): New macro. (GEN_MTSPR): New macro. (GEN_MFCR): New macro. (GEN_MTCR): New macro. (GEN_SYNC): New macro. (GEN_LWSYNC): New macro. (gen_x_form): New function. (GEN_OR): New macro. (GEN_MR): New macro. (GEN_LWARX): New macro. (GEN_STWCX): New macro. (GEN_CMPW): New macro. (gen_md_form): New function. (GEN_RLDICL): New macro. (GEN_RLDICR): New macro. (gen_i_form): New function. (GEN_B): New macro. (GEN_BL): New macro. (gen_b_form): New function. (GEN_BNE): New macro. (GEN_LOAD): New macro. (GEN_STORE): New macro. (gen_limm): New function. (gen_atomic_xchg): New function. (gen_call): New function. (ppc_relocate_instruction): New function. (ppc_install_fast_tracepoint_jump_pad): New function. (ppc_get_min_fast_tracepoint_insn_len): New function. (ppc_get_ipa_tdesc_idx): New function. (the_low_target): Wire in the new functions. (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit tdescs. * linux-ppc-tdesc.h: New file.
2016-03-10 01:38:18 +01:00
/* Low level support for ppc, shared between gdbserver and IPA.
Copyright (C) 2016-2018 Free Software Foundation, Inc.
gdbserver: Add powerpc fast tracepoint support. gdb/gdbserver/ChangeLog: 2016-03-31 Wei-cheng Wang <cole945@gmail.com> Marcin Kościelnicki <koriakin@0x04.net> PR/17221 * Makefile.in: Add powerpc-*-ipa.o * configure.srv: Add ipa_obj for powerpc*-linux. * linux-ppc-ipa.c: New file. * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h includes. (PPC_FIELD): New macro. (PPC_SEXT): New macro. (PPC_OP6): New macro. (PPC_BO): New macro. (PPC_LI): New macro. (PPC_BD): New macro. (init_registers_*): Move prototype to linux-ppc-tdesc.h. (tdesc_*): Move declaration to linux-ppc-tdesc.h. (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter. (ppc_get_thread_area): New function. (is_elfv2_inferior): New function. (gen_ds_form): New function. (GEN_STD): New macro. (GEN_STDU): New macro. (GEN_LD): New macro. (GEN_LDU): New macro. (gen_d_form): New function. (GEN_ADDI): New macro. (GEN_ADDIS): New macro. (GEN_LI): New macro. (GEN_LIS): New macro. (GEN_ORI): New macro. (GEN_ORIS): New macro. (GEN_LWZ): New macro. (GEN_STW): New macro. (GEN_STWU): New macro. (gen_xfx_form): New function. (GEN_MFSPR): New macro. (GEN_MTSPR): New macro. (GEN_MFCR): New macro. (GEN_MTCR): New macro. (GEN_SYNC): New macro. (GEN_LWSYNC): New macro. (gen_x_form): New function. (GEN_OR): New macro. (GEN_MR): New macro. (GEN_LWARX): New macro. (GEN_STWCX): New macro. (GEN_CMPW): New macro. (gen_md_form): New function. (GEN_RLDICL): New macro. (GEN_RLDICR): New macro. (gen_i_form): New function. (GEN_B): New macro. (GEN_BL): New macro. (gen_b_form): New function. (GEN_BNE): New macro. (GEN_LOAD): New macro. (GEN_STORE): New macro. (gen_limm): New function. (gen_atomic_xchg): New function. (gen_call): New function. (ppc_relocate_instruction): New function. (ppc_install_fast_tracepoint_jump_pad): New function. (ppc_get_min_fast_tracepoint_insn_len): New function. (ppc_get_ipa_tdesc_idx): New function. (the_low_target): Wire in the new functions. (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit tdescs. * linux-ppc-tdesc.h: New file.
2016-03-10 01:38:18 +01:00
This file is part of GDB.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
/* Note: since IPA obviously knows what ABI it's running on (32 vs 64),
it's sufficient to pass only the register set here. This, together with
the ABI known at IPA compile time, maps to a tdesc. */
enum ppc_linux_tdesc {
PPC_TDESC_BASE,
PPC_TDESC_ALTIVEC,
PPC_TDESC_CELL,
PPC_TDESC_VSX,
PPC_TDESC_ISA205,
PPC_TDESC_ISA205_ALTIVEC,
PPC_TDESC_ISA205_VSX,
PPC_TDESC_E500,
};
#if !defined __powerpc64__ || !defined IN_PROCESS_AGENT
/* Defined in auto-generated file powerpc-32l.c. */
void init_registers_powerpc_32l (void);
extern const struct target_desc *tdesc_powerpc_32l;
/* Defined in auto-generated file powerpc-altivec32l.c. */
void init_registers_powerpc_altivec32l (void);
extern const struct target_desc *tdesc_powerpc_altivec32l;
/* Defined in auto-generated file powerpc-cell32l.c. */
void init_registers_powerpc_cell32l (void);
extern const struct target_desc *tdesc_powerpc_cell32l;
/* Defined in auto-generated file powerpc-vsx32l.c. */
void init_registers_powerpc_vsx32l (void);
extern const struct target_desc *tdesc_powerpc_vsx32l;
/* Defined in auto-generated file powerpc-isa205-32l.c. */
void init_registers_powerpc_isa205_32l (void);
extern const struct target_desc *tdesc_powerpc_isa205_32l;
/* Defined in auto-generated file powerpc-isa205-altivec32l.c. */
void init_registers_powerpc_isa205_altivec32l (void);
extern const struct target_desc *tdesc_powerpc_isa205_altivec32l;
/* Defined in auto-generated file powerpc-isa205-vsx32l.c. */
void init_registers_powerpc_isa205_vsx32l (void);
extern const struct target_desc *tdesc_powerpc_isa205_vsx32l;
/* Defined in auto-generated file powerpc-e500l.c. */
void init_registers_powerpc_e500l (void);
extern const struct target_desc *tdesc_powerpc_e500l;
#endif
#if defined __powerpc64__
/* Defined in auto-generated file powerpc-64l.c. */
void init_registers_powerpc_64l (void);
extern const struct target_desc *tdesc_powerpc_64l;
/* Defined in auto-generated file powerpc-altivec64l.c. */
void init_registers_powerpc_altivec64l (void);
extern const struct target_desc *tdesc_powerpc_altivec64l;
/* Defined in auto-generated file powerpc-cell64l.c. */
void init_registers_powerpc_cell64l (void);
extern const struct target_desc *tdesc_powerpc_cell64l;
/* Defined in auto-generated file powerpc-vsx64l.c. */
void init_registers_powerpc_vsx64l (void);
extern const struct target_desc *tdesc_powerpc_vsx64l;
/* Defined in auto-generated file powerpc-isa205-64l.c. */
void init_registers_powerpc_isa205_64l (void);
extern const struct target_desc *tdesc_powerpc_isa205_64l;
/* Defined in auto-generated file powerpc-isa205-altivec64l.c. */
void init_registers_powerpc_isa205_altivec64l (void);
extern const struct target_desc *tdesc_powerpc_isa205_altivec64l;
/* Defined in auto-generated file powerpc-isa205-vsx64l.c. */
void init_registers_powerpc_isa205_vsx64l (void);
extern const struct target_desc *tdesc_powerpc_isa205_vsx64l;
#endif