Remove global variable arm_linux_has_wmmx_registers in arm-linux-nat.c

This patch is to remove the global variable arm_linux_has_wmmx_registers
in arm-linux-nat.c, and add a new field have_wmmx_registers in
'struct gdbarch_tdep'.

gdb:

2015-05-28  Yao Qi  <yao.qi@linaro.org>

	* arm-linux-nat.c (arm_linux_has_wmmx_registers): Remove.
	(arm_linux_fetch_inferior_registers): Use
	tdep->have_wmmx_registers instead of arm_linux_has_wmmx_registers.
	(arm_linux_store_inferior_registers): Likewise.
	(arm_linux_read_description): Don't set
	arm_linux_has_wmmx_registers.
	* arm-tdep.c (arm_gdbarch_init): Set
	tdep->have_wmmx_registers according target descriptions.
	* arm-tdep.h (struct gdbarch_tdep) <have_wmmx_registers>: New
	field.
This commit is contained in:
Yao Qi
2015-05-28 10:19:30 +01:00
parent 330c6ca9a0
commit a56cc1ce22
4 changed files with 23 additions and 12 deletions

View File

@@ -9915,6 +9915,7 @@ arm_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
struct tdesc_arch_data *tdesc_data = NULL;
int i, is_m = 0;
int vfp_register_count = 0, have_vfp_pseudos = 0, have_neon_pseudos = 0;
int have_wmmx_registers = 0;
int have_neon = 0;
int have_fpa_registers = 1;
const struct target_desc *tdesc = info.target_desc;
@@ -10178,6 +10179,8 @@ arm_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
tdesc_data_cleanup (tdesc_data);
return NULL;
}
have_wmmx_registers = 1;
}
/* If we have a VFP unit, check whether the single precision registers
@@ -10289,6 +10292,7 @@ arm_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
tdep->fp_model = fp_model;
tdep->is_m = is_m;
tdep->have_fpa_registers = have_fpa_registers;
tdep->have_wmmx_registers = have_wmmx_registers;
gdb_assert (vfp_register_count == 0
|| vfp_register_count == 16
|| vfp_register_count == 32);