]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
[gdb/testsuite, tclint] Fix lib/aarch64-scalable.exp
authorTom de Vries <tdevries@suse.de>
Sun, 5 Oct 2025 20:50:10 +0000 (22:50 +0200)
committerTom de Vries <tdevries@suse.de>
Sun, 5 Oct 2025 20:50:10 +0000 (22:50 +0200)
gdb/tclint.toml
gdb/testsuite/lib/aarch64-scalable.exp

index bd5203927eb9b40c15630669924d28203fd34837..8e8558e95d4efbfed08103be610fe1a79db6c9a5 100644 (file)
@@ -33,7 +33,6 @@ exclude = [
 # TODO:
 "gdb/testsuite/boards",
 "gdb/testsuite/config",
-"gdb/testsuite/lib/aarch64-scalable.exp",
 "gdb/testsuite/lib/gdb.exp",
 # IGNORE (document reason in trailing comment):
 "gdb/testsuite/gdb.stabs", # To be removed.
index c9f24637cc068ccea79ebc40769a9b252590e897..e06b339a01f05e763fa577a1bc551e11ca63a991 100644 (file)
@@ -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"} {