diff options
author | Paul Iannetta <piannetta@kalrayinc.com> | 2023-09-04 15:31:53 +0200 |
---|---|---|
committer | Paul Iannetta <piannetta@kalrayinc.com> | 2024-02-20 12:07:57 +0100 |
commit | 04e46d3bd9a2fff58de16af6b45f387b330bcd88 (patch) | |
tree | 6ea7c1b87baf77e245e8ec39f232727731500010 /gas/testsuite | |
parent | f1efdade946d7dab958c4ecbf5feea9aba01e280 (diff) | |
download | gdb-04e46d3bd9a2fff58de16af6b45f387b330bcd88.zip gdb-04e46d3bd9a2fff58de16af6b45f387b330bcd88.tar.gz gdb-04e46d3bd9a2fff58de16af6b45f387b330bcd88.tar.bz2 |
kvx: gas: fix the detection of negative powers of 2
The detection of negative powers of 2 was wrong and could lead to
well-formed bundles ending up taking more syllables than necessary.
gas/ChangeLog:
* config/kvx-parse.c (get_token_class): Use the signed value.
* testsuite/gas/kvx/np2-detection.d: New test.
* testsuite/gas/kvx/np2-detection.s: New test.
Diffstat (limited to 'gas/testsuite')
-rw-r--r-- | gas/testsuite/gas/kvx/np2-detection.d | 14 | ||||
-rw-r--r-- | gas/testsuite/gas/kvx/np2-detection.s | 5 |
2 files changed, 19 insertions, 0 deletions
diff --git a/gas/testsuite/gas/kvx/np2-detection.d b/gas/testsuite/gas/kvx/np2-detection.d new file mode 100644 index 0000000..b612277 --- /dev/null +++ b/gas/testsuite/gas/kvx/np2-detection.d @@ -0,0 +1,14 @@ +#as: -march=kv3-1 +#source: np2-detection.s +#objdump: -d + +.*\/np2-detection.o: file format elf64-kvx + + +Disassembly of section .text: + +0000000000000000 <.text>: + 0: 00 80 00 e1 addd \$r0 = \$r0, -512 \(0xfffffe00\) + 4: 00 00 00 e0 make \$r0 = 0 \(0x0\) + 8: c0 ff 00 e0 c0 ff 00 e0 ff ff df 97 make \$r0 = 9223372034707292159 \(0x7fffffff7fffffff\) + 14: ff ff ff 93 ff ff df 9f ff ff ff 1b make \$r0 = 9223372034707292159 \(0x7fffffff7fffffff\);; diff --git a/gas/testsuite/gas/kvx/np2-detection.s b/gas/testsuite/gas/kvx/np2-detection.s new file mode 100644 index 0000000..dfc3c26 --- /dev/null +++ b/gas/testsuite/gas/kvx/np2-detection.s @@ -0,0 +1,5 @@ + addd $r0 = $r0, -512 + make $r0 = 0x7fffffff7fffffff + make $r0 = 0x7fffffff7fffffff + make $r0 = 0 +;; |