tcl: [1/3] prepare for jimtcl 0.81 'expr' syntax change
[fw/openocd] / tcl / cpu / arc / v2.tcl
index a3172c220a1d918b20aae8286db775eaa9b98bfb..364e8af37e7b8b8ade429820c325b7fe42b3a9b3 100644 (file)
@@ -41,7 +41,7 @@ proc arc_v2_examine_target { {target ""} } {
                        # 0b01 - 4 actionpoints
                        # 0b10 - 8 actionpoints
                        # 0b11 - reserved.
-                       set ap_num [expr 0x2 << ($ap_build_type & 3)]
+                       set ap_num [expr {0x2 << ($ap_build_type & 3)}]
                        # Expression on top may produce 16 action points - which is a
                        # reserved value for now.
                        if { $ap_num < 16 } {
@@ -341,6 +341,6 @@ proc arc_v2_reset { {target ""} } {
        # to write directly via JTAG layer...
        set num_ap [arc num-actionpoints]
        for {set i 0} {$i < $num_ap} {incr i} {
-               arc jtag set-aux-reg [expr 0x222 + $i * 3] 0
+               arc jtag set-aux-reg [expr {0x222 + $i * 3}] 0
        }
 }