2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
Committed by Jim Blandy <jimb@redhat.com>.
* config/s390/nm-linux.h: Update comments. Do not include "solib.h".
(KERNEL_U_ADDR, REGISTER_U_ADDR, U_REGS_OFFSET): Remove.
(FETCH_INFERIOR_REGISTERS): Define.
* config/s390/s390.mh (NATDEPFILES): Remove core-aout.o and
core-regset.o.
* config/s390/s390x.mt: Remove.
* config/s390/tm-s390.h: Remove.
* config/s390/tm-linux.h: Do not include "s390/tm-s390.h".
(TARGET_ELF64): Remove.
(SKIP_TRAMPOLINE_CODE): Do not undefine.
* configure.tgt [s390-*-*, s390x-*-*]: Merge into single
s390*-*-* case; always set gdb_target to s390.
* regformats/reg-s390.dat: Remove control registers.
* regformats/reg-s390x.dat: Likewise.
* s390-tdep.h: New file.
* s390-nat.c: Do not include <asm/processor.h> or <value.h>.
Include "inferior.h" and "s390-tdep.h".
Remove private definition of offsetof.
(s390_register_u_addr): Remove.
(regmap_gregset, regmap_fpregset): Define.
(supply_gregset, fill_gregset): Reimplement.
(supply_fpregset, fill_fpregset): Likewise.
(s390_inferior_tid): New function.
(fetch_regs, store_regs, fetch_fpregs, store_fpregs): Likewise.
(fetch_inferior_registers, store_inferior_registers): Likewise.
* s390-tdep.c: Do not define S390_TDEP. Include "defs.h" instead
of <defs.h>. Include "reggroups.h", "regset.h", and "s390-tdep.h".
Global replace of S390_GP0_REGNUM by S390_R0_REGNUM.
Global replace of S390_FP0_REGNUM by S390_F0_REGNUM.
(struct gdbarch_tdep): Define.
(struct s390_register_info): Define.
(s390_register_info): New variable.
(s390_register_name): Reimplement.
(s390_register_type): New function.
(s390_register_raw_size, s390x_register_raw_size): Remove.
(s390_cannot_fetch_register): Remove.
(s390_register_byte): Remove.
(s390_register_virtual_type, s390x_register_virtual_type): Remove.
(s390_dwarf_regmap): New variable.
(s390_dwarf_reg_to_regnum): New function.
(s390_stab_reg_to_regnum): Remove.
(s390_pseudo_register_read, s390_pseudo_register_write): New functions.
(s390x_pseudo_register_read, s390x_pseudo_register_write): Likewise.
(s390_convert_register_p): Likewise.
(s390_register_to_value, s390_value_to_register): Likewise.
(s390_register_reggroup_p): Likewise.
(s390_regmap_gregset, s390x_regmap_gregset, s390_regmap_fpregset,
s390_gregset, s390x_gregset, s390_fpregset): New variables.
(s390_supply_regset, s390_regset_from_core_section): New functions.
(GDB_TARGET_IS_ESAME): Move here from tm-s390.h.
(S390_FPR_SIZE): Likewise.
(S390_GPR_SIZE): Likewise. Redefine in terms of GDB_TARGET_IS_ESAME.
Global replace of DEPRECATED_REGISTER_SIZE by S390_GPR_SIZE.
(S390_NUM_GPRS): Move here from tm-s390.h.
(S390_NUM_FPRS): Likewise.
(s390_in_function_epilogue_p): New function.
(s390_is_sigreturn): Replace S390_PSW_ADDR_SIZE by S390_GPR_SIZE.
Replace S390_PC_REGNUM by S390_PSWA_REGNUM.
(s390_gdbarch_init): Allocate and set up gdbarch_tdep structure.
Replace s390_stab_reg_to_regnum by s390_dwarf_reg_to_regnum.
Replace S390_FP_REGNUM by S390_SP_REGNUM.
Remove calls to:
set_gdbarch_deprecated_max_register_raw_size,
set_gdbarch_deprecated_max_register_virtual_size,
set_gdbarch_deprecated_register_byte,
set_gdbarch_cannot_fetch_register,
set_gdbarch_cannot_store_register,
set_gdbarch_deprecated_register_size,
set_gdbarch_deprecated_register_raw_size,
set_gdbarch_deprecated_register_virtual_size,
set_gdbarch_deprecated_register_virtual_type,
set_gdbarch_deprecated_register_bytes.
Add calls to:
set_gdbarch_num_pseudo_regs,
set_gdbarch_register_type,
set_gdbarch_convert_register_p,
set_gdbarch_register_to_value,
set_gdbarch_value_to_register,
set_gdbarch_register_reggroup_p,
set_gdbarch_regset_from_core_section,
set_gdbarch_pseudo_register_read,
set_gdbarch_pseudo_register_write,
set_gdbarch_in_function_epilogue_p.
* Makefile.in (s390-nat.o, s390-tdep.o): Update dependencies.
(s390_tdep_h): New variable.
2004-02-18 04:42:51 +01:00
|
|
|
/* Target-dependent code for GDB, the GNU debugger.
|
2016-01-01 05:33:14 +01:00
|
|
|
Copyright (C) 2003-2016 Free Software Foundation, Inc.
|
2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
Committed by Jim Blandy <jimb@redhat.com>.
* config/s390/nm-linux.h: Update comments. Do not include "solib.h".
(KERNEL_U_ADDR, REGISTER_U_ADDR, U_REGS_OFFSET): Remove.
(FETCH_INFERIOR_REGISTERS): Define.
* config/s390/s390.mh (NATDEPFILES): Remove core-aout.o and
core-regset.o.
* config/s390/s390x.mt: Remove.
* config/s390/tm-s390.h: Remove.
* config/s390/tm-linux.h: Do not include "s390/tm-s390.h".
(TARGET_ELF64): Remove.
(SKIP_TRAMPOLINE_CODE): Do not undefine.
* configure.tgt [s390-*-*, s390x-*-*]: Merge into single
s390*-*-* case; always set gdb_target to s390.
* regformats/reg-s390.dat: Remove control registers.
* regformats/reg-s390x.dat: Likewise.
* s390-tdep.h: New file.
* s390-nat.c: Do not include <asm/processor.h> or <value.h>.
Include "inferior.h" and "s390-tdep.h".
Remove private definition of offsetof.
(s390_register_u_addr): Remove.
(regmap_gregset, regmap_fpregset): Define.
(supply_gregset, fill_gregset): Reimplement.
(supply_fpregset, fill_fpregset): Likewise.
(s390_inferior_tid): New function.
(fetch_regs, store_regs, fetch_fpregs, store_fpregs): Likewise.
(fetch_inferior_registers, store_inferior_registers): Likewise.
* s390-tdep.c: Do not define S390_TDEP. Include "defs.h" instead
of <defs.h>. Include "reggroups.h", "regset.h", and "s390-tdep.h".
Global replace of S390_GP0_REGNUM by S390_R0_REGNUM.
Global replace of S390_FP0_REGNUM by S390_F0_REGNUM.
(struct gdbarch_tdep): Define.
(struct s390_register_info): Define.
(s390_register_info): New variable.
(s390_register_name): Reimplement.
(s390_register_type): New function.
(s390_register_raw_size, s390x_register_raw_size): Remove.
(s390_cannot_fetch_register): Remove.
(s390_register_byte): Remove.
(s390_register_virtual_type, s390x_register_virtual_type): Remove.
(s390_dwarf_regmap): New variable.
(s390_dwarf_reg_to_regnum): New function.
(s390_stab_reg_to_regnum): Remove.
(s390_pseudo_register_read, s390_pseudo_register_write): New functions.
(s390x_pseudo_register_read, s390x_pseudo_register_write): Likewise.
(s390_convert_register_p): Likewise.
(s390_register_to_value, s390_value_to_register): Likewise.
(s390_register_reggroup_p): Likewise.
(s390_regmap_gregset, s390x_regmap_gregset, s390_regmap_fpregset,
s390_gregset, s390x_gregset, s390_fpregset): New variables.
(s390_supply_regset, s390_regset_from_core_section): New functions.
(GDB_TARGET_IS_ESAME): Move here from tm-s390.h.
(S390_FPR_SIZE): Likewise.
(S390_GPR_SIZE): Likewise. Redefine in terms of GDB_TARGET_IS_ESAME.
Global replace of DEPRECATED_REGISTER_SIZE by S390_GPR_SIZE.
(S390_NUM_GPRS): Move here from tm-s390.h.
(S390_NUM_FPRS): Likewise.
(s390_in_function_epilogue_p): New function.
(s390_is_sigreturn): Replace S390_PSW_ADDR_SIZE by S390_GPR_SIZE.
Replace S390_PC_REGNUM by S390_PSWA_REGNUM.
(s390_gdbarch_init): Allocate and set up gdbarch_tdep structure.
Replace s390_stab_reg_to_regnum by s390_dwarf_reg_to_regnum.
Replace S390_FP_REGNUM by S390_SP_REGNUM.
Remove calls to:
set_gdbarch_deprecated_max_register_raw_size,
set_gdbarch_deprecated_max_register_virtual_size,
set_gdbarch_deprecated_register_byte,
set_gdbarch_cannot_fetch_register,
set_gdbarch_cannot_store_register,
set_gdbarch_deprecated_register_size,
set_gdbarch_deprecated_register_raw_size,
set_gdbarch_deprecated_register_virtual_size,
set_gdbarch_deprecated_register_virtual_type,
set_gdbarch_deprecated_register_bytes.
Add calls to:
set_gdbarch_num_pseudo_regs,
set_gdbarch_register_type,
set_gdbarch_convert_register_p,
set_gdbarch_register_to_value,
set_gdbarch_value_to_register,
set_gdbarch_register_reggroup_p,
set_gdbarch_regset_from_core_section,
set_gdbarch_pseudo_register_read,
set_gdbarch_pseudo_register_write,
set_gdbarch_in_function_epilogue_p.
* Makefile.in (s390-nat.o, s390-tdep.o): Update dependencies.
(s390_tdep_h): New variable.
2004-02-18 04:42:51 +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
|
2007-08-23 20:08:50 +02:00
|
|
|
the Free Software Foundation; either version 3 of the License, or
|
2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
Committed by Jim Blandy <jimb@redhat.com>.
* config/s390/nm-linux.h: Update comments. Do not include "solib.h".
(KERNEL_U_ADDR, REGISTER_U_ADDR, U_REGS_OFFSET): Remove.
(FETCH_INFERIOR_REGISTERS): Define.
* config/s390/s390.mh (NATDEPFILES): Remove core-aout.o and
core-regset.o.
* config/s390/s390x.mt: Remove.
* config/s390/tm-s390.h: Remove.
* config/s390/tm-linux.h: Do not include "s390/tm-s390.h".
(TARGET_ELF64): Remove.
(SKIP_TRAMPOLINE_CODE): Do not undefine.
* configure.tgt [s390-*-*, s390x-*-*]: Merge into single
s390*-*-* case; always set gdb_target to s390.
* regformats/reg-s390.dat: Remove control registers.
* regformats/reg-s390x.dat: Likewise.
* s390-tdep.h: New file.
* s390-nat.c: Do not include <asm/processor.h> or <value.h>.
Include "inferior.h" and "s390-tdep.h".
Remove private definition of offsetof.
(s390_register_u_addr): Remove.
(regmap_gregset, regmap_fpregset): Define.
(supply_gregset, fill_gregset): Reimplement.
(supply_fpregset, fill_fpregset): Likewise.
(s390_inferior_tid): New function.
(fetch_regs, store_regs, fetch_fpregs, store_fpregs): Likewise.
(fetch_inferior_registers, store_inferior_registers): Likewise.
* s390-tdep.c: Do not define S390_TDEP. Include "defs.h" instead
of <defs.h>. Include "reggroups.h", "regset.h", and "s390-tdep.h".
Global replace of S390_GP0_REGNUM by S390_R0_REGNUM.
Global replace of S390_FP0_REGNUM by S390_F0_REGNUM.
(struct gdbarch_tdep): Define.
(struct s390_register_info): Define.
(s390_register_info): New variable.
(s390_register_name): Reimplement.
(s390_register_type): New function.
(s390_register_raw_size, s390x_register_raw_size): Remove.
(s390_cannot_fetch_register): Remove.
(s390_register_byte): Remove.
(s390_register_virtual_type, s390x_register_virtual_type): Remove.
(s390_dwarf_regmap): New variable.
(s390_dwarf_reg_to_regnum): New function.
(s390_stab_reg_to_regnum): Remove.
(s390_pseudo_register_read, s390_pseudo_register_write): New functions.
(s390x_pseudo_register_read, s390x_pseudo_register_write): Likewise.
(s390_convert_register_p): Likewise.
(s390_register_to_value, s390_value_to_register): Likewise.
(s390_register_reggroup_p): Likewise.
(s390_regmap_gregset, s390x_regmap_gregset, s390_regmap_fpregset,
s390_gregset, s390x_gregset, s390_fpregset): New variables.
(s390_supply_regset, s390_regset_from_core_section): New functions.
(GDB_TARGET_IS_ESAME): Move here from tm-s390.h.
(S390_FPR_SIZE): Likewise.
(S390_GPR_SIZE): Likewise. Redefine in terms of GDB_TARGET_IS_ESAME.
Global replace of DEPRECATED_REGISTER_SIZE by S390_GPR_SIZE.
(S390_NUM_GPRS): Move here from tm-s390.h.
(S390_NUM_FPRS): Likewise.
(s390_in_function_epilogue_p): New function.
(s390_is_sigreturn): Replace S390_PSW_ADDR_SIZE by S390_GPR_SIZE.
Replace S390_PC_REGNUM by S390_PSWA_REGNUM.
(s390_gdbarch_init): Allocate and set up gdbarch_tdep structure.
Replace s390_stab_reg_to_regnum by s390_dwarf_reg_to_regnum.
Replace S390_FP_REGNUM by S390_SP_REGNUM.
Remove calls to:
set_gdbarch_deprecated_max_register_raw_size,
set_gdbarch_deprecated_max_register_virtual_size,
set_gdbarch_deprecated_register_byte,
set_gdbarch_cannot_fetch_register,
set_gdbarch_cannot_store_register,
set_gdbarch_deprecated_register_size,
set_gdbarch_deprecated_register_raw_size,
set_gdbarch_deprecated_register_virtual_size,
set_gdbarch_deprecated_register_virtual_type,
set_gdbarch_deprecated_register_bytes.
Add calls to:
set_gdbarch_num_pseudo_regs,
set_gdbarch_register_type,
set_gdbarch_convert_register_p,
set_gdbarch_register_to_value,
set_gdbarch_value_to_register,
set_gdbarch_register_reggroup_p,
set_gdbarch_regset_from_core_section,
set_gdbarch_pseudo_register_read,
set_gdbarch_pseudo_register_write,
set_gdbarch_in_function_epilogue_p.
* Makefile.in (s390-nat.o, s390-tdep.o): Update dependencies.
(s390_tdep_h): New variable.
2004-02-18 04:42:51 +01:00
|
|
|
(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
|
2007-08-23 20:08:50 +02:00
|
|
|
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
Committed by Jim Blandy <jimb@redhat.com>.
* config/s390/nm-linux.h: Update comments. Do not include "solib.h".
(KERNEL_U_ADDR, REGISTER_U_ADDR, U_REGS_OFFSET): Remove.
(FETCH_INFERIOR_REGISTERS): Define.
* config/s390/s390.mh (NATDEPFILES): Remove core-aout.o and
core-regset.o.
* config/s390/s390x.mt: Remove.
* config/s390/tm-s390.h: Remove.
* config/s390/tm-linux.h: Do not include "s390/tm-s390.h".
(TARGET_ELF64): Remove.
(SKIP_TRAMPOLINE_CODE): Do not undefine.
* configure.tgt [s390-*-*, s390x-*-*]: Merge into single
s390*-*-* case; always set gdb_target to s390.
* regformats/reg-s390.dat: Remove control registers.
* regformats/reg-s390x.dat: Likewise.
* s390-tdep.h: New file.
* s390-nat.c: Do not include <asm/processor.h> or <value.h>.
Include "inferior.h" and "s390-tdep.h".
Remove private definition of offsetof.
(s390_register_u_addr): Remove.
(regmap_gregset, regmap_fpregset): Define.
(supply_gregset, fill_gregset): Reimplement.
(supply_fpregset, fill_fpregset): Likewise.
(s390_inferior_tid): New function.
(fetch_regs, store_regs, fetch_fpregs, store_fpregs): Likewise.
(fetch_inferior_registers, store_inferior_registers): Likewise.
* s390-tdep.c: Do not define S390_TDEP. Include "defs.h" instead
of <defs.h>. Include "reggroups.h", "regset.h", and "s390-tdep.h".
Global replace of S390_GP0_REGNUM by S390_R0_REGNUM.
Global replace of S390_FP0_REGNUM by S390_F0_REGNUM.
(struct gdbarch_tdep): Define.
(struct s390_register_info): Define.
(s390_register_info): New variable.
(s390_register_name): Reimplement.
(s390_register_type): New function.
(s390_register_raw_size, s390x_register_raw_size): Remove.
(s390_cannot_fetch_register): Remove.
(s390_register_byte): Remove.
(s390_register_virtual_type, s390x_register_virtual_type): Remove.
(s390_dwarf_regmap): New variable.
(s390_dwarf_reg_to_regnum): New function.
(s390_stab_reg_to_regnum): Remove.
(s390_pseudo_register_read, s390_pseudo_register_write): New functions.
(s390x_pseudo_register_read, s390x_pseudo_register_write): Likewise.
(s390_convert_register_p): Likewise.
(s390_register_to_value, s390_value_to_register): Likewise.
(s390_register_reggroup_p): Likewise.
(s390_regmap_gregset, s390x_regmap_gregset, s390_regmap_fpregset,
s390_gregset, s390x_gregset, s390_fpregset): New variables.
(s390_supply_regset, s390_regset_from_core_section): New functions.
(GDB_TARGET_IS_ESAME): Move here from tm-s390.h.
(S390_FPR_SIZE): Likewise.
(S390_GPR_SIZE): Likewise. Redefine in terms of GDB_TARGET_IS_ESAME.
Global replace of DEPRECATED_REGISTER_SIZE by S390_GPR_SIZE.
(S390_NUM_GPRS): Move here from tm-s390.h.
(S390_NUM_FPRS): Likewise.
(s390_in_function_epilogue_p): New function.
(s390_is_sigreturn): Replace S390_PSW_ADDR_SIZE by S390_GPR_SIZE.
Replace S390_PC_REGNUM by S390_PSWA_REGNUM.
(s390_gdbarch_init): Allocate and set up gdbarch_tdep structure.
Replace s390_stab_reg_to_regnum by s390_dwarf_reg_to_regnum.
Replace S390_FP_REGNUM by S390_SP_REGNUM.
Remove calls to:
set_gdbarch_deprecated_max_register_raw_size,
set_gdbarch_deprecated_max_register_virtual_size,
set_gdbarch_deprecated_register_byte,
set_gdbarch_cannot_fetch_register,
set_gdbarch_cannot_store_register,
set_gdbarch_deprecated_register_size,
set_gdbarch_deprecated_register_raw_size,
set_gdbarch_deprecated_register_virtual_size,
set_gdbarch_deprecated_register_virtual_type,
set_gdbarch_deprecated_register_bytes.
Add calls to:
set_gdbarch_num_pseudo_regs,
set_gdbarch_register_type,
set_gdbarch_convert_register_p,
set_gdbarch_register_to_value,
set_gdbarch_value_to_register,
set_gdbarch_register_reggroup_p,
set_gdbarch_regset_from_core_section,
set_gdbarch_pseudo_register_read,
set_gdbarch_pseudo_register_write,
set_gdbarch_in_function_epilogue_p.
* Makefile.in (s390-nat.o, s390-tdep.o): Update dependencies.
(s390_tdep_h): New variable.
2004-02-18 04:42:51 +01:00
|
|
|
|
|
|
|
#ifndef S390_TDEP_H
|
|
|
|
#define S390_TDEP_H
|
|
|
|
|
2013-09-13 16:17:31 +02:00
|
|
|
/* Hardware capabilities. */
|
|
|
|
|
|
|
|
#ifndef HWCAP_S390_HIGH_GPRS
|
|
|
|
#define HWCAP_S390_HIGH_GPRS 512
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef HWCAP_S390_TE
|
|
|
|
#define HWCAP_S390_TE 1024
|
|
|
|
#endif
|
|
|
|
|
S390: Add vector register support to gdb
Recognize S/390 targets with the new vector feature and present their
vector registers appropriately: as 32 new 128-bit wide registers
v0-v31, where the first 16 embed the floating point registers f0-f15.
Each of the full registers v0-v15 is modelled as a pseudo register.
gdb/ChangeLog:
* s390-linux-nat.c (have_regset_vxrs): New static variable.
(s390_linux_fetch_inferior_registers): Handle vector registers, if
present.
(s390_linux_store_inferior_registers): Likewise.
(s390_get_hwcap): Remove function. Embed its logic...
(s390_read_description): ...here. Yield a target description with
vector registers if applicable.
* s390-linux-tdep.c: Include "features/s390-vx-linux64.c",
"features/s390-tevx-linux64.c", "features/s390x-vx-linux64.c", and
"features/s390x-tevx-linux64.c".
(struct gdbarch_tdep) <v0_full_regnum>: New field.
(s390_dwarf_regmap): Add vector registers. Remove bogus entries
for "GNU/Linux-specific registers".
(s390_dwarf_reg_r0l): New enum value.
(s390_dwarf_reg_to_regnum): Support vector registers.
(s390_adjust_frame_regnum): Adjust pseudo DWARF register numbers
of GPR lower halves.
(regnum_is_vxr_full): New function.
(s390_register_name): New function.
(s390_pseudo_register_name): Handle v0-v15, which are composed of
f0-f15 and v0l-v15l.
(s390_pseudo_register_type): Likewise.
(s390_pseudo_register_read): Likewise.
(s390_pseudo_register_write): Likewise.
(s390_value_from_register): Account for the fact that values are
placed left-justified in vector registers.
(s390_pseudo_register_reggroup_p): Add pseudo registers v0-v15 to
the vector reggroup and omit them from the general reggroup.
(s390_regmap_vxrs_low, s390_regmap_vxrs_high): New register maps.
(s390_vxrs_low_regset, s390_vxrs_high_regset): New regsets.
(s390_iterate_over_regset_sections): Add iterations for the two
new vector regsets.
(s390_core_read_description): Yield a target description with
vector registers if applicable.
(s390_gdbarch_init): Handle target descriptions with vector
registers. Add "register_name" gdbarch method.
(_initialize_s390_tdep): Call new tdesc initialization functions.
* s390-linux-tdep.h (HWCAP_S390_VX): New macro.
(S390_V0_LOWER_REGNUM, S390_V1_LOWER_REGNUM, S390_V2_LOWER_REGNUM)
(S390_V3_LOWER_REGNUM, S390_V4_LOWER_REGNUM, S390_V5_LOWER_REGNUM)
(S390_V6_LOWER_REGNUM, S390_V7_LOWER_REGNUM, S390_V8_LOWER_REGNUM)
(S390_V9_LOWER_REGNUM, S390_V10_LOWER_REGNUM)
(S390_V11_LOWER_REGNUM, S390_V12_LOWER_REGNUM)
(S390_V13_LOWER_REGNUM, S390_V14_LOWER_REGNUM)
(S390_V15_LOWER_REGNUM, S390_V16_REGNUM, S390_V17_REGNUM)
(S390_V18_REGNUM, S390_V19_REGNUM, S390_V20_REGNUM)
(S390_V21_REGNUM, S390_V22_REGNUM, S390_V23_REGNUM)
(S390_V24_REGNUM, S390_V25_REGNUM, S390_V26_REGNUM)
(S390_V27_REGNUM, S390_V28_REGNUM, S390_V29_REGNUM)
(S390_V30_REGNUM, S390_V31_REGNUM): New macros.
(S390_NUM_REGS): Adjust value.
(s390_vxrs_low_regset, s390_vxrs_high_regset): Declare.
(tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
(tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): Likewise.
* NEWS: Announce S/390 vector register support.
2015-03-02 10:57:39 +01:00
|
|
|
#ifndef HWCAP_S390_VX
|
|
|
|
#define HWCAP_S390_VX 2048
|
|
|
|
#endif
|
|
|
|
|
2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
Committed by Jim Blandy <jimb@redhat.com>.
* config/s390/nm-linux.h: Update comments. Do not include "solib.h".
(KERNEL_U_ADDR, REGISTER_U_ADDR, U_REGS_OFFSET): Remove.
(FETCH_INFERIOR_REGISTERS): Define.
* config/s390/s390.mh (NATDEPFILES): Remove core-aout.o and
core-regset.o.
* config/s390/s390x.mt: Remove.
* config/s390/tm-s390.h: Remove.
* config/s390/tm-linux.h: Do not include "s390/tm-s390.h".
(TARGET_ELF64): Remove.
(SKIP_TRAMPOLINE_CODE): Do not undefine.
* configure.tgt [s390-*-*, s390x-*-*]: Merge into single
s390*-*-* case; always set gdb_target to s390.
* regformats/reg-s390.dat: Remove control registers.
* regformats/reg-s390x.dat: Likewise.
* s390-tdep.h: New file.
* s390-nat.c: Do not include <asm/processor.h> or <value.h>.
Include "inferior.h" and "s390-tdep.h".
Remove private definition of offsetof.
(s390_register_u_addr): Remove.
(regmap_gregset, regmap_fpregset): Define.
(supply_gregset, fill_gregset): Reimplement.
(supply_fpregset, fill_fpregset): Likewise.
(s390_inferior_tid): New function.
(fetch_regs, store_regs, fetch_fpregs, store_fpregs): Likewise.
(fetch_inferior_registers, store_inferior_registers): Likewise.
* s390-tdep.c: Do not define S390_TDEP. Include "defs.h" instead
of <defs.h>. Include "reggroups.h", "regset.h", and "s390-tdep.h".
Global replace of S390_GP0_REGNUM by S390_R0_REGNUM.
Global replace of S390_FP0_REGNUM by S390_F0_REGNUM.
(struct gdbarch_tdep): Define.
(struct s390_register_info): Define.
(s390_register_info): New variable.
(s390_register_name): Reimplement.
(s390_register_type): New function.
(s390_register_raw_size, s390x_register_raw_size): Remove.
(s390_cannot_fetch_register): Remove.
(s390_register_byte): Remove.
(s390_register_virtual_type, s390x_register_virtual_type): Remove.
(s390_dwarf_regmap): New variable.
(s390_dwarf_reg_to_regnum): New function.
(s390_stab_reg_to_regnum): Remove.
(s390_pseudo_register_read, s390_pseudo_register_write): New functions.
(s390x_pseudo_register_read, s390x_pseudo_register_write): Likewise.
(s390_convert_register_p): Likewise.
(s390_register_to_value, s390_value_to_register): Likewise.
(s390_register_reggroup_p): Likewise.
(s390_regmap_gregset, s390x_regmap_gregset, s390_regmap_fpregset,
s390_gregset, s390x_gregset, s390_fpregset): New variables.
(s390_supply_regset, s390_regset_from_core_section): New functions.
(GDB_TARGET_IS_ESAME): Move here from tm-s390.h.
(S390_FPR_SIZE): Likewise.
(S390_GPR_SIZE): Likewise. Redefine in terms of GDB_TARGET_IS_ESAME.
Global replace of DEPRECATED_REGISTER_SIZE by S390_GPR_SIZE.
(S390_NUM_GPRS): Move here from tm-s390.h.
(S390_NUM_FPRS): Likewise.
(s390_in_function_epilogue_p): New function.
(s390_is_sigreturn): Replace S390_PSW_ADDR_SIZE by S390_GPR_SIZE.
Replace S390_PC_REGNUM by S390_PSWA_REGNUM.
(s390_gdbarch_init): Allocate and set up gdbarch_tdep structure.
Replace s390_stab_reg_to_regnum by s390_dwarf_reg_to_regnum.
Replace S390_FP_REGNUM by S390_SP_REGNUM.
Remove calls to:
set_gdbarch_deprecated_max_register_raw_size,
set_gdbarch_deprecated_max_register_virtual_size,
set_gdbarch_deprecated_register_byte,
set_gdbarch_cannot_fetch_register,
set_gdbarch_cannot_store_register,
set_gdbarch_deprecated_register_size,
set_gdbarch_deprecated_register_raw_size,
set_gdbarch_deprecated_register_virtual_size,
set_gdbarch_deprecated_register_virtual_type,
set_gdbarch_deprecated_register_bytes.
Add calls to:
set_gdbarch_num_pseudo_regs,
set_gdbarch_register_type,
set_gdbarch_convert_register_p,
set_gdbarch_register_to_value,
set_gdbarch_value_to_register,
set_gdbarch_register_reggroup_p,
set_gdbarch_regset_from_core_section,
set_gdbarch_pseudo_register_read,
set_gdbarch_pseudo_register_write,
set_gdbarch_in_function_epilogue_p.
* Makefile.in (s390-nat.o, s390-tdep.o): Update dependencies.
(s390_tdep_h): New variable.
2004-02-18 04:42:51 +01:00
|
|
|
/* Register information. */
|
|
|
|
|
|
|
|
/* Program Status Word. */
|
|
|
|
#define S390_PSWM_REGNUM 0
|
|
|
|
#define S390_PSWA_REGNUM 1
|
|
|
|
/* General Purpose Registers. */
|
|
|
|
#define S390_R0_REGNUM 2
|
|
|
|
#define S390_R1_REGNUM 3
|
|
|
|
#define S390_R2_REGNUM 4
|
|
|
|
#define S390_R3_REGNUM 5
|
|
|
|
#define S390_R4_REGNUM 6
|
|
|
|
#define S390_R5_REGNUM 7
|
|
|
|
#define S390_R6_REGNUM 8
|
|
|
|
#define S390_R7_REGNUM 9
|
|
|
|
#define S390_R8_REGNUM 10
|
|
|
|
#define S390_R9_REGNUM 11
|
|
|
|
#define S390_R10_REGNUM 12
|
|
|
|
#define S390_R11_REGNUM 13
|
|
|
|
#define S390_R12_REGNUM 14
|
|
|
|
#define S390_R13_REGNUM 15
|
|
|
|
#define S390_R14_REGNUM 16
|
|
|
|
#define S390_R15_REGNUM 17
|
|
|
|
/* Access Registers. */
|
|
|
|
#define S390_A0_REGNUM 18
|
|
|
|
#define S390_A1_REGNUM 19
|
|
|
|
#define S390_A2_REGNUM 20
|
|
|
|
#define S390_A3_REGNUM 21
|
|
|
|
#define S390_A4_REGNUM 22
|
|
|
|
#define S390_A5_REGNUM 23
|
|
|
|
#define S390_A6_REGNUM 24
|
|
|
|
#define S390_A7_REGNUM 25
|
|
|
|
#define S390_A8_REGNUM 26
|
|
|
|
#define S390_A9_REGNUM 27
|
|
|
|
#define S390_A10_REGNUM 28
|
|
|
|
#define S390_A11_REGNUM 29
|
|
|
|
#define S390_A12_REGNUM 30
|
|
|
|
#define S390_A13_REGNUM 31
|
|
|
|
#define S390_A14_REGNUM 32
|
|
|
|
#define S390_A15_REGNUM 33
|
|
|
|
/* Floating Point Control Word. */
|
|
|
|
#define S390_FPC_REGNUM 34
|
|
|
|
/* Floating Point Registers. */
|
|
|
|
#define S390_F0_REGNUM 35
|
|
|
|
#define S390_F1_REGNUM 36
|
|
|
|
#define S390_F2_REGNUM 37
|
|
|
|
#define S390_F3_REGNUM 38
|
|
|
|
#define S390_F4_REGNUM 39
|
|
|
|
#define S390_F5_REGNUM 40
|
|
|
|
#define S390_F6_REGNUM 41
|
|
|
|
#define S390_F7_REGNUM 42
|
|
|
|
#define S390_F8_REGNUM 43
|
|
|
|
#define S390_F9_REGNUM 44
|
|
|
|
#define S390_F10_REGNUM 45
|
|
|
|
#define S390_F11_REGNUM 46
|
|
|
|
#define S390_F12_REGNUM 47
|
|
|
|
#define S390_F13_REGNUM 48
|
|
|
|
#define S390_F14_REGNUM 49
|
|
|
|
#define S390_F15_REGNUM 50
|
* features/Makefile (WHICH): Add s390-linux32, s390-linux64,
and s390x-linux64.
(s390-linux32-expedite): Define.
(s390-linux64-expedite): Define.
(s390x-linux64-expedite): Define.
* features/s390-acr.xml: New file.
* features/s390-fpr.xml: New file.
* features/s390-core32.xml: New file.
* features/s390-core64.xml: New file.
* features/s390x-core64.xml: New file.
* features/s390-linux32.xml: New file.
* features/s390-linux64.xml: New file.
* features/s390x-linux64.xml: New file.
* features/s390-linux32.c: New generated file.
* features/s390-linux64.c: New generated file.
* features/s390x-linux64.c: New generated file.
* regformats/s390-linux32.dat: New generated file.
* regformats/s390-linux64.dat: New generated file.
* regformats/s390x-linux64.dat: New generated file.
* regformats/reg-s390.dat: Remove.
* regformats/reg-s390x.dat: Remove.
* s390-nat.c: Include "auxv.h" and <elf.h>.
(HWCAP_S390_HIGH_GPRS): Define if undefined.
(s390_target_wordsize): New function.
(s390_auxv_parse): Likewise.
(s390_get_hwcap): Likewise.
(s390_read_description): Likewise.
(_initialize_s390_nat): Install s390_auxv_parse and
s390_read_description.
* s390-tdep.c: Include "features/s390-linux32.c",
"features/s390-linux64.c", and "features/s390x-linux64.c".
(struct gdbarch_tdep): Add gpr_full_regnum, pc_regnum, and cc_regnum.
(s390_register_call_saved): New function.
(s390_register_name): Remove.
(s390_register_type): Remove.
(s390_dwarf_regmap): Add lower half GPR pseudo DWARF CFI regnums.
(s390_dwarf_reg_to_regnum): Remap GPR regnums to full GPRs.
(s390_adjust_frame_regnum): Remap GPR regnums to lower halves for CFI.
(s390_pseudo_register_name): New function.
(s390_pseudo_register_type): New function.
(s390_pseudo_register_read): Handle both 32-bit and 64-bit cases.
Handle full GPR pesudos and varying pseudo register numbers.
(s390_pseudo_register_write): Likewise
(s390x_pseudo_register_read): Remove.
(s390x_pseudo_register_write): Likewise.
(s390_register_group): Remove.
(s390_pseudo_register_group): New function.
(s390_regmap_gregset): Add GPR upper halves.
(s390x_regmap_gregset): Likewise.
(s390_regmap_fpregset): Likewise.
(s390_regmap_upper): New global variable.
(s390_upper_regset): New global variable.
(s390_upper_regset_sections): New global variable.
(s390_regset_from_core_section): Handle GPR upper halves.
(s390_core_read_description): New function.
(s390_prologue_frame_unwind_cache): Set up ABI call-saved/clobbered
register information. Handle varying pseudo register numbers.
(s390_backchain_frame_unwind_cache): Likewise.
(s390_frame_prev_register): Unwind full GPRs to show lower halves.
(s390_stub_frame_unwind_cache): Handle varying pseudo register numbers.
(s390_sigtramp_frame_unwind_cache): Unwind PSWM and PSWA as well as
PC and CC pseudos. Unwind upper halves and full GPRs as appropriate.
Handle varying pseudo register numbers.
(s390_unwind_pc): Handle varying pseudo register numbers.
(s390_dwarf2_prev_register): New function.
(s390_dwarf2_frame_init_reg): Set up ABI call-saved/clobbered
register information. Handle varying pseudo register numbers.
Install s390_dwarf2_prev_register to unwind full GPRs.
(s390_gdbarch_init): Handle target descriptions. Assign varying
pseudo register numbers. Install s390_adjust_frame_regnum.
(_initialize_s390_tdep): Initialize target descriptions.
* s390-tdep.h (S390_R0_UPPER_REGNUM .. S390_R15_UPPER_REGNUM): Define.
(S390_NUM_REGS): Redefine to include upper half registers.
(S390_PC_REGNUM, S390_CC_REGNUM): Remove.
(S390_NUM_PSEUDO_REGS, S390_NUM_TOTAL_REGS): Likewise.
(tdesc_s390_linux32): Add declaration.
(tdesc_s390_linux64): Likewise.
(tdesc_s390x_linux64): Likewise.
gdb/testsuite/
* gdb.xml/tdesc-regs.exp: Support s390*-*-* targets.
gdbserver/
* Makefile.in (clean): Remove new generated files.
(reg-s390.o, reg-s390.c): Remove rules.
(reg-s390x.o, reg-s390x.c): Likewise.
(s390-linux32.o, s390-linux32.c): Add rules.
(s390-linux64.o, s390-linux64.c): Likewise.
(s390x-linux64.o, s390x-linux64.c): Likewise.
* configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
* linux-s390-low.c: Include <elf.h>.
(HWCAP_S390_HIGH_GPRS): Define if undefined.
(init_registers_s390): Remove prototype.
(init_registers_s390x): Likewise.
(init_registers_s390_linux32): Add prototype.
(init_registers_s390_linux64): Likewise.
(init_registers_s390x_linux64): Likewise.
(s390_num_regs_3264): New define.
(s390_regmap_3264): New global variable.
(s390_cannot_fetch_register): Remove obsolete check.
(s390_cannot_store_register): Likewise.
(s390_collect_ptrace_register): Handle upper/lower register halves.
(s390_supply_ptrace_register): Likewise.
(s390_fill_gregset): Update to register number changes.
(s390_get_hwcap): New routine.
(s390_arch_setup): Detect 32-bit process running on 64-bit system.
Install appropriate regmap and register set.
2010-01-04 16:03:01 +01:00
|
|
|
/* General Purpose Register Upper Halves. */
|
|
|
|
#define S390_R0_UPPER_REGNUM 51
|
|
|
|
#define S390_R1_UPPER_REGNUM 52
|
|
|
|
#define S390_R2_UPPER_REGNUM 53
|
|
|
|
#define S390_R3_UPPER_REGNUM 54
|
|
|
|
#define S390_R4_UPPER_REGNUM 55
|
|
|
|
#define S390_R5_UPPER_REGNUM 56
|
|
|
|
#define S390_R6_UPPER_REGNUM 57
|
|
|
|
#define S390_R7_UPPER_REGNUM 58
|
|
|
|
#define S390_R8_UPPER_REGNUM 59
|
|
|
|
#define S390_R9_UPPER_REGNUM 60
|
|
|
|
#define S390_R10_UPPER_REGNUM 61
|
|
|
|
#define S390_R11_UPPER_REGNUM 62
|
|
|
|
#define S390_R12_UPPER_REGNUM 63
|
|
|
|
#define S390_R13_UPPER_REGNUM 64
|
|
|
|
#define S390_R14_UPPER_REGNUM 65
|
|
|
|
#define S390_R15_UPPER_REGNUM 66
|
2011-12-07 14:31:05 +01:00
|
|
|
/* GNU/Linux-specific optional registers. */
|
ChangeLog:
* s390-tdep.h (S390_ORIG_R2_REGNUM): Define.
(S390_LAST_BREAK_REGNUM): Likewise.
(S390_SYSTEM_CALL_REGNUM): Likewise.
(S390_NUM_REGS): Update.
(s390_regmap_last_break): Add declaration.
(s390x_regmap_last_break): Likewise.
(s390_regmap_system_call): Likewise.
(tdesc_s390_linux32v1): Add declaration.
(tdesc_s390_linux32v2): Likewise.
(tdesc_s390_linux64v1): Likewise.
(tdesc_s390_linux64v2): Likewise.
(tdesc_s390x_linux64v1): Likewise.
(tdesc_s390x_linux64v2): Likewise.
* s390-tdep.c: Include new target description files
"features/s390-linux32v1.c", "features/s390-linux32v2.c",
"features/s390-linux64v1.c", "features/s390-linux64v2.c",
"features/s390x-linux64v1.c", and "features/s390x-linux64v2.c".
(s390_cannot_store_register): New function.
(s390_write_pc): Likewise.
(s390_dwarf_regmap): Add fields for new registers.
(s390_regmap_gregset): Likewise.
(s390x_regmap_gregset): Likewise.
(s390_regmap_fpregset): Likewise.
(s390_regmap_upper): Likewise.
(s390_regmap_last_break): New variable.
(s390x_regmap_last_break): Likewise.
(s390_regmap_system_call): Likewise.
(s390_last_break_regset): Likewise.
(s390x_last_break_regset): Likewise.
(s390_system_call_regset): Likewise.
(s390_upper_regset_sections): Rename to ...
(s390_linux64_regset_sections): ... this.
(s390_linux32_regset_sections): New variable.
(s390x_linux64_regset_sections): Likewise.
(s390_linux32v1_regset_sections): Likewise.
(s390_linux32v2_regset_sections): Likewise.
(s390_linux64v1_regset_sections): Likewise.
(s390_linux64v2_regset_sections): Likewise.
(s390x_linux64v1_regset_sections): Likewise.
(s390x_linux64v2_regset_sections): Likewise.
(s390_regset_from_core_section): Handle .reg-s390-last-break and
.reg-s390-system-call core file sections.
(s390_core_read_description): Check for presence of
.reg-s390-last-break and .reg-s390-system-call core file
sections and return appropriate target description.
(s390_gdbarch_init): Detect Linux-specific registers "orig_r2",
"last_break" and "system_call" in target description. Install
appropriate gdbarch_core_regset_sections array.
Call set_gdbarch_cannot_store_register and set_gdbarch_write_pc.
(_initialize_s390_tdep): Initialize additional target descriptions.
* s390-nat.c: Include "elf/common.h".
(PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
(have_regset_last_break): New static variable.
(have_regset_system_call): Likewise.
(s390_native_supply): Handle S390_ORIG_R2_REGNUM.
(s390_native_collect): Likewise.
(fetch_regset, store_regset, check_regset): New functions.
(s390_linux_fetch_inferior_registers): Handle S390_LAST_BREAK_REGNUM
and S390_SYSTEM_CALL_REGNUM.
(s390_linux_store_inferior_registers): Likewise.
(s390_read_description): Check for presence of NT_S390_LAST_BREAK
and NT_S390_SYSTEM_CALL regsets and use appropriate description.
* features/Makefile (WHICH): Add s390-linux32v1, s390-linux64v1,
s390x-linux64v1, s390-linux32v2, s390-linux64v2, and s390x-linux64v2.
(s390-linux32v1-expedite): Define.
(s390-linux32v2-expedite): Likewise.
(s390-linux64v1-expedite): Likewise.
(s390-linux64v2-expedite): Likewise.
(s390x-linux64v1-expedite): Likewise.
(s390x-linux64v2-expedite): Likewise.
* features/s390-linux32.xml: Add orig_r2 register.
* features/s390-linux64.xml: Likewise.
* features/s390x-linux64.xml: Likewise.
* features/s390-linux32v1.xml: New file.
* features/s390-linux32v2.xml: Likewise.
* features/s390-linux64v1.xml: Likewise.
* features/s390-linux64v2.xml: Likewise.
* features/s390x-linux64v1.xml: Likewise.
* features/s390x-linux64v2.xml: Likewise.
* features/s390-linux32.c: Regenerate.
* features/s390-linux64.c: Likewise.
* features/s390x-linux64.c: Likewise.
* features/s390-linux32v1.c: New generated file.
* features/s390-linux32v2.c: Likewise.
* features/s390-linux64v1.c: Likewise.
* features/s390-linux64v2.c: Likewise.
* features/s390x-linux64v1.c: Likewise.
* features/s390x-linux64v2.c: Likewise.
* regformats/s390-linux32.dat: Regenerate.
* regformats/s390-linux64.dat: Regenerate.
* regformats/s390x-linux64.dat: Regenerate.
* regformats/s390-linux32v1.dat: New generated file.
* regformats/s390-linux32v2.dat: Likewise.
* regformats/s390-linux64v1.dat: Likewise.
* regformats/s390-linux64v2.dat: Likewise.
* regformats/s390x-linux64v1.dat: Likewise.
* regformats/s390x-linux64v2.dat: Likewise.
gdbserver/ChangeLog:
* Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
(s390-linux32v2.o, s390-linux32v2.c): Likewise.
(s390-linux64v1.o, s390-linux64v1.c): Likewise.
(s390-linux64v2.o, s390-linux64v2.c): Likewise.
(s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
(s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
* configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
(srv_xmlfiles): Add new XML files.
* linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
and <sys/uio.h>.
(PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
(init_registers_s390_linux32v1): Add prototype.
(init_registers_s390_linux32v2): Likewise.
(init_registers_s390_linux64v1): Likewise.
(init_registers_s390_linux64v2): Likewise.
(init_registers_s390x_linux64v1): Likewise.
(init_registers_s390x_linux64v2): Likewise.
(s390_num_regs): Increment to 52.
(s390_regmap): Add orig_r2 register.
(s390_num_regs_3264): Increment to 68.
(s390_regmap_3264): Add orig_r2 register.
(s390_collect_ptrace_register): Handle orig_r2 register.
(s390_supply_ptrace_register): Likewise.
(s390_fill_last_break): New function.
(s390_store_last_break): Likewise.
(s390_fill_system_call): New function.
(s390_store_system_call): Likewise.
(target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
register sets.
(s390_check_regset): New function.
(s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
NT_S390_SYSTEM_CALL regsets and use appropriate description.
Update target_regsets for available register sets.
testsuite/ChangeLog:
* gdb.base/callfuncs.exp (fetch_all_registers): Filter out read-only
last_break register on s390*-*-* targets.
2011-12-06 15:14:50 +01:00
|
|
|
#define S390_ORIG_R2_REGNUM 67
|
|
|
|
#define S390_LAST_BREAK_REGNUM 68
|
|
|
|
#define S390_SYSTEM_CALL_REGNUM 69
|
2013-09-13 16:17:31 +02:00
|
|
|
/* Transaction diagnostic block. */
|
|
|
|
#define S390_TDB_DWORD0_REGNUM 70
|
|
|
|
#define S390_TDB_ABORT_CODE_REGNUM 71
|
|
|
|
#define S390_TDB_CONFLICT_TOKEN_REGNUM 72
|
|
|
|
#define S390_TDB_ATIA_REGNUM 73
|
|
|
|
#define S390_TDB_R0_REGNUM 74
|
|
|
|
#define S390_TDB_R1_REGNUM 75
|
|
|
|
#define S390_TDB_R2_REGNUM 76
|
|
|
|
#define S390_TDB_R3_REGNUM 77
|
|
|
|
#define S390_TDB_R4_REGNUM 78
|
|
|
|
#define S390_TDB_R5_REGNUM 79
|
|
|
|
#define S390_TDB_R6_REGNUM 80
|
|
|
|
#define S390_TDB_R7_REGNUM 81
|
|
|
|
#define S390_TDB_R8_REGNUM 82
|
|
|
|
#define S390_TDB_R9_REGNUM 83
|
|
|
|
#define S390_TDB_R10_REGNUM 84
|
|
|
|
#define S390_TDB_R11_REGNUM 85
|
|
|
|
#define S390_TDB_R12_REGNUM 86
|
|
|
|
#define S390_TDB_R13_REGNUM 87
|
|
|
|
#define S390_TDB_R14_REGNUM 88
|
|
|
|
#define S390_TDB_R15_REGNUM 89
|
S390: Add vector register support to gdb
Recognize S/390 targets with the new vector feature and present their
vector registers appropriately: as 32 new 128-bit wide registers
v0-v31, where the first 16 embed the floating point registers f0-f15.
Each of the full registers v0-v15 is modelled as a pseudo register.
gdb/ChangeLog:
* s390-linux-nat.c (have_regset_vxrs): New static variable.
(s390_linux_fetch_inferior_registers): Handle vector registers, if
present.
(s390_linux_store_inferior_registers): Likewise.
(s390_get_hwcap): Remove function. Embed its logic...
(s390_read_description): ...here. Yield a target description with
vector registers if applicable.
* s390-linux-tdep.c: Include "features/s390-vx-linux64.c",
"features/s390-tevx-linux64.c", "features/s390x-vx-linux64.c", and
"features/s390x-tevx-linux64.c".
(struct gdbarch_tdep) <v0_full_regnum>: New field.
(s390_dwarf_regmap): Add vector registers. Remove bogus entries
for "GNU/Linux-specific registers".
(s390_dwarf_reg_r0l): New enum value.
(s390_dwarf_reg_to_regnum): Support vector registers.
(s390_adjust_frame_regnum): Adjust pseudo DWARF register numbers
of GPR lower halves.
(regnum_is_vxr_full): New function.
(s390_register_name): New function.
(s390_pseudo_register_name): Handle v0-v15, which are composed of
f0-f15 and v0l-v15l.
(s390_pseudo_register_type): Likewise.
(s390_pseudo_register_read): Likewise.
(s390_pseudo_register_write): Likewise.
(s390_value_from_register): Account for the fact that values are
placed left-justified in vector registers.
(s390_pseudo_register_reggroup_p): Add pseudo registers v0-v15 to
the vector reggroup and omit them from the general reggroup.
(s390_regmap_vxrs_low, s390_regmap_vxrs_high): New register maps.
(s390_vxrs_low_regset, s390_vxrs_high_regset): New regsets.
(s390_iterate_over_regset_sections): Add iterations for the two
new vector regsets.
(s390_core_read_description): Yield a target description with
vector registers if applicable.
(s390_gdbarch_init): Handle target descriptions with vector
registers. Add "register_name" gdbarch method.
(_initialize_s390_tdep): Call new tdesc initialization functions.
* s390-linux-tdep.h (HWCAP_S390_VX): New macro.
(S390_V0_LOWER_REGNUM, S390_V1_LOWER_REGNUM, S390_V2_LOWER_REGNUM)
(S390_V3_LOWER_REGNUM, S390_V4_LOWER_REGNUM, S390_V5_LOWER_REGNUM)
(S390_V6_LOWER_REGNUM, S390_V7_LOWER_REGNUM, S390_V8_LOWER_REGNUM)
(S390_V9_LOWER_REGNUM, S390_V10_LOWER_REGNUM)
(S390_V11_LOWER_REGNUM, S390_V12_LOWER_REGNUM)
(S390_V13_LOWER_REGNUM, S390_V14_LOWER_REGNUM)
(S390_V15_LOWER_REGNUM, S390_V16_REGNUM, S390_V17_REGNUM)
(S390_V18_REGNUM, S390_V19_REGNUM, S390_V20_REGNUM)
(S390_V21_REGNUM, S390_V22_REGNUM, S390_V23_REGNUM)
(S390_V24_REGNUM, S390_V25_REGNUM, S390_V26_REGNUM)
(S390_V27_REGNUM, S390_V28_REGNUM, S390_V29_REGNUM)
(S390_V30_REGNUM, S390_V31_REGNUM): New macros.
(S390_NUM_REGS): Adjust value.
(s390_vxrs_low_regset, s390_vxrs_high_regset): Declare.
(tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
(tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): Likewise.
* NEWS: Announce S/390 vector register support.
2015-03-02 10:57:39 +01:00
|
|
|
/* Vector registers. */
|
|
|
|
#define S390_V0_LOWER_REGNUM 90
|
|
|
|
#define S390_V1_LOWER_REGNUM 91
|
|
|
|
#define S390_V2_LOWER_REGNUM 92
|
|
|
|
#define S390_V3_LOWER_REGNUM 93
|
|
|
|
#define S390_V4_LOWER_REGNUM 94
|
|
|
|
#define S390_V5_LOWER_REGNUM 95
|
|
|
|
#define S390_V6_LOWER_REGNUM 96
|
|
|
|
#define S390_V7_LOWER_REGNUM 97
|
|
|
|
#define S390_V8_LOWER_REGNUM 98
|
|
|
|
#define S390_V9_LOWER_REGNUM 99
|
|
|
|
#define S390_V10_LOWER_REGNUM 100
|
|
|
|
#define S390_V11_LOWER_REGNUM 101
|
|
|
|
#define S390_V12_LOWER_REGNUM 102
|
|
|
|
#define S390_V13_LOWER_REGNUM 103
|
|
|
|
#define S390_V14_LOWER_REGNUM 104
|
|
|
|
#define S390_V15_LOWER_REGNUM 105
|
|
|
|
#define S390_V16_REGNUM 106
|
|
|
|
#define S390_V17_REGNUM 107
|
|
|
|
#define S390_V18_REGNUM 108
|
|
|
|
#define S390_V19_REGNUM 109
|
|
|
|
#define S390_V20_REGNUM 110
|
|
|
|
#define S390_V21_REGNUM 111
|
|
|
|
#define S390_V22_REGNUM 112
|
|
|
|
#define S390_V23_REGNUM 113
|
|
|
|
#define S390_V24_REGNUM 114
|
|
|
|
#define S390_V25_REGNUM 115
|
|
|
|
#define S390_V26_REGNUM 116
|
|
|
|
#define S390_V27_REGNUM 117
|
|
|
|
#define S390_V28_REGNUM 118
|
|
|
|
#define S390_V29_REGNUM 119
|
|
|
|
#define S390_V30_REGNUM 120
|
|
|
|
#define S390_V31_REGNUM 121
|
2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
Committed by Jim Blandy <jimb@redhat.com>.
* config/s390/nm-linux.h: Update comments. Do not include "solib.h".
(KERNEL_U_ADDR, REGISTER_U_ADDR, U_REGS_OFFSET): Remove.
(FETCH_INFERIOR_REGISTERS): Define.
* config/s390/s390.mh (NATDEPFILES): Remove core-aout.o and
core-regset.o.
* config/s390/s390x.mt: Remove.
* config/s390/tm-s390.h: Remove.
* config/s390/tm-linux.h: Do not include "s390/tm-s390.h".
(TARGET_ELF64): Remove.
(SKIP_TRAMPOLINE_CODE): Do not undefine.
* configure.tgt [s390-*-*, s390x-*-*]: Merge into single
s390*-*-* case; always set gdb_target to s390.
* regformats/reg-s390.dat: Remove control registers.
* regformats/reg-s390x.dat: Likewise.
* s390-tdep.h: New file.
* s390-nat.c: Do not include <asm/processor.h> or <value.h>.
Include "inferior.h" and "s390-tdep.h".
Remove private definition of offsetof.
(s390_register_u_addr): Remove.
(regmap_gregset, regmap_fpregset): Define.
(supply_gregset, fill_gregset): Reimplement.
(supply_fpregset, fill_fpregset): Likewise.
(s390_inferior_tid): New function.
(fetch_regs, store_regs, fetch_fpregs, store_fpregs): Likewise.
(fetch_inferior_registers, store_inferior_registers): Likewise.
* s390-tdep.c: Do not define S390_TDEP. Include "defs.h" instead
of <defs.h>. Include "reggroups.h", "regset.h", and "s390-tdep.h".
Global replace of S390_GP0_REGNUM by S390_R0_REGNUM.
Global replace of S390_FP0_REGNUM by S390_F0_REGNUM.
(struct gdbarch_tdep): Define.
(struct s390_register_info): Define.
(s390_register_info): New variable.
(s390_register_name): Reimplement.
(s390_register_type): New function.
(s390_register_raw_size, s390x_register_raw_size): Remove.
(s390_cannot_fetch_register): Remove.
(s390_register_byte): Remove.
(s390_register_virtual_type, s390x_register_virtual_type): Remove.
(s390_dwarf_regmap): New variable.
(s390_dwarf_reg_to_regnum): New function.
(s390_stab_reg_to_regnum): Remove.
(s390_pseudo_register_read, s390_pseudo_register_write): New functions.
(s390x_pseudo_register_read, s390x_pseudo_register_write): Likewise.
(s390_convert_register_p): Likewise.
(s390_register_to_value, s390_value_to_register): Likewise.
(s390_register_reggroup_p): Likewise.
(s390_regmap_gregset, s390x_regmap_gregset, s390_regmap_fpregset,
s390_gregset, s390x_gregset, s390_fpregset): New variables.
(s390_supply_regset, s390_regset_from_core_section): New functions.
(GDB_TARGET_IS_ESAME): Move here from tm-s390.h.
(S390_FPR_SIZE): Likewise.
(S390_GPR_SIZE): Likewise. Redefine in terms of GDB_TARGET_IS_ESAME.
Global replace of DEPRECATED_REGISTER_SIZE by S390_GPR_SIZE.
(S390_NUM_GPRS): Move here from tm-s390.h.
(S390_NUM_FPRS): Likewise.
(s390_in_function_epilogue_p): New function.
(s390_is_sigreturn): Replace S390_PSW_ADDR_SIZE by S390_GPR_SIZE.
Replace S390_PC_REGNUM by S390_PSWA_REGNUM.
(s390_gdbarch_init): Allocate and set up gdbarch_tdep structure.
Replace s390_stab_reg_to_regnum by s390_dwarf_reg_to_regnum.
Replace S390_FP_REGNUM by S390_SP_REGNUM.
Remove calls to:
set_gdbarch_deprecated_max_register_raw_size,
set_gdbarch_deprecated_max_register_virtual_size,
set_gdbarch_deprecated_register_byte,
set_gdbarch_cannot_fetch_register,
set_gdbarch_cannot_store_register,
set_gdbarch_deprecated_register_size,
set_gdbarch_deprecated_register_raw_size,
set_gdbarch_deprecated_register_virtual_size,
set_gdbarch_deprecated_register_virtual_type,
set_gdbarch_deprecated_register_bytes.
Add calls to:
set_gdbarch_num_pseudo_regs,
set_gdbarch_register_type,
set_gdbarch_convert_register_p,
set_gdbarch_register_to_value,
set_gdbarch_value_to_register,
set_gdbarch_register_reggroup_p,
set_gdbarch_regset_from_core_section,
set_gdbarch_pseudo_register_read,
set_gdbarch_pseudo_register_write,
set_gdbarch_in_function_epilogue_p.
* Makefile.in (s390-nat.o, s390-tdep.o): Update dependencies.
(s390_tdep_h): New variable.
2004-02-18 04:42:51 +01:00
|
|
|
/* Total. */
|
S390: Add vector register support to gdb
Recognize S/390 targets with the new vector feature and present their
vector registers appropriately: as 32 new 128-bit wide registers
v0-v31, where the first 16 embed the floating point registers f0-f15.
Each of the full registers v0-v15 is modelled as a pseudo register.
gdb/ChangeLog:
* s390-linux-nat.c (have_regset_vxrs): New static variable.
(s390_linux_fetch_inferior_registers): Handle vector registers, if
present.
(s390_linux_store_inferior_registers): Likewise.
(s390_get_hwcap): Remove function. Embed its logic...
(s390_read_description): ...here. Yield a target description with
vector registers if applicable.
* s390-linux-tdep.c: Include "features/s390-vx-linux64.c",
"features/s390-tevx-linux64.c", "features/s390x-vx-linux64.c", and
"features/s390x-tevx-linux64.c".
(struct gdbarch_tdep) <v0_full_regnum>: New field.
(s390_dwarf_regmap): Add vector registers. Remove bogus entries
for "GNU/Linux-specific registers".
(s390_dwarf_reg_r0l): New enum value.
(s390_dwarf_reg_to_regnum): Support vector registers.
(s390_adjust_frame_regnum): Adjust pseudo DWARF register numbers
of GPR lower halves.
(regnum_is_vxr_full): New function.
(s390_register_name): New function.
(s390_pseudo_register_name): Handle v0-v15, which are composed of
f0-f15 and v0l-v15l.
(s390_pseudo_register_type): Likewise.
(s390_pseudo_register_read): Likewise.
(s390_pseudo_register_write): Likewise.
(s390_value_from_register): Account for the fact that values are
placed left-justified in vector registers.
(s390_pseudo_register_reggroup_p): Add pseudo registers v0-v15 to
the vector reggroup and omit them from the general reggroup.
(s390_regmap_vxrs_low, s390_regmap_vxrs_high): New register maps.
(s390_vxrs_low_regset, s390_vxrs_high_regset): New regsets.
(s390_iterate_over_regset_sections): Add iterations for the two
new vector regsets.
(s390_core_read_description): Yield a target description with
vector registers if applicable.
(s390_gdbarch_init): Handle target descriptions with vector
registers. Add "register_name" gdbarch method.
(_initialize_s390_tdep): Call new tdesc initialization functions.
* s390-linux-tdep.h (HWCAP_S390_VX): New macro.
(S390_V0_LOWER_REGNUM, S390_V1_LOWER_REGNUM, S390_V2_LOWER_REGNUM)
(S390_V3_LOWER_REGNUM, S390_V4_LOWER_REGNUM, S390_V5_LOWER_REGNUM)
(S390_V6_LOWER_REGNUM, S390_V7_LOWER_REGNUM, S390_V8_LOWER_REGNUM)
(S390_V9_LOWER_REGNUM, S390_V10_LOWER_REGNUM)
(S390_V11_LOWER_REGNUM, S390_V12_LOWER_REGNUM)
(S390_V13_LOWER_REGNUM, S390_V14_LOWER_REGNUM)
(S390_V15_LOWER_REGNUM, S390_V16_REGNUM, S390_V17_REGNUM)
(S390_V18_REGNUM, S390_V19_REGNUM, S390_V20_REGNUM)
(S390_V21_REGNUM, S390_V22_REGNUM, S390_V23_REGNUM)
(S390_V24_REGNUM, S390_V25_REGNUM, S390_V26_REGNUM)
(S390_V27_REGNUM, S390_V28_REGNUM, S390_V29_REGNUM)
(S390_V30_REGNUM, S390_V31_REGNUM): New macros.
(S390_NUM_REGS): Adjust value.
(s390_vxrs_low_regset, s390_vxrs_high_regset): Declare.
(tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
(tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): Likewise.
* NEWS: Announce S/390 vector register support.
2015-03-02 10:57:39 +01:00
|
|
|
#define S390_NUM_REGS 122
|
2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
Committed by Jim Blandy <jimb@redhat.com>.
* config/s390/nm-linux.h: Update comments. Do not include "solib.h".
(KERNEL_U_ADDR, REGISTER_U_ADDR, U_REGS_OFFSET): Remove.
(FETCH_INFERIOR_REGISTERS): Define.
* config/s390/s390.mh (NATDEPFILES): Remove core-aout.o and
core-regset.o.
* config/s390/s390x.mt: Remove.
* config/s390/tm-s390.h: Remove.
* config/s390/tm-linux.h: Do not include "s390/tm-s390.h".
(TARGET_ELF64): Remove.
(SKIP_TRAMPOLINE_CODE): Do not undefine.
* configure.tgt [s390-*-*, s390x-*-*]: Merge into single
s390*-*-* case; always set gdb_target to s390.
* regformats/reg-s390.dat: Remove control registers.
* regformats/reg-s390x.dat: Likewise.
* s390-tdep.h: New file.
* s390-nat.c: Do not include <asm/processor.h> or <value.h>.
Include "inferior.h" and "s390-tdep.h".
Remove private definition of offsetof.
(s390_register_u_addr): Remove.
(regmap_gregset, regmap_fpregset): Define.
(supply_gregset, fill_gregset): Reimplement.
(supply_fpregset, fill_fpregset): Likewise.
(s390_inferior_tid): New function.
(fetch_regs, store_regs, fetch_fpregs, store_fpregs): Likewise.
(fetch_inferior_registers, store_inferior_registers): Likewise.
* s390-tdep.c: Do not define S390_TDEP. Include "defs.h" instead
of <defs.h>. Include "reggroups.h", "regset.h", and "s390-tdep.h".
Global replace of S390_GP0_REGNUM by S390_R0_REGNUM.
Global replace of S390_FP0_REGNUM by S390_F0_REGNUM.
(struct gdbarch_tdep): Define.
(struct s390_register_info): Define.
(s390_register_info): New variable.
(s390_register_name): Reimplement.
(s390_register_type): New function.
(s390_register_raw_size, s390x_register_raw_size): Remove.
(s390_cannot_fetch_register): Remove.
(s390_register_byte): Remove.
(s390_register_virtual_type, s390x_register_virtual_type): Remove.
(s390_dwarf_regmap): New variable.
(s390_dwarf_reg_to_regnum): New function.
(s390_stab_reg_to_regnum): Remove.
(s390_pseudo_register_read, s390_pseudo_register_write): New functions.
(s390x_pseudo_register_read, s390x_pseudo_register_write): Likewise.
(s390_convert_register_p): Likewise.
(s390_register_to_value, s390_value_to_register): Likewise.
(s390_register_reggroup_p): Likewise.
(s390_regmap_gregset, s390x_regmap_gregset, s390_regmap_fpregset,
s390_gregset, s390x_gregset, s390_fpregset): New variables.
(s390_supply_regset, s390_regset_from_core_section): New functions.
(GDB_TARGET_IS_ESAME): Move here from tm-s390.h.
(S390_FPR_SIZE): Likewise.
(S390_GPR_SIZE): Likewise. Redefine in terms of GDB_TARGET_IS_ESAME.
Global replace of DEPRECATED_REGISTER_SIZE by S390_GPR_SIZE.
(S390_NUM_GPRS): Move here from tm-s390.h.
(S390_NUM_FPRS): Likewise.
(s390_in_function_epilogue_p): New function.
(s390_is_sigreturn): Replace S390_PSW_ADDR_SIZE by S390_GPR_SIZE.
Replace S390_PC_REGNUM by S390_PSWA_REGNUM.
(s390_gdbarch_init): Allocate and set up gdbarch_tdep structure.
Replace s390_stab_reg_to_regnum by s390_dwarf_reg_to_regnum.
Replace S390_FP_REGNUM by S390_SP_REGNUM.
Remove calls to:
set_gdbarch_deprecated_max_register_raw_size,
set_gdbarch_deprecated_max_register_virtual_size,
set_gdbarch_deprecated_register_byte,
set_gdbarch_cannot_fetch_register,
set_gdbarch_cannot_store_register,
set_gdbarch_deprecated_register_size,
set_gdbarch_deprecated_register_raw_size,
set_gdbarch_deprecated_register_virtual_size,
set_gdbarch_deprecated_register_virtual_type,
set_gdbarch_deprecated_register_bytes.
Add calls to:
set_gdbarch_num_pseudo_regs,
set_gdbarch_register_type,
set_gdbarch_convert_register_p,
set_gdbarch_register_to_value,
set_gdbarch_value_to_register,
set_gdbarch_register_reggroup_p,
set_gdbarch_regset_from_core_section,
set_gdbarch_pseudo_register_read,
set_gdbarch_pseudo_register_write,
set_gdbarch_in_function_epilogue_p.
* Makefile.in (s390-nat.o, s390-tdep.o): Update dependencies.
(s390_tdep_h): New variable.
2004-02-18 04:42:51 +01:00
|
|
|
|
|
|
|
/* Special register usage. */
|
|
|
|
#define S390_SP_REGNUM S390_R15_REGNUM
|
|
|
|
#define S390_RETADDR_REGNUM S390_R14_REGNUM
|
|
|
|
#define S390_FRAME_REGNUM S390_R11_REGNUM
|
|
|
|
|
2013-09-13 16:11:15 +02:00
|
|
|
#define S390_IS_GREGSET_REGNUM(i) \
|
|
|
|
(((i) >= S390_PSWM_REGNUM && (i) <= S390_A15_REGNUM) \
|
|
|
|
|| ((i) >= S390_R0_UPPER_REGNUM && (i) <= S390_R15_UPPER_REGNUM) \
|
|
|
|
|| (i) == S390_ORIG_R2_REGNUM)
|
|
|
|
|
|
|
|
#define S390_IS_FPREGSET_REGNUM(i) \
|
|
|
|
((i) >= S390_FPC_REGNUM && (i) <= S390_F15_REGNUM)
|
|
|
|
|
2013-09-13 16:17:31 +02:00
|
|
|
#define S390_IS_TDBREGSET_REGNUM(i) \
|
|
|
|
((i) >= S390_TDB_DWORD0_REGNUM && (i) <= S390_TDB_R15_REGNUM)
|
|
|
|
|
2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
Committed by Jim Blandy <jimb@redhat.com>.
* config/s390/nm-linux.h: Update comments. Do not include "solib.h".
(KERNEL_U_ADDR, REGISTER_U_ADDR, U_REGS_OFFSET): Remove.
(FETCH_INFERIOR_REGISTERS): Define.
* config/s390/s390.mh (NATDEPFILES): Remove core-aout.o and
core-regset.o.
* config/s390/s390x.mt: Remove.
* config/s390/tm-s390.h: Remove.
* config/s390/tm-linux.h: Do not include "s390/tm-s390.h".
(TARGET_ELF64): Remove.
(SKIP_TRAMPOLINE_CODE): Do not undefine.
* configure.tgt [s390-*-*, s390x-*-*]: Merge into single
s390*-*-* case; always set gdb_target to s390.
* regformats/reg-s390.dat: Remove control registers.
* regformats/reg-s390x.dat: Likewise.
* s390-tdep.h: New file.
* s390-nat.c: Do not include <asm/processor.h> or <value.h>.
Include "inferior.h" and "s390-tdep.h".
Remove private definition of offsetof.
(s390_register_u_addr): Remove.
(regmap_gregset, regmap_fpregset): Define.
(supply_gregset, fill_gregset): Reimplement.
(supply_fpregset, fill_fpregset): Likewise.
(s390_inferior_tid): New function.
(fetch_regs, store_regs, fetch_fpregs, store_fpregs): Likewise.
(fetch_inferior_registers, store_inferior_registers): Likewise.
* s390-tdep.c: Do not define S390_TDEP. Include "defs.h" instead
of <defs.h>. Include "reggroups.h", "regset.h", and "s390-tdep.h".
Global replace of S390_GP0_REGNUM by S390_R0_REGNUM.
Global replace of S390_FP0_REGNUM by S390_F0_REGNUM.
(struct gdbarch_tdep): Define.
(struct s390_register_info): Define.
(s390_register_info): New variable.
(s390_register_name): Reimplement.
(s390_register_type): New function.
(s390_register_raw_size, s390x_register_raw_size): Remove.
(s390_cannot_fetch_register): Remove.
(s390_register_byte): Remove.
(s390_register_virtual_type, s390x_register_virtual_type): Remove.
(s390_dwarf_regmap): New variable.
(s390_dwarf_reg_to_regnum): New function.
(s390_stab_reg_to_regnum): Remove.
(s390_pseudo_register_read, s390_pseudo_register_write): New functions.
(s390x_pseudo_register_read, s390x_pseudo_register_write): Likewise.
(s390_convert_register_p): Likewise.
(s390_register_to_value, s390_value_to_register): Likewise.
(s390_register_reggroup_p): Likewise.
(s390_regmap_gregset, s390x_regmap_gregset, s390_regmap_fpregset,
s390_gregset, s390x_gregset, s390_fpregset): New variables.
(s390_supply_regset, s390_regset_from_core_section): New functions.
(GDB_TARGET_IS_ESAME): Move here from tm-s390.h.
(S390_FPR_SIZE): Likewise.
(S390_GPR_SIZE): Likewise. Redefine in terms of GDB_TARGET_IS_ESAME.
Global replace of DEPRECATED_REGISTER_SIZE by S390_GPR_SIZE.
(S390_NUM_GPRS): Move here from tm-s390.h.
(S390_NUM_FPRS): Likewise.
(s390_in_function_epilogue_p): New function.
(s390_is_sigreturn): Replace S390_PSW_ADDR_SIZE by S390_GPR_SIZE.
Replace S390_PC_REGNUM by S390_PSWA_REGNUM.
(s390_gdbarch_init): Allocate and set up gdbarch_tdep structure.
Replace s390_stab_reg_to_regnum by s390_dwarf_reg_to_regnum.
Replace S390_FP_REGNUM by S390_SP_REGNUM.
Remove calls to:
set_gdbarch_deprecated_max_register_raw_size,
set_gdbarch_deprecated_max_register_virtual_size,
set_gdbarch_deprecated_register_byte,
set_gdbarch_cannot_fetch_register,
set_gdbarch_cannot_store_register,
set_gdbarch_deprecated_register_size,
set_gdbarch_deprecated_register_raw_size,
set_gdbarch_deprecated_register_virtual_size,
set_gdbarch_deprecated_register_virtual_type,
set_gdbarch_deprecated_register_bytes.
Add calls to:
set_gdbarch_num_pseudo_regs,
set_gdbarch_register_type,
set_gdbarch_convert_register_p,
set_gdbarch_register_to_value,
set_gdbarch_value_to_register,
set_gdbarch_register_reggroup_p,
set_gdbarch_regset_from_core_section,
set_gdbarch_pseudo_register_read,
set_gdbarch_pseudo_register_write,
set_gdbarch_in_function_epilogue_p.
* Makefile.in (s390-nat.o, s390-tdep.o): Update dependencies.
(s390_tdep_h): New variable.
2004-02-18 04:42:51 +01:00
|
|
|
/* Core file register sets, defined in s390-tdep.c. */
|
|
|
|
#define s390_sizeof_gregset 0x90
|
|
|
|
#define s390x_sizeof_gregset 0xd8
|
2014-07-15 13:18:35 +02:00
|
|
|
extern const struct regset s390_gregset;
|
2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
Committed by Jim Blandy <jimb@redhat.com>.
* config/s390/nm-linux.h: Update comments. Do not include "solib.h".
(KERNEL_U_ADDR, REGISTER_U_ADDR, U_REGS_OFFSET): Remove.
(FETCH_INFERIOR_REGISTERS): Define.
* config/s390/s390.mh (NATDEPFILES): Remove core-aout.o and
core-regset.o.
* config/s390/s390x.mt: Remove.
* config/s390/tm-s390.h: Remove.
* config/s390/tm-linux.h: Do not include "s390/tm-s390.h".
(TARGET_ELF64): Remove.
(SKIP_TRAMPOLINE_CODE): Do not undefine.
* configure.tgt [s390-*-*, s390x-*-*]: Merge into single
s390*-*-* case; always set gdb_target to s390.
* regformats/reg-s390.dat: Remove control registers.
* regformats/reg-s390x.dat: Likewise.
* s390-tdep.h: New file.
* s390-nat.c: Do not include <asm/processor.h> or <value.h>.
Include "inferior.h" and "s390-tdep.h".
Remove private definition of offsetof.
(s390_register_u_addr): Remove.
(regmap_gregset, regmap_fpregset): Define.
(supply_gregset, fill_gregset): Reimplement.
(supply_fpregset, fill_fpregset): Likewise.
(s390_inferior_tid): New function.
(fetch_regs, store_regs, fetch_fpregs, store_fpregs): Likewise.
(fetch_inferior_registers, store_inferior_registers): Likewise.
* s390-tdep.c: Do not define S390_TDEP. Include "defs.h" instead
of <defs.h>. Include "reggroups.h", "regset.h", and "s390-tdep.h".
Global replace of S390_GP0_REGNUM by S390_R0_REGNUM.
Global replace of S390_FP0_REGNUM by S390_F0_REGNUM.
(struct gdbarch_tdep): Define.
(struct s390_register_info): Define.
(s390_register_info): New variable.
(s390_register_name): Reimplement.
(s390_register_type): New function.
(s390_register_raw_size, s390x_register_raw_size): Remove.
(s390_cannot_fetch_register): Remove.
(s390_register_byte): Remove.
(s390_register_virtual_type, s390x_register_virtual_type): Remove.
(s390_dwarf_regmap): New variable.
(s390_dwarf_reg_to_regnum): New function.
(s390_stab_reg_to_regnum): Remove.
(s390_pseudo_register_read, s390_pseudo_register_write): New functions.
(s390x_pseudo_register_read, s390x_pseudo_register_write): Likewise.
(s390_convert_register_p): Likewise.
(s390_register_to_value, s390_value_to_register): Likewise.
(s390_register_reggroup_p): Likewise.
(s390_regmap_gregset, s390x_regmap_gregset, s390_regmap_fpregset,
s390_gregset, s390x_gregset, s390_fpregset): New variables.
(s390_supply_regset, s390_regset_from_core_section): New functions.
(GDB_TARGET_IS_ESAME): Move here from tm-s390.h.
(S390_FPR_SIZE): Likewise.
(S390_GPR_SIZE): Likewise. Redefine in terms of GDB_TARGET_IS_ESAME.
Global replace of DEPRECATED_REGISTER_SIZE by S390_GPR_SIZE.
(S390_NUM_GPRS): Move here from tm-s390.h.
(S390_NUM_FPRS): Likewise.
(s390_in_function_epilogue_p): New function.
(s390_is_sigreturn): Replace S390_PSW_ADDR_SIZE by S390_GPR_SIZE.
Replace S390_PC_REGNUM by S390_PSWA_REGNUM.
(s390_gdbarch_init): Allocate and set up gdbarch_tdep structure.
Replace s390_stab_reg_to_regnum by s390_dwarf_reg_to_regnum.
Replace S390_FP_REGNUM by S390_SP_REGNUM.
Remove calls to:
set_gdbarch_deprecated_max_register_raw_size,
set_gdbarch_deprecated_max_register_virtual_size,
set_gdbarch_deprecated_register_byte,
set_gdbarch_cannot_fetch_register,
set_gdbarch_cannot_store_register,
set_gdbarch_deprecated_register_size,
set_gdbarch_deprecated_register_raw_size,
set_gdbarch_deprecated_register_virtual_size,
set_gdbarch_deprecated_register_virtual_type,
set_gdbarch_deprecated_register_bytes.
Add calls to:
set_gdbarch_num_pseudo_regs,
set_gdbarch_register_type,
set_gdbarch_convert_register_p,
set_gdbarch_register_to_value,
set_gdbarch_value_to_register,
set_gdbarch_register_reggroup_p,
set_gdbarch_regset_from_core_section,
set_gdbarch_pseudo_register_read,
set_gdbarch_pseudo_register_write,
set_gdbarch_in_function_epilogue_p.
* Makefile.in (s390-nat.o, s390-tdep.o): Update dependencies.
(s390_tdep_h): New variable.
2004-02-18 04:42:51 +01:00
|
|
|
#define s390_sizeof_fpregset 0x88
|
2014-07-15 13:18:35 +02:00
|
|
|
extern const struct regset s390_fpregset;
|
|
|
|
extern const struct regset s390_last_break_regset;
|
|
|
|
extern const struct regset s390x_last_break_regset;
|
|
|
|
extern const struct regset s390_system_call_regset;
|
|
|
|
extern const struct regset s390_tdb_regset;
|
2013-09-13 16:17:31 +02:00
|
|
|
#define s390_sizeof_tdbregset 0x100
|
S390: Add vector register support to gdb
Recognize S/390 targets with the new vector feature and present their
vector registers appropriately: as 32 new 128-bit wide registers
v0-v31, where the first 16 embed the floating point registers f0-f15.
Each of the full registers v0-v15 is modelled as a pseudo register.
gdb/ChangeLog:
* s390-linux-nat.c (have_regset_vxrs): New static variable.
(s390_linux_fetch_inferior_registers): Handle vector registers, if
present.
(s390_linux_store_inferior_registers): Likewise.
(s390_get_hwcap): Remove function. Embed its logic...
(s390_read_description): ...here. Yield a target description with
vector registers if applicable.
* s390-linux-tdep.c: Include "features/s390-vx-linux64.c",
"features/s390-tevx-linux64.c", "features/s390x-vx-linux64.c", and
"features/s390x-tevx-linux64.c".
(struct gdbarch_tdep) <v0_full_regnum>: New field.
(s390_dwarf_regmap): Add vector registers. Remove bogus entries
for "GNU/Linux-specific registers".
(s390_dwarf_reg_r0l): New enum value.
(s390_dwarf_reg_to_regnum): Support vector registers.
(s390_adjust_frame_regnum): Adjust pseudo DWARF register numbers
of GPR lower halves.
(regnum_is_vxr_full): New function.
(s390_register_name): New function.
(s390_pseudo_register_name): Handle v0-v15, which are composed of
f0-f15 and v0l-v15l.
(s390_pseudo_register_type): Likewise.
(s390_pseudo_register_read): Likewise.
(s390_pseudo_register_write): Likewise.
(s390_value_from_register): Account for the fact that values are
placed left-justified in vector registers.
(s390_pseudo_register_reggroup_p): Add pseudo registers v0-v15 to
the vector reggroup and omit them from the general reggroup.
(s390_regmap_vxrs_low, s390_regmap_vxrs_high): New register maps.
(s390_vxrs_low_regset, s390_vxrs_high_regset): New regsets.
(s390_iterate_over_regset_sections): Add iterations for the two
new vector regsets.
(s390_core_read_description): Yield a target description with
vector registers if applicable.
(s390_gdbarch_init): Handle target descriptions with vector
registers. Add "register_name" gdbarch method.
(_initialize_s390_tdep): Call new tdesc initialization functions.
* s390-linux-tdep.h (HWCAP_S390_VX): New macro.
(S390_V0_LOWER_REGNUM, S390_V1_LOWER_REGNUM, S390_V2_LOWER_REGNUM)
(S390_V3_LOWER_REGNUM, S390_V4_LOWER_REGNUM, S390_V5_LOWER_REGNUM)
(S390_V6_LOWER_REGNUM, S390_V7_LOWER_REGNUM, S390_V8_LOWER_REGNUM)
(S390_V9_LOWER_REGNUM, S390_V10_LOWER_REGNUM)
(S390_V11_LOWER_REGNUM, S390_V12_LOWER_REGNUM)
(S390_V13_LOWER_REGNUM, S390_V14_LOWER_REGNUM)
(S390_V15_LOWER_REGNUM, S390_V16_REGNUM, S390_V17_REGNUM)
(S390_V18_REGNUM, S390_V19_REGNUM, S390_V20_REGNUM)
(S390_V21_REGNUM, S390_V22_REGNUM, S390_V23_REGNUM)
(S390_V24_REGNUM, S390_V25_REGNUM, S390_V26_REGNUM)
(S390_V27_REGNUM, S390_V28_REGNUM, S390_V29_REGNUM)
(S390_V30_REGNUM, S390_V31_REGNUM): New macros.
(S390_NUM_REGS): Adjust value.
(s390_vxrs_low_regset, s390_vxrs_high_regset): Declare.
(tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
(tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): Likewise.
* NEWS: Announce S/390 vector register support.
2015-03-02 10:57:39 +01:00
|
|
|
extern const struct regset s390_vxrs_low_regset;
|
|
|
|
extern const struct regset s390_vxrs_high_regset;
|
2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
Committed by Jim Blandy <jimb@redhat.com>.
* config/s390/nm-linux.h: Update comments. Do not include "solib.h".
(KERNEL_U_ADDR, REGISTER_U_ADDR, U_REGS_OFFSET): Remove.
(FETCH_INFERIOR_REGISTERS): Define.
* config/s390/s390.mh (NATDEPFILES): Remove core-aout.o and
core-regset.o.
* config/s390/s390x.mt: Remove.
* config/s390/tm-s390.h: Remove.
* config/s390/tm-linux.h: Do not include "s390/tm-s390.h".
(TARGET_ELF64): Remove.
(SKIP_TRAMPOLINE_CODE): Do not undefine.
* configure.tgt [s390-*-*, s390x-*-*]: Merge into single
s390*-*-* case; always set gdb_target to s390.
* regformats/reg-s390.dat: Remove control registers.
* regformats/reg-s390x.dat: Likewise.
* s390-tdep.h: New file.
* s390-nat.c: Do not include <asm/processor.h> or <value.h>.
Include "inferior.h" and "s390-tdep.h".
Remove private definition of offsetof.
(s390_register_u_addr): Remove.
(regmap_gregset, regmap_fpregset): Define.
(supply_gregset, fill_gregset): Reimplement.
(supply_fpregset, fill_fpregset): Likewise.
(s390_inferior_tid): New function.
(fetch_regs, store_regs, fetch_fpregs, store_fpregs): Likewise.
(fetch_inferior_registers, store_inferior_registers): Likewise.
* s390-tdep.c: Do not define S390_TDEP. Include "defs.h" instead
of <defs.h>. Include "reggroups.h", "regset.h", and "s390-tdep.h".
Global replace of S390_GP0_REGNUM by S390_R0_REGNUM.
Global replace of S390_FP0_REGNUM by S390_F0_REGNUM.
(struct gdbarch_tdep): Define.
(struct s390_register_info): Define.
(s390_register_info): New variable.
(s390_register_name): Reimplement.
(s390_register_type): New function.
(s390_register_raw_size, s390x_register_raw_size): Remove.
(s390_cannot_fetch_register): Remove.
(s390_register_byte): Remove.
(s390_register_virtual_type, s390x_register_virtual_type): Remove.
(s390_dwarf_regmap): New variable.
(s390_dwarf_reg_to_regnum): New function.
(s390_stab_reg_to_regnum): Remove.
(s390_pseudo_register_read, s390_pseudo_register_write): New functions.
(s390x_pseudo_register_read, s390x_pseudo_register_write): Likewise.
(s390_convert_register_p): Likewise.
(s390_register_to_value, s390_value_to_register): Likewise.
(s390_register_reggroup_p): Likewise.
(s390_regmap_gregset, s390x_regmap_gregset, s390_regmap_fpregset,
s390_gregset, s390x_gregset, s390_fpregset): New variables.
(s390_supply_regset, s390_regset_from_core_section): New functions.
(GDB_TARGET_IS_ESAME): Move here from tm-s390.h.
(S390_FPR_SIZE): Likewise.
(S390_GPR_SIZE): Likewise. Redefine in terms of GDB_TARGET_IS_ESAME.
Global replace of DEPRECATED_REGISTER_SIZE by S390_GPR_SIZE.
(S390_NUM_GPRS): Move here from tm-s390.h.
(S390_NUM_FPRS): Likewise.
(s390_in_function_epilogue_p): New function.
(s390_is_sigreturn): Replace S390_PSW_ADDR_SIZE by S390_GPR_SIZE.
Replace S390_PC_REGNUM by S390_PSWA_REGNUM.
(s390_gdbarch_init): Allocate and set up gdbarch_tdep structure.
Replace s390_stab_reg_to_regnum by s390_dwarf_reg_to_regnum.
Replace S390_FP_REGNUM by S390_SP_REGNUM.
Remove calls to:
set_gdbarch_deprecated_max_register_raw_size,
set_gdbarch_deprecated_max_register_virtual_size,
set_gdbarch_deprecated_register_byte,
set_gdbarch_cannot_fetch_register,
set_gdbarch_cannot_store_register,
set_gdbarch_deprecated_register_size,
set_gdbarch_deprecated_register_raw_size,
set_gdbarch_deprecated_register_virtual_size,
set_gdbarch_deprecated_register_virtual_type,
set_gdbarch_deprecated_register_bytes.
Add calls to:
set_gdbarch_num_pseudo_regs,
set_gdbarch_register_type,
set_gdbarch_convert_register_p,
set_gdbarch_register_to_value,
set_gdbarch_value_to_register,
set_gdbarch_register_reggroup_p,
set_gdbarch_regset_from_core_section,
set_gdbarch_pseudo_register_read,
set_gdbarch_pseudo_register_write,
set_gdbarch_in_function_epilogue_p.
* Makefile.in (s390-nat.o, s390-tdep.o): Update dependencies.
(s390_tdep_h): New variable.
2004-02-18 04:42:51 +01:00
|
|
|
|
2011-12-07 14:31:05 +01:00
|
|
|
/* GNU/Linux target descriptions. */
|
* features/Makefile (WHICH): Add s390-linux32, s390-linux64,
and s390x-linux64.
(s390-linux32-expedite): Define.
(s390-linux64-expedite): Define.
(s390x-linux64-expedite): Define.
* features/s390-acr.xml: New file.
* features/s390-fpr.xml: New file.
* features/s390-core32.xml: New file.
* features/s390-core64.xml: New file.
* features/s390x-core64.xml: New file.
* features/s390-linux32.xml: New file.
* features/s390-linux64.xml: New file.
* features/s390x-linux64.xml: New file.
* features/s390-linux32.c: New generated file.
* features/s390-linux64.c: New generated file.
* features/s390x-linux64.c: New generated file.
* regformats/s390-linux32.dat: New generated file.
* regformats/s390-linux64.dat: New generated file.
* regformats/s390x-linux64.dat: New generated file.
* regformats/reg-s390.dat: Remove.
* regformats/reg-s390x.dat: Remove.
* s390-nat.c: Include "auxv.h" and <elf.h>.
(HWCAP_S390_HIGH_GPRS): Define if undefined.
(s390_target_wordsize): New function.
(s390_auxv_parse): Likewise.
(s390_get_hwcap): Likewise.
(s390_read_description): Likewise.
(_initialize_s390_nat): Install s390_auxv_parse and
s390_read_description.
* s390-tdep.c: Include "features/s390-linux32.c",
"features/s390-linux64.c", and "features/s390x-linux64.c".
(struct gdbarch_tdep): Add gpr_full_regnum, pc_regnum, and cc_regnum.
(s390_register_call_saved): New function.
(s390_register_name): Remove.
(s390_register_type): Remove.
(s390_dwarf_regmap): Add lower half GPR pseudo DWARF CFI regnums.
(s390_dwarf_reg_to_regnum): Remap GPR regnums to full GPRs.
(s390_adjust_frame_regnum): Remap GPR regnums to lower halves for CFI.
(s390_pseudo_register_name): New function.
(s390_pseudo_register_type): New function.
(s390_pseudo_register_read): Handle both 32-bit and 64-bit cases.
Handle full GPR pesudos and varying pseudo register numbers.
(s390_pseudo_register_write): Likewise
(s390x_pseudo_register_read): Remove.
(s390x_pseudo_register_write): Likewise.
(s390_register_group): Remove.
(s390_pseudo_register_group): New function.
(s390_regmap_gregset): Add GPR upper halves.
(s390x_regmap_gregset): Likewise.
(s390_regmap_fpregset): Likewise.
(s390_regmap_upper): New global variable.
(s390_upper_regset): New global variable.
(s390_upper_regset_sections): New global variable.
(s390_regset_from_core_section): Handle GPR upper halves.
(s390_core_read_description): New function.
(s390_prologue_frame_unwind_cache): Set up ABI call-saved/clobbered
register information. Handle varying pseudo register numbers.
(s390_backchain_frame_unwind_cache): Likewise.
(s390_frame_prev_register): Unwind full GPRs to show lower halves.
(s390_stub_frame_unwind_cache): Handle varying pseudo register numbers.
(s390_sigtramp_frame_unwind_cache): Unwind PSWM and PSWA as well as
PC and CC pseudos. Unwind upper halves and full GPRs as appropriate.
Handle varying pseudo register numbers.
(s390_unwind_pc): Handle varying pseudo register numbers.
(s390_dwarf2_prev_register): New function.
(s390_dwarf2_frame_init_reg): Set up ABI call-saved/clobbered
register information. Handle varying pseudo register numbers.
Install s390_dwarf2_prev_register to unwind full GPRs.
(s390_gdbarch_init): Handle target descriptions. Assign varying
pseudo register numbers. Install s390_adjust_frame_regnum.
(_initialize_s390_tdep): Initialize target descriptions.
* s390-tdep.h (S390_R0_UPPER_REGNUM .. S390_R15_UPPER_REGNUM): Define.
(S390_NUM_REGS): Redefine to include upper half registers.
(S390_PC_REGNUM, S390_CC_REGNUM): Remove.
(S390_NUM_PSEUDO_REGS, S390_NUM_TOTAL_REGS): Likewise.
(tdesc_s390_linux32): Add declaration.
(tdesc_s390_linux64): Likewise.
(tdesc_s390x_linux64): Likewise.
gdb/testsuite/
* gdb.xml/tdesc-regs.exp: Support s390*-*-* targets.
gdbserver/
* Makefile.in (clean): Remove new generated files.
(reg-s390.o, reg-s390.c): Remove rules.
(reg-s390x.o, reg-s390x.c): Likewise.
(s390-linux32.o, s390-linux32.c): Add rules.
(s390-linux64.o, s390-linux64.c): Likewise.
(s390x-linux64.o, s390x-linux64.c): Likewise.
* configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
* linux-s390-low.c: Include <elf.h>.
(HWCAP_S390_HIGH_GPRS): Define if undefined.
(init_registers_s390): Remove prototype.
(init_registers_s390x): Likewise.
(init_registers_s390_linux32): Add prototype.
(init_registers_s390_linux64): Likewise.
(init_registers_s390x_linux64): Likewise.
(s390_num_regs_3264): New define.
(s390_regmap_3264): New global variable.
(s390_cannot_fetch_register): Remove obsolete check.
(s390_cannot_store_register): Likewise.
(s390_collect_ptrace_register): Handle upper/lower register halves.
(s390_supply_ptrace_register): Likewise.
(s390_fill_gregset): Update to register number changes.
(s390_get_hwcap): New routine.
(s390_arch_setup): Detect 32-bit process running on 64-bit system.
Install appropriate regmap and register set.
2010-01-04 16:03:01 +01:00
|
|
|
extern struct target_desc *tdesc_s390_linux32;
|
ChangeLog:
* s390-tdep.h (S390_ORIG_R2_REGNUM): Define.
(S390_LAST_BREAK_REGNUM): Likewise.
(S390_SYSTEM_CALL_REGNUM): Likewise.
(S390_NUM_REGS): Update.
(s390_regmap_last_break): Add declaration.
(s390x_regmap_last_break): Likewise.
(s390_regmap_system_call): Likewise.
(tdesc_s390_linux32v1): Add declaration.
(tdesc_s390_linux32v2): Likewise.
(tdesc_s390_linux64v1): Likewise.
(tdesc_s390_linux64v2): Likewise.
(tdesc_s390x_linux64v1): Likewise.
(tdesc_s390x_linux64v2): Likewise.
* s390-tdep.c: Include new target description files
"features/s390-linux32v1.c", "features/s390-linux32v2.c",
"features/s390-linux64v1.c", "features/s390-linux64v2.c",
"features/s390x-linux64v1.c", and "features/s390x-linux64v2.c".
(s390_cannot_store_register): New function.
(s390_write_pc): Likewise.
(s390_dwarf_regmap): Add fields for new registers.
(s390_regmap_gregset): Likewise.
(s390x_regmap_gregset): Likewise.
(s390_regmap_fpregset): Likewise.
(s390_regmap_upper): Likewise.
(s390_regmap_last_break): New variable.
(s390x_regmap_last_break): Likewise.
(s390_regmap_system_call): Likewise.
(s390_last_break_regset): Likewise.
(s390x_last_break_regset): Likewise.
(s390_system_call_regset): Likewise.
(s390_upper_regset_sections): Rename to ...
(s390_linux64_regset_sections): ... this.
(s390_linux32_regset_sections): New variable.
(s390x_linux64_regset_sections): Likewise.
(s390_linux32v1_regset_sections): Likewise.
(s390_linux32v2_regset_sections): Likewise.
(s390_linux64v1_regset_sections): Likewise.
(s390_linux64v2_regset_sections): Likewise.
(s390x_linux64v1_regset_sections): Likewise.
(s390x_linux64v2_regset_sections): Likewise.
(s390_regset_from_core_section): Handle .reg-s390-last-break and
.reg-s390-system-call core file sections.
(s390_core_read_description): Check for presence of
.reg-s390-last-break and .reg-s390-system-call core file
sections and return appropriate target description.
(s390_gdbarch_init): Detect Linux-specific registers "orig_r2",
"last_break" and "system_call" in target description. Install
appropriate gdbarch_core_regset_sections array.
Call set_gdbarch_cannot_store_register and set_gdbarch_write_pc.
(_initialize_s390_tdep): Initialize additional target descriptions.
* s390-nat.c: Include "elf/common.h".
(PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
(have_regset_last_break): New static variable.
(have_regset_system_call): Likewise.
(s390_native_supply): Handle S390_ORIG_R2_REGNUM.
(s390_native_collect): Likewise.
(fetch_regset, store_regset, check_regset): New functions.
(s390_linux_fetch_inferior_registers): Handle S390_LAST_BREAK_REGNUM
and S390_SYSTEM_CALL_REGNUM.
(s390_linux_store_inferior_registers): Likewise.
(s390_read_description): Check for presence of NT_S390_LAST_BREAK
and NT_S390_SYSTEM_CALL regsets and use appropriate description.
* features/Makefile (WHICH): Add s390-linux32v1, s390-linux64v1,
s390x-linux64v1, s390-linux32v2, s390-linux64v2, and s390x-linux64v2.
(s390-linux32v1-expedite): Define.
(s390-linux32v2-expedite): Likewise.
(s390-linux64v1-expedite): Likewise.
(s390-linux64v2-expedite): Likewise.
(s390x-linux64v1-expedite): Likewise.
(s390x-linux64v2-expedite): Likewise.
* features/s390-linux32.xml: Add orig_r2 register.
* features/s390-linux64.xml: Likewise.
* features/s390x-linux64.xml: Likewise.
* features/s390-linux32v1.xml: New file.
* features/s390-linux32v2.xml: Likewise.
* features/s390-linux64v1.xml: Likewise.
* features/s390-linux64v2.xml: Likewise.
* features/s390x-linux64v1.xml: Likewise.
* features/s390x-linux64v2.xml: Likewise.
* features/s390-linux32.c: Regenerate.
* features/s390-linux64.c: Likewise.
* features/s390x-linux64.c: Likewise.
* features/s390-linux32v1.c: New generated file.
* features/s390-linux32v2.c: Likewise.
* features/s390-linux64v1.c: Likewise.
* features/s390-linux64v2.c: Likewise.
* features/s390x-linux64v1.c: Likewise.
* features/s390x-linux64v2.c: Likewise.
* regformats/s390-linux32.dat: Regenerate.
* regformats/s390-linux64.dat: Regenerate.
* regformats/s390x-linux64.dat: Regenerate.
* regformats/s390-linux32v1.dat: New generated file.
* regformats/s390-linux32v2.dat: Likewise.
* regformats/s390-linux64v1.dat: Likewise.
* regformats/s390-linux64v2.dat: Likewise.
* regformats/s390x-linux64v1.dat: Likewise.
* regformats/s390x-linux64v2.dat: Likewise.
gdbserver/ChangeLog:
* Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
(s390-linux32v2.o, s390-linux32v2.c): Likewise.
(s390-linux64v1.o, s390-linux64v1.c): Likewise.
(s390-linux64v2.o, s390-linux64v2.c): Likewise.
(s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
(s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
* configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
(srv_xmlfiles): Add new XML files.
* linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
and <sys/uio.h>.
(PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
(init_registers_s390_linux32v1): Add prototype.
(init_registers_s390_linux32v2): Likewise.
(init_registers_s390_linux64v1): Likewise.
(init_registers_s390_linux64v2): Likewise.
(init_registers_s390x_linux64v1): Likewise.
(init_registers_s390x_linux64v2): Likewise.
(s390_num_regs): Increment to 52.
(s390_regmap): Add orig_r2 register.
(s390_num_regs_3264): Increment to 68.
(s390_regmap_3264): Add orig_r2 register.
(s390_collect_ptrace_register): Handle orig_r2 register.
(s390_supply_ptrace_register): Likewise.
(s390_fill_last_break): New function.
(s390_store_last_break): Likewise.
(s390_fill_system_call): New function.
(s390_store_system_call): Likewise.
(target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
register sets.
(s390_check_regset): New function.
(s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
NT_S390_SYSTEM_CALL regsets and use appropriate description.
Update target_regsets for available register sets.
testsuite/ChangeLog:
* gdb.base/callfuncs.exp (fetch_all_registers): Filter out read-only
last_break register on s390*-*-* targets.
2011-12-06 15:14:50 +01:00
|
|
|
extern struct target_desc *tdesc_s390_linux32v1;
|
|
|
|
extern struct target_desc *tdesc_s390_linux32v2;
|
* features/Makefile (WHICH): Add s390-linux32, s390-linux64,
and s390x-linux64.
(s390-linux32-expedite): Define.
(s390-linux64-expedite): Define.
(s390x-linux64-expedite): Define.
* features/s390-acr.xml: New file.
* features/s390-fpr.xml: New file.
* features/s390-core32.xml: New file.
* features/s390-core64.xml: New file.
* features/s390x-core64.xml: New file.
* features/s390-linux32.xml: New file.
* features/s390-linux64.xml: New file.
* features/s390x-linux64.xml: New file.
* features/s390-linux32.c: New generated file.
* features/s390-linux64.c: New generated file.
* features/s390x-linux64.c: New generated file.
* regformats/s390-linux32.dat: New generated file.
* regformats/s390-linux64.dat: New generated file.
* regformats/s390x-linux64.dat: New generated file.
* regformats/reg-s390.dat: Remove.
* regformats/reg-s390x.dat: Remove.
* s390-nat.c: Include "auxv.h" and <elf.h>.
(HWCAP_S390_HIGH_GPRS): Define if undefined.
(s390_target_wordsize): New function.
(s390_auxv_parse): Likewise.
(s390_get_hwcap): Likewise.
(s390_read_description): Likewise.
(_initialize_s390_nat): Install s390_auxv_parse and
s390_read_description.
* s390-tdep.c: Include "features/s390-linux32.c",
"features/s390-linux64.c", and "features/s390x-linux64.c".
(struct gdbarch_tdep): Add gpr_full_regnum, pc_regnum, and cc_regnum.
(s390_register_call_saved): New function.
(s390_register_name): Remove.
(s390_register_type): Remove.
(s390_dwarf_regmap): Add lower half GPR pseudo DWARF CFI regnums.
(s390_dwarf_reg_to_regnum): Remap GPR regnums to full GPRs.
(s390_adjust_frame_regnum): Remap GPR regnums to lower halves for CFI.
(s390_pseudo_register_name): New function.
(s390_pseudo_register_type): New function.
(s390_pseudo_register_read): Handle both 32-bit and 64-bit cases.
Handle full GPR pesudos and varying pseudo register numbers.
(s390_pseudo_register_write): Likewise
(s390x_pseudo_register_read): Remove.
(s390x_pseudo_register_write): Likewise.
(s390_register_group): Remove.
(s390_pseudo_register_group): New function.
(s390_regmap_gregset): Add GPR upper halves.
(s390x_regmap_gregset): Likewise.
(s390_regmap_fpregset): Likewise.
(s390_regmap_upper): New global variable.
(s390_upper_regset): New global variable.
(s390_upper_regset_sections): New global variable.
(s390_regset_from_core_section): Handle GPR upper halves.
(s390_core_read_description): New function.
(s390_prologue_frame_unwind_cache): Set up ABI call-saved/clobbered
register information. Handle varying pseudo register numbers.
(s390_backchain_frame_unwind_cache): Likewise.
(s390_frame_prev_register): Unwind full GPRs to show lower halves.
(s390_stub_frame_unwind_cache): Handle varying pseudo register numbers.
(s390_sigtramp_frame_unwind_cache): Unwind PSWM and PSWA as well as
PC and CC pseudos. Unwind upper halves and full GPRs as appropriate.
Handle varying pseudo register numbers.
(s390_unwind_pc): Handle varying pseudo register numbers.
(s390_dwarf2_prev_register): New function.
(s390_dwarf2_frame_init_reg): Set up ABI call-saved/clobbered
register information. Handle varying pseudo register numbers.
Install s390_dwarf2_prev_register to unwind full GPRs.
(s390_gdbarch_init): Handle target descriptions. Assign varying
pseudo register numbers. Install s390_adjust_frame_regnum.
(_initialize_s390_tdep): Initialize target descriptions.
* s390-tdep.h (S390_R0_UPPER_REGNUM .. S390_R15_UPPER_REGNUM): Define.
(S390_NUM_REGS): Redefine to include upper half registers.
(S390_PC_REGNUM, S390_CC_REGNUM): Remove.
(S390_NUM_PSEUDO_REGS, S390_NUM_TOTAL_REGS): Likewise.
(tdesc_s390_linux32): Add declaration.
(tdesc_s390_linux64): Likewise.
(tdesc_s390x_linux64): Likewise.
gdb/testsuite/
* gdb.xml/tdesc-regs.exp: Support s390*-*-* targets.
gdbserver/
* Makefile.in (clean): Remove new generated files.
(reg-s390.o, reg-s390.c): Remove rules.
(reg-s390x.o, reg-s390x.c): Likewise.
(s390-linux32.o, s390-linux32.c): Add rules.
(s390-linux64.o, s390-linux64.c): Likewise.
(s390x-linux64.o, s390x-linux64.c): Likewise.
* configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
* linux-s390-low.c: Include <elf.h>.
(HWCAP_S390_HIGH_GPRS): Define if undefined.
(init_registers_s390): Remove prototype.
(init_registers_s390x): Likewise.
(init_registers_s390_linux32): Add prototype.
(init_registers_s390_linux64): Likewise.
(init_registers_s390x_linux64): Likewise.
(s390_num_regs_3264): New define.
(s390_regmap_3264): New global variable.
(s390_cannot_fetch_register): Remove obsolete check.
(s390_cannot_store_register): Likewise.
(s390_collect_ptrace_register): Handle upper/lower register halves.
(s390_supply_ptrace_register): Likewise.
(s390_fill_gregset): Update to register number changes.
(s390_get_hwcap): New routine.
(s390_arch_setup): Detect 32-bit process running on 64-bit system.
Install appropriate regmap and register set.
2010-01-04 16:03:01 +01:00
|
|
|
extern struct target_desc *tdesc_s390_linux64;
|
ChangeLog:
* s390-tdep.h (S390_ORIG_R2_REGNUM): Define.
(S390_LAST_BREAK_REGNUM): Likewise.
(S390_SYSTEM_CALL_REGNUM): Likewise.
(S390_NUM_REGS): Update.
(s390_regmap_last_break): Add declaration.
(s390x_regmap_last_break): Likewise.
(s390_regmap_system_call): Likewise.
(tdesc_s390_linux32v1): Add declaration.
(tdesc_s390_linux32v2): Likewise.
(tdesc_s390_linux64v1): Likewise.
(tdesc_s390_linux64v2): Likewise.
(tdesc_s390x_linux64v1): Likewise.
(tdesc_s390x_linux64v2): Likewise.
* s390-tdep.c: Include new target description files
"features/s390-linux32v1.c", "features/s390-linux32v2.c",
"features/s390-linux64v1.c", "features/s390-linux64v2.c",
"features/s390x-linux64v1.c", and "features/s390x-linux64v2.c".
(s390_cannot_store_register): New function.
(s390_write_pc): Likewise.
(s390_dwarf_regmap): Add fields for new registers.
(s390_regmap_gregset): Likewise.
(s390x_regmap_gregset): Likewise.
(s390_regmap_fpregset): Likewise.
(s390_regmap_upper): Likewise.
(s390_regmap_last_break): New variable.
(s390x_regmap_last_break): Likewise.
(s390_regmap_system_call): Likewise.
(s390_last_break_regset): Likewise.
(s390x_last_break_regset): Likewise.
(s390_system_call_regset): Likewise.
(s390_upper_regset_sections): Rename to ...
(s390_linux64_regset_sections): ... this.
(s390_linux32_regset_sections): New variable.
(s390x_linux64_regset_sections): Likewise.
(s390_linux32v1_regset_sections): Likewise.
(s390_linux32v2_regset_sections): Likewise.
(s390_linux64v1_regset_sections): Likewise.
(s390_linux64v2_regset_sections): Likewise.
(s390x_linux64v1_regset_sections): Likewise.
(s390x_linux64v2_regset_sections): Likewise.
(s390_regset_from_core_section): Handle .reg-s390-last-break and
.reg-s390-system-call core file sections.
(s390_core_read_description): Check for presence of
.reg-s390-last-break and .reg-s390-system-call core file
sections and return appropriate target description.
(s390_gdbarch_init): Detect Linux-specific registers "orig_r2",
"last_break" and "system_call" in target description. Install
appropriate gdbarch_core_regset_sections array.
Call set_gdbarch_cannot_store_register and set_gdbarch_write_pc.
(_initialize_s390_tdep): Initialize additional target descriptions.
* s390-nat.c: Include "elf/common.h".
(PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
(have_regset_last_break): New static variable.
(have_regset_system_call): Likewise.
(s390_native_supply): Handle S390_ORIG_R2_REGNUM.
(s390_native_collect): Likewise.
(fetch_regset, store_regset, check_regset): New functions.
(s390_linux_fetch_inferior_registers): Handle S390_LAST_BREAK_REGNUM
and S390_SYSTEM_CALL_REGNUM.
(s390_linux_store_inferior_registers): Likewise.
(s390_read_description): Check for presence of NT_S390_LAST_BREAK
and NT_S390_SYSTEM_CALL regsets and use appropriate description.
* features/Makefile (WHICH): Add s390-linux32v1, s390-linux64v1,
s390x-linux64v1, s390-linux32v2, s390-linux64v2, and s390x-linux64v2.
(s390-linux32v1-expedite): Define.
(s390-linux32v2-expedite): Likewise.
(s390-linux64v1-expedite): Likewise.
(s390-linux64v2-expedite): Likewise.
(s390x-linux64v1-expedite): Likewise.
(s390x-linux64v2-expedite): Likewise.
* features/s390-linux32.xml: Add orig_r2 register.
* features/s390-linux64.xml: Likewise.
* features/s390x-linux64.xml: Likewise.
* features/s390-linux32v1.xml: New file.
* features/s390-linux32v2.xml: Likewise.
* features/s390-linux64v1.xml: Likewise.
* features/s390-linux64v2.xml: Likewise.
* features/s390x-linux64v1.xml: Likewise.
* features/s390x-linux64v2.xml: Likewise.
* features/s390-linux32.c: Regenerate.
* features/s390-linux64.c: Likewise.
* features/s390x-linux64.c: Likewise.
* features/s390-linux32v1.c: New generated file.
* features/s390-linux32v2.c: Likewise.
* features/s390-linux64v1.c: Likewise.
* features/s390-linux64v2.c: Likewise.
* features/s390x-linux64v1.c: Likewise.
* features/s390x-linux64v2.c: Likewise.
* regformats/s390-linux32.dat: Regenerate.
* regformats/s390-linux64.dat: Regenerate.
* regformats/s390x-linux64.dat: Regenerate.
* regformats/s390-linux32v1.dat: New generated file.
* regformats/s390-linux32v2.dat: Likewise.
* regformats/s390-linux64v1.dat: Likewise.
* regformats/s390-linux64v2.dat: Likewise.
* regformats/s390x-linux64v1.dat: Likewise.
* regformats/s390x-linux64v2.dat: Likewise.
gdbserver/ChangeLog:
* Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
(s390-linux32v2.o, s390-linux32v2.c): Likewise.
(s390-linux64v1.o, s390-linux64v1.c): Likewise.
(s390-linux64v2.o, s390-linux64v2.c): Likewise.
(s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
(s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
* configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
(srv_xmlfiles): Add new XML files.
* linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
and <sys/uio.h>.
(PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
(init_registers_s390_linux32v1): Add prototype.
(init_registers_s390_linux32v2): Likewise.
(init_registers_s390_linux64v1): Likewise.
(init_registers_s390_linux64v2): Likewise.
(init_registers_s390x_linux64v1): Likewise.
(init_registers_s390x_linux64v2): Likewise.
(s390_num_regs): Increment to 52.
(s390_regmap): Add orig_r2 register.
(s390_num_regs_3264): Increment to 68.
(s390_regmap_3264): Add orig_r2 register.
(s390_collect_ptrace_register): Handle orig_r2 register.
(s390_supply_ptrace_register): Likewise.
(s390_fill_last_break): New function.
(s390_store_last_break): Likewise.
(s390_fill_system_call): New function.
(s390_store_system_call): Likewise.
(target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
register sets.
(s390_check_regset): New function.
(s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
NT_S390_SYSTEM_CALL regsets and use appropriate description.
Update target_regsets for available register sets.
testsuite/ChangeLog:
* gdb.base/callfuncs.exp (fetch_all_registers): Filter out read-only
last_break register on s390*-*-* targets.
2011-12-06 15:14:50 +01:00
|
|
|
extern struct target_desc *tdesc_s390_linux64v1;
|
|
|
|
extern struct target_desc *tdesc_s390_linux64v2;
|
2013-09-13 16:17:31 +02:00
|
|
|
extern struct target_desc *tdesc_s390_te_linux64;
|
S390: Add vector register support to gdb
Recognize S/390 targets with the new vector feature and present their
vector registers appropriately: as 32 new 128-bit wide registers
v0-v31, where the first 16 embed the floating point registers f0-f15.
Each of the full registers v0-v15 is modelled as a pseudo register.
gdb/ChangeLog:
* s390-linux-nat.c (have_regset_vxrs): New static variable.
(s390_linux_fetch_inferior_registers): Handle vector registers, if
present.
(s390_linux_store_inferior_registers): Likewise.
(s390_get_hwcap): Remove function. Embed its logic...
(s390_read_description): ...here. Yield a target description with
vector registers if applicable.
* s390-linux-tdep.c: Include "features/s390-vx-linux64.c",
"features/s390-tevx-linux64.c", "features/s390x-vx-linux64.c", and
"features/s390x-tevx-linux64.c".
(struct gdbarch_tdep) <v0_full_regnum>: New field.
(s390_dwarf_regmap): Add vector registers. Remove bogus entries
for "GNU/Linux-specific registers".
(s390_dwarf_reg_r0l): New enum value.
(s390_dwarf_reg_to_regnum): Support vector registers.
(s390_adjust_frame_regnum): Adjust pseudo DWARF register numbers
of GPR lower halves.
(regnum_is_vxr_full): New function.
(s390_register_name): New function.
(s390_pseudo_register_name): Handle v0-v15, which are composed of
f0-f15 and v0l-v15l.
(s390_pseudo_register_type): Likewise.
(s390_pseudo_register_read): Likewise.
(s390_pseudo_register_write): Likewise.
(s390_value_from_register): Account for the fact that values are
placed left-justified in vector registers.
(s390_pseudo_register_reggroup_p): Add pseudo registers v0-v15 to
the vector reggroup and omit them from the general reggroup.
(s390_regmap_vxrs_low, s390_regmap_vxrs_high): New register maps.
(s390_vxrs_low_regset, s390_vxrs_high_regset): New regsets.
(s390_iterate_over_regset_sections): Add iterations for the two
new vector regsets.
(s390_core_read_description): Yield a target description with
vector registers if applicable.
(s390_gdbarch_init): Handle target descriptions with vector
registers. Add "register_name" gdbarch method.
(_initialize_s390_tdep): Call new tdesc initialization functions.
* s390-linux-tdep.h (HWCAP_S390_VX): New macro.
(S390_V0_LOWER_REGNUM, S390_V1_LOWER_REGNUM, S390_V2_LOWER_REGNUM)
(S390_V3_LOWER_REGNUM, S390_V4_LOWER_REGNUM, S390_V5_LOWER_REGNUM)
(S390_V6_LOWER_REGNUM, S390_V7_LOWER_REGNUM, S390_V8_LOWER_REGNUM)
(S390_V9_LOWER_REGNUM, S390_V10_LOWER_REGNUM)
(S390_V11_LOWER_REGNUM, S390_V12_LOWER_REGNUM)
(S390_V13_LOWER_REGNUM, S390_V14_LOWER_REGNUM)
(S390_V15_LOWER_REGNUM, S390_V16_REGNUM, S390_V17_REGNUM)
(S390_V18_REGNUM, S390_V19_REGNUM, S390_V20_REGNUM)
(S390_V21_REGNUM, S390_V22_REGNUM, S390_V23_REGNUM)
(S390_V24_REGNUM, S390_V25_REGNUM, S390_V26_REGNUM)
(S390_V27_REGNUM, S390_V28_REGNUM, S390_V29_REGNUM)
(S390_V30_REGNUM, S390_V31_REGNUM): New macros.
(S390_NUM_REGS): Adjust value.
(s390_vxrs_low_regset, s390_vxrs_high_regset): Declare.
(tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
(tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): Likewise.
* NEWS: Announce S/390 vector register support.
2015-03-02 10:57:39 +01:00
|
|
|
extern struct target_desc *tdesc_s390_vx_linux64;
|
|
|
|
extern struct target_desc *tdesc_s390_tevx_linux64;
|
* features/Makefile (WHICH): Add s390-linux32, s390-linux64,
and s390x-linux64.
(s390-linux32-expedite): Define.
(s390-linux64-expedite): Define.
(s390x-linux64-expedite): Define.
* features/s390-acr.xml: New file.
* features/s390-fpr.xml: New file.
* features/s390-core32.xml: New file.
* features/s390-core64.xml: New file.
* features/s390x-core64.xml: New file.
* features/s390-linux32.xml: New file.
* features/s390-linux64.xml: New file.
* features/s390x-linux64.xml: New file.
* features/s390-linux32.c: New generated file.
* features/s390-linux64.c: New generated file.
* features/s390x-linux64.c: New generated file.
* regformats/s390-linux32.dat: New generated file.
* regformats/s390-linux64.dat: New generated file.
* regformats/s390x-linux64.dat: New generated file.
* regformats/reg-s390.dat: Remove.
* regformats/reg-s390x.dat: Remove.
* s390-nat.c: Include "auxv.h" and <elf.h>.
(HWCAP_S390_HIGH_GPRS): Define if undefined.
(s390_target_wordsize): New function.
(s390_auxv_parse): Likewise.
(s390_get_hwcap): Likewise.
(s390_read_description): Likewise.
(_initialize_s390_nat): Install s390_auxv_parse and
s390_read_description.
* s390-tdep.c: Include "features/s390-linux32.c",
"features/s390-linux64.c", and "features/s390x-linux64.c".
(struct gdbarch_tdep): Add gpr_full_regnum, pc_regnum, and cc_regnum.
(s390_register_call_saved): New function.
(s390_register_name): Remove.
(s390_register_type): Remove.
(s390_dwarf_regmap): Add lower half GPR pseudo DWARF CFI regnums.
(s390_dwarf_reg_to_regnum): Remap GPR regnums to full GPRs.
(s390_adjust_frame_regnum): Remap GPR regnums to lower halves for CFI.
(s390_pseudo_register_name): New function.
(s390_pseudo_register_type): New function.
(s390_pseudo_register_read): Handle both 32-bit and 64-bit cases.
Handle full GPR pesudos and varying pseudo register numbers.
(s390_pseudo_register_write): Likewise
(s390x_pseudo_register_read): Remove.
(s390x_pseudo_register_write): Likewise.
(s390_register_group): Remove.
(s390_pseudo_register_group): New function.
(s390_regmap_gregset): Add GPR upper halves.
(s390x_regmap_gregset): Likewise.
(s390_regmap_fpregset): Likewise.
(s390_regmap_upper): New global variable.
(s390_upper_regset): New global variable.
(s390_upper_regset_sections): New global variable.
(s390_regset_from_core_section): Handle GPR upper halves.
(s390_core_read_description): New function.
(s390_prologue_frame_unwind_cache): Set up ABI call-saved/clobbered
register information. Handle varying pseudo register numbers.
(s390_backchain_frame_unwind_cache): Likewise.
(s390_frame_prev_register): Unwind full GPRs to show lower halves.
(s390_stub_frame_unwind_cache): Handle varying pseudo register numbers.
(s390_sigtramp_frame_unwind_cache): Unwind PSWM and PSWA as well as
PC and CC pseudos. Unwind upper halves and full GPRs as appropriate.
Handle varying pseudo register numbers.
(s390_unwind_pc): Handle varying pseudo register numbers.
(s390_dwarf2_prev_register): New function.
(s390_dwarf2_frame_init_reg): Set up ABI call-saved/clobbered
register information. Handle varying pseudo register numbers.
Install s390_dwarf2_prev_register to unwind full GPRs.
(s390_gdbarch_init): Handle target descriptions. Assign varying
pseudo register numbers. Install s390_adjust_frame_regnum.
(_initialize_s390_tdep): Initialize target descriptions.
* s390-tdep.h (S390_R0_UPPER_REGNUM .. S390_R15_UPPER_REGNUM): Define.
(S390_NUM_REGS): Redefine to include upper half registers.
(S390_PC_REGNUM, S390_CC_REGNUM): Remove.
(S390_NUM_PSEUDO_REGS, S390_NUM_TOTAL_REGS): Likewise.
(tdesc_s390_linux32): Add declaration.
(tdesc_s390_linux64): Likewise.
(tdesc_s390x_linux64): Likewise.
gdb/testsuite/
* gdb.xml/tdesc-regs.exp: Support s390*-*-* targets.
gdbserver/
* Makefile.in (clean): Remove new generated files.
(reg-s390.o, reg-s390.c): Remove rules.
(reg-s390x.o, reg-s390x.c): Likewise.
(s390-linux32.o, s390-linux32.c): Add rules.
(s390-linux64.o, s390-linux64.c): Likewise.
(s390x-linux64.o, s390x-linux64.c): Likewise.
* configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
* linux-s390-low.c: Include <elf.h>.
(HWCAP_S390_HIGH_GPRS): Define if undefined.
(init_registers_s390): Remove prototype.
(init_registers_s390x): Likewise.
(init_registers_s390_linux32): Add prototype.
(init_registers_s390_linux64): Likewise.
(init_registers_s390x_linux64): Likewise.
(s390_num_regs_3264): New define.
(s390_regmap_3264): New global variable.
(s390_cannot_fetch_register): Remove obsolete check.
(s390_cannot_store_register): Likewise.
(s390_collect_ptrace_register): Handle upper/lower register halves.
(s390_supply_ptrace_register): Likewise.
(s390_fill_gregset): Update to register number changes.
(s390_get_hwcap): New routine.
(s390_arch_setup): Detect 32-bit process running on 64-bit system.
Install appropriate regmap and register set.
2010-01-04 16:03:01 +01:00
|
|
|
extern struct target_desc *tdesc_s390x_linux64;
|
ChangeLog:
* s390-tdep.h (S390_ORIG_R2_REGNUM): Define.
(S390_LAST_BREAK_REGNUM): Likewise.
(S390_SYSTEM_CALL_REGNUM): Likewise.
(S390_NUM_REGS): Update.
(s390_regmap_last_break): Add declaration.
(s390x_regmap_last_break): Likewise.
(s390_regmap_system_call): Likewise.
(tdesc_s390_linux32v1): Add declaration.
(tdesc_s390_linux32v2): Likewise.
(tdesc_s390_linux64v1): Likewise.
(tdesc_s390_linux64v2): Likewise.
(tdesc_s390x_linux64v1): Likewise.
(tdesc_s390x_linux64v2): Likewise.
* s390-tdep.c: Include new target description files
"features/s390-linux32v1.c", "features/s390-linux32v2.c",
"features/s390-linux64v1.c", "features/s390-linux64v2.c",
"features/s390x-linux64v1.c", and "features/s390x-linux64v2.c".
(s390_cannot_store_register): New function.
(s390_write_pc): Likewise.
(s390_dwarf_regmap): Add fields for new registers.
(s390_regmap_gregset): Likewise.
(s390x_regmap_gregset): Likewise.
(s390_regmap_fpregset): Likewise.
(s390_regmap_upper): Likewise.
(s390_regmap_last_break): New variable.
(s390x_regmap_last_break): Likewise.
(s390_regmap_system_call): Likewise.
(s390_last_break_regset): Likewise.
(s390x_last_break_regset): Likewise.
(s390_system_call_regset): Likewise.
(s390_upper_regset_sections): Rename to ...
(s390_linux64_regset_sections): ... this.
(s390_linux32_regset_sections): New variable.
(s390x_linux64_regset_sections): Likewise.
(s390_linux32v1_regset_sections): Likewise.
(s390_linux32v2_regset_sections): Likewise.
(s390_linux64v1_regset_sections): Likewise.
(s390_linux64v2_regset_sections): Likewise.
(s390x_linux64v1_regset_sections): Likewise.
(s390x_linux64v2_regset_sections): Likewise.
(s390_regset_from_core_section): Handle .reg-s390-last-break and
.reg-s390-system-call core file sections.
(s390_core_read_description): Check for presence of
.reg-s390-last-break and .reg-s390-system-call core file
sections and return appropriate target description.
(s390_gdbarch_init): Detect Linux-specific registers "orig_r2",
"last_break" and "system_call" in target description. Install
appropriate gdbarch_core_regset_sections array.
Call set_gdbarch_cannot_store_register and set_gdbarch_write_pc.
(_initialize_s390_tdep): Initialize additional target descriptions.
* s390-nat.c: Include "elf/common.h".
(PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
(have_regset_last_break): New static variable.
(have_regset_system_call): Likewise.
(s390_native_supply): Handle S390_ORIG_R2_REGNUM.
(s390_native_collect): Likewise.
(fetch_regset, store_regset, check_regset): New functions.
(s390_linux_fetch_inferior_registers): Handle S390_LAST_BREAK_REGNUM
and S390_SYSTEM_CALL_REGNUM.
(s390_linux_store_inferior_registers): Likewise.
(s390_read_description): Check for presence of NT_S390_LAST_BREAK
and NT_S390_SYSTEM_CALL regsets and use appropriate description.
* features/Makefile (WHICH): Add s390-linux32v1, s390-linux64v1,
s390x-linux64v1, s390-linux32v2, s390-linux64v2, and s390x-linux64v2.
(s390-linux32v1-expedite): Define.
(s390-linux32v2-expedite): Likewise.
(s390-linux64v1-expedite): Likewise.
(s390-linux64v2-expedite): Likewise.
(s390x-linux64v1-expedite): Likewise.
(s390x-linux64v2-expedite): Likewise.
* features/s390-linux32.xml: Add orig_r2 register.
* features/s390-linux64.xml: Likewise.
* features/s390x-linux64.xml: Likewise.
* features/s390-linux32v1.xml: New file.
* features/s390-linux32v2.xml: Likewise.
* features/s390-linux64v1.xml: Likewise.
* features/s390-linux64v2.xml: Likewise.
* features/s390x-linux64v1.xml: Likewise.
* features/s390x-linux64v2.xml: Likewise.
* features/s390-linux32.c: Regenerate.
* features/s390-linux64.c: Likewise.
* features/s390x-linux64.c: Likewise.
* features/s390-linux32v1.c: New generated file.
* features/s390-linux32v2.c: Likewise.
* features/s390-linux64v1.c: Likewise.
* features/s390-linux64v2.c: Likewise.
* features/s390x-linux64v1.c: Likewise.
* features/s390x-linux64v2.c: Likewise.
* regformats/s390-linux32.dat: Regenerate.
* regformats/s390-linux64.dat: Regenerate.
* regformats/s390x-linux64.dat: Regenerate.
* regformats/s390-linux32v1.dat: New generated file.
* regformats/s390-linux32v2.dat: Likewise.
* regformats/s390-linux64v1.dat: Likewise.
* regformats/s390-linux64v2.dat: Likewise.
* regformats/s390x-linux64v1.dat: Likewise.
* regformats/s390x-linux64v2.dat: Likewise.
gdbserver/ChangeLog:
* Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
(s390-linux32v2.o, s390-linux32v2.c): Likewise.
(s390-linux64v1.o, s390-linux64v1.c): Likewise.
(s390-linux64v2.o, s390-linux64v2.c): Likewise.
(s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
(s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
* configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
(srv_xmlfiles): Add new XML files.
* linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
and <sys/uio.h>.
(PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
(init_registers_s390_linux32v1): Add prototype.
(init_registers_s390_linux32v2): Likewise.
(init_registers_s390_linux64v1): Likewise.
(init_registers_s390_linux64v2): Likewise.
(init_registers_s390x_linux64v1): Likewise.
(init_registers_s390x_linux64v2): Likewise.
(s390_num_regs): Increment to 52.
(s390_regmap): Add orig_r2 register.
(s390_num_regs_3264): Increment to 68.
(s390_regmap_3264): Add orig_r2 register.
(s390_collect_ptrace_register): Handle orig_r2 register.
(s390_supply_ptrace_register): Likewise.
(s390_fill_last_break): New function.
(s390_store_last_break): Likewise.
(s390_fill_system_call): New function.
(s390_store_system_call): Likewise.
(target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
register sets.
(s390_check_regset): New function.
(s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
NT_S390_SYSTEM_CALL regsets and use appropriate description.
Update target_regsets for available register sets.
testsuite/ChangeLog:
* gdb.base/callfuncs.exp (fetch_all_registers): Filter out read-only
last_break register on s390*-*-* targets.
2011-12-06 15:14:50 +01:00
|
|
|
extern struct target_desc *tdesc_s390x_linux64v1;
|
|
|
|
extern struct target_desc *tdesc_s390x_linux64v2;
|
2013-09-13 16:17:31 +02:00
|
|
|
extern struct target_desc *tdesc_s390x_te_linux64;
|
S390: Add vector register support to gdb
Recognize S/390 targets with the new vector feature and present their
vector registers appropriately: as 32 new 128-bit wide registers
v0-v31, where the first 16 embed the floating point registers f0-f15.
Each of the full registers v0-v15 is modelled as a pseudo register.
gdb/ChangeLog:
* s390-linux-nat.c (have_regset_vxrs): New static variable.
(s390_linux_fetch_inferior_registers): Handle vector registers, if
present.
(s390_linux_store_inferior_registers): Likewise.
(s390_get_hwcap): Remove function. Embed its logic...
(s390_read_description): ...here. Yield a target description with
vector registers if applicable.
* s390-linux-tdep.c: Include "features/s390-vx-linux64.c",
"features/s390-tevx-linux64.c", "features/s390x-vx-linux64.c", and
"features/s390x-tevx-linux64.c".
(struct gdbarch_tdep) <v0_full_regnum>: New field.
(s390_dwarf_regmap): Add vector registers. Remove bogus entries
for "GNU/Linux-specific registers".
(s390_dwarf_reg_r0l): New enum value.
(s390_dwarf_reg_to_regnum): Support vector registers.
(s390_adjust_frame_regnum): Adjust pseudo DWARF register numbers
of GPR lower halves.
(regnum_is_vxr_full): New function.
(s390_register_name): New function.
(s390_pseudo_register_name): Handle v0-v15, which are composed of
f0-f15 and v0l-v15l.
(s390_pseudo_register_type): Likewise.
(s390_pseudo_register_read): Likewise.
(s390_pseudo_register_write): Likewise.
(s390_value_from_register): Account for the fact that values are
placed left-justified in vector registers.
(s390_pseudo_register_reggroup_p): Add pseudo registers v0-v15 to
the vector reggroup and omit them from the general reggroup.
(s390_regmap_vxrs_low, s390_regmap_vxrs_high): New register maps.
(s390_vxrs_low_regset, s390_vxrs_high_regset): New regsets.
(s390_iterate_over_regset_sections): Add iterations for the two
new vector regsets.
(s390_core_read_description): Yield a target description with
vector registers if applicable.
(s390_gdbarch_init): Handle target descriptions with vector
registers. Add "register_name" gdbarch method.
(_initialize_s390_tdep): Call new tdesc initialization functions.
* s390-linux-tdep.h (HWCAP_S390_VX): New macro.
(S390_V0_LOWER_REGNUM, S390_V1_LOWER_REGNUM, S390_V2_LOWER_REGNUM)
(S390_V3_LOWER_REGNUM, S390_V4_LOWER_REGNUM, S390_V5_LOWER_REGNUM)
(S390_V6_LOWER_REGNUM, S390_V7_LOWER_REGNUM, S390_V8_LOWER_REGNUM)
(S390_V9_LOWER_REGNUM, S390_V10_LOWER_REGNUM)
(S390_V11_LOWER_REGNUM, S390_V12_LOWER_REGNUM)
(S390_V13_LOWER_REGNUM, S390_V14_LOWER_REGNUM)
(S390_V15_LOWER_REGNUM, S390_V16_REGNUM, S390_V17_REGNUM)
(S390_V18_REGNUM, S390_V19_REGNUM, S390_V20_REGNUM)
(S390_V21_REGNUM, S390_V22_REGNUM, S390_V23_REGNUM)
(S390_V24_REGNUM, S390_V25_REGNUM, S390_V26_REGNUM)
(S390_V27_REGNUM, S390_V28_REGNUM, S390_V29_REGNUM)
(S390_V30_REGNUM, S390_V31_REGNUM): New macros.
(S390_NUM_REGS): Adjust value.
(s390_vxrs_low_regset, s390_vxrs_high_regset): Declare.
(tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
(tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): Likewise.
* NEWS: Announce S/390 vector register support.
2015-03-02 10:57:39 +01:00
|
|
|
extern struct target_desc *tdesc_s390x_vx_linux64;
|
|
|
|
extern struct target_desc *tdesc_s390x_tevx_linux64;
|
* features/Makefile (WHICH): Add s390-linux32, s390-linux64,
and s390x-linux64.
(s390-linux32-expedite): Define.
(s390-linux64-expedite): Define.
(s390x-linux64-expedite): Define.
* features/s390-acr.xml: New file.
* features/s390-fpr.xml: New file.
* features/s390-core32.xml: New file.
* features/s390-core64.xml: New file.
* features/s390x-core64.xml: New file.
* features/s390-linux32.xml: New file.
* features/s390-linux64.xml: New file.
* features/s390x-linux64.xml: New file.
* features/s390-linux32.c: New generated file.
* features/s390-linux64.c: New generated file.
* features/s390x-linux64.c: New generated file.
* regformats/s390-linux32.dat: New generated file.
* regformats/s390-linux64.dat: New generated file.
* regformats/s390x-linux64.dat: New generated file.
* regformats/reg-s390.dat: Remove.
* regformats/reg-s390x.dat: Remove.
* s390-nat.c: Include "auxv.h" and <elf.h>.
(HWCAP_S390_HIGH_GPRS): Define if undefined.
(s390_target_wordsize): New function.
(s390_auxv_parse): Likewise.
(s390_get_hwcap): Likewise.
(s390_read_description): Likewise.
(_initialize_s390_nat): Install s390_auxv_parse and
s390_read_description.
* s390-tdep.c: Include "features/s390-linux32.c",
"features/s390-linux64.c", and "features/s390x-linux64.c".
(struct gdbarch_tdep): Add gpr_full_regnum, pc_regnum, and cc_regnum.
(s390_register_call_saved): New function.
(s390_register_name): Remove.
(s390_register_type): Remove.
(s390_dwarf_regmap): Add lower half GPR pseudo DWARF CFI regnums.
(s390_dwarf_reg_to_regnum): Remap GPR regnums to full GPRs.
(s390_adjust_frame_regnum): Remap GPR regnums to lower halves for CFI.
(s390_pseudo_register_name): New function.
(s390_pseudo_register_type): New function.
(s390_pseudo_register_read): Handle both 32-bit and 64-bit cases.
Handle full GPR pesudos and varying pseudo register numbers.
(s390_pseudo_register_write): Likewise
(s390x_pseudo_register_read): Remove.
(s390x_pseudo_register_write): Likewise.
(s390_register_group): Remove.
(s390_pseudo_register_group): New function.
(s390_regmap_gregset): Add GPR upper halves.
(s390x_regmap_gregset): Likewise.
(s390_regmap_fpregset): Likewise.
(s390_regmap_upper): New global variable.
(s390_upper_regset): New global variable.
(s390_upper_regset_sections): New global variable.
(s390_regset_from_core_section): Handle GPR upper halves.
(s390_core_read_description): New function.
(s390_prologue_frame_unwind_cache): Set up ABI call-saved/clobbered
register information. Handle varying pseudo register numbers.
(s390_backchain_frame_unwind_cache): Likewise.
(s390_frame_prev_register): Unwind full GPRs to show lower halves.
(s390_stub_frame_unwind_cache): Handle varying pseudo register numbers.
(s390_sigtramp_frame_unwind_cache): Unwind PSWM and PSWA as well as
PC and CC pseudos. Unwind upper halves and full GPRs as appropriate.
Handle varying pseudo register numbers.
(s390_unwind_pc): Handle varying pseudo register numbers.
(s390_dwarf2_prev_register): New function.
(s390_dwarf2_frame_init_reg): Set up ABI call-saved/clobbered
register information. Handle varying pseudo register numbers.
Install s390_dwarf2_prev_register to unwind full GPRs.
(s390_gdbarch_init): Handle target descriptions. Assign varying
pseudo register numbers. Install s390_adjust_frame_regnum.
(_initialize_s390_tdep): Initialize target descriptions.
* s390-tdep.h (S390_R0_UPPER_REGNUM .. S390_R15_UPPER_REGNUM): Define.
(S390_NUM_REGS): Redefine to include upper half registers.
(S390_PC_REGNUM, S390_CC_REGNUM): Remove.
(S390_NUM_PSEUDO_REGS, S390_NUM_TOTAL_REGS): Likewise.
(tdesc_s390_linux32): Add declaration.
(tdesc_s390_linux64): Likewise.
(tdesc_s390x_linux64): Likewise.
gdb/testsuite/
* gdb.xml/tdesc-regs.exp: Support s390*-*-* targets.
gdbserver/
* Makefile.in (clean): Remove new generated files.
(reg-s390.o, reg-s390.c): Remove rules.
(reg-s390x.o, reg-s390x.c): Likewise.
(s390-linux32.o, s390-linux32.c): Add rules.
(s390-linux64.o, s390-linux64.c): Likewise.
(s390x-linux64.o, s390x-linux64.c): Likewise.
* configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
* linux-s390-low.c: Include <elf.h>.
(HWCAP_S390_HIGH_GPRS): Define if undefined.
(init_registers_s390): Remove prototype.
(init_registers_s390x): Likewise.
(init_registers_s390_linux32): Add prototype.
(init_registers_s390_linux64): Likewise.
(init_registers_s390x_linux64): Likewise.
(s390_num_regs_3264): New define.
(s390_regmap_3264): New global variable.
(s390_cannot_fetch_register): Remove obsolete check.
(s390_cannot_store_register): Likewise.
(s390_collect_ptrace_register): Handle upper/lower register halves.
(s390_supply_ptrace_register): Likewise.
(s390_fill_gregset): Update to register number changes.
(s390_get_hwcap): New routine.
(s390_arch_setup): Detect 32-bit process running on 64-bit system.
Install appropriate regmap and register set.
2010-01-04 16:03:01 +01:00
|
|
|
|
2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
Committed by Jim Blandy <jimb@redhat.com>.
* config/s390/nm-linux.h: Update comments. Do not include "solib.h".
(KERNEL_U_ADDR, REGISTER_U_ADDR, U_REGS_OFFSET): Remove.
(FETCH_INFERIOR_REGISTERS): Define.
* config/s390/s390.mh (NATDEPFILES): Remove core-aout.o and
core-regset.o.
* config/s390/s390x.mt: Remove.
* config/s390/tm-s390.h: Remove.
* config/s390/tm-linux.h: Do not include "s390/tm-s390.h".
(TARGET_ELF64): Remove.
(SKIP_TRAMPOLINE_CODE): Do not undefine.
* configure.tgt [s390-*-*, s390x-*-*]: Merge into single
s390*-*-* case; always set gdb_target to s390.
* regformats/reg-s390.dat: Remove control registers.
* regformats/reg-s390x.dat: Likewise.
* s390-tdep.h: New file.
* s390-nat.c: Do not include <asm/processor.h> or <value.h>.
Include "inferior.h" and "s390-tdep.h".
Remove private definition of offsetof.
(s390_register_u_addr): Remove.
(regmap_gregset, regmap_fpregset): Define.
(supply_gregset, fill_gregset): Reimplement.
(supply_fpregset, fill_fpregset): Likewise.
(s390_inferior_tid): New function.
(fetch_regs, store_regs, fetch_fpregs, store_fpregs): Likewise.
(fetch_inferior_registers, store_inferior_registers): Likewise.
* s390-tdep.c: Do not define S390_TDEP. Include "defs.h" instead
of <defs.h>. Include "reggroups.h", "regset.h", and "s390-tdep.h".
Global replace of S390_GP0_REGNUM by S390_R0_REGNUM.
Global replace of S390_FP0_REGNUM by S390_F0_REGNUM.
(struct gdbarch_tdep): Define.
(struct s390_register_info): Define.
(s390_register_info): New variable.
(s390_register_name): Reimplement.
(s390_register_type): New function.
(s390_register_raw_size, s390x_register_raw_size): Remove.
(s390_cannot_fetch_register): Remove.
(s390_register_byte): Remove.
(s390_register_virtual_type, s390x_register_virtual_type): Remove.
(s390_dwarf_regmap): New variable.
(s390_dwarf_reg_to_regnum): New function.
(s390_stab_reg_to_regnum): Remove.
(s390_pseudo_register_read, s390_pseudo_register_write): New functions.
(s390x_pseudo_register_read, s390x_pseudo_register_write): Likewise.
(s390_convert_register_p): Likewise.
(s390_register_to_value, s390_value_to_register): Likewise.
(s390_register_reggroup_p): Likewise.
(s390_regmap_gregset, s390x_regmap_gregset, s390_regmap_fpregset,
s390_gregset, s390x_gregset, s390_fpregset): New variables.
(s390_supply_regset, s390_regset_from_core_section): New functions.
(GDB_TARGET_IS_ESAME): Move here from tm-s390.h.
(S390_FPR_SIZE): Likewise.
(S390_GPR_SIZE): Likewise. Redefine in terms of GDB_TARGET_IS_ESAME.
Global replace of DEPRECATED_REGISTER_SIZE by S390_GPR_SIZE.
(S390_NUM_GPRS): Move here from tm-s390.h.
(S390_NUM_FPRS): Likewise.
(s390_in_function_epilogue_p): New function.
(s390_is_sigreturn): Replace S390_PSW_ADDR_SIZE by S390_GPR_SIZE.
Replace S390_PC_REGNUM by S390_PSWA_REGNUM.
(s390_gdbarch_init): Allocate and set up gdbarch_tdep structure.
Replace s390_stab_reg_to_regnum by s390_dwarf_reg_to_regnum.
Replace S390_FP_REGNUM by S390_SP_REGNUM.
Remove calls to:
set_gdbarch_deprecated_max_register_raw_size,
set_gdbarch_deprecated_max_register_virtual_size,
set_gdbarch_deprecated_register_byte,
set_gdbarch_cannot_fetch_register,
set_gdbarch_cannot_store_register,
set_gdbarch_deprecated_register_size,
set_gdbarch_deprecated_register_raw_size,
set_gdbarch_deprecated_register_virtual_size,
set_gdbarch_deprecated_register_virtual_type,
set_gdbarch_deprecated_register_bytes.
Add calls to:
set_gdbarch_num_pseudo_regs,
set_gdbarch_register_type,
set_gdbarch_convert_register_p,
set_gdbarch_register_to_value,
set_gdbarch_value_to_register,
set_gdbarch_register_reggroup_p,
set_gdbarch_regset_from_core_section,
set_gdbarch_pseudo_register_read,
set_gdbarch_pseudo_register_write,
set_gdbarch_in_function_epilogue_p.
* Makefile.in (s390-nat.o, s390-tdep.o): Update dependencies.
(s390_tdep_h): New variable.
2004-02-18 04:42:51 +01:00
|
|
|
#endif
|