diff options
author | Alan Hayward <alan.hayward@arm.com> | 2019-05-14 10:09:05 +0100 |
---|---|---|
committer | Alan Hayward <alan.hayward@arm.com> | 2019-05-14 10:10:56 +0100 |
commit | a6d0f2490c0c7969eb60038f01c0ee0f46e4d5fd (patch) | |
tree | 691f94788a913e65c545a9cedff6dc2082c2ec10 /gdb/features | |
parent | 2764128dee821448ba43a50ed8cee387f2ee8dca (diff) | |
download | gdb-a6d0f2490c0c7969eb60038f01c0ee0f46e4d5fd.zip gdb-a6d0f2490c0c7969eb60038f01c0ee0f46e4d5fd.tar.gz gdb-a6d0f2490c0c7969eb60038f01c0ee0f46e4d5fd.tar.bz2 |
AArch64: Add half float view to V registers
AArch64 can fill the vector registers with half precision floats.
Add a view for this.
Add builtin type ieee half and connect this to the existing
floatformats_ieee_half.
gdb/ChangeLog:
2019-05-14 Alan Hayward <alan.hayward@arm.com>
* aarch64-tdep.c (aarch64_vnh_type): Add half view.
(aarch64_vnv_type): Likewise.
* target-descriptions.c (make_gdb_type): Add TDESC_TYPE_IEEE_HALF.
* common/tdesc.c: Likewise.
* common/tdesc.h (enum tdesc_type_kind): Likewise.
* features/aarch64-fpu.c (create_feature_aarch64_fpu): Regenerate.
* features/aarch64-fpu.xml: Add ieee half view.
* features/aarch64-sve.c (create_feature_aarch64_fpu): Likewise.
* gdbtypes.c (gdbtypes_post_init): Add builtin_half
* gdbtypes.h (struct builtin_type): Likewise.
(struct objfile_type): Likewise.
Diffstat (limited to 'gdb/features')
-rw-r--r-- | gdb/features/aarch64-fpu.c | 5 | ||||
-rw-r--r-- | gdb/features/aarch64-fpu.xml | 2 | ||||
-rw-r--r-- | gdb/features/aarch64-sve.c | 5 |
3 files changed, 12 insertions, 0 deletions
diff --git a/gdb/features/aarch64-fpu.c b/gdb/features/aarch64-fpu.c index 47962d1..b73d12e 100644 --- a/gdb/features/aarch64-fpu.c +++ b/gdb/features/aarch64-fpu.c @@ -28,6 +28,9 @@ create_feature_aarch64_fpu (struct target_desc *result, long regnum) element_type = tdesc_named_type (feature, "int32"); tdesc_create_vector (feature, "v4i", element_type, 4); + element_type = tdesc_named_type (feature, "ieee_half"); + tdesc_create_vector (feature, "v8f", element_type, 8); + element_type = tdesc_named_type (feature, "uint16"); tdesc_create_vector (feature, "v8u", element_type, 8); @@ -65,6 +68,8 @@ create_feature_aarch64_fpu (struct target_desc *result, long regnum) tdesc_add_field (type_with_fields, "s", field_type); type_with_fields = tdesc_create_union (feature, "vnh"); + field_type = tdesc_named_type (feature, "v8f"); + tdesc_add_field (type_with_fields, "f", field_type); field_type = tdesc_named_type (feature, "v8u"); tdesc_add_field (type_with_fields, "u", field_type); field_type = tdesc_named_type (feature, "v8i"); diff --git a/gdb/features/aarch64-fpu.xml b/gdb/features/aarch64-fpu.xml index 141c996..1eba8fa 100644 --- a/gdb/features/aarch64-fpu.xml +++ b/gdb/features/aarch64-fpu.xml @@ -14,6 +14,7 @@ <vector id="v4f" type="ieee_single" count="4"/> <vector id="v4u" type="uint32" count="4"/> <vector id="v4i" type="int32" count="4"/> + <vector id="v8f" type="ieee_half" count="8"/> <vector id="v8u" type="uint16" count="8"/> <vector id="v8i" type="int16" count="8"/> <vector id="v16u" type="uint8" count="16"/> @@ -31,6 +32,7 @@ <field name="s" type="v4i"/> </union> <union id="vnh"> + <field name="f" type="v8f"/> <field name="u" type="v8u"/> <field name="s" type="v8i"/> </union> diff --git a/gdb/features/aarch64-sve.c b/gdb/features/aarch64-sve.c index 2166b4b..ae292d2 100644 --- a/gdb/features/aarch64-sve.c +++ b/gdb/features/aarch64-sve.c @@ -55,6 +55,9 @@ create_feature_aarch64_sve (struct target_desc *result, long regnum, element_type = tdesc_named_type (feature, "int32"); tdesc_create_vector (feature, "svevss", element_type, 4 * scale); + element_type = tdesc_named_type (feature, "ieee_half"); + tdesc_create_vector (feature, "svevhf", element_type, 8 * scale); + element_type = tdesc_named_type (feature, "uint16"); tdesc_create_vector (feature, "svevhu", element_type, 8 * scale); @@ -90,6 +93,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, "svevnh"); + field_type = tdesc_named_type (feature, "svevhf"); + tdesc_add_field (type_with_fields, "f", field_type); field_type = tdesc_named_type (feature, "svevhu"); tdesc_add_field (type_with_fields, "u", field_type); field_type = tdesc_named_type (feature, "svevhs"); |