diff options
author | Nick Clifton <nickc@redhat.com> | 2022-03-21 11:33:59 +0000 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2022-03-21 11:33:59 +0000 |
commit | a58b0053f4c4b4f0089f3985a41d0deac4c59ea4 (patch) | |
tree | 77300c440e286ed65190cf20f84189bf86b2a2c4 /gas/testsuite | |
parent | 1add37b567a7dee39d99f37b37802034c3fce9c4 (diff) | |
download | gdb-a58b0053f4c4b4f0089f3985a41d0deac4c59ea4.zip gdb-a58b0053f4c4b4f0089f3985a41d0deac4c59ea4.tar.gz gdb-a58b0053f4c4b4f0089f3985a41d0deac4c59ea4.tar.bz2 |
z80 assembler: Fix new unexpected overflow warning in v2.37
PR 28791
* config/tc-z80.c (emit_data_val): Do not warn about overlarge
constants generated by bit manipulation operators.
* testsuite/gas/z80/pr28791.s: New test source file.
* testsuite/gas/z80/pr28791.d: New test driver file.
Diffstat (limited to 'gas/testsuite')
-rw-r--r-- | gas/testsuite/gas/z80/pr28791.d | 16 | ||||
-rw-r--r-- | gas/testsuite/gas/z80/pr28791.s | 7 |
2 files changed, 23 insertions, 0 deletions
diff --git a/gas/testsuite/gas/z80/pr28791.d b/gas/testsuite/gas/z80/pr28791.d new file mode 100644 index 0000000..4351f1a --- /dev/null +++ b/gas/testsuite/gas/z80/pr28791.d @@ -0,0 +1,16 @@ +#as: -march=ez80 +#objdump: -d +#name: PR 28791: Do not complain about overlarge bit manipulated constants + +.*:.* + +Disassembly of section .text: + +0+ <.text>: +\s+0:\s+1e 19\s+ld e,0x19 +\s+2:\s+1e 1a\s+ld e,0x1a +\s+4:\s+1e e6\s+ld e,0xe6 +\s+6:\s+1e ff\s+ld e,0xff +\s+8:\s+1e 00\s+ld e,0x00 +\s+a:\s+1e f9\s+ld e,0xf9 +\s+c:\s+1e cb\s+ld e,0xcb diff --git a/gas/testsuite/gas/z80/pr28791.s b/gas/testsuite/gas/z80/pr28791.s new file mode 100644 index 0000000..bcfdbe5 --- /dev/null +++ b/gas/testsuite/gas/z80/pr28791.s @@ -0,0 +1,7 @@ +ld e, ~0xe6 +ld e, -0xe6 +ld e, 0xe6 +ld e, ~0 +ld e, !0xe6 +ld e, -7 +ld e, ~0x1234 |