x86: off-by-1 in offset_in_range()
authorJan Beulich <jbeulich@suse.com>
Tue, 15 Jun 2021 05:58:18 +0000 (07:58 +0200)
committerJan Beulich <jbeulich@suse.com>
Tue, 15 Jun 2021 05:58:18 +0000 (07:58 +0200)
commit4fe51f7d3ce96953a62c493b8c2615f8577c0f11
treea08b7fc2f4a429a2e28c2f3b8769d5a3cb6af16a
parentcc0f96357e0b5bce4a1f02910cec2dd66e8990c5
x86: off-by-1 in offset_in_range()

Just like e.g. 0x10000 triggers a warning for size 2, -0x10000 ought to
as well.

Note that some of the encodings produced aren't ones one would expect,
and hence the generated code is not being checked for in the new
testcases.
gas/ChangeLog
gas/config/tc-i386.c
gas/testsuite/gas/i386/disp-imm-16.l [new file with mode: 0644]
gas/testsuite/gas/i386/disp-imm-16.s [new file with mode: 0644]
gas/testsuite/gas/i386/disp-imm-64.l [new file with mode: 0644]
gas/testsuite/gas/i386/disp-imm-64.s [new file with mode: 0644]
gas/testsuite/gas/i386/i386.exp