]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
loongarch gas resolving constant expressions
authorAlan Modra <amodra@gmail.com>
Tue, 15 Apr 2025 21:42:46 +0000 (07:12 +0930)
committerAlan Modra <amodra@gmail.com>
Fri, 18 Apr 2025 09:06:39 +0000 (18:36 +0930)
commitf04146a96be59b603ca36eac0bb4f244bc29c7af
treeb5e3bc49b3f60ae536908db0755d853f1e9c1856
parent637e0dfb04a6d3b0453c88f696ce053d978140e6
loongarch gas resolving constant expressions

The test added in commit 4fe96ddaf614 results in an asan complaint:
loongarch-parse.y:225:16: runtime error: left shift of negative value -1
To avoid the complaint, perform left shifts as unsigned (which gives
the same result on 2's complement machines).  Do the same for
addition, subtraction and multiplication.  Furthermore, warn on
divide/modulus by zero.
gas/config/loongarch-parse.y