Fix overflow detection in the Z80 assembler.
authorSergey Belyashov <sergey.belyashov@gmail.com>
Thu, 20 May 2021 15:14:10 +0000 (16:14 +0100)
committerNick Clifton <nickc@redhat.com>
Thu, 20 May 2021 15:14:10 +0000 (16:14 +0100)
commit9a01ec4c0368048fb5ea1ba1b3af9afbd651b529
tree03d54f33ce20121595129c3b59e1c9ef7aa0e238
parented3130b74053766de776a0d29176610c1bbbdc31
Fix overflow detection in the Z80 assembler.

 * config/tc-z80.c (emit_data_val): Warn on constant overflow.
 (signed_overflow): New function.
 (unsigned_overflow): New function.
 (is_overflow): Use new functions.
 (md_apply_fix): Use signed_overflow.
 * testsuite/gas/z80/ez80_adl_suf.d: Fix test.
 * testsuite/gas/z80/ez80_isuf.s: Likewise.
 * testsuite/gas/z80/ez80_z80_suf.d: Likewise.
gas/ChangeLog
gas/config/tc-z80.c
gas/testsuite/gas/z80/ez80_adl_suf.d
gas/testsuite/gas/z80/ez80_isuf.s
gas/testsuite/gas/z80/ez80_z80_suf.d