From: Thiago Jung Bauermann <thiago.bauermann@linaro.org>
To: Luis Machado <luis.machado@arm.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH v2 5/6] [gdb/testsuite] sme2: Extend SME tests to include SME2
Date: Sat, 26 Aug 2023 22:23:13 -0300 [thread overview]
Message-ID: <877cphl1mm.fsf@linaro.org> (raw)
In-Reply-To: <20230822112144.1513268-6-luis.machado@arm.com>
Luis Machado <luis.machado@arm.com> writes:
> diff --git a/gdb/testsuite/lib/aarch64.exp b/gdb/testsuite/lib/aarch64.exp
> index cd43a4c4f77..40bba861b5f 100644
> --- a/gdb/testsuite/lib/aarch64.exp
> +++ b/gdb/testsuite/lib/aarch64.exp
> @@ -151,3 +151,56 @@ proc check_fpsimd_regs { byte state vl svl} {
> gdb_test "print $register_name" $fpsimd_pattern
> }
> }
> +
> +#
> +# Validate the values of the SVE registers.
> +#
> +proc check_sve_regs { byte state vl svl } {
This is a duplicate of the same function in aarch64-scalable.exp. It
seems to be included here by mistake.
> +
> + # If streaming mode is enabled, the vector length is the streaming
> + # vector length.
> + set z_pattern ""
> + set z_size 0
> + if {$state == "ssve" || $state == "za_ssve"} {
> + set z_pattern [string_to_regexp [1d_array_value_pattern $byte $svl]]
> + set z_size $svl
> + } else {
> + set z_size $vl
> +
> + if {$state == "fpsimd" || $state == "za"} {
> + # If there is no SVE/SSVE state, the contents of the Z/P/FFR registers
> + # are zero.
> + if {$vl == 16} {
> + set z_pattern [string_to_regexp [1d_array_value_pattern $byte $vl]]
> + } else {
> + set z_repeats [expr $vl - 16]
> + set z_pattern [string_to_regexp "{$byte <repeats 16 times>, 0 <repeats $z_repeats times>}"]
> + }
> + } else {
> + set z_pattern [string_to_regexp [1d_array_value_pattern $byte $vl]]
> + }
> + }
> + set p_size [expr $z_size / 8]
> +
> + # If there is no SVE/SSVE state, the contents of the Z/P/FFR registers
> + # are zero.
> + set p_byte $byte
> + if {$state == "fpsimd" || $state == "za"} {
> + set p_byte 0
> + }
> + set p_pattern [string_to_regexp [1d_array_value_pattern $p_byte $p_size]]
> +
> + for {set number 0} {$number < 32} {incr number} {
> + set register_name "\$z${number}\.b\.u"
> + gdb_test "print sizeof $register_name" " = $z_size"
> + gdb_test "print $register_name" $z_pattern
> + }
> +
> + for {set number 0} {$number < 16} {incr number} {
> + set register_name "\$p${number}"
> + gdb_test "print sizeof $register_name" " = $p_size"
> + gdb_test "print $register_name" $p_pattern
> + }
> +
> + gdb_test "print \$ffr" $p_pattern
> +}
Reviewed-by: Thiago Jung Bauermann <thiago.bauermann@linaro.org>
--
Thiago
next prev parent reply other threads:[~2023-08-27 1:23 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-22 11:21 [PATCH v2 0/6] SME2 support for AArch64 gdb/gdbserver on Linux Luis Machado
2023-08-22 11:21 ` [PATCH v2 1/6] [gdb/aarch64] sme2: Enable SME2 for AArch64 gdb " Luis Machado
2023-08-27 1:16 ` Thiago Jung Bauermann
2023-08-30 12:53 ` Luis Machado
2023-08-22 11:21 ` [PATCH v2 2/6] [gdbserver/aarch64] sme2: Enable SME2 support in gdbserver Luis Machado
2023-08-27 1:18 ` Thiago Jung Bauermann
2023-08-30 12:54 ` Luis Machado
2023-08-22 11:21 ` [PATCH v2 3/6] [gdb/aarch64] sme2: signal frame support Luis Machado
2023-08-27 1:19 ` Thiago Jung Bauermann
2023-08-22 11:21 ` [PATCH v2 4/6] [gdb/aarch64] sme2: Core file support for ZT register set Luis Machado
2023-08-27 1:21 ` Thiago Jung Bauermann
2023-08-30 12:56 ` Luis Machado
2023-08-22 11:21 ` [PATCH v2 5/6] [gdb/testsuite] sme2: Extend SME tests to include SME2 Luis Machado
2023-08-27 1:23 ` Thiago Jung Bauermann [this message]
2023-08-30 12:56 ` Luis Machado
2023-08-22 11:21 ` [PATCH v2 6/6] [gdb/docs] sme2: Document SME2 registers and features Luis Machado
2023-08-22 11:34 ` Eli Zaretskii
2023-08-22 11:45 ` Luis Machado
2023-08-27 1:27 ` Thiago Jung Bauermann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=877cphl1mm.fsf@linaro.org \
--to=thiago.bauermann@linaro.org \
--cc=gdb-patches@sourceware.org \
--cc=luis.machado@arm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).