]> git.eshelyaron.com Git - emacs.git/commitdiff
Use `ash` instead of `lsh` in verilog-mode (bug#56641)
authorMattias Engdegård <mattiase@acm.org>
Sat, 23 Jul 2022 10:29:35 +0000 (12:29 +0200)
committerMattias Engdegård <mattiase@acm.org>
Sat, 23 Jul 2022 10:29:35 +0000 (12:29 +0200)
* lisp/progmodes/verilog-mode.el (verilog-simplify-range-expression):
Use `ash`; the result will be the same because the first argument is
nonnegative.

lisp/progmodes/verilog-mode.el

index df3b28615fd402b4df31566e2cdc9f33272f219c..f063fb5a7ca936fbb315f908d0a8a4769ffa2af1 100644 (file)
@@ -10880,10 +10880,10 @@ This repairs those mis-inserted by an AUTOARG."
             (setq out (replace-match
                        (concat (match-string 1 out)
                                (if (equal (match-string 3 out) ">>")
-                                   (int-to-string (lsh (string-to-number (match-string 2 out))
+                                   (int-to-string (ash (string-to-number (match-string 2 out))
                                                        (* -1 (string-to-number (match-string 4 out))))))
                                (if (equal (match-string 3 out) "<<")
-                                   (int-to-string (lsh (string-to-number (match-string 2 out))
+                                   (int-to-string (ash (string-to-number (match-string 2 out))
                                                        (string-to-number (match-string 4 out)))))
                                (if (equal (match-string 3 out) ">>>")
                                    (int-to-string (ash (string-to-number (match-string 2 out))