diff mbox

AArch64: 128bit views for SVE registers

Message ID 20190320152547.73765-1-alan.hayward@arm.com
State New
Headers show

Commit Message

Alan Hayward March 20, 2019, 3:26 p.m. UTC
SVE can view Z registers as 128bit values using .q prefix.

Add this view to the end of Z registers in the SVE feature (the same as
V registers), keeping the .d view as the first entry.

gdb/ChangeLog:

2019-03-20  Alan Hayward  <alan.hayward@arm.com>

	* features/aarch64-sve.c (create_feature_aarch64_sve): Add q view.
---
 gdb/features/aarch64-sve.c | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

Comments

Alan Hayward March 27, 2019, 3:49 p.m. UTC | #1
Ping.
I’ll push tomorrow if there are no comments for this or

[PATCH] AArch64: View the pseudo V registers as vectors
https://sourceware.org/ml/gdb-patches/2019-03/msg00430.html


Alan.

> On 20 Mar 2019, at 15:26, Alan Hayward <Alan.Hayward@arm.com> wrote:

> 

> SVE can view Z registers as 128bit values using .q prefix.

> 

> Add this view to the end of Z registers in the SVE feature (the same as

> V registers), keeping the .d view as the first entry.

> 

> gdb/ChangeLog:

> 

> 2019-03-20  Alan Hayward  <alan.hayward@arm.com>

> 

> 	* features/aarch64-sve.c (create_feature_aarch64_sve): Add q view.

> ---

> gdb/features/aarch64-sve.c | 14 ++++++++++++++

> 1 file changed, 14 insertions(+)

> 

> diff --git a/gdb/features/aarch64-sve.c b/gdb/features/aarch64-sve.c

> index aa2ac7a3c5..63d8ee666c 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);

> @@ -98,6 +110,8 @@ create_feature_aarch64_sve (struct target_desc *result, long regnum,

>   tdesc_add_field (type_with_fields, "h", field_type);

>   field_type = tdesc_named_type (feature, "svevnb");

>   tdesc_add_field (type_with_fields, "b", field_type);

> +  field_type = tdesc_named_type (feature, "svevnq");

> +  tdesc_add_field (type_with_fields, "q", field_type);

> 

>   field_type = tdesc_named_type (feature, "uint8");

>   tdesc_create_vector (feature, "svep", field_type, 2 * scale);

> -- 

> 2.17.2 (Apple Git-113)

>
diff mbox

Patch

diff --git a/gdb/features/aarch64-sve.c b/gdb/features/aarch64-sve.c
index aa2ac7a3c5..63d8ee666c 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);
@@ -98,6 +110,8 @@  create_feature_aarch64_sve (struct target_desc *result, long regnum,
   tdesc_add_field (type_with_fields, "h", field_type);
   field_type = tdesc_named_type (feature, "svevnb");
   tdesc_add_field (type_with_fields, "b", field_type);
+  field_type = tdesc_named_type (feature, "svevnq");
+  tdesc_add_field (type_with_fields, "q", field_type);
 
   field_type = tdesc_named_type (feature, "uint8");
   tdesc_create_vector (feature, "svep", field_type, 2 * scale);