commit | f04146a96be59b603ca36eac0bb4f244bc29c7af | [log] [tgz] |
---|---|---|
author | Alan Modra <amodra@gmail.com> | Wed Apr 16 07:12:46 2025 +0930 |
committer | Alan Modra <amodra@gmail.com> | Fri Apr 18 18:36:39 2025 +0930 |
tree | b5e3bc49b3f60ae536908db0755d853f1e9c1856 | |
parent | 637e0dfb04a6d3b0453c88f696ce053d978140e6 [diff] |
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.