From fc96163a3ea7761f5353591c825027090942e330 Mon Sep 17 00:00:00 2001 From: Alan Hayward Date: Thu, 28 Mar 2019 12:14:09 +0000 Subject: [PATCH] AArch64: 128bit views for SVE registers SVE can view Z registers as 128bit values using .q prefix. Add this view to the SVE feature. gdb/ChangeLog: * features/aarch64-sve.c (create_feature_aarch64_sve): Add q view. --- gdb/ChangeLog | 4 ++++ gdb/features/aarch64-sve.c | 14 ++++++++++++++ 2 files changed, 18 insertions(+) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 0c658e2..0a1a335 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,7 @@ +2019-03-28 Alan Hayward + + * features/aarch64-sve.c (create_feature_aarch64_sve): Add q view. + 2019-03-24 Philippe Waroquiers Tom Tromey diff --git a/gdb/features/aarch64-sve.c b/gdb/features/aarch64-sve.c index aa2ac7a..2166b4b 100644 --- a/gdb/features/aarch64-sve.c +++ b/gdb/features/aarch64-sve.c @@ -31,6 +31,12 @@ create_feature_aarch64_sve (struct target_desc *result, long regnum, feature = tdesc_create_feature (result, "org.gnu.gdb.aarch64.sve"); + element_type = tdesc_named_type (feature, "uint128"); + tdesc_create_vector (feature, "svevqu", element_type, scale); + + element_type = tdesc_named_type (feature, "int128"); + tdesc_create_vector (feature, "svevqs", element_type, scale); + element_type = tdesc_named_type (feature, "ieee_double"); tdesc_create_vector (feature, "svevdf", element_type, 2 * scale); @@ -61,6 +67,12 @@ create_feature_aarch64_sve (struct target_desc *result, long regnum, element_type = tdesc_named_type (feature, "int8"); tdesc_create_vector (feature, "svevbs", element_type, 16 * scale); + type_with_fields = tdesc_create_union (feature, "svevnq"); + field_type = tdesc_named_type (feature, "svevqu"); + tdesc_add_field (type_with_fields, "u", field_type); + field_type = tdesc_named_type (feature, "svevqs"); + tdesc_add_field (type_with_fields, "s", field_type); + type_with_fields = tdesc_create_union (feature, "svevnd"); field_type = tdesc_named_type (feature, "svevdf"); tdesc_add_field (type_with_fields, "f", field_type); @@ -90,6 +102,8 @@ create_feature_aarch64_sve (struct target_desc *result, long regnum, tdesc_add_field (type_with_fields, "s", field_type); type_with_fields = tdesc_create_union (feature, "svev"); + field_type = tdesc_named_type (feature, "svevnq"); + tdesc_add_field (type_with_fields, "q", field_type); field_type = tdesc_named_type (feature, "svevnd"); tdesc_add_field (type_with_fields, "d", field_type); field_type = tdesc_named_type (feature, "svevns"); -- 2.7.4