aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/lib/aarch64-scalable.exp
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/testsuite/lib/aarch64-scalable.exp')
-rw-r--r--gdb/testsuite/lib/aarch64-scalable.exp22
1 files changed, 11 insertions, 11 deletions
diff --git a/gdb/testsuite/lib/aarch64-scalable.exp b/gdb/testsuite/lib/aarch64-scalable.exp
index c9f2463..e06b339 100644
--- a/gdb/testsuite/lib/aarch64-scalable.exp
+++ b/gdb/testsuite/lib/aarch64-scalable.exp
@@ -42,7 +42,7 @@ proc sve_value_pattern { state vl byte_fpsimd byte_sve } {
append data $brace_open
if { $state == "fpsimd" || $state == "za" } {
if { $vl > 16 } {
- set sve_repeat_count [expr $vl - 16]
+ set sve_repeat_count [expr {$vl - 16}]
append data "$byte_fpsimd <repeats 16 times>, 0 <repeats $sve_repeat_count times>"
} else {
append data "$byte_fpsimd <repeats 16 times>"
@@ -95,7 +95,7 @@ proc state_id_to_state_string { state } {
# The state is one of fpsimd, sve, ssve, za and za_ssve.
#
proc test_id_to_state { id } {
- set state [expr $id / 25]
+ set state [expr {$id / 25}]
return [state_id_to_state_string $state]
}
@@ -104,14 +104,14 @@ proc test_id_to_state { id } {
# Given a test ID, return the associated vector length.
#
proc test_id_to_vl { id } {
- return [expr 16 << (($id / 5) % 5)]
+ return [expr {16 << (($id / 5) % 5)}]
}
#
# Given a test ID, return the associated streaming vector length.
#
proc test_id_to_svl { id } {
- return [expr 16 << ($id % 5)]
+ return [expr {16 << ($id % 5)}]
}
#
@@ -135,14 +135,14 @@ proc check_sve_regs { byte state vl svl } {
if {$vl == 16} {
set z_pattern [string_to_regexp [1d_array_value_pattern $byte $vl]]
} else {
- set z_repeats [expr $vl - 16]
+ 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]
+ set p_size [expr {$z_size / 8}]
# If there is no SVE/SSVE state, the contents of the Z/P/FFR registers
# are zero.
@@ -174,7 +174,7 @@ proc check_sme_regs { byte state svl } {
# ZA contents are only available when the ZA state is enabled. Otherwise
# the ZA contents are unavailable (zeroed out).
set za_pattern ""
- set expected_za_size [expr $svl * $svl]
+ set expected_za_size [expr {$svl * $svl}]
if {$state != "za" && $state != "za_ssve"} {
set byte 0
@@ -217,15 +217,15 @@ proc check_state { state vl svl } {
# each byte.
# Check VG to make sure it is correct
- set expected_vg [expr $vl / 8]
+ set expected_vg [expr {$vl / 8}]
# If streaming mode is enabled, then vg is actually svg.
if {$state == "ssve" || $state == "za_ssve"} {
- set expected_vg [expr $svl / 8]
+ set expected_vg [expr {$svl / 8}]
}
gdb_test "print \$vg" " = ${expected_vg}"
# Check SVG to make sure it is correct
- set expected_svg [expr $svl / 8]
+ set expected_svg [expr {$svl / 8}]
gdb_test "print \$svg" " = ${expected_svg}"
# Check the value of SVCR.
@@ -251,7 +251,7 @@ proc check_state { state vl svl } {
check_sme_regs 170 $state $svl
# Check SME2 registers
- if [is_sme2_available] {
+ if {[is_sme2_available]} {
# The SME2 ZT0 register will always be zero, except when ZA is active.
set sme2_byte 0
if {$state == "za" || $state == "za_ssve"} {