tdesc_register_size returns number of bits, not bytes.
Rename to make it clearer.
Also, fixed bug in aarch64_get_tdesc_vq which assumed bytes.
gdb/
* target-descriptions.c (tdesc_register_bitsize): Rename.
* target-descriptions.h (tdesc_register_bitsize): Likewise.
* rs6000-tdep.c (rs6000_gdbarch_init): Use new name.
* aarch64-tdep.c (aarch64_get_tdesc_vq): Convert size.
+2018-07-11 Alan Hayward <alan.hayward@arm.com>
+
+ * target-descriptions.c (tdesc_register_bitsize): Rename.
+ * target-descriptions.h (tdesc_register_bitsize): Likewise.
+ * rs6000-tdep.c (rs6000_gdbarch_init): Use new name.
+ * aarch64-tdep.c (aarch64_get_tdesc_vq): Convert size.
+
2018-07-10 Tom Tromey <tom@tromey.com>
* breakpoint.c (moribund_locations): Now static and a
if (feature_sve == nullptr)
return 0;
- uint64_t vl = tdesc_register_size (feature_sve,
- aarch64_sve_register_names[0]);
+ uint64_t vl = tdesc_register_bitsize (feature_sve,
+ aarch64_sve_register_names[0]) / 8;
return sve_vq_from_vl (vl);
}
have_mq = tdesc_numbered_register (feature, tdesc_data, PPC_MQ_REGNUM,
"mq");
- tdesc_wordsize = tdesc_register_size (feature, "pc") / 8;
+ tdesc_wordsize = tdesc_register_bitsize (feature, "pc") / 8;
if (wordsize == -1)
wordsize = tdesc_wordsize;
/* The fpscr register was expanded in isa 2.05 to 64 bits
along with the addition of the decimal floating point
facility. */
- if (tdesc_register_size (feature, "fpscr") > 32)
+ if (tdesc_register_bitsize (feature, "fpscr") > 32)
have_dfp = 1;
}
else
bits. The register must exist. */
int
-tdesc_register_size (const struct tdesc_feature *feature,
- const char *name)
+tdesc_register_bitsize (const struct tdesc_feature *feature, const char *name)
{
struct tdesc_reg *reg = tdesc_find_register_early (feature, name);
/* Search FEATURE for a register named NAME, and return its size in
bits. The register must exist. */
-int tdesc_register_size (const struct tdesc_feature *feature,
- const char *name);
+int tdesc_register_bitsize (const struct tdesc_feature *feature,
+ const char *name);
/* Search FEATURE for a register with any of the names from NAMES
(NULL-terminated). Record REGNO and the register in DATA; when